You are not logged in.

#1 2015-01-31 12:27:45

Paingiver
Member
Registered: 2008-03-01
Posts: 83

[SOLVED]Xinitrc vs WM Start File

I am logging through TTY and using startx to open PEKWM.  You can use both .xinitrc and PekWM's start file for starting programs. But which one to use?

My current setup is:

Xinitrc:

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

xrdb -merge ~/.Xresources       # update x resources db
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) # for gnome-keyring
export SSH_AUTH_SOCK # for gnome-keyring
setxkbmap -option caps:escape   # assign caps-lock to escape
syndaemon -t -k -i 2 -d         # disable touchpad 2 seconds while typing
xbindkeys &
exec pekwm

PekWM's start file:

tint2 &
nm-applet &
cbatticon &
volti &
volnoti &

Last edited by Paingiver (2015-02-01 22:56:38)

Offline

#2 2015-01-31 13:13:13

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,422
Website

Re: [SOLVED]Xinitrc vs WM Start File

Doesn't really matter, I'd just keep them in one place.


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#3 2015-01-31 17:28:41

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED]Xinitrc vs WM Start File

I would use .xinitrc because PekWM's start file is re-run if you use the "restart" option in the PekWM menu -- you will then have multiple instances of the startup programs running.


Jin, Jîyan, Azadî

Offline

#4 2015-01-31 18:14:01

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED]Xinitrc vs WM Start File

I use Openbox. If it's generic for X then I put it in "~/.xinitrc" (xset, xrandr, setxkbmap, xsetroot, autocutsel...) and if it's specific to Openbox then I put it in "~/.config/openbox/autostart" (setting wallpaper, conky, thunar and urxvt daemons...).

Offline

#5 2015-02-01 13:50:22

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,422
Website

Re: [SOLVED]Xinitrc vs WM Start File

Head_on_a_Stick wrote:

I would use .xinitrc because PekWM's start file is re-run if you use the "restart" option in the PekWM menu -- you will then have multiple instances of the startup programs running.

Good point.. in i3 you have to use "exec_always" instead of "exec" for this so I wrongly assumed similar behaviour in PekWM.

Anyway, apps in .xinitrc may also be re-run (if not killed properly on logout), so I have this little function:

run() { pgrep >/dev/null "$1" || "$@" & }

(adapted from here)

edit: horrible, horrible typos.

Last edited by Alad (2015-02-04 09:06:22)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#6 2015-02-01 17:51:07

Paingiver
Member
Registered: 2008-03-01
Posts: 83

Re: [SOLVED]Xinitrc vs WM Start File

Alad wrote:

Doesn't really matter, I'd just keep them in one place.

I put the ones in PekWM start file to .Xinitrc and now they are not starting.

Offline

#7 2015-02-01 17:55:37

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED]Xinitrc vs WM Start File

Paingiver wrote:

I put the ones in PekWM start file to .Xinitrc and now they are not starting.

Post your ~/.xinitrc -- I'm guessing you've put them after the `exec pekwm` bit...
https://wiki.archlinux.org/index.php/Xinitrc


Jin, Jîyan, Azadî

Offline

#8 2015-02-01 17:55:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: [SOLVED]Xinitrc vs WM Start File

If you share that file with us we might actually be able to help (you've been around these forums long enough to know how to post).  My first guess would be that you've put them after the exec line.  This will not work.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2015-02-01 22:09:37

Paingiver
Member
Registered: 2008-03-01
Posts: 83

Re: [SOLVED]Xinitrc vs WM Start File

Thanks guys. Yes it was after exec line. I've naively thought some programs like tint2 must run after the window manager starts. Now the .xinitrc is:

xrdb -merge ~/.Xresources	# update x resources db
# Following 2 lines is to use gnome-keyring
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
setxkbmap -option caps:escape	# assign caps-lock to escape
syndaemon -t -k -i 2 -d 	# disable touchpad 2 seconds while typing
xbindkeys &
tint2 &
nm-applet &
cbatticon &
volti &
volnoti &
exec pekwm

Last edited by Paingiver (2015-02-02 16:02:30)

Offline

Board footer

Powered by FluxBB