LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Blogs > arniekat
User Name
Password

Notices


Rate this Entry

Slackware-13.37-Hacks-SLiM

Posted 09-18-2011 at 10:50 PM by arniekat

Simple Login Manager

SLiM is a Lightweight Graphical Login Manager designed as a replacement for GDM/KDM/XDM.

Compile and install slim-1.3.2 from SlackBuilds.org

After installing SLiM, the only two changes I make are turning off the X Servers listening on Port 6000 TCP for incoming connections for use in Remote X-Windows Sessions (with the -nolisten tcp flag) and changing the default SLiM theme to use the Slackware theme.

Here is what an X-Server with Port 6000 open looks like when you run netstat:

bash-4.1# netstat -lundt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN
tcp 0 0 :::6000 :::* LISTEN

The following shows the changes needed for slim.conf to turn off Port 6000. There is a custom Slackware theme that matches the default Slackware Lilo theme. To use the Slackware Slim theme, you will need to edit /etc/slim.conf and change the 'current_theme' directive from 'default' to 'slackware-black'

# vi /etc/slim.conf

# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path /bin:/usr/bin:/usr/local/bin
default_xserver /usr/bin/X
xserver_arguments -nolisten tcp

....

# current theme, use comma separated list to specify a set to
# randomly choose from
current_theme slackware-black

Save the file and exit.

If you would like to use SLiM as the login manager in runlevel 4, add the following lines to /etc/rc.d/rc.4 just above the section that tries to start gdm:

# vi /etc/rc.d/rc.4

...

# Try to use SLiM login manager. This comes first, because if SLiM is
# installed, then the user probably wants to use it by default:
if [ -x /usr/bin/slim ]; then
exec /usr/bin/slim
fi

# Try to use GNOME's gdm session manager. This comes first because if
# gdm is on the machine then the user probably installed it and wants
# to use it by default:
if [ -x /usr/bin/gdm ]; then
exec /usr/bin/gdm -nodaemon
fi

# Someone thought that gdm looked prettier in /usr/sbin,
# so look there, too:
if [ -x /usr/sbin/gdm ]; then
exec /usr/sbin/gdm -nodaemon
fi

...

Save the file and exit.

You will not be able to login as a regular user using slim unless you have an ~/.xinitrc file because slim runs that after logging in. The file must have your preferred Window Manager or Desktop Environment listed and uncommented. The .xinitrc file must be executable. Here is what the .xinitrc file looks like:

#!/bin/sh

#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

# Here are the various Desktop Environments
# exec awesome
# exec dwm
# exec fluxbox
# exec fvwm2
# exec gnome-session
# exec openbox-session
# exec startkde
# exec startlxde
# exec startxfce4
# exec enlightenment_start
# exec ck-launch-session $ONE_OF_THE_ABOVE

exec ck-launch-session startkde

After you have created this file in your users /home directory, make it executable:

# chmod +x /home/<username>/.xinitrc

If the wallpaper text for the Slackware theme does not look right (it is at a 1280x1024 resolution), use the GIMP to resize it to your screen size. For instance, my netbook has a 1024x600 resolution, so I sized it to that and saved the file as background.jpg

If you have not compiled the SlackBuild, untar the slackware-black.tar.bz2 portion and overwrite the existing background.jpg file with your modified version. The tar it back. When you compile it, it will be at the correct resolution for your box.

If you have already installed the package, you can overwite the background.jpg file for slim. It is located at /usr/share/slim/themes/slackware-black/background.jpg
Posted in Uncategorized
Views 1606 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 02:33 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration