Bug 557295 - Login using slim does not work when using tcsh as default shell
Summary: Login using slim does not work when using tcsh as default shell
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: slim
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Lorenzo Villani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-20 22:46 UTC by Walter Francis
Modified: 2010-03-12 13:40 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-03-12 11:43:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Walter Francis 2010-01-20 22:46:03 UTC
Description of problem:
If the users default shell is tcsh, login when using SLIM fails.  The problem seems to lie in the /etc/slim.conf generated by slim-dynwm in the login_cmd.  It assumes it is being executed under bash, where in this case it is not.  This could potentially fail similarly if using ksh, zsh, etc, but I have not tried other shells.

If the login_cmd is changed to "exec /bin/bash -login ~/.xinitrc %session" it works as it forces bash, however I'm not clear on how to wrap the entire logic of if ~/.xinitrc else /etc/X11/xinit/xinitrc in bash, I've tried a bit without success. 

Version-Release number of selected component (if applicable):
slim-1.3.1-9.fc12.i686

How reproducible:
100%

Steps to Reproduce:
1. Install tcsh and slim
2. Change default shell of a user to tcsh
3. echo "DISPLAYMANAGER=/usr/bin/slim-dynwm" > /etc/sysconfig/desktop
4. Restart X/GDM etc so slim is the active login manager
5. Attempt to login
6. Note "Failed to execute login command" failure

Actual results:
slim fails to execute the login command defined by the slim-dynwm wrapper and the user cannot login.

Expected results:
User can login regardless of shell used.

Additional info:

Workaround is make the DISPLAYMANAGER /usr/bin/slim after slim-dynwm has ran at least once and edit the /etc/slim.conf to be:

login_cmd exec /bin/bash -login ~/.xinitrc %session

Where ~/.xinitrc exists and either accepts the argument passed to it to launch the preferred desktop or has been configured to launch a predefined desktop.  User loses flexability and is required to make manual changes to system for this workaround to work.

Comment 1 Lorenzo Villani 2010-02-19 18:49:10 UTC
I can't really work on this: my time is limited I don't have enough time to test non-standard setups. If you have patches I will be happy to merge them.

Comment 2 Dams 2010-03-12 13:40:08 UTC
I think the "non-standard" here is slim and not "having a non-bash shell".

The man xinit says that ~/.xinitrc is a shell script. It's nowhere said it should be a bash shell script. You can have a  #!/bin/whatever she-bang as your ~/.xinitrc first line, so trying to evaluate it with bash is just not correct.

If $SHELL is the user shell as described in /etc/passwd, then the login command should be something like :
$SHELL -l -c ~/.xinitrc

(tcsh doesnt seem to accept anything after -l, so someone should find a portable way to have a login shell).


Note You need to log in before you can comment on or make changes to this bug.