Desktop Session

Different from most Linux based operating systems, antiX Linux enables you to switch 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. nuts-n-bolts: some background info and terminology Several components are involved in achieving a graphical (aka "desktop") linux experience. After the system boots, it starts multiple tty (aka "terminal") instances then, from within one of the terminal instances, launches the X server... (bear in mind: linux is a multi-user, multi "seat" platform) ...which, in turn, launches a "login manager" (aka "display manager"). SLiM, LightDM, SDDM each alternative login manager has differing features. Their shared common features are username+password challenge and, typically, ability to select which graphical "environment" to invoke for the current "desktop login session". The login manager launches a (configurable, per user) "session startup" script which, in turn, launches a "window manager" component. An all-in-one "desktop environment" (aka "DE") like Xfce, KDE, Gnome, Cinnamon... is typically comprised of a fixed set of (interlocking//interdependent) components. For instance, the Xfce panel and taskbar are only usable in conjunction with the XFWM window manager. The antiX Full edition contains multiple preinstalled "window managers" (JWM, iceWM, fluxbox) which are capable of running alone or, optionally, along with (y)our choice of various, loosely-coupled, components. For the component serving the role of "desktop (icon) manager", antiX Full edition offers a choice of rox or spacefm. These both can also be launched as windowed "file manager" instances, in addition to handling drag-n-drop (and click) interactions with desktop icons (launchers) and, optionally, placement and tiling of "wallpaper" (root window background image).

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").
 * Running /usr/local/lib/desktop-session/desktop-session-restart desktop_session_name

The last selected Desktop Session (which becomes the default upon selection) is stored in ~/.desktop-session/desktop-code.[0-9]. The number in the name represents the X server instance. Default options are listed above; additionally openbox is listed for variants.(openbox, space-openbox, rox-openbox) An up to date list for *your* system of names and session switch commands can be found in /usr/share/desktop-session/wm-menus/RAW-wm-menu

Desktop Session functions
antiX Desktop Session not only manages switching 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:


 * Enable the user to 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 [a GUI utility, accessible via antiX ControlCentre] 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

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. tip: in antiX Full and Base editions, via ControlCentre you can open a tabbed text editor containing various configuration files for convenient editing.

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%".
 * A full copy of the configuration file:

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:

Tips:


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


 * If, after having edited your configuration file, you later wonder "What's changed, compared to the 'original' copy?"... you can find an original copy here: /etc/desktop-session/desktop-session.conf

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).