SlackwareThis 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.
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?
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
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...
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
Advertisement
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Click Here to receive a complimentary subscription courtesy of LQ.