Only 1 choice as x-session-manager alternatives, but it's the wrong one.
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Only 1 choice as x-session-manager alternatives, but it's the wrong one.
Okay, I still kind of consider myself a Debian and I have to admit I haven't totally read ALL the RTFM's related to this, but here is the problem:
More than once now I have installed a new window manager (this time it is XFCE-4) and it puts and entry in x-session-manager alternatives (where in this case there wasn't one before, I only had fluxbox on this system), and it overrides my selection in x-window-manager alternatives (which I have now selected back to fluxbox), and runs XFCE-4 anyway when I "startx". Because there is only one entry in x-session-manager, I can't select anything else. I guess I would kind of like to be able to select "none", which must have been what I had before I installed XFCE-4.
I have to admit that I still don't understand the concept behind an x-session manager anyway other than it seems to chose which program runs if you choose to do the xdm/gdm/kdm style graphical login from bootup. This particular system was using none of these because most of the time it is in console mode only. X is present mostly for rare times when I want to browse the net with it, and I simply do a "startx" to get there.
Type 'update-alternatives --config x-session-manager' in a terminal and see if you see any selection of choices. Otherwise, you may have to run /usr/bin/xfce4_setup.
Last edited by the_shaman; 09-19-2004 at 12:54 AM.
I think that the "update-alternatives --config x-window-manager" and "update-alternatives --config x-session-manager" commands are meant to configure the default settings for X sessions that are started from a GUI login (KDM, GDM, XDM, WDM, or Login.app).
To set a default WM/DE when using the "startx" command from the console, you need to create a .xinitrc file into your home directory ("nano .xinitrc"). At its simplest this .xinitrc file can contain only a single line -- for example, to define fluxbox as the default WM (that will be launched every time you use the "startx" command in the console) this single line would be:
Code:
exec fluxbox
When you've got some time to kill, point your Midnight Commander to Debian's XFree86 documentation ("mc /usr/share/doc/xfree86-common") and read the FAQ to learn more.
ah yeah Dead Parrot is right, the 'update-alternatives --config x-window-session' command is for use with a graphical display manager indeed. Running /usr/bin/xfce4_setup will however generate just such a xinitrc in your /etc/X11/xfce4/ but that is a global thingy. Contents of such a file is as follow:
Code:
#!/bin/sh
xsetroot -solid black -cursor_name watch
# fix broken $UID on some system...
if test "x$UID" = "x"; then
UID=`id -u`
fi
# Those are my settings, change them as appropriate...
# Xft DPI: 96
# Xft.hintstyle: hintnone/hintslight/hintmedium/hintfull
# Xft hinting: 1/0
xrdb -nocpp -merge - << EOF
Xft.dpi: 96
Xft.hinting: 1
Xft.hintstyle: hintmedium
EOF
test -f $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
# Uncomment this if you want to load Xresources and/or Xdefaults
# test -f $HOME/.Xresources && xrdb -merge $HOME/.Xresources
# test -f $HOME/.Xdefaults && xrdb -merge $HOME/.Xdefaults
# Launch xscreensaver (if available), but only as non-root user
test $UID -gt 0 && test -z $VNCSESSION && xscreensaver -no-splash &
# Run xfce4-session if installed
xfcesm=`which xfce4-session`
case "x$xfcesm" in
x|xno*)
;;
*)
exec $xfcesm
# Shouldn't get there, but anyway...
exit
;;
esac
# or use old-fashioned startup script otherwise
xfce-mcs-manager
xfwm4 --daemon
# Start-up stuff from ~/Desktop/Autostart directory, if it exists
# (as it seems to be the new standard)
if test -d "$HOME/Desktop/Autostart"; then
for i in `ls -1 -L ${HOME}/Desktop/Autostart/ 2>/dev/null`; do
if test -x $HOME/Desktop/Autostart/$i; then
$HOME/Desktop/Autostart/$i &
fi
done
fi
xftaskbar4&
xfdesktop&
xfcalendar&
panel=`which xfce4-panel`
case "x$panel" in
x|xno*)
;;
*)
$panel
ret=$?
while test $ret -ne 0; do
xmessage -center -file - -timeout 20 -title Error <<EOF
A crash occured in the panel
Please report this to the xfce4-dev@moongroup.com list
Meanwhile the panel will be restarted
EOF
cat >&2 <<EOF
A crash occured in the panel
Please report this to the xfce4-dev@moongroup.com list
Meanwhile the panel will be restarted
EOF
$panel
ret=$?
done
;;
esac
xsetroot -bg white -fg red -solid black -cursor_name watch
if you use startx and want to start XFCE4 by default
with your favorite editor:
#vim /home/your_name/.xinitrc
copy/paste this
#!/bin/sh
xhost +localhost
#exec fluxbox
exec xfce4-session
save/exit
logout/login
just remember that the UNCOMMENTED line will be the wm starting, IOW, if later on, you change your mind, comment the xfce4 line and uncomment the fluxbox line, then, Fluxbox will start.
I didn't actually have local .xinitrc so I made one, and that worked.
So where is this set globally? It seems that /etc/X11/xinit/xinitrc calls /etc/X11/Xsession, which then looks all over the place for configuration files, which is rather tedious to track down. An example of why I still speak kindly of Slackware.
Is manually editing your .xinitrc file the "correct" Debian way to do this or will it later confuse packaging and configuration tools?
Originally posted by macondo "Is manually editing your .xinitrc file the "correct" Debian way to do this or will it later confuse packaging and configuration tools?"
Debian is civilized and professional, they do things right.
I'm not sure I'd go that far, but they do seem to be going the direction I like, with all the back-end infrastructure like the packaging tools, "alternatives", "menu" updater, initrd rebuilder, deborphan (what ever happened to the "orphaner" front end to this?), and such. I really like being able to easily build up a customized, tight, lean system from a base install that has only what I need but where everything works, the being able to keep it up-to-date with only minimal grief.
Debian (and some of its derivatives) seems to be the only family Linux distributions where you really only do have to install once. I think I still have every Debian installation I ever installed. I can't even count how may RHs, Mandrakes, Slackwares, etc. I've gone through to keep an up-to-date system. (I still really like Slack however, It is what I am typing this on presently) ReInstalling gets to be a drag at times, kind of like MS Windows.
Ah very nice. I copied the whole thing into a local text file. I do think there is some lacking tutorials on Debian specific post install procedures. It seems there is a "proper" debian way to do most everything, it's just not always obvious or easy to find.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.