LinuxCommandLibrary

dm-tool

Manage device-mapper devices from the command line

TLDR

Show the greeter while keeping current desktop session open and waiting to be restored upon authentication by logged in user

$ dm-tool switch-to-greeter
copy

Lock the current session
$ dm-tool lock
copy

Switch to a specific user, showing an authentication prompt if required
$ dm-tool switch-to-user [username] [session]
copy

Add a dynamic seat from within a running LightDM session
$ dm-tool add-seat [xlocal] [name]=[value]
copy

SYNOPSIS

dm-tool [command]

PARAMETERS

lock
    Locks the current session's screen.

switch-to-greeter
    Switches to the greeter (login screen), allowing another user to log in without logging out the current user.

unlock
    Unlocks the current session's screen. (Not usually used directly)

add-nested-desktop
    Adds a nested desktop (experimental).

remove-nested-desktop
    Removes a nested desktop (experimental).

DESCRIPTION

The dm-tool command is a utility primarily used in desktop environments like Ubuntu that utilize a display manager such as LightDM. It allows users to perform certain actions related to user sessions, like switching users, locking the screen, and logging out.

dm-tool is designed to work in conjunction with the display manager to provide a seamless desktop experience. It communicates with the display manager to trigger these session-related events. This tool simplifies interaction by abstracting away the complexities of directly interacting with the display manager's underlying mechanisms.

Typical users don't directly invoke dm-tool from the command line as desktop environments often provide graphical interfaces for these functions. It is used by desktop environment components to switch users or lock screens.

CAVEATS

dm-tool requires appropriate permissions to interact with the display manager. If you are not running it within a suitable session context or don't have the necessary privileges, the commands may fail. It's primarily meant for use within a graphical desktop environment.

<B>SECURITY CONSIDERATIONS</B>

Using dm-tool inappropriately can potentially compromise security. Ensure proper access controls and avoid using it in contexts where unauthorized session manipulation could occur.

<B>PERMISSIONS</B>

Many dm-tool commands require root privileges or specific session permissions to function correctly. This is particularly true for actions that affect other users or the system's state.

HISTORY

dm-tool was specifically developed to interact with LightDM, a popular display manager. It emerged as a convenient way to trigger session management actions within desktop environments using LightDM. Before dm-tool, these operations typically required more complex interactions with the display manager's internal mechanisms. It's become integral with Ubuntu, being used in combination with Unity and Gnome, and more generally in other desktop environments that uses LightDM

SEE ALSO

lightdm(1), xlock(1)

Copied to clipboard