LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Failed to execute login command (http://www.linuxquestions.org/questions/slackware-14/failed-to-execute-login-command-4175458111/)

JWJones 04-14-2013 10:56 AM

Failed to execute login command
 
I have installed Slackware with Xfce on my ThinkPad T61, setup a user account, configured my Xfce desktop the way I wanted it, etc.

Then, as root, I went over to SlackBuilds and installed SLiM, flash-plugin, and Dropbox. Everything installed and is working fine.

However, now I cannot login with my user account, I get this message at the SLiM login screen:

"Failed to execute login command"

So, what did I break, and how do I fix it?

JWJones 04-14-2013 08:21 PM

Update: I deleted the user account from root, and created a new user account, but attempting to login to the new user account yielded the same result. Puzzled...

STDOUBT 04-14-2013 08:24 PM

I haven't used SLiM, but I've read that deleting your ~/.Xauthority file then logging out and back in (from the console) will fix that, but mind you, that info came from a quick googal search. Also, if you've altered your /etc/hosts file, that might be affecting SLiM.
Probably more of a SLiM problem than a Slackware or even a DE issue, although XFCE can be finicky about things.

yenn 04-14-2013 09:25 PM

Are you able to login as new user and start Xorg manually from console? Could you post content of ~/.xinitrc?

I'm using SLiM and only encountered "Failed to execute login command" when stopping or restarting computer via SLiM, in which case it really doesn't matter.

JWJones 04-14-2013 10:06 PM

Quote:

Originally Posted by STDOUBT (Post 4931588)
I haven't used SLiM, but I've read that deleting your ~/.Xauthority file then logging out and back in (from the console) will fix that, but mind you, that info came from a quick googal search. Also, if you've altered your /etc/hosts file, that might be affecting SLiM.
Probably more of a SLiM problem than a Slackware or even a DE issue, although XFCE can be finicky about things.

Confirmed: the problem is SLiM. I removed SLiM from my rc.4, thereby reverting to XDM, and was able to login as user. Oh well, it looks like there are lots of cool configuration options for XDM, too, so I guess I'll check that out.

slack_rick 04-14-2013 10:15 PM

I would just delete ~.xinitrc

and make a new one.

nano .xinitrc
#!/bin/sh

#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

exec startxfce4

JWJones 04-14-2013 10:29 PM

Quote:

Originally Posted by yenn (Post 4931606)
Are you able to login as new user and start Xorg manually from console? Could you post content of ~/.xinitrc?

I'm using SLiM and only encountered "Failed to execute login command" when stopping or restarting computer via SLiM, in which case it really doesn't matter.

This may be a moot point now, but here it is:

Code:

#!/bin/sh
#  xinitrc.xfce - modified to work around xfce4session bug
#                https://bugzilla.xfce.org/show_bug.cgi?id=8841


########################################################################
##  Merge in defaults and keymaps                                    ##
########################################################################

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

if [ -f $sysresources ]; then
    /usr/bin/xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    /usr/bin/xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    /usr/bin/xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    /usr/bin/xmodmap $usermodmap
fi

########################################################################
##  Start xfce Desktop Environment                                    ##
########################################################################

if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
  exec ck-launch-session dbus-launch --exit-with-session /usr/bin/startxfce4
else
  exec dbus-launch --exit-with-session /usr/bin/startxfce4
fi


JWJones 04-14-2013 11:19 PM

Quote:

Originally Posted by slack_rick (Post 4931621)
I would just delete ~.xinitrc

and make a new one.

nano .xinitrc
#!/bin/sh

#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

exec startxfce4

I did try this, after adding SLiM back into rc.4, but it didn't work.

GazL 04-15-2013 03:46 AM

Code:

if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
  exec ck-launch-session dbus-launch --exit-with-session /usr/bin/startxfce4
else
  exec dbus-launch --exit-with-session /usr/bin/startxfce4
fi

That kind of construct where you use dbus-launch to exec the environment's start script has proven unreliable in the past.
I prefer to add the following to the start<whatever> script and remove the dbus-launch from the xinitrc.
Code:

  if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
      eval `dbus-launch --sh-syntax --exit-with-session`
  fi

Note: you can't just add the above to the xinitrc itself because it needs to be run within the session started by ck-launch-session


In the case of xfce4, /etc/xdg/xfce4/xinitrc will start dbus anyway so the dbus-launch in xinitrc.xfce is redundant.

I'd be inclined to replace that section with:
Code:

if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
  exec ck-launch-session /usr/bin/startxfce4
else
  exec /usr/bin/startxfce4
fi

This may or may not have any bearing on your problem, but it's one less thing that could go wrong.


P.S. If SLIM is anything like XDM it may be running .xsession rather than .xinitrc, so you need to make sure you know which file it is running.

JWJones 04-15-2013 07:11 AM

Thanks, GazL, I will check that out when I get the chance. I'm going to mark this as SOLVED for now, as SLiM was clearly the problem, and I'm able to login normally with XDM. I may also give GDM a try, we'll see.

yenn 04-15-2013 07:52 AM

You can also try running 'xwmconfig' as new user, which creates new correct .xinitrc or .xsession (I'm not sure which one) and report if it helped.

JWJones 04-15-2013 09:49 AM

Thanks, yenn, I will check that out also, and report back.

JWJones 04-15-2013 11:22 PM

Test. This is only a test.

JWJones 04-17-2013 10:40 PM

Quote:

Originally Posted by eyeofliberty (Post 4931798)
I may also give GDM a try, we'll see.

I decided to give GDM a try, and I'm very happy with it so far. I even found some very nice Slackware themes for it.


All times are GMT -5. The time now is 10:28 AM.