LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-01-2003, 02:46 AM   #1
shenlong
LQ Newbie
 
Registered: Feb 2003
Posts: 18

Rep: Reputation: 0
SLackware 9.0 login problems


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!

Last edited by shenlong; 04-01-2003 at 02:48 AM.
 
Old 04-01-2003, 08:09 PM   #2
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 46
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.

Perhaps it will help you solve your problem.
 
Old 04-02-2003, 03:37 AM   #3
shenlong
LQ Newbie
 
Registered: Feb 2003
Posts: 18

Original Poster
Rep: Reputation: 0
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.
 
Old 04-02-2003, 04:21 AM   #4
notAcoolNick
Member
 
Registered: Apr 2003
Location: Oxford, MA, USA
Distribution: Slackware
Posts: 89

Rep: Reputation: 16
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
 
Old 04-02-2003, 06:20 AM   #5
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 46
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.
 
Old 04-02-2003, 06:45 PM   #6
notAcoolNick
Member
 
Registered: Apr 2003
Location: Oxford, MA, USA
Distribution: Slackware
Posts: 89

Rep: Reputation: 16
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
 
Old 04-03-2003, 10:31 AM   #7
shenlong
LQ Newbie
 
Registered: Feb 2003
Posts: 18

Original Poster
Rep: Reputation: 0
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).

what do you think is the problem?
 
Old 04-03-2003, 02:00 PM   #8
bilbod
Member
 
Registered: Mar 2003
Posts: 134

Rep: Reputation: 33
Hi shenlong ,

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.

Bill
 
Old 04-03-2003, 10:21 PM   #9
shenlong
LQ Newbie
 
Registered: Feb 2003
Posts: 18

Original Poster
Rep: Reputation: 0
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

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap

# merge in defaults and keymaps

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 a particular session type was requested in $1, start that session:
case "$1" in
failsafe)
xsetroot -solid SteelBlue
exec xterm -geometry 80x24-0-0
;;
kde)
exec startkde
;;
gnome)
exec gnome-session
;;
openwin)
exec olvwm
;;
fvwm2)
xsetroot -solid SteelBlue
exec fvwm2
;;
fvwm95)
xsetroot -solid SteelBlue
exec fvwm95
;;
blackbox)
exec blackbox
;;
xfce)
exec /etc/X11/xinit/xinitrc.xfce
;;
windowmaker)
exec /etc/X11/xinit/xinitrc.wmaker
;;
afterstep)
exec afterstep
;;
enlightenment)
exec enlightenment
;;
twm)
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#xterm -geometry 80x66+0+0 -name login &
xsetroot -solid SteelBlue
exec twm
;;
xpde)
exec -l $SHELL -c "/etc/X11/xinit/xinitrc.xpde"
;;
esac

# 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
 
Old 04-03-2003, 10:53 PM   #10
bilbod
Member
 
Registered: Mar 2003
Posts: 134

Rep: Reputation: 33
Hi shenlong,

I am not a bash expert but your XSession script looks OK.

Look in your kdmrc file for a line like this:

SessionTypes=KDE,GNOME,WindowMaker,BlackBox,XFce,IceWM,failsafe,default,

For each item in this list you need an entry in the case statemant that matches.

Once you verify that, and the problem still exists try running xinitrc.gnome from the command line to see if that works.

Bill
 
Old 04-04-2003, 12:08 AM   #11
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 46
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.
 
Old 04-05-2003, 09:07 AM   #12
shenlong
LQ Newbie
 
Registered: Feb 2003
Posts: 18

Original Poster
Rep: Reputation: 0
i finally got it fixed! it turns out the culprit was the ".profile" file created by the StarOffice installation.

many thanks to everyone who helped!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic login slackware 8.1 hack124x768 Linux - Software 1 03-04-2005 06:30 AM
Login Screen and Login Photo problems? host Linux - Software 0 02-21-2005 06:56 AM
KDE login problems for users on Slackware 9.1 fishbulb Slackware 1 11-26-2003 03:51 AM
Slackware login failure nutz Linux - Software 3 11-25-2003 03:18 PM
Slackware 9.1 Live CD #2: what is the login? andrewstr Slackware 8 11-01-2003 07:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration