Manjaro Difference between pages "Configure NVIDIA (non-free) settings and load them on Startup" and "SLiM Configuration"

Difference between pages "Configure NVIDIA (non-free) settings and load them on Startup" and "SLiM Configuration"

From Manjaro
(Difference between pages)
imported>Rudylorren
 
imported>Verityproductions
 
Line 1: Line 1:
= Introduction=
=Overview=


{note| This tutorial is meant for users who are using the NVIDIA Proprietary (non-free) drivers.}}
{{tip|Since version 1.6.2, SLiM will automatically find installed desktop environments and window managers.}}


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


You can check what drivers you have installed by entering the following command into your terminal:


inxi -G
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 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.
<br clear="all" />


= Install NVIDIA Drivers =


If you have the Nouveau driver you can install the proprietary NVIDIA driver by using the [[Configure_Graphics_Cards| Manjaro Hardware Detection (MHWD)]] utility. To do so, enter the following command into your terminal:


sudo mhwd -a pci nonfree 0300
= 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.}}


Once Complete, reboot your system to complete the process. You can then confirm that the driver has been installed and is working by entering the following command into your terminal:


mhwd -li
'''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==


=Configure The Resolution/Refresh Rate=
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:


{{warning|The method provided does not currently work for the Cinnamon Edition. As soon as a solution is found, then this article will be updated.}}
sudo [text editor] /etc/slim.conf




'''1.'''  Open your terminal and enter the following command:
For example, if you wish to edit the file using Geany (provided with the Openbox flavour) then enter:


  sudo nvidia-settings
  gksu geany /etc/slim.conf




'''2.'''  Change resolution and refresh rate in 'X Server Display Configuration' tab.
Otherwise, if you wish to edit the file using Gedit (provided with the XFCE flavour) then enter:


'''3.''' Hit the 'Save to X Configuration File' button and save to '''/etc/X11/mhwd.d/nvidia.conf'''
  sudo gedit /etc/slim.conf


'''4.'''  Now enter the following command into the terminal to complete the process:


sudo mhwd-gpu --setgl nvidia --setxorg /etc/X11/mhwd.d/nvidia.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:


=Configure X Screen settings (OpenGL Settings, Antialiasing, X Server XVideo)=
sessiondir /usr/share/xsessions/




'''1.''' Open your terminal and enter the following command:  
'''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:


  nvidia-settings
  '''# 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">sessions            xfce,gnome3,kde,cinnamon,razor-qt,openbox,lxde,mate </font color>'''




'''2.''' Change settings in X Server XVideo Settings, OpenGL and Antialiasing, in the 'X Screen' tab.
And make the necessary amendment so that it now looks like this:


'''3.''' Click on 'nvidia-settings configuration' tab and click on the 'Save Current Configuration' button.
'''# 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>'''


'''4.''' Save the .nvidia-settings-rc to the default location specified ('''/home/[your account name]''')


'''5.''' Edit the .xinitrc file. To do so, enter the following into your terminal:
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). In essence, the .xinitrc file will take the name of your chosen (or only) desktop environment from SLiM, and then use that to determine which command to use to actually start it. 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 within the terminal using nano, then enter:
 
sudo nano ~/.xinitrc
 
 
Otherwise you could use the ''gedit'' text editor instead, by entering the command:


  sudo gedit ~/.xinitrc
  sudo gedit ~/.xinitrc




'''6.''' Once opened, add the following line into the configuration file:
==Add Desktop Environments to the X-Windows Initialisation File==
 
Again, the purpose of editing this file is to:
 
* 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. The names and commands themselves must be added after the '''DEFAULTSESSION=''' command. All the names used in the SLiM configuration file above have been listed exactly the same way here, and have been '''<font color="green">colured in green</font color>''' for illustrative purposes.
 
#!/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
      '''<font color="green">xfce</font color>''') exec xfce4-session ;;
      '''<font color="green">gnome3</font color>''') exec gnome-session ;;
      '''<font color="green">kde</font color>''') exec startkde ;;
      '''<font color="green">cinnamon</font color>''') exec gnome-session-cinnamon ;;
      '''<font color="green">razor-qt</font color>''') exec razor-session ;;
      '''<font color="green">openbox</font color>''') exec openbox-session ;;
      '''<font color="green">lxde</font color>''') exec lxsession ;;
      '''<font color="green">mate</font color>''') exec mate-session ;;
      *) exec $DEFAULTSESSION ;;
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. Note that each line starting with green text:
 
'''1.''' starts with the  '''<font color="green">''name'' of the desktop environment</font color>'''
 
'''2.''' uses the command ''exec'' which means ''execute'' (i.e. start), and
 
'''3.''' ends with the actual ''command'' necessary to start a desktop environment appropriate to the name
 
 
The exception is the last line which begins with an asterisk ('*' - a wildcard). This is to ensure that if a match is not found, then the default session will be started instead - which in this instance, is xfce4. Again, if the name of a desktop environment listed in this file does not exactly match a name passed to it by the SLiM configuration file, then the actual command to start that desktop cannot be executed.
 
If you wish, you are free to use the entire example provided in your own .xinitrc file, 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 if you decide to install any new desktops at a future point (i.e. it will only be necessary to edit the SLiM configuration file). '''Otherwise you may just delete the lines for any desktop environments that you do not have installed'''.
 
 
Once your amendments have been completed, 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.
 
 
Now reboot the system for the changes to take effect.
 
 
=Selecting Multiple Desktop Environments=
 
[[File:slimsessions.png|thumb|left|375px]]
 
 
{{tip|The desktop environments shown will be listed in both the order and manner they were listed in the SLiM configuration file.}}
 
 
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.
<br clear="all" />
 
 
= 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 ==
 
{{warning|There '''<u>must not</u>''' be any spaces before the '''default_user''' command, otherwise it will not work.}}
 
 
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.
# <font color="green">'''default_user        simone'''</font color>
 
 
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.
<font color="green">'''default_user        carl'''</font color>
 
 
Once complete, the second and step is to enable the autologin feature itself.
 
 
== Step 2: Enable Auto Login ==
 
{{warning|There '''<u>must not</u>''' be any spaces before the '''auto_login''' command, otherwise it will not work.}}
 
 
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
# <font color="green">'''auto_login          no'''</font color>
 
 
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
<font color="green">'''auto_login          yes'''</font color>
 


exec nvidia-settings --load-config-only
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.


'''7.''' Save and exit.


Reboot your system for the changes to take effect.


= Troubleshooting: X-Server Failed to Start and Install =


Where there has been an error during the installation process, upon rebooting you may see the following error message: '''modprobe: ERROR: could not insert nvidia : No such a device'''
= Previewing Installed Themes =


{{note|It is apparently not possible to preview themes where the auto login feature has been enabled.}}


If this happens:


'''1.''' Remove the NVIDIA driver by entering the following command into your terminal:
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:


sudo mhwd -r pci video-nvidia   
1. Change to the directory that contains the themes by entering the following command:


cd /usr/share/slim/themes/


'''2.''' Reboot your computer


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


'''3.''' Enter the following into your terminal:
ls


sudo gedit /etc/mkinitcpio.conf


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


'''4.''' delete the word '''nouveau''' from the following line:
slim -p [name of theme]


MODULES=" nouveau"


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


It should now look like this (i.e. keep the speech marks ("")):
slim -p mindlock


MODULES=""


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


'''5.''' Save and close the file.


= Changing Themes =


'''6.''' It is now necessary to reconfigure your existing kernel to take into account this change. The syntax of the necessary command to enter into your terminal is:
[[File:slimmindlock.png|thumb|left|375px]]


sudo mkinitcpio -p [linux kernel version]


{{tip|There may be even more themes available from the '''[[Arch User Repository]]'''.}}


For example, if you are currently using Kernel 3.10, you would enter the following:


sudo mkinitcpio -p linux310
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" />


For kernel 3.11, you would enter the following:


sudo mkinitcpio -p linux311
== 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:


And so on.
sudo [text editor] /etc/slim.conf


'''7.''' Now re-install the NVIDIA driver by entering the following command into your terminal:


sudo mhwd -a pci nonfree 0300
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


'''8.''' Reboot your system. Now it should work ;)


=Bumblebee and Steam=
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:


Properly using and configuring Bumblebee with Steam is much easier than it seems at first.
sudo gedit /etc/slim.conf


'''1.''' Install bumblebee for nonfree nvidia. Please run in terminal command in proper order:


sudo pacman -S virtualgl lib32-virtualgl lib32-primus primus
== Set the Desired Theme ==


sudo mhwd -f -i pci video-hybrid-intel-nvidia-bumblebee
{{warning|Make sure that you list the name of the desired theme correctly.}}


sudo systemctl enable bumblebeed


'''2.''' Reboot system:
Enabling the automatic login is undertaken in the following section, located near the bottom of the SLiM configuration file:


  sudo reboot
  # current theme, use comma separated list to specify a set to
# randomly choose from
<font color="green">'''current_theme      default'''</font color>


'''3.''' Next run:


optirun -b none nvidia-settings -c :8
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:


'''4.''' Verify it is working
# current theme, use comma separated list to specify a set to
# randomly choose from
<font color="green">'''current_theme      mindlock'''</font color>


primusrun glxspheres
and
glxspheres


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


'''5a.''' To have all games with Steam run using the NVidia card.
* '''nano''': Press CTRL and 'x' to exit, 'y' to save, and <enter> to finish, or
Run Steam with command:
* '''gedit''': Select the 'save' option and then close the window.


primusrun steam


'''5b.''' Alternatively, you can run specific games by:
=SLiM Login Commands=


Select a game - that you want to run using your discrete Nvidia card - from the Library page of the Steam client, right-click, and select Properties.
{{tip|This section may prove especially useful if SLiM has been misconfigured in some way!}}
Click the SET LAUNCH OPTIONS... button and specify primusrun %command% for the command line.
Save your changes.This method allows you to pick when the discrete NVidia GPU should be used on a per-game basis.




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:


=Feedback and Support=
* '''exit''' - Return to the command line
* '''halt''' - Shutdown the system
* '''reboot''' - Reboot the system
* '''console''' - Launch the terminal


If you have any problems, improvements or see any errors in this tutorial, please post in this Manjaro forum thread: [http://forum.manjaro.org/index.php?topic=4489.0]




[[Category:Contents Page]]
[[Category:Contents Page]]

Revision as of 18:19, 13 November 2013

Overview

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


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

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 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). In essence, the .xinitrc file will take the name of your chosen (or only) desktop environment from SLiM, and then use that to determine which command to use to actually start it. 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 within the terminal using nano, then enter:

sudo nano ~/.xinitrc


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

sudo gedit ~/.xinitrc


Add Desktop Environments to the X-Windows Initialisation File

Again, the purpose of editing this file is to:

  • 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 vitally important 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. The names and commands themselves must be added after the DEFAULTSESSION= command. All the names used in the SLiM configuration file above have been listed exactly the same way here, and have been colured in green for illustrative purposes.

#!/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


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. Note that each line starting with green text:

1. starts with the name of the desktop environment

2. uses the command exec which means execute (i.e. start), and

3. ends with the actual command necessary to start a desktop environment appropriate to the name


The exception is the last line which begins with an asterisk ('*' - a wildcard). This is to ensure that if a match is not found, then the default session will be started instead - which in this instance, is xfce4. Again, if the name of a desktop environment listed in this file does not exactly match a name passed to it by the SLiM configuration file, then the actual command to start that desktop cannot be executed.

If you wish, you are free to use the entire example provided in your own .xinitrc file, 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 if you decide to install any new desktops at a future point (i.e. it will only be necessary to edit the SLiM configuration file). Otherwise you may just delete the lines for any desktop environments that you do not have installed.


Once your amendments have been completed, 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.


Now reboot the system for the changes to take effect.


Selecting Multiple Desktop Environments

Slimsessions.png



Tip
The desktop environments shown will be listed in both the order and manner they were listed in the SLiM configuration file.


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

Warning
There must not be any spaces before the default_user command, otherwise it will not work.


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

Warning
There must not be any spaces before the auto_login command, otherwise it will not work.


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

Note
It is apparently not possible to preview themes where the auto login feature has been enabled.


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:

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

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
Cookies help us deliver our services. By using our services, you agree to our use of cookies.