Manjaro Difference between revisions of "SLiM Configuration"

Difference between revisions of "SLiM Configuration"

From Manjaro
imported>Verityproductions
(Created page with "=Overview= {{note|It will be necessary to manually edit the SLiM configuration file and the X-Windows initialisation file whenever a new desktop is added or an old one is rem...")
 
imported>Dalto
(Redirect archived content to remove it from search results)
 
(73 intermediate revisions by 3 users not shown)
Line 1: Line 1:
#REDIRECT [[Install Display Managers]]
=Overview=
=Overview=


{{note|It will be necessary to manually edit the SLiM configuration file and the X-Windows initialisation file whenever a new desktop is added or an old one is removed.}}
{{warning|SLiM display manager is not maintained and should be replaced by eg. LightDM.}}


Once SLiM has been '''[[Install_Display_Managers#SLiM|installed and enabled]]''', it will be necessary to manually edit both the ''SLiM configuration file'', as well as the ''X-Windows initialisation file'', in order to actually start your installed desktop environment(s). '''If these files are not edited - or not edited properly - then it is likely that you will not be able to proceed any further than the login screen itself.'''
{{tip|Since version 1.6.2, SLiM will automatically find installed desktop environments and window managers.}}


[[File:slim-manjaro.png|thumb|left|375px]]


=Editing the SLiM Configuration File=


The purpose of editing this file is to add the name(s) of your installed desktop environment(s). SLiM will then pass these name(s) to the X-Windows initialisation file (.xinitrc), which in turn will actually start your desired desktop environment(s).
SLiM - the '''S'''imple '''L'''og'''i'''n '''M'''anager - is currently the default Display Manager for the Manjaro Openbox (ManjaroBox) flavour.  


SLiM is highly configurable with an abundance of extra themes available. Since version 1.6.2, it has become suitable for less experienced users as it can now automatically detect any installed desktop environments and window managers. However, users installing SLiM manually will still need to make an amendment to the ''.xinitrc'' configuration file for it to work properly.
<br clear="all" />


==Open slim.conf==
= Configuring SLiM to Start Desktop Environments =


You will need to first open your terminal in order to edit the '''SLiM configuration file'''. The syntax of the command to do this is:
{{tip|It is not necessary to take any action for Manjaro Openbox (ManjaroBox) release 0.8.8 and onwards.}}
 
 
'''Users who have installed an earlier version of SLiM''' (e.g. provided with the Manjaro Openbox 0.8.7.1 release and earlier) will need to manually edit both the ''SLiM configuration file'' (slim.conf) and the ''X-Windows initialisation file'' (.xinitrc) in order to enable the new auto-detect feature. '''Users who have manually installed the latest version of SLiM''' will only need to manually edit the ''.xinitrc'' file. The amendments required are themselves very quick and easy to implement.
 
 
==Edit the SLiM Configuration File==
 
The purpose of checking and/or editing this file is to ensure that SLiM will automatically detect installed desktop environments and window managers. You will need to first open your terminal in order to edit the '''SLiM configuration file'''. The syntax of the command to do this is:


  sudo [text editor] /etc/slim.conf
  sudo [text editor] /etc/slim.conf




For example, if you wish to edit the file within the terminal using nano (a standard terminal-based text editor) then enter:
For example, if you wish to edit the file using ''Geany'' (provided with the Openbox flavour) then enter:


  sudo nano /etc/slim.conf
  gksu geany /etc/slim.conf




Otherwise - if you have installed the full version of Manjaro (i.e. not the NET-Edition) - you may find it easier to use the pre-installed ''gedit'' text editor instead. This will open the configuration file up as a document, making it easier to read and edit. To use gedit instead, the command is:
Otherwise, if you wish to edit the file using ''Gedit'' (provided with the XFCE flavour) then enter:


  sudo gedit /etc/slim.conf
  gksu gedit /etc/slim.conf


==Ensure SLiM Automatically Detects Installed Environments==


==Add Desktop Environment Names to slim.conf==
Once the SLiM configuration file has been opened, it will be necessary to ensure that the following line is present:


Once the SLiM configuration file has been opened, it will be necessary to add the name(s) of your installed desktop(s) in order to:
sessiondir /usr/share/xsessions/


* display the name(s) of your desktop(s) on the login screen - which is helpful if you want to know which one you are switching to, and
* to tell the .xinitrc file which desktop it is to start


This is undertaken in the '''# Available Sessions''' section, located towards the middle of the file. In the example below, all the available desktops have been added. The text itself has been '''<font color="green">colured in green</font color>''' for illustrative purposes.
'''Users who had a previous version of SLiM installed''' must replace the '''sessions''' command with the above '''sessiondir''' command. For example, '''users who installed Manjaro Openbox 0.8.7.1 or earlier''' should first find the following section:


  '''# Available sessions (first one is the default).'''
  '''# Available sessions (first one is the default).'''
Line 41: Line 51:
  # above, so your login command can handle different sessions.
  # above, so your login command can handle different sessions.
  # see the xinitrc.sample file shipped with slim sources
  # see the xinitrc.sample file shipped with slim sources
  '''<font color="green">sessions            xfce,gnome3,kde,cinnamon,razor-qt,openbox</font color>'''
  '''<font color="green">sessions            xfce,gnome3,kde,cinnamon,razor-qt,openbox,lxde,mate </font color>'''
 
 
And make the necessary amendment so that it now looks like this:


'''# Available sessions (first one is the default).'''
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
'''<font color="green">sessiondir /usr/share/xsessions/</font color>'''


As illustrated, if two or more desktops are listed, they must be seperated with a comma (''','''). In addition, as stated, the first desktop listed will be the default. This means that if you do not choose which desktop you want on the login screen, the name of the default one will be automatically sent to the .xinitrc file. If you have also listed a name for one or more desktops that have not actually been installed, the default one will also be sent instead.


Once your amendments have been completed, save your changes and close the configuration file by:
Once satisfied that the ''sessiondir'' command is present and/or has replaced the old ''sessions'' command, save and close the file. The next - and final - step necessary is to edit and configure the '''X-Windows Initialisation File'''.


* '''nano''': Press CTRL and 'x' to exit, 'y' to save, and <enter> to finish, or
* '''gedit''': Select the 'save' option and then close the window.


==Edit the X-Windows Initialisation File==


=Editing the X-Windows Initialisation File=
{{tip|The ''.xinitrc'' file is already owned by you, so there is no need to use the 'sudo' or 'gksu' commands to edit it.}}


The .xinitrc is responsible for actually starting your installed desktop environment(s). In essence, the .xinitrc will take the name of your chosen (or only) desktop environment from SLiM, and then use it to determine which command to use in order to actually start it.


The .xinitrc is responsible for actually starting your installed desktop environment(s). You will need to first open your terminal in order to edit the '''X-Windows initialisation file'''. The syntax of the command to do this is:


==Open .xinitrc==
[text editor] ~/.xinitrc


You will need to first open your terminal in order to edit the '''X-Windows initialisation file'''. The syntax of the command to do this is:


sudo [text editor] ~/.xinitrc
'''Don't forget the dot'''. For example, if you wish to edit the file using ''Geany'', then enter:


geany ~/.xinitrc


'''Don't forget the dot'''. For example, if you wish to edit the file within the terminal using nano, then enter:


sudo nano ~/.xinitrc
Otherwise you could use the ''Gedit'' text editor instead, by entering the command:


gedit ~/.xinitrc


Otherwise you could use the ''gedit'' text editor instead, by entering the command:
==Ensure the X-Windows Initialisation File Runs Installed Environments==


sudo gedit ~/.xinitrc
{{warning|SLiM no longer seems to support a default session. It will therefore be necessary to select what desktop environment or window manager you wish to use by first pressing the '''<F1>''' key, prior to entering your username and password.}}




==Add Desktop Environment Names and Commands to .xinitrc==
Once the .xinitrc configuration file has been opened, it will be necessary to ensure that the following line is present <u>at the very end of the configuration file</u>:


Again, the purpose of editing this file is to:
exec $1


* list the name(s) (or labels) of your installed desktop environment(s) from the SLiM configuration file, and
* match those name(s) with the command(s) necessary to actually start the desktop environment(s)


The key point to keep in mind is that the name(s) of the desktop(s) listed in the SLiM configuration file must be matched with those listed in the X-Windows Initialisation file. As such, it is therefore '''<u>vitally important</u>''' that the name of any given desktop environment is listed '''EXACTLY''' the same way in both files. This includes the use of captial and lower-case letters. Should there by any difference at all, then there will not be a match, and your chosen desktop environment will not be started.
'''Users who had a previous version of SLiM installed''' must completely replace both the previous '''case "$1"''' and '''DEFAULTSESSION=''' commands listed below with the '''exec $1''' command. For example, '''users who installed Manjaro Openbox 0.8.7.1 or earlier''' should first find the following section:


The names and commands themselves are added after the '''DEFAULTSESSION=''' command. In the example below, notice that each desktop name is followed by the appropriate command to actually start a desktop environment (e.g. the name 'kde' is followed by the command 'startkde'). All the names used in the SLiM configuration file have been listed exactly the same way here, and have been '''<font color="green">colured in green</font color>''' for illustrative purposes.


  '''DEFAULTSESSION=xfce4-session'''
  DEFAULTSESSION=openbox-session
   
   
  case "$1" in
  case "$1" in
       '''<font color="green">xfce</font color>''') exec xfce4-session ;;
    openbox) exec openbox-session ;;
       '''<font color="green">gnome3</font color>''') exec gnome-session ;;
       xfce) exec xfce4-session ;;
       '''<font color="green">kde</font color>''') exec startkde ;;
       gnome3) exec gnome-session ;;
       '''<font color="green">cinnamon</font color>''') exec gnome-session-cinnamon ;;
       kde) exec startkde ;;
       '''<font color="green">razor-qt</font color>''') exec razor-session ;;
       cinnamon) exec gnome-session-cinnamon ;;
       '''<font color="green">openbox</font color>''') exec openbox ;;
       razor-qt) exec razor-session ;;
       lxde) exec lxsession ;;
      mate) exec mate-session ;;
       *) exec $DEFAULTSESSION ;;
       *) exec $DEFAULTSESSION ;;
  esac
  esac


The '''default session''' has been set to xfce4 in this instance as the author's Manjaro installation came with that desktop environment pre-installed. Yours may be different, and you are entirely free to change it if you wish. The word '''exec''' means ''execute''. Note that between the lines 'case "$1" in' and 'esac', each line starts with the name of a desktop environment, followed by the command to ''execute'' a particular desktop environment. The exception is the last line which begins with an asterisk ('*'). This is to ensure that if a match is not found, then the default session will be started instead - in this instance, the command to start xfce.


'''You can use all of the lines between 'case "$1" in' and 'esac' in the above example if you wish, even if you do not have all of these desktop environments installed'''. Doing so will not cause any problems, and can make life much easier in future if you decide to install a new desktop (i.e. it will only be necessary to edit the SLiM configuration file). Otherwise, delete the approptiate lines for any desktops you do not have installed.
And make the necessary amendment so that it now looks like this:
 
exec $1
 
 
To clarify for newer users, the entire ''.xinitrc'' file should now look like this:
 
 
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#
## Ensure that the D-Bus Communication System is running properly to fix
## File management, authentication, and other essential system processes
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
    eval "$(dbus-launch --sh-syntax --exit-with-session)"
fi
## Ensure that GTK themes are applied uniformly in the Desktop Environment
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
## Where the default Home folders have not already been created, generate them
if [ -x /usr/bin/xdg-user-dirs-update ]; then
    /usr/bin/xdg-user-dirs-update
fi
## Ensure that obmenu-generator (a pipe menu) is set to the user.
sed 's/_user_/'$(whoami)'/' ~/.config/obmenu-generator/schema.pl -i
sed 's/_user_/'$(whoami)'/' ~/.config/obmenu-generator/config.pl -i
exec $1
 
 
 
Once satisfied that the ''exec $1'' command is present and/or has replaced the old ''case "$1"'' and ''DEFAULTSESSION='' commands, save and close the file. Now reboot the system for the changes to take effect.
 
=Selecting Multiple Desktop Environments=
 
[[File:slimsessions.png|thumb|left|375px]]
 
 
{{Note|Again, there is no longer a 'default session', so you will have to manually pick the installed desktop you wish. This includes even where only Openbox has been installed, as it is possible to use this window manager with the KDE desktop environment.}}
 
 
Where two or more desktop environments have be installed (or at least just Openbox), then they can be cycled and selected by pressing the '''F1''' key on the SLiM login screen.
<br clear="all" />
 
 
= Previewing Installed Themes =
 
Thankfully, it is not necessary to repeatedly edit the SLiM configuration file and re-boot your system in order to see what the installed themes look like. More conveniently, they can instead be previewed in the terminal. To do so, once the themes have of course been installed:
 
1. Change to the directory that contains the themes by entering the following command:
 
cd /usr/share/slim/themes/
 
 
2. List the installed themes available by entering the following command:
 
ls
 
 
3. Preview any and all installed themes listed. The syntax of the command to do so is:
 
slim -p [name of theme]
 
 
For example, to preview a listed theme called ''mindlock'', the following command would be entered
 
slim -p mindlock
 
 
To exit from a theme currently being previewed, simply type '''exit''' into the ''user name'' field and then press <enter>
 
= Changing Themes =
 
[[File:slimmindlock.png|thumb|left|375px]]
 
 
{{tip|There may be even more themes available from the '''[[Arch User Repository]]'''.}}
 
 
A particularly strong feature of SLiM that has attracted many users is the abundance of varied and wide-ranging themes available for it. Moreover, these themes are very easy to set. To install all available themes for SLiM from the official Manjaro repositories, enter the following command in the terminal:
 
sudo pacman -S slim-themes archlinux-themes-slim
<br clear="all" />
 
 
== Open the SLiM Configuration File ==
 
You will need to first open your terminal in order to edit the '''SLiM configuration file'''. The syntax of the command to do this is:
 
gksu [text editor] /etc/slim.conf
 
 
For example, if you wish to edit the file within the terminal using the ''gedit'' text editor, the command is:
 
gksu gedit /etc/slim.conf
 
== Set the Desired Theme ==
 
{{warning|Make sure that you list the name of the desired theme correctly.}}
 
 
Enabling the automatic login is undertaken in the following section, located near the bottom of the SLiM configuration file:
 
# current theme, use comma separated list to specify a set to
# randomly choose from
<font color="green">'''current_theme      default'''</font color>
 
 
To change the theme, simply replace the name of the current theme listed after the '''current_theme''' command (e.g. default) with the name of the desired theme to set. As an example, SliM has been configured to use the ''mindlock'' theme:
 
# current theme, use comma separated list to specify a set to
# randomly choose from
<font color="green">'''current_theme      mindlock'''</font color>
 


Once your amendments have been completed, save your changes and close the configuration file by:
Once your amendments have been completed, you can save your changes and close the configuration file by:


* '''nano''': Press CTRL and 'x' to exit, 'y' to save, and <enter> to finish, or
* '''nano''': Press CTRL and 'x' to exit, 'y' to save, and <enter> to finish, or
* '''gedit''': Select the 'save' option and then close the window.
* '''gedit''': Select the 'save' option and then close the window.


Now reboot the system for the changes to take effect.
 
=SLiM Login Commands=
 
{{tip|This section may prove especially useful if SLiM has been misconfigured in some way!}}
 
 
SLiM also provides a number of basic functions in addition to logging into a desktop environment. To use these features, simply enter the following commands into the user name field:
 
* '''exit''' - Return to the command line
* '''halt''' - Shutdown the system
* '''reboot''' - Reboot the system
* '''console''' - Launch the terminal
 
 
= Enable Auto-Login =
 
It is indeed possible to enable automatic login. To do so, it will be necessary to edit both the ''SLiM configuration file'' (slim.conf) and the and the ''X-Windows initialisation file''. Instructions on how to actually open these files to edit them have been omitted as they have already been provided earlier in the article.
 
 
==Enable Auto-Login in the SLiM Configuration file==
 
Once the SLiM configuration file has been opened, follow the three steps provided.
 
 
'''1.''' Sash-out the the following command, as it is no longer-necessary to auto-detect installed desktop environments:
 
  sessiondir /usr/share/xsessions/
 
 
It should therefore look like this:
 
#sessiondir /usr/share/xsessions/
 
 
 
'''2.''' Amend the following line to set yourself as the default user by removing the hash, and replacing 'simone' with your account name:
 
#default_user        simone
 
 
For example, for the user 'carl', the line would be changed to:
 
default_user        carl
 
 
 
'''3.''' Finally, enable auto-login by amending the following line:
 
#auto_login          no
 
 
It should therefore look like this:
 
auto_login          yes
 
 
Once complete, save and close the file. All that is required now is to edit the ''.xinitrc'' file.
 
 
==Set the Desktop Environment in the .xinitrc Configuration file==
 
Once the SLiM Configuration file has been amended, '''exec $1''' must be replaced with the session (i.e. Desktop Environment or Window Manager) to run automatically. The syntax of the new command is:
 
exec [desktop-session]
 
 
For example, to set Openbox as the default session to log into automatically, the following command would be used:
 
exec openbox-session
 
 
Here are a sample of exec commands for popular desktops to aid new users:
 
exec openbox-session
exec xfce4-session
exec gnome-session
exec startkde
exec cinnamon-session
exec razor-session
exec lxsession
exec mate-session
 
 
Once complete, save and close the file. Reboot the system for the changes to take effect.
 
 
[[Category:Obsolete]]

Latest revision as of 22:47, 23 June 2019

Overview

Warning
SLiM display manager is not maintained and should be replaced by eg. LightDM.



Tip
Since version 1.6.2, SLiM will automatically find installed desktop environments and window managers.
Slim-manjaro.png


SLiM - the Simple Login Manager - is currently the default Display Manager for the Manjaro Openbox (ManjaroBox) flavour.

SLiM is highly configurable with an abundance of extra themes available. Since version 1.6.2, it has become suitable for less experienced users as it can now automatically detect any installed desktop environments and window managers. However, users installing SLiM manually will still need to make an amendment to the .xinitrc configuration file for it to work properly.

Configuring SLiM to Start Desktop Environments

Tip
It is not necessary to take any action for Manjaro Openbox (ManjaroBox) release 0.8.8 and onwards.


Users who have installed an earlier version of SLiM (e.g. provided with the Manjaro Openbox 0.8.7.1 release and earlier) will need to manually edit both the SLiM configuration file (slim.conf) and the X-Windows initialisation file (.xinitrc) in order to enable the new auto-detect feature. Users who have manually installed the latest version of SLiM will only need to manually edit the .xinitrc file. The amendments required are themselves very quick and easy to implement.


Edit the SLiM Configuration File

The purpose of checking and/or editing this file is to ensure that SLiM will automatically detect installed desktop environments and window managers. You will need to first open your terminal in order to edit the SLiM configuration file. The syntax of the command to do this is:

sudo [text editor] /etc/slim.conf


For example, if you wish to edit the file using Geany (provided with the Openbox flavour) then enter:

gksu geany /etc/slim.conf


Otherwise, if you wish to edit the file using Gedit (provided with the XFCE flavour) then enter:

gksu gedit /etc/slim.conf

Ensure SLiM Automatically Detects Installed Environments

Once the SLiM configuration file has been opened, it will be necessary to ensure that the following line is present:

sessiondir /usr/share/xsessions/


Users who had a previous version of SLiM installed must replace the sessions command with the above sessiondir command. For example, users who installed Manjaro Openbox 0.8.7.1 or earlier should first find the following section:

# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions            xfce,gnome3,kde,cinnamon,razor-qt,openbox,lxde,mate 


And make the necessary amendment so that it now looks like this:

# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessiondir /usr/share/xsessions/


Once satisfied that the sessiondir command is present and/or has replaced the old sessions command, save and close the file. The next - and final - step necessary is to edit and configure the X-Windows Initialisation File.


Edit the X-Windows Initialisation File

Tip
The .xinitrc file is already owned by you, so there is no need to use the 'sudo' or 'gksu' commands to edit it.


The .xinitrc is responsible for actually starting your installed desktop environment(s). You will need to first open your terminal in order to edit the X-Windows initialisation file. The syntax of the command to do this is:

[text editor] ~/.xinitrc


Don't forget the dot. For example, if you wish to edit the file using Geany, then enter:

geany ~/.xinitrc


Otherwise you could use the Gedit text editor instead, by entering the command:

gedit ~/.xinitrc

Ensure the X-Windows Initialisation File Runs Installed Environments

Warning
SLiM no longer seems to support a default session. It will therefore be necessary to select what desktop environment or window manager you wish to use by first pressing the <F1> key, prior to entering your username and password.


Once the .xinitrc configuration file has been opened, it will be necessary to ensure that the following line is present at the very end of the configuration file:

exec $1


Users who had a previous version of SLiM installed must completely replace both the previous case "$1" and DEFAULTSESSION= commands listed below with the exec $1 command. For example, users who installed Manjaro Openbox 0.8.7.1 or earlier should first find the following section:


DEFAULTSESSION=openbox-session

case "$1" in
    openbox) exec openbox-session ;;
     xfce) exec xfce4-session ;;
     gnome3) exec gnome-session ;;
     kde) exec startkde ;;
     cinnamon) exec gnome-session-cinnamon ;;
     razor-qt) exec razor-session ;;
     lxde) exec lxsession ;;
     mate) exec mate-session ;;
     *) exec $DEFAULTSESSION ;;
esac


And make the necessary amendment so that it now looks like this:

exec $1


To clarify for newer users, the entire .xinitrc file should now look like this:


#!/bin/sh

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

## Ensure that the D-Bus Communication System is running properly to fix
## File management, authentication, and other essential system processes

if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
    eval "$(dbus-launch --sh-syntax --exit-with-session)"
fi


## Ensure that GTK themes are applied uniformly in the Desktop Environment

export GTK2_RC_FILES="$HOME/.gtkrc-2.0"


## Where the default Home folders have not already been created, generate them

if [ -x /usr/bin/xdg-user-dirs-update ]; then
   /usr/bin/xdg-user-dirs-update
fi

## Ensure that obmenu-generator (a pipe menu) is set to the user.

sed 's/_user_/'$(whoami)'/' ~/.config/obmenu-generator/schema.pl -i
sed 's/_user_/'$(whoami)'/' ~/.config/obmenu-generator/config.pl -i


exec $1


Once satisfied that the exec $1 command is present and/or has replaced the old case "$1" and DEFAULTSESSION= commands, save and close the file. Now reboot the system for the changes to take effect.

Selecting Multiple Desktop Environments

Slimsessions.png


Note
Again, there is no longer a 'default session', so you will have to manually pick the installed desktop you wish. This includes even where only Openbox has been installed, as it is possible to use this window manager with the KDE desktop environment.


Where two or more desktop environments have be installed (or at least just Openbox), then they can be cycled and selected by pressing the F1 key on the SLiM login screen.


Previewing Installed Themes

Thankfully, it is not necessary to repeatedly edit the SLiM configuration file and re-boot your system in order to see what the installed themes look like. More conveniently, they can instead be previewed in the terminal. To do so, once the themes have of course been installed:

1. Change to the directory that contains the themes by entering the following command:

cd /usr/share/slim/themes/


2. List the installed themes available by entering the following command:

ls


3. Preview any and all installed themes listed. The syntax of the command to do so is:

slim -p [name of theme]


For example, to preview a listed theme called mindlock, the following command would be entered

slim -p mindlock


To exit from a theme currently being previewed, simply type exit into the user name field and then press <enter>

Changing Themes

Slimmindlock.png



Tip
There may be even more themes available from the Arch User Repository.


A particularly strong feature of SLiM that has attracted many users is the abundance of varied and wide-ranging themes available for it. Moreover, these themes are very easy to set. To install all available themes for SLiM from the official Manjaro repositories, enter the following command in the terminal:

sudo pacman -S slim-themes archlinux-themes-slim



Open the SLiM Configuration File

You will need to first open your terminal in order to edit the SLiM configuration file. The syntax of the command to do this is:

gksu [text editor] /etc/slim.conf


For example, if you wish to edit the file within the terminal using the gedit text editor, the command is:

gksu gedit /etc/slim.conf

Set the Desired Theme

Warning
Make sure that you list the name of the desired theme correctly.


Enabling the automatic login is undertaken in the following section, located near the bottom of the SLiM configuration file:

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


To change the theme, simply replace the name of the current theme listed after the current_theme command (e.g. default) with the name of the desired theme to set. As an example, SliM has been configured to use the mindlock theme:

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


Once your amendments have been completed, you can save your changes and close the configuration file by:

  • nano: Press CTRL and 'x' to exit, 'y' to save, and <enter> to finish, or
  • gedit: Select the 'save' option and then close the window.


SLiM Login Commands

Tip
This section may prove especially useful if SLiM has been misconfigured in some way!


SLiM also provides a number of basic functions in addition to logging into a desktop environment. To use these features, simply enter the following commands into the user name field:

  • exit - Return to the command line
  • halt - Shutdown the system
  • reboot - Reboot the system
  • console - Launch the terminal


Enable Auto-Login

It is indeed possible to enable automatic login. To do so, it will be necessary to edit both the SLiM configuration file (slim.conf) and the and the X-Windows initialisation file. Instructions on how to actually open these files to edit them have been omitted as they have already been provided earlier in the article.


Enable Auto-Login in the SLiM Configuration file

Once the SLiM configuration file has been opened, follow the three steps provided.


1. Sash-out the the following command, as it is no longer-necessary to auto-detect installed desktop environments:

 sessiondir /usr/share/xsessions/


It should therefore look like this:

#sessiondir /usr/share/xsessions/ 


2. Amend the following line to set yourself as the default user by removing the hash, and replacing 'simone' with your account name:

#default_user        simone


For example, for the user 'carl', the line would be changed to:

default_user        carl


3. Finally, enable auto-login by amending the following line:

#auto_login          no


It should therefore look like this:

auto_login          yes


Once complete, save and close the file. All that is required now is to edit the .xinitrc file.


Set the Desktop Environment in the .xinitrc Configuration file

Once the SLiM Configuration file has been amended, exec $1 must be replaced with the session (i.e. Desktop Environment or Window Manager) to run automatically. The syntax of the new command is:

exec [desktop-session]


For example, to set Openbox as the default session to log into automatically, the following command would be used:

exec openbox-session


Here are a sample of exec commands for popular desktops to aid new users:

exec openbox-session
exec xfce4-session
exec gnome-session
exec startkde
exec cinnamon-session
exec razor-session
exec lxsession
exec mate-session


Once complete, save and close the file. Reboot the system for the changes to take effect.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.