You are not logged in.
I'm using LightDM and would like it to run startx or whatever's in my xinitrc so my dwm session can have time, wallpaper, etc. How would I go about doing this?
Offline
I'm not using LightDM and I'm a bit confused as https://wiki.archlinux.org/index.php/Xprofile says xinitrc is sourced by LightDM while https://wiki.archlinux.org/index.php/Li … _from_SLiM says to use xprofile.
Maybe you have to http://askubuntu.com/questions/77191/ho … d-sessions ?
Offline
I'm not using LightDM and I'm a bit confused as https://wiki.archlinux.org/index.php/Xprofile says xinitrc is sourced by LightDM while https://wiki.archlinux.org/index.php/Li … _from_SLiM says to use xprofile.
Maybe you have to http://askubuntu.com/questions/77191/ho … d-sessions ?
LightDM uses .desktops or whatever so I created my custom desktop session to select when logging in and pointed to /etc/X11/Xsession like the askubuntu says, and it didn't work. But I checked /etc/X11/Xsession and file doesn't even exist.
Offline
lightdm provides /etc/lightdm/Xsession.
Offline
You might also be interested in https://aur.archlinux.org/packages/xsession.desktop/
Offline
Ok let me clean this up. LightDM will indeed use the .desktop files in /usr/share/xsessions to start the session. It will also execute ~/.xprofile and that is what you should use. Any commands that you would normally put in your ~/.xinitrc you should put in your ~/.xprofile file instead and they will be started on login.
@karol thanks for pointing that out. I believe the wiki is in error there. I think it's referring to this (for LightDM):
# Run all system xinitrc shell scripts.
xinitdir="/etc/X11/xinit/xinitrc.d"
if [ -d "$xinitdir" ]; then
for script in $xinitdir/*; do
echo "Loading xinit script $script"
if [ -x "$script" -a ! -d "$script" ]; then
. "$script"
fi
done
fi
which starts scripts like 30-dbus.sh
But LightDM, GDM etc will definitely not run /etc/X11/xinit/xinitrc or ~/.xinitrc
Last edited by Chazza (2015-07-09 13:14:54)
Offline
Alternatively, its trivial to write your own 'dwm.desktop' file and put it in /usr/share/xsessions. From there you could then call any script you want! So you could have a script called 'run-dwm' somewhere which contains all the commands you would normally put in .xinitrc when running dwm via startx. Its nice and clean that way, and you get to use Lightdm's session selection menu.
Trying out a new wm (say bspwm...), just add a new .desktop file pointing to the right script and you're golden!
[Desktop Entry]
Type=XSession
Exec=/path/to/run-dwm
TryExec=/path/to/run-dwm
Name=Dwm
#!/bin/bash
## run-dwm
all your startup stuff, panels, xsetroot etc. goes here...
dwm 2> ~/.dwm.log
Beetles and bacteria are vastly more successful than humans in terms of survival.
Offline