LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Busybox ash as a login shell (http://www.linuxquestions.org/questions/linux-software-2/busybox-ash-as-a-login-shell-4175459268/)

prushik 04-23-2013 08:15 AM

Busybox ash as a login shell
 
Hi everybody
I have a nice shiny new Linux system set up on my machine, but it has a problem, to get X to run, I have to login from a getty and then type "startx" which probably requires root access. This kindof sucks a lot.
So I have installed SLiM as a login manager. I can run it from inittab and then I get a nice graphical login window.
However, when I actually login (with correct username and password) it tells me: "failed to run the login script" or something like that and restarts.
I ran into this problem before, and I remember what causes it. I am using busybox ash instead of bash. My system does not have bash at all, and I do not want to install it.
SLiM has a config file allowing you to change the command that gets run upon a successful login, which is tailored to bash by default.
The line looks like this:
Code:

exec /bin/bash -login ~/.xinitrc %session
busybox ash doesn't accept the -login argument.
So, basically, my question is, how can I replicate this bash behavior with busybox ash?
and/or
What should this line be to make slim work with busybox ash?

linosaurusroot 04-24-2013 05:54 AM

Quote:

but it has a problem, to get X to run, I have to login from a getty and then type "startx"
What's your default runlevel in /etc/inittab? Runlevel 5 starts X on systems I am familiar with and 3 gets you just the getty.

prushik 05-01-2013 07:47 AM

Quote:

Originally Posted by linosaurusroot (Post 4937875)
What's your default runlevel in /etc/inittab? Runlevel 5 starts X on systems I am familiar with and 3 gets you just the getty.

Sorry for the slow reply. I actually got it working and neglected to reply to this thread. I am using busybox init, which is a non standard init and I don't even use runlevels in inittab, instead slim gets started from a script called in this line: ::sysinit:/etc/rc.boot
However, runlevel has nothing to do with the problem. I never had trouble running X, X always runs fine. I had actually 3 seperate problems, but all are solved now.
Issue 1: this issue, busybox ash as a login shell. Not sure exactly what the issue was with it before, but I changed the invocation to
/bin/busybox ash - /etc/slimrc %session
and that works fine.
Issue 2: /etc/slimrc doesn't get %session properly. I gave up and hardcoded it in the script.
Issue 3: There was a problem with Xauth files, so I removed xauth altogether.


All times are GMT -5. The time now is 06:42 AM.