LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   ? automatically login to X ? (https://www.linuxquestions.org/questions/slackware-14/automatically-login-to-x-58170/)

VioLaToR 05-05-2003 04:52 AM

? automatically login to X ?
 
Since there is no graphical login in slackware, how do i go about making a semi-automatic login into KDE? or even a completely automatic login into KDE would be good. I would like to automatically "startx" as my user upon bootup. Login managers and session managers built into KDE appear useless in Slackware.

gazonk 05-05-2003 07:08 AM

Simply change runlevel
 
To use graphical login (XDM, KDM, GDM, whathaveyou) you need to change the default runlevel. Edit your /etc/inittab and set the default runlevel to 4. Change the id entry in the inittab to the following:

# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:

Then edit /etc/rc.d/rc.4 to use the display manager you want. The default in Slackware 9.0 is Gnome Display Manager.

Then simply do the following to switch runlevel:
# telinit 4

hecresper 05-05-2003 10:33 AM

Re: ? automatically login to X ?
 
Quote:

Originally posted by VioLaToR
Since there is no graphical login in slackware, how do i go about making a semi-automatic login into KDE? or even a completely automatic login into KDE would be good. I would like to automatically "startx" as my user upon bootup. Login managers and session managers built into KDE are useless in Slackware.
There is a way of running a certain program immediately after you login. In FreeBSD, I can edit the file: /etc/passwd and add a command at the end of my regular user line. I think it might work the same in Slackware, although I think you would have to use rc.local instead. Basically, it works like putting 'win.exe' as the last line of 'autoexec.bat' in MSDOS. If you'ever used, Windows 3.x! :)

gazonk 05-05-2003 11:34 AM

Yes, you can change your login shell in Linux as well as in FreeBSD (and any Un*x I've ever heard of) and that might work but I would recommend not changing the login shell since this is what xterm runs when you open it.

You could do something like "last line of autoexec.bat" by putting startx or something as the last command in your .login file (assuming tcsh) and then you could tell xterm whether or not the new shell is a login shell (should read .login).

Still I think changing the runlevel is the most straight-forward and correct(TM) way of doing it.

hecresper 05-05-2003 11:38 AM

Thanks for clarifying that, gazonk. I've been wanting to try placing startx in my startup files for sometime now. I've never had the chance to try it, tho. I will stay away from that idea, now. LOL Altho, it would've been a great learning experience for me to have tried it. For sure I wouldn't have done it after that. LOL :D

gazonk 05-05-2003 11:47 AM

Years ago I once changed my login shell to lynx just to try it and it worked fine until I pressed '!' (escape to shell...) ;)

Still...people have been known to use emacs as their login shell...

VioLaToR 05-06-2003 04:32 AM

I simply made the suggested changes, commented out the GDM so KDE was the first one......All is good now. you all are the greatest.


All times are GMT -5. The time now is 07:30 PM.