LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 08-16-2006, 02:00 PM   #1
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu
Posts: 1,189

Rep: Reputation: 47
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?
 
Old 08-16-2006, 02:39 PM   #2
hitest
Senior Member
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 4,282

Rep: Reputation: 588Reputation: 588Reputation: 588Reputation: 588Reputation: 588Reputation: 588
The graphical log-in for Slackware is run level 4. Just set your inittab to 4 and you're good to go:-)
 
Old 08-16-2006, 05:19 PM   #3
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
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 05:21 PM.
 
Old 08-16-2006, 09:11 PM   #4
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu
Posts: 1,189

Original Poster
Rep: Reputation: 47
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!!
 
Old 08-16-2006, 10:36 PM   #5
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
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 10:38 AM.
 
Old 08-21-2006, 10:18 AM   #6
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu
Posts: 1,189

Original Poster
Rep: Reputation: 47
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?
 
Old 08-21-2006, 10:38 AM   #7
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
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
 
Old 08-26-2006, 02:39 PM   #8
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu
Posts: 1,189

Original Poster
Rep: Reputation: 47
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 03:04 PM.
 
Old 08-26-2006, 03:20 PM   #9
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
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
 
Old 08-26-2006, 04:57 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 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
 
Old 08-26-2006, 05:00 PM   #11
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu
Posts: 1,189

Original Poster
Rep: Reputation: 47
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 05:01 PM.
 
Old 08-26-2006, 09:47 PM   #12
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,281

Rep: Reputation: 61
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.
 
Old 08-27-2006, 01:43 AM   #13
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
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
 
  


Reply


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
Autologin??? jakob_g Linux - Newbie 3 02-23-2006 07:05 PM
Fluxbox error /usr/share/fluxbox/nls/en_GB/fluxbox.cat humbletech99 Debian 2 12-29-2005 11:16 AM
autologin zaicheke Linux - General 1 07-16-2004 08:15 PM
autologin on RH 7.2 mehesque Linux - General 0 06-08-2004 09:16 AM
AutoLogin in Slack? r_jensen11 Slackware 4 06-04-2003 04:13 PM


All times are GMT -5. The time now is 06:32 PM.

Main Menu
Advertisement
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