The goal is to provide a simple and lightweight mechanic to select a desktop session after login on a tty. This is a readonly mirror of the GitLab project.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
screenshots
src
CHANGES
CONTRIBUTE
LICENSE
Makefile
README

README

x-session-selector
==================


The goal is to provide a simple and lightweight mechanic to start a X session.
x-session-selector can be used as a "better" `startx` replacement, but its main
usage case is to provide a X session selection after a user has logged in on
a TTY.


License
-------

x-session-selector is licensed under GNU GPLv3.


Features
--------

 * Allows to select a session/WM on the command line.
 * Starts X with the selected session/WM.


Usage
-----

Start it after login on a tty.

The parameters it supports:

    USAGE: xsessionselector [OPTION]
    
      --automatic[=TIMEOUT]  Activates the automatic selection system, if no
                             timeout is provided it defaults to 2 seconds.
      --display=DISPAY       The display number to assign. If not provided will
                             default to the next free X display number.
      --help                 Prints this help.
      --no-newline           When --print-only is provided, does not print
                             a new line after the selection.
      --print-only           Only print the selection to stdout (if any).
      --select=SELECTION     Select this item, the provided argument is
                             the executable, f.e. /usr/bin/openbox.
      --shell=SHELL          The executable to start when dropping to shell,
                             defaults to nothing. If this is not provided,
                             the program will simply exit, if a value is
                             provided, it will be executed.
      --timeout=TIMEOUT      When --automatic is provided, sets the timeout,
                             defaults to 2 seconds.
      --tty-only             Only present the prompt when being on a TTY.
                             When not on a TTY the program will exit, except
                             if --shell has been provided, then the shell will
                             be executed.
      --vt=VT                The number of the virtual terminal to use,
                             defaults to the current VT. Provided number must
                             be positive, but can be prefixed with + or - to
                             to change relative from the current VT.
      --wsessions-dir=DIR    The directory from which to read the available
                             Wayland sessions, defaults to
                             /usr/share/wayland-sessions/.
      --xlauncher=XLAUNCHER  The executable to use as launcher for X, defaults
                             to xinit. The selected session together with
                             the display number will be given as arguments to
                             the provided executable.
      --xsessions-dir=DIR    The directory from which to read the available
                             X sessions, defaults to /usr/share/xsessions/.


Examples
--------

The most simple example is to use it as a `startx` replacement:

    $ xsessionselector

However, after a login it might be wanted to automatically select one entry
and automatically starting this entry after a certain amount of time:

    $ xsessionselector --automatic=5 --select=/usr/bin/openbox

For testing purposes, or if you just want to use it as fancy selector,
x-session-selector can also only print the selected entry:

    $ xsessionselector --print-only

In a similar manner if you have trouble with it, you can set the X launcher to
`echo` to see what exactly is being started:

    $ xsessionselector --xlauncher=echo


Dependencies
------------

Dependencies are minimal:

 * ncurses