Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-16-2006, 01:00 PM
|
#1
|
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Fedora Core, Slackware, Vector Linux, Ubuntu
Posts: 1,167
Rep:
|
Fluxbox autologin
I have my pc setup to graphically login to Fluxbox (inittab is set to 5). How can I set it up to autologin since it's in my house?
|
|
|
|
08-16-2006, 01:39 PM
|
#2
|
|
Senior Member
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware
Posts: 3,646
|
The graphical log-in for Slackware is run level 4. Just set your inittab to 4 and you're good to go:-)
|
|
|
|
08-16-2006, 04:19 PM
|
#3
|
|
Member
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465
Rep:
|
For auto-login it will depend on which login manager you use to get into graphical (run level 4) ...
For KDM try here: http://www.ltsp.org/contrib/autologin_kdm.html
For GDM try here (do we still include GDM since dropping gnome?): http://ubuntuforums.org/archive/index.php/t-12777.html
For XDM, can't be done: http://www.monkey.org/openbsd/archiv.../msg01826.html
Autologin WITHOUT any of the session managers! http://members.tripod.com/rpragana/short-commands.html
I personally use GDM to autologin a user for my Freevo box, so I suspect I could fish out the config that you need to adjust if you needed word-for-word instructions. I tried the KDE method (since it was one of the first comprehensive walkthroughs I found) but could NOT get it to work. You may have more luck.
Good luck and let us know how it goes!
- Piete.
Edit: We will all assume you're using Slackware, since you posted here, but if your inittab is set to 5, then you won't get anything graphical. Unless you've editted the rest of inittab to match your Fedora box?
From cat /etc/inittab :
Code:
# These are the default runlevels in Slackware:
# 0 = halt
# 1 = single user mode
# 2 = unused (but configured the same as runlevel 3)
# 3 = multiuser mode (default Slackware runlevel)
# 4 = X11 with KDM/GDM/XDM (session managers)
# 5 = unused (but configured the same as runlevel 3)
# 6 = reboot
Last edited by piete; 08-16-2006 at 04:21 PM.
|
|
|
|
08-16-2006, 08:11 PM
|
#4
|
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Fedora Core, Slackware, Vector Linux, Ubuntu
Posts: 1,167
Original Poster
Rep:
|
Actually the pc I'm writing about is using Vector Linux which is very close to Slackware that I'm using on 2 other pcs. XDM is used, so I cannot use that for autologin. I will change it to boot to the console so I can autologin there-thanks for the links!!
|
|
|
|
08-16-2006, 09:36 PM
|
#5
|
|
Senior Member
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191
Rep:
|
I have auto login with XDM, here's how:
edit the /etc/inittab as follows:
Code:
x1:4:wait:/etc/rc.d/rc.xinit
(replacing the line that looks similar to this)
in the /etc/rc.d/rc.xinit:
Code:
#!/bin/sh
startx -- -bpp 24 | su - username
although it has been suggested to me by Daga that this would be better for the rc.xinit file
Code:
HOME='/home/username'
sudo -u username /bin/bash /usr/X11R6/bin/startx
First one I have tested, second I have not.
regards,
...drkstr
Last edited by drkstr; 08-21-2006 at 09:38 AM.
|
|
|
|
08-21-2006, 09:18 AM
|
#6
|
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Fedora Core, Slackware, Vector Linux, Ubuntu
Posts: 1,167
Original Poster
Rep:
|
My /etc/sudoers file is empty. Do I need to add to that to get the above sudoers command to work for login? If so, what do I add?
|
|
|
|
08-21-2006, 09:38 AM
|
#7
|
|
Senior Member
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191
Rep:
|
No for the first method, I'm not sure on the second. I don't belive so since you do not need root to startx. But if it doesn't work, try adding this to your sudoers file.
Code:
username ALL= NOPASSWD: /usr/X11R6/bin/startx
...buy the way, I noticed a type in my previous post. startx resides in /usr/X11R6/bin, not /usr/bin. I just updated it.
regards,
...drkstr
|
|
|
|
08-26-2006, 01:39 PM
|
#8
|
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Fedora Core, Slackware, Vector Linux, Ubuntu
Posts: 1,167
Original Poster
Rep:
|
Well, I tried a couple different scenarios and got xauthority errors. Here's the message I got:
/usr/X11R6/bin/startx: line 133 : xauth: command not found
this error repeats to line 145
If I login and then type startx it works fine. I think it has to do with /etc/sudoers which had 1 line already and I added the last line:
root ALL=(ALL) ALL
username ALL= NOPASSWD: /usr/X11R6/bin/startx
Any ideas?
EDIT:
I googled around and saw that error is caused by /usr/X11R6/bin not being in the path of root or the user (huntz). I added that to the path and on reboot get the same xauth error.
Last edited by linuxhippy; 08-26-2006 at 02:04 PM.
|
|
|
|
08-26-2006, 02:20 PM
|
#9
|
|
Senior Member
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191
Rep:
|
I finally tested it and it works just like it should once you add the path like you said. Here is the contents of my rc.xinit:
Code:
#!/bin/sh
HOME='/home/drkstr'
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin"
PATH="$PATH:/usr/X11R6/bin:/opt/kde/bin"
sudo -u drkstr /bin/bash /usr/X11R6/bin/startx
I'm using KDE on this laptop so I added /opt/kde/bin. You won't need that one however. It's possible you don't need to add all this to your path, but it works, and it doesn't hurt to have them there.
Also, no need to add anything to the sudoers file (except the default entry for root). The sudu command is being run by root which is why it can be run with no password by default.
This method is a much better way to do it then the one I was using since it will allow you to disable the user's shell if you want to.
regards,
...drkstr
|
|
|
|
08-26-2006, 03:57 PM
|
#10
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,903
|
I still can't understand why someone would want to do that. It's like
leaving the keys in the car over night, with the door ajar. Even if there's
no one living there who may take advantage, the house can still be burgled.
Cheers,
Tink
|
|
|
|
08-26-2006, 04:00 PM
|
#11
|
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Fedora Core, Slackware, Vector Linux, Ubuntu
Posts: 1,167
Original Poster
Rep:
|
Excellent-that worked! I was starting to wonder if it was possible in Vector Linux 4.3 since it's 2 years old and uses xdm. /etc/rc.d/rc.X (it says it's a 1993 file from Slackware) is the file that I replaced with /etc/rc.d/rc.xinit in drkstr's previous post. Then in /etc/inittab I changed the file naming of rc.X to rc.xinit and rebooted.
Thanks for all the help-this is my 4th Linux pc that I've setup as a Jukebox using xmms and 10 GB of mp3 song files. Now all you do is cut on the power and it automatically logs in and executes a shuffled xmms jukebox from the harddrive...it uses fluxbox since it only has 128 MB RAM and a CPU of 700 MHz.
EDIT:
Of course my house could be broken into...a $50 pc is going to be the least of my worries if that happpens!!
Last edited by linuxhippy; 08-26-2006 at 04:01 PM.
|
|
|
|
08-26-2006, 08:47 PM
|
#12
|
|
Senior Member
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,256
Rep:
|
Quote:
|
Originally Posted by Tinkster
I still can't understand why someone would want to do that. It's like
leaving the keys in the car over night, with the door ajar. Even if there's
no one living there who may take advantage, the house can still be burgled.
Cheers,
Tink
|
Most of the time this is not advisable but there are some cases where this is needed. For me, building a livecd it makes sense to autologin rather than having to type in a password every time you use it.
|
|
|
|
08-27-2006, 12:43 AM
|
#13
|
|
Senior Member
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191
Rep:
|
Quote:
I still can't understand why someone would want to do that. It's like
leaving the keys in the car over night, with the door ajar. Even if there's
no one living there who may take advantage, the house can still be burgled.
|
hehe. I used to say the same thing until I actually ran into a situation when I needed it. I don't use it do it on my home computer though. Even if I am the only person using it.
see you around Tink!
...drkstr
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:34 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|