Desktop Session

antiX Linux is one of the few Linux based operating systems out there where you can change between one window manager to another without having to log out from your user account. It is so that even the windows you have open are moved to the other window manager selected. This is all possible thanks to the antiX Desktop Session program.

Desktop Session functions
antiX Desktop Session not only manages changes between Window Managers, but also takes control of other system aspects (like the desktop, the menu updater, the startup programs, etc.), making any of the Window Managers function very close to how Desktop Environments do. Some of these functions are:


 * Let the user change/switch between different window managers and session
 * Select what program will manage the desktop icons and wallpaper (depending on the session selected). This functionality is complemented by the wallpaper-antiX program and the File manager related to each desktop session.
 * Manage the prefered applications (default applications).
 * Manage the script that updates the Applications menu with new apps and programs recently installed.
 * Manages the programs and scripts that auto-starts with the Desktop session
 * Manages the menu option and "Exit Session" window, to Suspend/PowerOff/Reboot the system, restart the session and log out (dependent on  package).
 * Removing and adding new Window Managers and Desktop Environments to the SLiM entries (for later selecting from the login screen).
 * Control the automounting behavior of devices (with  extra package as support).

As previously stated, this complex program tries to emulate the Desktop Environment behaviour. Each of its different functions requires further study to better understand them.

Preferred Applications
Preferred applications sets the default application to launch and open certain file types (except customizations done on the File manager), and changes the Freedesktop behavior for certain commands and options (mainly the xdg-open command). These changes are unique to each user.

The possible preferred applications that can be selected are:


 * Terminal = determines the default Terminal emulator and what the "Terminal" menu option does (related to the command ).
 * Web Browser = determines the default Web Browser and what the "Web Browser" menu option does (related to the command ).
 * File Manager = determines the default File Manager, launches it every time you mount a device, and controls what the menu entry "File Manager" (and IceWM taskbar button) does (related to the command ).
 * Email Client = determines the default Email Client program.
 * Text Editor = determines the default Text Editor and what the "Text Editor" menu option does (related to the command ).
 * Image Viewer = determines the default Image Viewer program.
 * Video Player = determines the default Video Player program.
 * Audio Player = determines the default Audio Player program.

You can launch the Preferred Applications selection window from the Control Centre (Desktop tab) or from terminal

$ desktop-defaults-set

Default antiX Sessions
antiX Full and Base editions have antiX Desktop Session installed by default. They come with 3 different desktop configurations. From more features (and more RAM use) to less, are:


 * Desktop + Window manager: a file manager (ROX or SPaceFM) displays the icons/launchers on the desktop, manages the wallpaper, automounting devices and files. The window manager (IceWM, JWM or fluxbox) will control the window, window decorations and menus. Apart from startup commands managed by antiX Desktop Session, the ones added to the Window manager's startup file will also launch. They are (from more to less RAM use):
 * Space-fluxbox
 * Space-Icewm
 * Space-jwm
 * Rox-fluxbox
 * Rox-icewm
 * Rox-jwm
 * Window Manager: There are no icons on the desktop. The window manager is in charge of everyting (except outpmounting devices and managing files), from wallpaper to window decorations and menu. The default file manager can be selected using Preferred Applications. From more to less RAM:
 * Fluxbox
 * Icewm
 * JWM
 * herbstluftwm (a tile based window manager not recommended for novices).
 * Minimal desktop sessions: The most minimal of all sessions. These desktop sessions will only launch the window manager and disable the startup programs (no matter if configured with Desktop Session or in the Window manager's own startup file). It is recommended for those systems with extremely limited RAM (less than 512 MBs). From most RAM intensive:
 * min-fluxbox
 * min-icewm
 * min-jwm

Changing between Desktop sessions can be done by:


 * Logging out and changing the Desktop session from SLiM (using F1 to toggle between different sessions before log in).
 * Selecting the desired session from the menu (menu > Desktop > Other Desktops).
 * Selecting the Desktop session from the Other Desktops window (launched from menu > Applications > Accessories or from App Select, searching and launching "Other Desktops").

Installation
The antiX Desktop Session manager is already included in antiX Full and Base editions. For those who have accidentally removed it or want to include it when building from the Core or Net editions, they can install it manually, downloading the package  from the antiX repos.

$ sudo apt install desktop-session-antix

It may be necessary to also copy the .desktop-session folder to your home folder

$ cp -r /etc/skel/.desktop-session ~/

For each new user created after installing, this step is done automatically (no need for user input).

For updating the default Applications menu automatically (for any of the supported Window managers) every time a new program is installed, the packages,  ,   and   are also needed.

$ sudo apt install desktop-defaults-base-antix xdg-utils python-gtk2 python-xdg

For the "Exit Session" window to work, the packages  and python-gtk2 are also needed.

To change the wallpapers, you will need to install wallpaper-antix program.

The  is very interlinked with the customized SLiM Login manager, but it can also work without it (requiring some changes, like launching it from the startup file corresponding to the window manager you are using).

Configuration
Most options will be found in the folder .desktop-session inside your home folder. Some can also be configured using supporting programs.

Main Desktop Session Configuration
The file ~/.desktop-session/desktop-session.conf contains the most important configuration options. All the options need to be edited in a Text editor manually. They are all accompanied of a comment that explains their function and some valid changes. Some of the most important options are:


 * STARTUP_DELAY: It will give a delay (in seconds) before it starts loading different options after the Window manager has started. For some old computers, the window manager may take longer than expected to load, and that may interfere with some programs auto-starting from the desktop session startup file, or even impede the proper loading of the desktop-icon manager. For those cases, changing the value between 3 and 5 should suffice.
 * LOAD_CONKY: If you dislike the System monitor on your desktop (Conky), or you are in need to conserve hardware resources, you can disable it permanently by changing the value from "true" to "false".
 * LOAD_STARTUP_FILE: If you only want the Window Manager's startup file to control the programs that auto-start, you can disable this option (changing it to "false", or leave the startup file empty. It will be "false" for minimal desktop sessions.
 * SCREEN_BLANK_TIME: Instead of an auto-suspend or screensaver option, antiX "blanks" your screen (turns off your display) after certain amount of time. Change here the amount of time in seconds (or use the Set Screen Blanking program from the Session section in the Control Centre).
 * STARTUP_SOUND_LEVEL: If you want to change the default volume when the system starts, change it here. It can be set from "0%" to "100%".

Startup applications
Add all programs and commands you want to auto-start with your user session to the ~/.desktop-session/startup file in this format:

Example:

If you want a certain command to startup for a specific window manager, you will need to add the command to the window manager's startup file instead.

Automount
Most of automounting options can also be configured with the Configure Automount (from the package ) program included in antiX Base and Full editions (launched from the Control Centre, Disk section).