How to setup auto login

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

How to setup auto login

Postby rzscott0509 » Sun Aug 30, 2009 2:08

So I just installed Sabayon 4.2 KDE4 version and I can't figure out how to setup auto login. I found where to set it up but it wouldnt let me click or change anything. I already read this...http://wiki.sabayonlinux.org/index.php? ... _Autologin but I tried it/dont understand it and it doesnt work....could someone please help me out here....and please keep it simple.
rzscott0509
Baby Hen
 
Posts: 4
Joined: Sun Aug 30, 2009 2:01

Re: How to setup auto login

Postby Fitzcarraldo » Sun Aug 30, 2009 3:02

The edits explained in the Wiki should work, so, when you write "I tried it/dont understand it and it doesnt work" were you able to actually edit the file? If you are logged in as root in a Konsole window (i.e. the prompt is a hash symbol instead of a dollar symbol) then entering the command kwrite as instructed in the Wiki article will actually return an error message:

Code: Select all
# kwrite
bash: kwrite: command not found
#

This is because the full path for kwrite needs to be entered. It's easier to use the nano text editor instead, which does not require the full path to be entered (I'll modify the Wiki article accordingly in due course):

Code: Select all
# nano /usr/kde/4.2/share/config/kdm/kdmrc

The nano text editor displays a menu of commands along the bottom of the Konsole window, so you don't need to know the commands by heart (For example ^X means press the Ctrl and X keys).

Scroll down to the following text in the kdmrc file:

Code: Select all
# Core config for 1st local display
[X-:0-Core]
# The VT the X-server should run on; auto-assign if zero, don't assign if -1.
# Better leave it zero and use ServerVTs.
# Default is 0
#ServerVT=7
# Enable automatic login. USE WITH EXTREME CARE!
# Default is false
#AutoLoginEnable=true
# If true, auto-login after logout. If false, auto-login is performed only
# when a display session starts up.
# Default is false
#AutoLoginAgain=true
# The delay in seconds before automatic login kicks in.
# Default is 0
#AutoLoginDelay=10
# The user to log in automatically. NEVER specify root!
# Default is ""
#AutoLoginUser=fred
# The password for the user to log in automatically. This is NOT required
# unless the user is logged into a NIS or Kerberos domain. If you use this
# option, you should "chmod 600 kdmrc" for obvious reasons.
# Default is ""
#AutoLoginPass=secret!
# Immediately lock the automatically started session. This works only with
# KDE sessions.
# Default is false
#AutoLoginLocked=true
# See above
ClientLogFile=.xsession-errors

In configuration files the hash symbol at the beginning of a line means that the text on that line is a comment and is ignored by the software. You just need to delete the comment symbol at the beginning of the two lines #AutoLoginAgain=true and #AutoLoginUser=fred, and change "fred" to your username. So the above block of text should now look like this (assuming your SL username is rzscott0509):

Code: Select all
# Core config for 1st local display
[X-:0-Core]
# The VT the X-server should run on; auto-assign if zero, don't assign if -1.
# Better leave it zero and use ServerVTs.
# Default is 0
#ServerVT=7
# Enable automatic login. USE WITH EXTREME CARE!
# Default is false
AutoLoginEnable=true
# If true, auto-login after logout. If false, auto-login is performed only
# when a display session starts up.
# Default is false
#AutoLoginAgain=true
# The delay in seconds before automatic login kicks in.
# Default is 0
#AutoLoginDelay=10
# The user to log in automatically. NEVER specify root!
# Default is ""
AutoLoginUser=rzscott0509
# The password for the user to log in automatically. This is NOT required
# unless the user is logged into a NIS or Kerberos domain. If you use this
# option, you should "chmod 600 kdmrc" for obvious reasons.
# Default is ""
#AutoLoginPass=secret!
# Immediately lock the automatically started session. This works only with
# KDE sessions.
# Default is false
#AutoLoginLocked=true
# See above
ClientLogFile=.xsession-errors

Save the file and exit nano by entering Ctrl-X. Then restart your PC and it should log-in automatically.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: How to setup auto login

Postby joeoden » Sun Aug 30, 2009 3:06

Sounds like you are trying to this via System Settings

Open a terminal and type
kdesu systemsettings
Desktop ASUS M2N-MX SE Plus, AMD 64 X2 Dual Core 5200, 4 Gb RAM, GeForce 9500 1GB
Notebook HP CQ61-311AX, AMD CPU M320, 4 Gb RAM, Radeon HD 4300 512 MB
Wireless AR9285, Audio ATI SBx00 (IDT 92hd75B2x5)
Some mistakes are too much fun to only make once!
joeoden
Old Dear Hen
 
Posts: 474
Joined: Sun Mar 15, 2009 10:35
Location: Back in the 'swamp land' Moe, Australia 38°10′20″S 146°16′04″E

Re: How to setup auto login

Postby Fitzcarraldo » Sun Aug 30, 2009 3:11

But be warned that if you do it using System Settings it will delete all the comments from the kdmrc file.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: How to setup auto login

Postby rzscott0509 » Sun Aug 30, 2009 4:10

Well i followed your advice...kinda. I just opened the file by finding it myself (going to root folder then usr..etc) because when I typed the nano thing in the terminal nothing happened, and i made the changes but when i go to save it, it says could not save file because it couldnt find a backup file...and it says something about having permission to change the file. So what do i do now?
rzscott0509
Baby Hen
 
Posts: 4
Joined: Sun Aug 30, 2009 2:01

Re: How to setup auto login

Postby Fitzcarraldo » Sun Aug 30, 2009 4:19

Did you log-in as the root user? You cannot edit it under your own user account, you have to log in as the root user. When you open the Konsole window you will first see a dollar prompt. Type su and hit Enter and it will prompt you for a password. Enter the root user's password, not your password. Then there should be a hash prompt. Are you getting the hash prompt?

Code: Select all
$ su
Password:  <--- here you need to type the password of the root user
# nano /usr/kde/4.2/share/config/kdm/kdmrc
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: How to setup auto login

Postby rzscott0509 » Sun Aug 30, 2009 4:22

yes i did that part
rzscott0509
Baby Hen
 
Posts: 4
Joined: Sun Aug 30, 2009 2:01

Re: How to setup auto login

Postby Fitzcarraldo » Sun Aug 30, 2009 4:30

Another way to edit the file as the root user would be to open a Konsole window and enter the command kdesu kwrite at the dollar prompt:

Code: Select all
$ kdesu kwrite


A window will pop up prompting you to enter the root user's password. Enter the root user's password and the kwrite window will pop up. Click on Open and navigate to the file /usr/kde/4.2/share/config/kdm/kdmrc and open it. Perform the edits described in my earlier post and save the file. Logout and reboot.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: How to setup auto login

Postby joeoden » Sun Aug 30, 2009 4:36

joeoden wrote:Open a terminal and type
kdesu systemsettings

Fitzcarraldo wrote:But be warned that if you do it using System Settings it will delete all the comments from the kdmrc file.

Sorry I didn't know that would happen (I don't use auto login)
Joe
Desktop ASUS M2N-MX SE Plus, AMD 64 X2 Dual Core 5200, 4 Gb RAM, GeForce 9500 1GB
Notebook HP CQ61-311AX, AMD CPU M320, 4 Gb RAM, Radeon HD 4300 512 MB
Wireless AR9285, Audio ATI SBx00 (IDT 92hd75B2x5)
Some mistakes are too much fun to only make once!
joeoden
Old Dear Hen
 
Posts: 474
Joined: Sun Mar 15, 2009 10:35
Location: Back in the 'swamp land' Moe, Australia 38°10′20″S 146°16′04″E

Re: How to setup auto login

Postby rzscott0509 » Sun Aug 30, 2009 4:51

Well i did what you said and when i rebooted sabayon would load to 75% and then the screen would go blank and nothing would happen. Its no big deal though i didnt have anything important so i can just reinstall it i guess. But this time i think im going to install Sabayon 4.2 gnome and just type in my password instead of using auto login lol.
rzscott0509
Baby Hen
 
Posts: 4
Joined: Sun Aug 30, 2009 2:01

Next

Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 2 guests