Difference between revisions of "SLiM Configuration"
Views
Actions
Namespaces
Variants
Tools
imported>Verityproductions |
imported>Verityproductions |
||
Line 28: | Line 28: | ||
For example, if you wish to edit the file using Geany (provided with the Openbox flavour) then enter: | For example, if you wish to edit the file using ''Geany'' (provided with the Openbox flavour) then enter: | ||
gksu geany /etc/slim.conf | gksu geany /etc/slim.conf | ||
Otherwise, if you wish to edit the file using Gedit (provided with the XFCE flavour) then enter: | Otherwise, if you wish to edit the file using ''Gedit'' (provided with the XFCE flavour) then enter: | ||
sudo gedit /etc/slim.conf | sudo gedit /etc/slim.conf | ||
Line 69: | Line 69: | ||
==Open the X-Windows Initialisation File== | ==Open the X-Windows Initialisation File== | ||
The .xinitrc is responsible for actually starting your installed desktop environment(s) | {{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: | |||
sudo [text editor] ~/.xinitrc | sudo [text editor] ~/.xinitrc | ||
'''Don't forget the dot'''. For example, if you wish to edit the file | '''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 <u>at the very end of the configuration file</u>: | |||
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: | |||
#!/bin/sh | #!/bin/sh | ||
Line 119: | Line 126: | ||
Now reboot the system for the changes to take effect. | 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. | ||
Revision as of 18:31, 13 November 2013
Overview
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 is 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
Users who have installed an earlier version of SLiM (e.g. provided with Manjaro Openbox 0.8.7.1 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:
sudo 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.
Open the X-Windows Initialisation File
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:
sudo [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
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:
#!/bin/sh # # ~/.xinitrc # # Executed by startx (run your window manager from here) # export GTK2_RC_FILES="$HOME/.gtkrc-2.0" DEFAULTSESSION=xfce4-session case "$1" in xfce) exec xfce4-session ;; gnome3) exec gnome-session ;; kde) exec startkde ;; cinnamon) exec gnome-session-cinnamon ;; razor-qt) exec razor-session ;; openbox) exec openbox-session ;; lxde) exec lxsession ;; mate) exec mate-session ;; *) exec $DEFAULTSESSION ;; esac
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
Where two or more desktop environments have be installed - and consequently enabled by editing the above files - then they can be cycled and selected by pressing the F1 key on the SLiM login screen.
Enabling Auto Login
It is possible to bypass the login screen completely and go straight into your chosen desktop environment upon booting up Manjaro. Of course, it will be necessary to have already configured SLiM to manually launch your installed desktop environment in order to use this feature.
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:
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:
sudo nano /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:
sudo gedit /etc/slim.conf
Step 1: Set the Default User
The first step is to set your personal account to be automatically logged in. This is undertaken in the following section, located near the bottom of the SLiM configuration file:
# default user, leave blank or remove this line # for avoid pre-loading the username. # default_user simone
1. Remove the hash ('#') from the beginning of the default_user command to activate it, ensuring that there are no spaces remaining at the beginning of the line.
2. Replace the existing name (i.e. simone) after the default_user command with the name of your personal user account
As an example, SLiM has been configured below to enable a personal user account named 'carl' to be logged in automatically:
# default user, leave blank or remove this line # for avoid pre-loading the username. default_user carl
Once complete, the second and step is to enable the autologin feature itself.
Step 2: Enable Auto Login
Enabling the automatic login is undertaken in the following section, also located near the bottom of the SLiM configuration file:
# Automatically login the default user (without entering # the password. Set to "yes" to enable this feature # auto_login no
1. Remove the hash ('#') from the beginning of the auto_login command to activate it, ensuring that there are no spaces remaining at the beginning of the line.
2. Replace the 'no' after the auto_login command with yes
As an example, SLiM has been configured below to enable the automatic login feature:
# Automatically login the default user (without entering # the password. Set to "yes" to enable this feature auto_login yes
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.
Reboot your system for the changes to take effect.
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
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:
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:
sudo nano /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:
sudo gedit /etc/slim.conf
Set the Desired Theme
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
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