SlackwareThis Forum is for the discussion of Slackware 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.
i'm new to slackware and i have this weird problem when logging in.
i setup my system to use KDM as the login manager. it worked perfectly, or so i thought. when i tried to log in to GNOME (or any wm other KDE), it still starts KDE! i thought it was a kdm problem, so i switched to GDM, but the same thing happened. Please help!
If the wm's were actually installed then they should run. I have a Slack 9.0 system that I switched from the default gdm login manager back to kdm like prior versions. I was able to login to KDE, GNome, and Windowmaker I think it was. I am fairly certain that I was able to use KDE and GNome from the default gdm config.
Perhaps it was the method you used to get the kdm or gdm to run. On my system, I modified /etc/inittab and changed the default run level from 3 to 4. Then I modified the /etc/rc.d/rc.4 script to execute kdm before gdm.
actually, i did exactly the same thing. and i am absolutely certain that i installed all the WMs. i tried reinstalling from scratch, but the samething happened. on the VERY first login, though, i was able to enter GNOME. but on all succeeding sessions (after i logged into KDE), KDE kept popping up regardless of what WM i chose. This is downright weird.
I never used any *dm but my suggestion would be just to edit (or create (if you do not have one) your own ~/.xinitrc. Or just symlink (ln -s) one of those:
$ ls -1 /etc/X11/xinit
xinitrc.e
xinitrc.fvwm2
xinitrc.fvwm95
xinitrc.gnome
xinitrc.kde
xinitrc.sawfish
xinitrc.twm
xinitrc.wmaker
xinitrc.xfce
Then I think I would switch back to runlevel 3 for testing purposes. Use startx and see which wm starts up. Log back out and run xwmconfig and change the default wm to another. Then run startx again and see if it will run. Continue untill all the wm's are verified that you desire. If they all work properly then you know fairly certian that it is a kdm or gdm problem.
From a quick look at my files it looks like they might use the ~/.wmrc and the ~/.xinitrc files to pass the conrtol. From runlevel 4, gdm or kdm. select to run gnome and when kde starts up, look at these two files and see what they contain.
If you are loging in as a normal user then you might want to check for root. Maybe a permission issue or something.
I agree with Excalibur. Even if you have *dm running you can always switch to another virtual console and login in the text mode and use startx to start whatever windowmanager is chosen in your own .xnitrc or systemwide xinitrc script.
Also, again I don't use *dm but you might also want to look at ~/.xsession file. I have vague recollections that in case if you use *dm a lot of X related stuff is controlled by ~/.xsession
i tried running xwmconfig, and i found out that gdm/gdm logs in to the default wm regardless of what i choose in the login menu.
the odd thing is that, when i created a new user account, the new account could properly go into any wm using the kdm/gdm menu. so, my problem only seems to affect root. and i also think that my XSession file is OK.
problem is, i prefer to always run as root to do away with the permission stuff (i'm the only person in the house who uses linux, anyway).
The XSession file that kdm uses is specified in /opt/kde/share/config/kdm/kdmrc
The default is the XSession file in the same directory which is a link to /etc/X11/xdm/XSession
there is a section for gnome like this
gnome)
exec gnome-session
;;
I had this happen once-> I put GNOME in capital letters in kdmrc and I got the default because the shell script is case sensitive. Also, I have been unable to add a wm with the KDE login config tool alone. I always have to add it to the XSession script by hand.
i don't see anything wrong with my Xsession file, but here it is, anyway, maybe you guys will find something:
#!/bin/sh
# $XConsortium: Xsession /main/10 1995/12/18 18:21:28 gildea $
#
#
# $XFree86: xc/programs/xdm/config/Xsession,v 1.2 1998/01/11 03:48:32 dawes Exp $
# Modified for Slackware-3.5, 28-Mar-98 volkerdi
# Extensively rewritten for Slackware 7.0, 03-Oct-1999 volkerdi
# Patched to give priority to $HOME/.xsession, 10-Oct-1999 volkerdi
# Merged changes into upstream (XFree86-4.0.2) version, 17-Feb-2001 volkerdi
# Fixes for $PATH (from Jim Diamond), GDM/KDM/XDM, 2003-02-07 volkerdi
# redirect errors to a file in user's home directory if we can
for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
do
if ( cp /dev/null "$errfile" 2> /dev/null )
then
chmod 600 "$errfile"
exec > "$errfile" 2>&1
break
fi
done
if [ -r $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -r $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -r $userresources ]; then
xrdb -merge $userresources
fi
if [ -r $usermodmap ]; then
xmodmap $usermodmap
fi
# Since xdm doesn't run a bash -login shell (or any other login shell)
# we should source these files to set up the user's environment.
profile=/etc/profile
userprofile=~/.profile
if [ -r $profile ]; then
source $profile 1> /dev/null 2> /dev/null
fi
if [ -r $userprofile ]; then
source $userprofile 1> /dev/null 2> /dev/null
fi
# Set the $PATH through the user's preferred shell.
case `basename "$SHELL"` in
bash|sh|ash)
PATH="`( echo 'echo $PATH' | bash --login ) | tail -1`"
;;
csh|tcsh)
PATH="`( echo 'echo $PATH' | tcsh -l ) | tail -1`"
;;
ksh)
PATH="`( cat /etc/profile ; echo 'echo $PATH' ) | ksh | tail -1`"
;;
zsh)
PATH="`( echo 'echo $PATH' | zsh -l ) | tail -1`"
;;
*)
# We don't know your shell, so we'll set up reasonable defaults.
if [ "`whoami`" = "root" ]; then
PATH=$PATH:/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin
else
PATH=$PATH:/usr/local/bin:/bin:/usr/bin
fi
;;
esac
# These files (if they exist) are used to set up the X related environment. We used to
# exec .xsession at this location, but that can interfere with choosing a session type
# through XDM/KDM/GDM so it was moved to after a requested session is started. Since
# that means that .xsession might never be run at all when using XDM/KDM/GDM, support
# for the xprofile was added to allow a way for the user to customize the X environment.
if [ -r /etc/xprofile ]; then
source /etc/xprofile
fi
if [ -r ~/.xprofile ]; then
source ~/.xprofile
fi
# Some people say that an .xsession file should always be given priority, even if a
# different window manager was requested in $1. If you want that behavior, uncomment
# the lines below. This is not recommended (nor, in general, is the use of an
# .xsession file as a default... it should be left for the advanced users).
#if [ -x $HOME/.xsession ]; then
# exec $HOME/.xsession $@
#fi
# If we aren't running from XDM/KDM/GDM and no window manager was
# specified, then we'll run the user's $HOME/.xsession if it's
# executable. This must be set up to run the user's window manager.
if [ -x $HOME/.xsession ]; then
exec $HOME/.xsession $@
fi
# If the user doesn't have their own xsession and none was specified in
# $1, then run the system default session type:
if [ -r /etc/X11/xinit/xinitrc ]; then
exec /etc/X11/xinit/xinitrc
fi
# If a $startup variable is set to define the window or session manager,
# then run that:
if [ -s "$startup" -a -x "$startup" ]; then
exec "$startup"
else
if [ -r "$resources" ]; then
xrdb -load "$resources"
fi
# Run xsm as a failsafe.
exec xsm
fi
The script above looks identical to my copy and you also know that it works for a normal user. Since the problem appears to be restricted to root only. Perhaps doing this might help to isolate where the problem is.
After booting and with the kdm/gdm login screen visible. Press [ctrl][alt][f6] for the tty6 login prompt. Then login as root in console mode and at the prompt then;
mv root root.orig
mkdir root
Then press [ctrl][alt][f7] to return to kdm/gdm and login as root to a desired wm. If it works as desired, then the problem is in the root home directory. If not, then the problem is in the system defaults for root somewhere.
To return the root directory back to normal, logout of the wm and return to kdm/gdm. Return to tty6 console as before. You should still be logged in if you haven't rebooted.
rm -r root
mv root.orig root
logout
Press [ctrl][alt][f7] to return to kdm/gdm as normal.
If problem is isolated to the root directory, then look for and review any .xinitrc, .xsession or practically any .x* type file. I would think all of them could be moved to a subdirectory and see if removing them out of the way resolves the issue.
mkdir /root/xfiles
mv /root/.x* /root/xfiles
Then see if that helps resolve the issue. I am leaning in this direction of the root directory because the problem only effects root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.