aboutsummaryrefslogtreecommitdiff
path: root/x
diff options
context:
space:
mode:
Diffstat (limited to 'x')
-rw-r--r--x/xprofile3
-rw-r--r--x/xsession.sh18
-rw-r--r--x/xsessionrc13
3 files changed, 20 insertions, 14 deletions
diff --git a/x/xprofile b/x/xprofile
deleted file mode 100644
index 1750c70b..00000000
--- a/x/xprofile
+++ /dev/null
@@ -1,3 +0,0 @@
-# Read ~/.profile to set up environment when starting X with a display manager
-# like LightDM, since we didn't have a TTY login arrange that already
-. "$HOME"/.profile
diff --git a/x/xsession.sh b/x/xsession.sh
index e0552315..3e2e468d 100644
--- a/x/xsession.sh
+++ b/x/xsession.sh
@@ -46,16 +46,14 @@ xset \
# log the failed attempt to start them to the errors file, as a hint that
# I might want to install them.
#
-(
- # Display compositor
- compton
- # Message display (libnotify)
- dunst
- # PulseAudio system tray tool
- pasystray
- # Hide mouse after inactivity
- unclutter
-) &
+## Display compositor
+compton &
+## Message display (libnotify)
+dunst &
+## PulseAudio system tray tool
+pasystray &
+## Hide mouse after inactivity
+unclutter &
# Load all supplementary scripts in ~/.xsession.d
for sh in "$HOME"/.xsession.d/*.sh ; do
diff --git a/x/xsessionrc b/x/xsessionrc
index 48f2a725..8d46ed0b 100644
--- a/x/xsessionrc
+++ b/x/xsessionrc
@@ -1,5 +1,16 @@
# X startup commands go in here if they should run on every X session, whether
-# classic `startx` or a modern DE like LightDM
+# classic `startx` or a modern DE like LightDM. xsessionrc is a dpkg-specific
+# file.
+#
+
+# If $ENV isn't set, then this X startup process wasn't started from somewhere
+# beneath a login shell that sources ~/.profile to set up environment variables
+# yet, most likely because it's being opened by a display manager, so we'll do
+# it here.
+#
+if [ -z "$ENV" ] ; then
+ . "$HOME"/.profile
+fi
# Update BROWSER, since .profile has already set this to a curses browser
# shellcheck disable=SC2034