LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-23-2013, 07:15 AM   #1
prushik
Member
 
Registered: Mar 2009
Location: South Korea
Distribution: Lubuntu, BetterLinux
Posts: 364

Rep: Reputation: 28
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?
 
Old 04-24-2013, 04:54 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 749
Blog Entries: 2

Rep: Reputation: 194Reputation: 194
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.
 
Old 05-01-2013, 06:47 AM   #3
prushik
Member
 
Registered: Mar 2009
Location: South Korea
Distribution: Lubuntu, BetterLinux
Posts: 364

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by linosaurusroot View Post
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.
 
  


Reply

Tags
ash, busybox, login, slim


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How do I make these shell scripts with ash as my shell? riahc3 Programming 13 08-15-2012 03:57 AM
which script does ash shell execute first Jurrian Linux - Newbie 0 01-21-2009 04:06 AM
Extended ASCII on Busybox ASH shell kassle Linux - Software 0 12-19-2006 05:06 AM
CJK support in ash shell uiqbal Linux - General 0 10-18-2005 08:24 AM
Sarge - only ASH in shell no BASH jriis Debian 1 12-25-2003 03:25 PM


All times are GMT -5. The time now is 04:45 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration