neeasade / dotfiles

garden
http://noriceno.life
MIT License
383 stars 13 forks source link

xinitrc items don't start with lxdm #7

Closed neeasade closed 9 years ago

neeasade commented 9 years ago

https://wiki.archlinux.org/index.php/LXDE#Autostart

https://wiki.archlinux.org/index.php/Xprofile

moookino commented 9 years ago

Hi again, i've tryed this way, but still cannot get sxhkd to work. .config/lxsession/LXDE/autostart:

@/home/mur/.screenlayout/display.sh
@pcmanfm -d
@xrdb -load  /home/$USER/.Xresources
@/home/mur/.fehbg
@compton
@mpd ~/.config/mpd/mpd.conf
@[[ -z $(pgrep -xU $UID mpdcron) ]] && mpdcron
@xsetroot -cursor_name left_ptr
@. /home/mur/.bspwm_theme
@dunst -geometry 200x200-10-10 \
    -fn "$DUNST_FONT" \
    -lb "$defaultBG" -lf "$defaultFG" \
    -nb "$defaultBG" -nf "$defaultFG" \
    -cb "$defaultBG" -cf "#ffff00"
@rm /tmp/$(ls /tmp | grep bspwm)
@export SXHKD_SHELL=sh
@sxhkd -f 100 -c /home/$USER/.config/sxhkd/sxhkdrc
#@exec bspwm -c /home/$USER/.config/bspwm/bspwmrc > .xinit.log
neeasade commented 9 years ago

See, my thought is that the file .config/lxsession/LXDE/autostart is specific to lxde, not lxdm - do any of the other things start? maybe if you put in an @urxvt on one of the lines and see if that launches.

moookino commented 9 years ago

all other things start normally, tryed with tray, nm-applet and pa-applet in this conf

neeasade commented 9 years ago

did you try adding @urxvt to a line and seeing if it launches(and then launching sxhkd from the term)? alternatively if that does not work, after start, switch TTY's (ctrl + alt + f2) and login and start sxhkd and see what you get.

moookino commented 9 years ago

sorry, my fault, have duplicate this applets in both files, so lxdm read from xinitrc too, but sxhkd not working, when trying to kill and launch from terminal get socket error

neeasade commented 9 years ago

Okay, so I installed lxdm today and it appears to indeed be launching(xinit items, including sxhkd) htop

However, some things are off and programs aren't running with bash shell context. For example dmenu_run as called by keybind super + space skips my ~/bin/dmenu_run and runs dmenu_run without any flags. this also affects dunst colors and some panel colors, but everything appears functional to an extent. Will try some changes to ~/.x{profile,initrc} next.

neeasade commented 9 years ago

Alright now bspc commands are failing with the 'cannot connect to socket' - this would explain the sxhkd binds not working..

edit: So things are being launched from the xsession shell which is posix, and fails with bashisms - but this should be fine, because it's calling ~/.xprofile, which launches bash on ~/.xinitrc. But things appear to be failing from here(colors reaching panel specifically). Output of ps --forest from .Xprofile:

  PID TTY          TIME CMD
16855 ?        00:00:00 Xsession
16864 ?        00:00:00  \_ ps

explicitly sourcing $HOME/.bashrc to set scripts in the path(fix dzen and dmenu_run commands) in both xprofile and xinitrc does not work, though I have confirmed $HOME is is /home/neeasade. I also tried su $USER -c 'cat .xinitrc | grep -v "exec" | bash' as the .xprofile command. mehr.

neeasade commented 9 years ago

Okay, what causes bspc commands to fail with 'cannot connect to socket' is if you attempt to launch bspwm after it is already running. The funky thing is even if you point the BSPWM_SOCKET variable to the existing socket in /tmp/, bspc commands still fail and you are forced to exit with something akin to pkill bspwm.

neeasade commented 9 years ago

Alright so if I move my path changes to ~/.profile (as I probably should have long ago anyway) it works correctly. Unsure why sourcing .bashrc from .xinitrc didn't work, though. Committing soon, this was frustrating.