Click to See Complete Forum and Search --> : a little .xsession question
rickenbacherus
07-19-2003, 02:47 PM
I'm either not using the correct command to execute any of these or .xsession is wrong:
#!/bin/sh
if [ -e /usr/bin/xscreensaver ]; then
xscreensaver -no-splash &
fi
if [ -x /usr/bin/enlightenment ]
then exec enlightenment
elif [ -x /usr/bin/wmaker ]
then [ -d ~/GNUstep ] ||
wmaker.inst
exec wmaker
elif [ -x /usr/bin/icewm ]
then exec icewm
elif [ -x /usr/bin/blackbox ]
then exec blackbox
elif [ -x /usr/bin/fvwm2 ]
then exec fvwm2
fi
If I just do 'startx' , I get the default twm. How do you select one of these wm's from the cli?
startx blackbox
(nope)
startx /usr/bin/icewm
(nope)
Thanks
z0mbix
07-19-2003, 03:05 PM
if you are using startx to fire up X, you need to edit ~/.xinitrc. Add something like the following:
exec pekwm
rickenbacherus
07-19-2003, 03:20 PM
Thanks for the tip ZOmbix.
I created /home/rickenbacherus/.xinitrc and added
exec icewm
but startx gets me:
/home/rickenbacherus/.xinitrc line 1: exec: icewm: not found
Same with all of the other wm's Any ideas?
z0mbix
07-19-2003, 03:22 PM
it sound's like your PATH variable may be set incorrectly. What's the output of echo $PATH?
I suspect /usr/bin is missing, although that would be very odd.
3mta3
07-19-2003, 03:27 PM
Any time you make something that's needs to execute, don't forget to chmod +x it. :) That suggestion may not solve your immediate problem, but is nevertheless true.
z0mbix
07-19-2003, 03:30 PM
Originally posted by 3mta3
Any time you make something that's needs to execute, don't forget to chmod +x it. :) That suggestion may not solve your immediate problem, but is nevertheless true.
True, but the .xinitrc file does not need to be executable, just readable by the user.
rickenbacherus
07-19-2003, 03:36 PM
Yep- /usr/bin is in my path but still I get the same thing.
*scratching head*
mdwatts
07-19-2003, 04:05 PM
whereis icewm (only searches what is in your PATH)
locate icewm
See what you find.
3mta3
07-19-2003, 07:58 PM
Originally posted by z0mbix
True, but the .xinitrc file does not need to be executable, just readable by the user.
If you'll check rickenbacherus' post, you'll see that he asked about his .xsession.
From the Xsession manpage:
/etc/X11/Xsession is a Bourne shell (sh(1)) script which is run every time an X Window System session is begun by startx(1) or a display manager such as xdm(1). (Some display managers only invoke Xsession when specifically directed to so by the user; see the documentation for your display manager to find out more.) Administrators unfamilar with the Bourne shell will likely find the Xsession.options(5) configuration file easier to deal with than Xsession itself.
The manpage refers to /etc/X11/Xsession, but ~/.xsession is the same thing. It's just made for a user to customize his/her own.
The #!/bin/sh on the first line is also a pretty good clue that it needs to be executable.
You are correct about ~/.xinitrc though, and I felt that probably was the solution to the problem. I just thought it noteworthy to mention that it needed to be executable because that's a common gotcha. :)