Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

xstartup is nothing else than a shell script (note the #!/bin/sh in the fist line).

if [ -x /etc/X11/xinit/xinitrc ]; then
  exec /etc/X11/xinit/xinitrc
fi

If the file /etc/X11/xinit/xinitrc exists AND has the executable bit, run it. If the +x bit is not set, don't run.

if [ -f /etc/X11/xinit/xinitrc ]; then
  exec sh /etc/X11/xinit/xinitrc
fi

If the file /etc/X11/xinit/xinitrc exist AND is a regular file, execute it by using the sh shell. As you have noted, if the file exists, it's a regular file and also has executable bit, it would be execute twice.

xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

Start a xterm window - a barebones terminal which is used by many Xorg packages:

# whereis xterm
xterm: /usr/bin/xterm /usr/share/man/man1/xterm.1.gz
# rpm -qf /usr/bin/xterm
xterm-303-1.fc21.i686
# repoquery --whatrequires xterm
9wm-0:1.2-7.fc20.i686
awesome-0:3.5.5-1.fc21.i686
cairo-dock-core-0:3.2.1-2.fc20.i686
clusterssh-0:4.02.03-1.fc21.noarch
codeblocks-0:13.12-3.fc21.i686
ddd-0:3.3.12-16.fc21.i686
dwm-0:6.0-8.fc21.i686
fvwm-0:2.6.5-6.fc20.i686
gmrun-0:0.9.2-30.fc20.i686
icewm-0:1.3.8-1.fc21.i686
jwm-0:2.2.0-1.fc21.i686
kdbg-1:2.5.4-1.fc21.i686
m2vmp2cut-0:0.86-2.fc19.i686
musca-0:0.9.24-7.fc20.i686
rasmol-0:2.7.5.2-2.fc21.i686
slim-0:1.3.6-1.fc21.i686
snotes-0:1.0-3.fc20.noarch
spectrwm-0:2.5.0-1.fc21.i686
streamtuner-0:2.0.8-12.fc20.noarch
surf-0:0.6-2.fc20.i686
tn5250-0:0.17.4-10.fc21.i686
uzbl-defaults-0:0-0.33.20120514git228bc38cbd.fc20.i686
wmx-0:7-12.20120109svn.fc20.i686
xmined-0:2013.23-2.fc21.i686
xmonad-basic-0:0.11-9.fc21.i686
xzgv-0:0.9.1-8.fc20.i686

And about the last lines:

twm &   
exec gnome-session &
exec /usr/bin/startkde &

Yeah, there's no point trying to run three desktop environments. This xstartup seems a skeleton you (or any application using it) need to modify.

twm is a very tiny window manager - here you have a screenshot which also shows xterm:

twm window manager

It was the standard "back in the day" - if you give Gentoo a try and follow its X installation, that's what you get before installing a modern window manager :)