Manjaro Difference between pages "ManjaroISO" and "SLiM Configuration"

Difference between pages "ManjaroISO" and "SLiM Configuration"

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


=What is ManjaroISO?=
{{tip|Since version 1.6.2, SLiM will automatically find installed desktop environments and window managers.}}


ManjaroISO is a small set of bash scripts that is capable of building fully
[[File:slim-manjaro.png|thumb|left|375px]]
functional Manjaro Linux based live medias. It is a very generic tool, so it
could potentially be used to generate anything from rescue systems,
to install disks, to special interest live CD systems, and who knows what
else. Simply put, if it involves Manjaro on a shiny coaster, it can do it.




=How to get started?=
SLiM - the '''S'''imple '''L'''og'''i'''n '''M'''anager - is currently the default Display Manager for the Manjaro Openbox (ManjaroBox) flavour.


==Create a work directory==
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" />


The first thing you should probably do is create a directory to work
= Configuring SLiM to Start Desktop Environments =
in, and cd to it. This'll help keep things organized.


  mkdir -p ~/work/manjaroiso
{{tip|It is not necessary to take any action for Manjaro Openbox (ManjaroBox) release 0.8.8 and onwards.}}


==Update your system==


To update your system
'''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.


  sudo pacman -Syu


==Install ManjaroISO==
==Edit the SLiM Configuration File==


Next, install manjaroiso and its profiles. If you do not need the community profiles, do not install their package.
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 pacman -S manjaroiso manjaroiso-profiles manjaroiso-community-profiles
sudo [text editor] /etc/slim.conf


Copy ManjaroISOs profiles to your work directory:


  cp -a /usr/share/manjaroiso/configs/ ~/work/manjaroiso/configs/
For example, if you wish to edit the file using ''Geany'' (provided with the Openbox flavour) then enter:


There is an [[Alternative way to install ManjaroISO]] available.
gksu geany /etc/slim.conf


==Understanding ManjaroISO Profiles==


Depending on your ManjaroISO version you find followed directories in ~/work/manjaroiso:
Otherwise, if you wish to edit the file using ''Gedit'' (provided with the XFCE flavour) then enter:


  build cinnamon  e17  kde  lxde  mate  net  openbox  shared  sysmenu  xfce
  gksu gedit /etc/slim.conf


In this example we work with the '''e17''' folder. This folder is not available anymore and got replaced by the '''enlightenment''' folder, but it serves well for demonstration purposes. All profile folders look very similar. Change to it and take a look at the files and folders in it:
==Ensure SLiM Automatically Detects Installed Environments==


Packages      isolinux        overlay          pacman-x86_64.conf
Once the SLiM configuration file has been opened, it will be necessary to ensure that the following line is present:
Packages-E17  isomounts        overlay-livecd    syslinux
Packages-Xorg  mkinitcpio.conf  pacman-gfx.conf  efiboot
e17-overlay    options.conf    pacman-i686.conf


* Packages includes the common packages of all editions.
sessiondir /usr/share/xsessions/
* Packages-E17 includes all packages especially for the E17 Edition
* Packages-Xorg includes all common Xorg packages
* e17-overlay includes files and folders modified to get E17 Edition working
* isolinux includes isolinux.cfg file to start syslinux bootloader
* isomounts holds the information of all overlay-images and their bootorder: It tells the kernel in which order (from top to bottom) to load all overlay images
* mkinitcpio.conf holds the information of all needed modules need to be added to the live-media kernel
* options.conf defines basic settings for the live-media
* overlay includes common files and folders modified to get all edition working
* overlay-livecd includes common files and folders modified for all editions getting the live-session working
* pacman-gfx.conf includes the common pacman.conf file for pkgs-image overlay
* pacman-i686.conf includes the common pacman.conf for all 32bit Manjaro Editions
* pacman-x86_64.conf includes the common pacman.conf for all 64bit Manjaro Editions
* syslinux includes the bootloader for all Manjaro Editions
* efiboot includes UEFI bootloader stuff for all Manjaro Editions


==Modifying a ManjaroISO Profile==


In this example we work with the '''e17''' folder. Following files and folders are most important for the E17 Profile:
'''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:


* Packages-E17
'''# Available sessions (first one is the default).'''
* e17-overlay
# 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>'''


Current Packages-E17 file looks like this:


  ### Manjaro Packages
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>'''
 
 
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 <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:
 
 
DEFAULTSESSION=openbox-session
   
   
  ## E17 Main Packages
case "$1" in
  enlightenment17
    openbox) exec openbox-session ;;
  faenza-green-icon-theme
      xfce) exec xfce4-session ;;
  gksu
      gnome3) exec gnome-session ;;
  libgnomeui
      kde) exec startkde ;;
  lxdm
      cinnamon) exec gnome-session-cinnamon ;;
  network-manager-applet
      razor-qt) exec razor-session ;;
  system-tools
      lxde) exec lxsession ;;
  xcursor-simpleandsoft
      mate) exec mate-session ;;
xcursor-vanilla-dmz-aa
      *) 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.
   
   
  ## Applications
  sed 's/_user_/'$(whoami)'/' ~/.config/obmenu-generator/schema.pl -i
  blueman
  sed 's/_user_/'$(whoami)'/' ~/.config/obmenu-generator/config.pl -i
epdfview
midori
mplayer
gparted
#manjaro-installer
sylpheed
xchat
xnoise
   
   
## Packages for Sound and Audio
gstreamer0.10-bad-plugins
gstreamer0.10-ffmpeg
gstreamer0.10-ugly-plugins
   
   
  ## Package management
exec $1
  pacman-gui
 
 
 
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, 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/


You can add any missing package like '''connman''', the E17 network manager, to this file and save it. Please keep in mind that you can only add packages from the manjaro repositories and '''not''' from the AUR. [[How to install AUR packages in ManjaroISO]]


The '''e17-overlay''' folder looks like this atm:
It should therefore look like this:


  e17-overlay
  #sessiondir /usr/share/xsessions/
|-etc
|---skel
|-----.config
|-------epdfview
|-------gtk-2.0
|-------midori
|-----.local
|-------share
|---------applications
|---systemd
|-----system
|-usr
|---share
|-----icons
|-------default


It includes configuration files like </code>etc/systemd/system/display-manager.service</code> to define the used bootloader. You can change or add any files to that folder to get included to the installed Manjaro system and also added to the live-session if not overwritten by the same file in overlay-livecd.


The '''overlay-livecd''' folder looks like this atm:


overlay-livecd
'''2.''' Amend the following line to set yourself as the default user by removing the hash, and replacing 'simone' with your account name:
|-etc
|---gdm
|---lightdm
|---manjaro
|---pam.d
|---samba
|---skel
|-----.config
|-------autostart
|-----.kde4
|-------share
|---------config
|-----Desktop
|---sudoers.d
|---systemd
|-----system
|-------multi-user.target.wants
|-root
|---.config
|-usr
|---bin
|---lib
|-----systemd
|-------system
|---sbin
|---share
|-----icons


Any file added to this folder gets '''only''' added to the '''live-session'''. In some cases, this can be important.
#default_user        simone


== Building 32 bit and 64 bit install-medias ==


The '''options.conf''' file found in the ''shared'' subfolder or the subfolder of the desktop environment you are trying to build (in our example: <code>~/work/manjaroiso/configs/e17/</code> ) contains the following code:
For example, for the user 'carl', the line would be changed to:


  arch=`uname -m`
  default_user        carl
#arch=i686


This will build a 32bit install-media, if you are on a 32bit Manjaro system and a 64bit install-media, if you are on a 64bit Manjaro system.


If you are on a 64bit Manjaro system and want to build a 32bit install-media, please change the code to this:


#arch=`uname -m`
'''3.''' Finally, enable auto-login by amending the following line:
arch=i686


#auto_login          no


=Building an install-media=


Please change into the profile folder you want to build, if you have not already done this. In our example this is:
It should therefore look like this:


  cd ~/work/manjaroiso/configs/e17/
  auto_login          yes


Now, use buildiso to build your install-media:


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


buildiso will create a new folder <code>work-x86_64</code> or <code>work-i686</code> depending on install-media you want to build. buildiso will work in that folder exclusively. When buildiso is finished, the .iso file with your install-media will appear in your profile folder (in our example: <code>~/work/manjaroiso/configs/e17/</code> ).


== Troubleshooting ==
==Set the Desktop Environment in the .xinitrc Configuration file==


In case anything goes wrong buildiso will display an error. Try to fix this error and restart buildiso.  
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:
If there is a severe error in buildiso or if you want to build a completely new install-media, it might be necessary to delete buildiso's work folder. In our example this is:


  sudo rm -rfv ~/work/manjaroiso/configs/e17/work-x86_64
  exec [desktop-session]


'''Attention:''' The <code>work-x86_64</code> folder will '''not''' be completely deleted, because parts of it are mounted.


In severe cases, please reboot your system before and after you try to remove the <code>work-x86_64</code> folder.
For example, to set Openbox as the default session to log into automatically, the following command would be used:


exec openbox-session


= Links =


* [https://www.youtube.com/watch?v=89TsITpY3h0 Basic Video Tutorial]
Here are a sample of exec commands for popular desktops to aid new users:
* [http://vimeo.com/63063954 Video tutorial]


* [https://forum.manjaro.org/index.php?topic=4295.0 ManjaroISO Tutorial]
exec openbox-session
exec xfce4-session
exec gnome-session
exec startkde
exec cinnamon-session
exec razor-session
exec lxsession
exec mate-session


* [https://forum.manjaro.org/index.php?board=27.0 Manjaro subforum dedicated to ManjaroISO]


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


= Further reading=


* [[Alternative way to install ManjaroISO]]
[[Category:Contents Page]]
* [[How to install AUR packages in ManjaroISO]]

Revision as of 11:40, 16 November 2013

Overview

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.