LinuxQuestions.org
Visit Jeremy's Blog.
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 06-03-2003, 09:39 PM   #1
r_jensen11
Senior Member
 
Registered: Apr 2003
Location: Minnesota, USA
Distribution: Slack 10.0 w/2.4.26
Posts: 1,032

Rep: Reputation: 45
AutoLogin in Slack?


Is it possible to have Slack 8.1 automatically log into one profile? On my system, I have the root account, then my personal account, no other ones because I have no need for any additional accounts. Also, is it possible to have Slack automatically issue the command startx after it logs in? If so, could it be possible to have a boot setup such as in LILO to have two options, one, the first and default, to have it automaticaly log into the account and then start X, and the second option have it as a normal Slack8.1 login screen and not boot into X, so I could do stuff such as load a different window manager, such as Flux or BlackBox, or KDE?
 
Old 06-03-2003, 09:52 PM   #2
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
You can change the runlevel to 4 by editing /etc/inittab, line 24...
#Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:


This will use a graphical login instead of the console. If you use KDE, you can use the KDM login manager (you may need to edit /etc/rc.d/rc.4 and make the kdm login manager the first choice instead of gdm), and then in KDE Control Center, setup your user to use an automatic or passwordless login.

EDIT:
Here is an example of the first few entries in my rc.4 script...

# Tell the viewers what's going to happen...
echo "Starting up X11 session manager..."

# Try to use KDE's kdm session manager:
if [ -x /opt/kde/bin/kdm ]; then
exec /opt/kde/bin/kdm -nodaemon
fi

# Try to use GNOME's gdm session manager:
if [ -x /usr/bin/gdm ]; then
exec /usr/bin/gdm -nodaemon
fi

# Not there? OK, try to use KDE's kdm session manager:
#if [ -x /opt/kde/bin/kdm ]; then
# exec /opt/kde/bin/kdm -nodaemon
#fi

Last edited by DaOne; 06-03-2003 at 09:56 PM.
 
Old 06-03-2003, 09:57 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Quote:
Is it possible to have Slack 8.1 automatically log into one profile?
Yes ... both kdm and gdm support this.

Quote:
Also, is it possible to have Slack automatically issue the command startx after it logs in?
Yes ... two ways (at least ;}):
1.) Edit /etc/inittab and set the default runlevel to 4

2.) Edit /etc/rc.d/rc.local and add /opt/kde/bin/kdm&
as the last line...

Quote:
If so, could it be possible to have a boot setup such as in LILO to have two options, one, the first and default, to have it automaticaly log into the account and then start X, and the second option have it as a normal Slack8.1 login screen and not boot into X, so I could do stuff such as load a different window manager, such as Flux or BlackBox, or KDE?
And yes, again ;)

There's a bunch of options here, you could use
some of the packages that are available online
(search freshmeat) to have configuration choices,
or a "do it yourself" approach ... which is what I did
for my notebooks varied setup.

Lilo allows you to set environment variables, and
you can query these from your startup-script(s)
which allows for a very versatile setup...

Code:
snippet from lilo.conf
# Linux bootable partition config begins
image = /boot/vmlinuz.rc2
  root = /dev/hda8
  label = work
        append="LOCATION=work"
  read-only
# Linux bootable partition config ends
Code:
snippet from rc.inet1
if [ "$LOCATION" = "work" ]; then
    USE_DHCP=yes
    # If your provider requires a DHCP hostname, uncomment and edit below:
    DHCP_HOSTNAME="tink-n"
    /bin/cp /etc/resolv.conf.work /etc/resolv.conf
    /bin/cp /etc/hosts.work /etc/hosts
else
    USE_DHCP=no
    /bin/cp /etc/resolv.conf.home /etc/resolv.conf
    /bin/cp /etc/hosts.home /etc/hosts
    # If your provider requires a DHCP hostname, uncomment and edit below:
fi
Just to give you a general idea :}
You could put a similar statement into rc.local,
depending on which you'd start kdm (and thus
auto-login into your normal user's X) or not...

Cheers,
Tink

Last edited by Tinkster; 09-08-2005 at 03:37 AM.
 
Old 06-03-2003, 10:59 PM   #4
r_jensen11
Senior Member
 
Registered: Apr 2003
Location: Minnesota, USA
Distribution: Slack 10.0 w/2.4.26
Posts: 1,032

Original Poster
Rep: Reputation: 45
Tinkster, which way(s) would you recommend I go about doing this if I want to have a boot choice between automatically in Gnome or the shell login and remaining in text mode?
 
Old 06-04-2003, 04:13 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Well, what I would do is what I did :)

I'm sure there's better ways out there, but in brief:

1.) Put two entires into /etc/lilo.conf
that point at the same kernel, but give them
different names, like
Code:
# Linux bootable partition config begins
image = /boot/vmlinuz.rc2
  root = /dev/hda8
  label = choice
  read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz.rc2
  root = /dev/hda8
  label = Gnome
        append="XENV=gnome"
  read-only
# Linux bootable partition config ends
2.)In /etc/rc.d/rc.local
Code:
if [ "$XENV" = "gnome" ]; then
   /opt/kde/bin/kdm&
fi
3.) All you'd have to do now is to go into kde once
and set-up your normal user in the KDM
settings of the control panel to have auto-login,
and chose gnome as the default desktop.

If you haven't got KDE/kdm, it should be possible
with gdm, too, but I can't give you any pointers
since I don't use it.

Cheers,
Tink

Last edited by Tinkster; 06-04-2003 at 04:14 PM.
 
  


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 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
RH9: Autologin lectraplayer Linux - Newbie 2 10-26-2003 10:12 AM
Autologin Getty rch Linux - Security 5 04-15-2003 02:04 AM
SSH and autologin? presstone Linux - General 8 03-12-2003 09:40 PM


All times are GMT -5. The time now is 06:38 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