Archives For Gnome Shell

The popular Gnome 3 desktop session for Linux. Available in Ubuntu Software Center.

This simple tutorial shows how to add a system tray menu option to switch between Dark and Light system mode in Ubuntu.

By default, the System Settings -> Appearance page offers options to choose Standard, Light, and Dark window colors. It however only apply the app theme.

For system menu, notifications, date and time menu, etc, you have to install user themes extension, and change the Gnome Shell theme individually via Gnome Tweak Tool.

Here I’m going to introduce a new Gnome Shell Extension called ‘Ubuntu Appearance‘. With it, you can toggle fully dark and light mode easily via a few clicks.

The extension features:

  • Integrate Light, Dark, Standard option into system tray menu.
  • Toggle fully dark / light mode, not only app window colors but also system theme (e.g., system menu, calendar, notifications.).
  • Option name vary according to current system mode.
  • The user themes extension is not required.

Install Ubuntu Appearance extension:

1.) Firstly, open terminal by pressing Ctrl+Alt+T on keyboard. When terminal opens, run required packages:

sudo apt install chrome-gnome-shell gnome-shell-extension-prefs

2.) Secondly, go to the extension web page and click on the slider icon to install it.

Though the extension says for Gnome 40, it works well in my Ubuntu 20.04 and Ubuntu 21.04 machine.

Don’t see the toggle icon? Click the link ‘Click here to install browser extension’ to install browser extension and refresh the web page.

Once you installed the extension, the option should appear in system menu immediately. Log out and back in or restart Gnome Shell if you don’t see the option.

Unlike laptop lid close action, it’s easy to tell Ubuntu to shutdown or hibernate automatically when reached idle timeout.

In all current Ubuntu releases, including Ubuntu 18.04, Ubuntu 20.04, and Ubuntu 21.04 running with the default GNOME desktop, you can enable ‘Automatic Suspend‘ feature in Power Settings easily.

What if you want to power off, hibernate, or even log-out Ubuntu after it reached inactivity timeout? Here’s how to do this in two ways.

Method 1. Run 2 commands to enable Automatic Shutdown / Hibernate:

Firstly open terminal either from system application launcher or by pressing Ctrl+Alt+T on keyboard.

NOTE: Hibernate does not function out-of-the-box in current Ubuntu releases. You have to enable it first if you need automatic hibernation.

When terminal opens, run command:

  • Enable automatic shutdown for desktop PC or laptop on AC power:
    gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'shutdown'

    For choices, you can change ‘shutdown’ in command to ‘hibernate‘, ‘logout‘, ‘nothing‘, etc.

  • Change the inactivity timeout (in seconds), half an hour for instance:
    gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 1800

For laptops on battery, use following commands instead:

gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'shutdown'
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 1800

Method 2: Change system idle action via Dconf Editor.

For those prefer graphical configuration tool, search for and install ‘Dconf Editor‘ from Ubuntu Software.

Then launch the tool, and go to ‘org/gnome/settings-daemon/plugins/power‘.

Next scroll down, find out and change the values of ‘sleep-inactive-ac-type‘ and ‘sleep-inactive-ac-timeout‘ for system idle action when on AC power.

When on battery, change the values of ‘sleep-inactive-battery-type‘ and ‘sleep-inactive-battery-timeout‘ instead.

Changes will take place immediately when you click on ‘Apply’ button.

Gnome Tweaks, one of the must have apps for configuring Ubuntu, removes GNOME Shell Extensions support by releasing version 40.

Which means in next Ubuntu release which will ship with Gnome 40+, you have to use another tool to manage Gnome Shell Extensions.

If you have tried out Fedora 34, you should already see the prompt at first launch of Gnome Tweaks: “Extensions management has been moved to GNOME Extensions”.

The “new” tool “GNOME Extensions” is available in Ubuntu universe repositories since Ubuntu 20.04 LTS. If you don’t have it, open terminal by pressing Ctrl+Alt+T on keyboard, and run command to install it:

sudo apt install gnome-shell-extension-prefs

Then you can open it from system app launcher.

Different to the extensions tab in Gnome Tweaks, the GNOME Extensions tool displays built-in Gnome Shell extensions and user installed extensions separately.

Besides the slider icons to toggle on/off extensions and gear buttons to change extension settings, there’s a triangle icon after each extension. Clicking on the icon will expand the extension with a brief description as well as the website and remove buttons.

In addition, Fedora users can get the tool by installing gnome-extensions-app package. Other Linux with Gnome Desktop can install the flatpak package.

Looking a graphical tool to manage users and groups in Ubuntu Desktop? Try the classic Gnome user settings tool.

A user is anyone who uses a computer, and users may be grouped together into a “group”. Users and groups are used to control access to the system’s files, directories, and peripherals.

For those hate Linux commands, the classic GUI tool, which was default in Ubuntu when it was Gnome 2, allows to add, remove, edit users and groups.

Like system default User Settings, it offers options to add, remove, and edit all user accounts. Though there are a few differences:

  • It can generate random password for user account.
  • Automatic login option seems not working.
  • Custom user privileges under Advanced Settings.

By clicking on “Manage Groups” button, you can then add, remove, edit groups.

To add or remove a user from a group, simply go to group properties, and check or un-check the user name under Group Numbers.

To install the GUI user and group managing tool, open terminal from system app launcher and run command:

sudo apt install gnome-system-tools

Then search for and open “Users and Groups” from system app launcher and enjoy!

Run Ubuntu or other Linux with Gnome Desktop on E-Ink Displays? There’s now an E-Ink Mode Gnome Shell extension allows to easily toggle desktop appearance suitable for the monitors.

What does E-Ink Mode extension do:

  • Switch shell theme to built-in light high contrast one (User Themes extension is not required).
  • Switch GTK and icon theme to High Contrast
  • Switch Cursor theme to DMZ-White
  • Disable shell animations
  • Restore previous themes and animation settings when disable this extension

Though the things can be done manually step by step, the extension make it as easy as a toggle switch in Extensions tool. And so far Gnome 3.36 is supported.

How to Install E-Ink Mode extension:

1.) For Ubuntu, first make sure chrome-gnome-shell package is installed. And for the Extensions tool, install thethe gnome-shell-extension-prefs package:

sudo apt install chrome-gnome-shell gnome-shell-extension-prefs

2.) Go to the extension web page and turn on the toggle icon to install it.

Don’t see the toggle icon? Click the link which says “Click here to install browser extension” to install browser extension and refresh the web page.

It should enable E-Ink Mode once you installed the extension. To toggle off or remove it, use Extensions tool.