# Main Index: Debian Linux Magic Spells Cheat Sheet (one liners, how to, tips and tricks)
# Commands for the GUI (Graphical User Interface)
GUI (Graphical User Interface) provides a visual interface with icons, menus, and windows for users to interact with a computer system, making it user-friendly and intuitive. CLI (Command Line Interface) offers a text-based interface where users enter commands to interact with the system, providing more control and efficiency for advanced users and automation tasks.
While this book is focused on the Command Line Interface, you can perform commands from the command line that affect your desktop environment.
Display Manager
You can check if and which Display Manager is present on the system by checking whether is present a symbolic link to the display manager file
ls -l /etc/systemd/system/display-manager.service
If the file is missing ("No such file or directory") there is no display manager (on the system there is therefore only the textual interface), otherwise the linked file is shown.
Or, you can read the file default-display-manager:
cat /etc/X11/default-display-manager
To change Display Manager, deactivate the current one and activate the new one (which must have been previously installed):
systemctl disable OLD_DISPLAY_MANAGER # For example systemctl disable sddm
systemctl enable NEW_DISPLAY_MANAGER # For example systemctl enable kdm (provided it has already been installed)
You can also use the following command, but it will open a box where you have to confirm your choice and press Enter.
dpkg-reconfigure DISPLAY_MANAGER # choose the DISPLAY_MANAGER you want to set in your system, for example: dpkg-reconfigure kdm
System users are stored in the /etc/passwd file and their passwords (shadowed) in /etc/shadow . Debian makes regular backups in /var/backups/passwd.bak and /var/backups/shadow.bak
Display Server (Window Manager)
update-alternatives --list x-window-manager # List Display Servers (Window Managers) installed on the system
echo $XDG_SESSION_TYPE # Show the Display Server currently in use.
Desktop Environment
echo $DESKTOP_SESSION shows the path and the name of the file (without the .desktop extension) containing information about the Desktop Environment to be started.
ls /usr/share/applications/ shows all launcher files for applications (which will appear in the desktop environment start menu). The files have a .desktop extension. A .desktop file contains the parameters to launch the application from the menu. The path and name of the file to be launched are indicated in the Exec parameter within the .desktop file. Application icons are placed in the section (or sections) of the menu specified under Categories.
xwinifo # Enter this command and then click on any window to get information about it, such as its size in pixels and color depth. You may also click on the desktop.
rm -rf ~/.local/share/Trash/files/* # Empty trashcan
Issues with graphic cards
If graphics doesn't work on your system (or no longer works after an update)
You probably need to install the proprietary driver for your graphic card.
apt edit-sources
Add non-free contrib to your sources. For example, change "deb http://deb.debian.org/debian/ testing main" to "deb http://deb.debian.org/debian/ testing main non-free contrib".
apt update
apt install firmware-linux
reboot
For Nvidia graphic cards:
apt install -y nvidia-detect && nvidia-detect
Then you have to install the Nvidia proprietary driver (apt install nvidia-driver) or the suggested driver returned by nvidia-detect (for example, apt install nvidia-legacy-nnnxx-driver )
reboot
Please DONATE to support the development of Free and Open Source Software (PayPal, Credit Card, Bitcoin, Ether)
Page issued on 29-Sep-2023 14:48 GMT
Copyright (c) 2023 Geody - Legal notices: copyright, privacy policy, disclaimer