| mydm(5) | File Formats Manual | mydm(5) |
#!/bin/sh #/option
The following options are supported:
#/xsession
Users must be aware that session startup is usually quite involved and does a lot of things behind the scenes about which ordinary users are often unaware. These things must be manually replicated in session scripts. The most common ones are:
When in doubt, users are adviced to check the documentation of their Operating System distributions.
#!/bin/bash #/xsession export XDG_CURRENT_DESKTOP=somewm export XDG_SESSION_TYPE=x11 xrdb -merge "$HOME/.Xresources" dbus-update-activation-environment --verbose --systemd --all systemctl --user import-environment exec /usr/bin/dbus-launch /usr/bin/x-window-manager
#!/bin/bash
source "${HOME}/.env"
source "${HOME}/.activate-dbus-environment
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_TYPE=wayland
dbus-update-activation-environment --verbose --systemd --all
systemctl --user unset-environment SWAYSOCK I3SOCK WAYLAND_DISPLAY DISPLAY
systemctl --user import-environment
exec /usr/bin/dbus-launch /usr/bin/sway
#!/bin/bash
#/xsession
# user-session socket has already been set up
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && \
[ -n "$XDG_RUNTIME_DIR" ] && \
[ "$XDG_RUNTIME_DIR" = "/run/user/`id -u`" ] && \
[ -S "$XDG_RUNTIME_DIR/bus" ]; then
DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
export DBUS_SESSION_BUS_ADDRESS
fi
dbus-update-activation-environment --verbose --systemd \
DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
# launch dbus if it isn't launched yet
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
eval $(/usr/bin/dbus-launch --exit-with-session --sh-syntax)
fi
# unset unnecessary env variables safely in a subshell and export environment
# to dbus
if [ -n "$DBUS_SESSION_BUS_ADDRESS" ]; then
(
unset XDG_SEAT
unset XDG_SESSION_ID
unset XDG_VTNR
dbus-update-activation-environment --verbose --systemd --all
)
fi
# dbus-update-activation-environment --systemd works only if systemd --user is
# available on dbus
systemctl --user import-environment
exec /usr/bin/x-window-manager
Source code: https://git.goral.net.pl/mydm.git
| 2024-05-10 |