Bookmark this page

Accessing the Command Line Using the Desktop

Objectives

After completing this section, you should be able to log in to the Linux system using the GNOME 3 desktop environment to run commands from a shell prompt in a terminal program.

Introduction to the GNOME Desktop Environment

The desktop environment is the graphical user interface on a Linux system. The default desktop environment in Red Hat Enterprise Linux 8 is provided by GNOME 3. It provides an integrated desktop for users and a unified development platform on top of a graphical framework provided by either Wayland (by default) or the legacy X Window System.

GNOME Shell provides the core user interface functions for the GNOME desktop environment. The GNOME Shell application is highly customizable. Red Hat Enterprise Linux 8 defaults GNOME Shell's look and feel to the "Standard" theme, which is used in this section. Red Hat Enterprise Linux 7 defaulted to an alternative theme named "Classic" that was closer to the look and feel of older versions of GNOME. Either theme can be selected persistently at login by clicking the gear icon next to the Sign In button that is available after selecting your account but before entering your password.

Figure 2.1: An empty GNOME 3 desktop

The first time you log in as a new user, an initial setup program runs to help configure basic account settings. Once that is complete, the GNOME Help application starts on the Getting Started with GNOME screen. This screen includes videos and documentation to help orient new users to the GNOME 3 environment. You can quickly start GNOME Help by clicking the Activities button on the left side of the top bar, and in the dash that appears on the left side of the screen, clicking the life ring buoy icon to launch it.

Parts of the GNOME Shell

The elements of the GNOME Shell include the following parts, as illustrated by this screenshot of the GNOME Shell in Activities overview mode:

1

Top bar: The bar that runs along the top of the screen. It is displayed in the Activities overview and in workspaces. The top bar provides the Activities button, and controls for volume, networking, calendar access, and switching between keyboard input methods (if more than one is configured).

2

Activities overview: This is a special mode that helps a user organize windows and start applications. The Activities overview can be entered by clicking the Activities button at the upper-left corner of the top bar, or by pressing the Super key. The Super key (sometimes called the Windows key or Command key), is found near the lower left corner of an IBM PC 104/105-key or Apple keyboard. The three main areas of the Activities overview are the dash on the left side of the screen, the windows overview in the center of the screen, and the workspace selector on the right side of the screen.

3

System menu: The menu in the upper-right corner on the top bar provides control to adjust the brightness of the screen, and to switch on or off the network connections. Under the submenu for the user's name are options to adjust account settings, and log out of the system. The system menu also offers buttons to open the Settings window, lock the screen, or shut down the system.

4

Dash: This is a configurable list of icons of the user's favorite applications, applications which are currently running, and a grid button at the bottom of the dash which can be used to select arbitrary applications. Applications can be started by clicking on one of the icons or by using the grid button to find a less commonly used application. The dash is also sometimes called the dock.

5

Windows overview: An area in the center of the Activities overview which displays thumbnails of all windows active in the current workspace. This allows windows to be more easily brought to the foreground on a cluttered workspace, or to be moved to another workspace.

6

Workspace selector: An area to the right of the Activities overview which displays thumbnails of all active workspaces and allows workspaces to be selected and windows to be moved from one workspace to another.

7

Message tray: The message tray provides a way to review notifications sent by applications or system components to GNOME. If a notification occurs, normally the notification first appears briefly as a single line at the top of the screen, and a persistent indicator appears in the middle of the top bar next to the clock to inform the user of notifications have been recently received. The message tray can be opened to review these notifications by clicking the clock on the top bar or by pressing Super+M. The message tray can be closed by clicking the clock on the top bar, or by pressing Esc or Super+M again.

Figure 2.2: Closeup of an open message tray

You can view and edit the GNOME keyboard shortcuts used by your account. Open the system menu on the right side of the top bar. Click the Settings button on the bottom of the menu on the left. In the application window that opens, select DevicesKeyboard from the left pane. The right pane will display your current shortcut settings.

Note

Some keyboard shortcuts, such as function keys or the Super key, might be difficult to send to a virtual machine. This is because special keystrokes used by those shortcuts might be captured by your local operating system, or by the application that you are using to access the graphical desktop of your virtual machine.

Important

In Red Hat's current virtual training and self-paced training environments, using the Super key can be a little tricky. You probably cannot just use your keyboard's Super key because it is often not passed to the virtual machine in the classroom environment by your web browser.

At the top of your browser window that displays the interface for your virtual machine, there should be a keyboard icon on the right side. If you click that, it will open an on-screen keyboard. Clicking it again will close the on-screen keyboard.

The on-screen keyboard treats Super as a modifier key that is often held down while pressing another key. If you click it once, it will turn yellow indicating that the key is being held down. So, to enter Super+M in the on-screen keyboard, click Super, then click M.

If you just want to press and release Super in the on-screen keyboard, you have to click it twice. The first click "holds down" the Super key, and the second click releases it.

The other keys treated as modifier keys (like Super) by the on-screen keyboard are Shift, Ctrl, Alt, and Caps. The Esc and Menu keys are treated like normal keys and not modifier keys.

Workspaces

Workspaces are separate desktop screens that have different application windows. These can be used to organize the working environment by grouping open application windows by task. For example, windows being used to perform a particular system maintenance activity (such as setting up a new remote server) can be grouped in one workspace, while email and other communication applications can be grouped in another workspace.

There are two simple methods for switching between workspaces. One method, perhaps the fastest, is to press Ctrl+Alt+UpArrow or Ctrl+Alt+DownArrow to switch between workspaces sequentially. The second is to switch to the Activities overview and click the desired workspace.

An advantage of using the Activities overview is that windows can be clicked and dragged between workspaces using the workspace selector on the right side of the screen and the windows overview in the center of the screen.

Important

Like Super, in Red Hat's current virtual training and self-paced training environments, Ctrl+Alt key combinations are not usually passed to the virtual machine in the classroom environment by your web browser.

You can enter these key combinations to switch workspaces using the on-screen keyboard. At least two workspaces need to be in use. Open the on-screen keyboard and click Ctrl, Alt, and then either UpArrow or DownArrow.

However, in those training environments, it is generally simpler to avoid the keyboard shortcuts and the on-screen keyboard. Switch workspaces by clicking the Activities button and then, in the workspace selector to the right of the Activities overview, clicking on the workspace to which you want to switch.

Starting a Terminal

To get a shell prompt in GNOME, start a graphical terminal application such as GNOME Terminal. There are several ways to do this. The two most commonly used methods are listed below:

  • From the Activities overview, select Terminal from the dash (either from the favorites area or by finding it with either the grid button (inside Utilities grouping) or the search field at the top of the windows overview).

  • Press the Alt+F2 key combination to open the Enter a Command and enter gnome-terminal.

When a terminal window is opened, a shell prompt displays for the user that started the graphical terminal program. The shell prompt and the terminal window's title bar indicate the current user name, host name, and working directory.

Locking the Screen or Logging Out

Locking the screen, or logging out entirely, can be done from the system menu on the far right of the top bar.

To lock the screen, from the system menu in the upper-right corner, click the lock button at the bottom of the menu or press Super+L (which might be easier to remember as Windows+L). The screen also locks if the graphical session is idle for a few minutes.

A lock screen curtain appears that shows the system time and the name of the logged-in user. To unlock the screen, press Enter or Space to raise the lock screen curtain, then enter that user's password on the lock screen.

To log out and end the current graphical login session, select the system menu in the upper-right corner on the top bar and select (User)Log Out. A window displays that offers the option to Cancel or confirm the Log Out action.

Powering off or Rebooting the System

To shut down the system, from the system menu in the upper-right corner, click the power button at the bottom of the menu or press Ctrl+Alt+Del. In the dialog box that displays, you can choose to Power Off or Restart the machine, or Cancel the operation. If you do not make a choice, the system automatically shuts down after 60 seconds.

References

GNOME Help

  • yelp

GNOME Help: Getting Started with GNOME

  • yelp help:gnome-help/getting-started

Revision: rh124-8.2-df5a585