Bookmark this page

Access the Command Line with the Desktop

Objectives

  • Log in to the Linux system with the GNOME 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. GNOME 40 is the default desktop environment in Red Hat Enterprise Linux 9. It provides an integrated desktop for users and a unified development platform on top of a graphical framework that either Wayland (by default) or the legacy X Window System provides.

GNOME Shell provides the core user interface functions for the GNOME desktop environment. The GNOME Shell application is highly customizable. Red Hat Enterprise Linux 9 defaults the GNOME Shell appearance to the "Standard" theme, which is used in this section. You can default to an alternative "Classic" theme, which is closer to the appearance of earlier versions of GNOME, and which is used on previous RHEL versions. You can select either theme persistently at login by clicking the gear icon next to the Sign In button. The gear icon is available after selecting your account but before entering your password.

Figure 2.1: The RHEL 9 login screen

The first time that you log in as a new user, you can take an optional initial "Take Tour" program to learn about the new RHEL 9 features. After you either complete it or skip it, the main GNOME screen appears.

To review the documentation in GNOME Help, click the Activities button on the left side of the top bar. In the dash at the bottom of the screen, click the ring icon to launch it or hover your mouse over the Help icon.

Parts of the GNOME Shell

The elements of the GNOME Shell include the following parts, as shown in this screen capture 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 method is configured).

2

Activities overview: This mode helps to organize windows and to start applications. Enter the Activities overview by clicking the Activities button at the upper-left corner of the top bar, or by pressing the Super key. Find the Super key (sometimes called the Windows key or Command key) near the lower-left corner of most common keyboards. The three main areas are the dash at the bottom of the screen, the windows overview in the center, and the workspace selector on the right side.

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 to 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 configurable list of icons shows your favorite applications, running applications, and a Show Applications button to select arbitrary applications. Start applications by clicking an icon or by using the Show Applications button to find less commonly used applications. The dash is also called the dock.

5

Windows overview: The area in the center of the Activities overview that displays thumbnails of active windows in the current workspace, for bringing windows to the foreground on a cluttered workspace, or moving them to another workspace.

6

Workspace selector: An area to the right, which displays thumbnails of active workspaces, and allows selecting workspaces and moving windows from one workspace to another.

7

Message tray: With the message tray, you can review notifications from applications or system components. If a notification occurs, the notification typically first appears briefly as a single line at the top of the screen, and a persistent indicator appears in the top bar next to the clock to inform you of recently received notifications. Open the message tray to review these notifications by clicking the clock on the top bar or by pressing Super+M. Close the message tray by clicking the clock on the top bar, or by pressing Esc or Super+M again. The message tray also shows the calendar and information about the events in the calendar.

Figure 2.2: Closeup of an open message tray

View and edit the GNOME keyboard shortcuts that your account uses. 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 Keyboard from the left pane. The right pane displays your current shortcut settings under the Keyboard ShortcutsCustomize Shortcuts section.

Note

Some keyboard shortcuts, such as function keys or the Super key, might be difficult to send to a virtual machine. Special keystrokes that those shortcuts use 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 the current virtual training and self-paced training environments provided by Red Hat, use of the Super key can be tricky, because your web browser might not pass it to the virtual machine in the classroom environment.

At the top of your browser window that displays the interface for your virtual machine, click the keyboard icon on the right side. An on-screen keyboard opens. Click the icon again to 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, then it turns yellow, to indicate that the key is being held down. So for example, to enter Super+M in the on-screen keyboard, you can click Super and then click M.

To press and release Super in the on-screen keyboard, then click it twice. The first click holds down the Super key, and the second click releases it.

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

Access Workspaces

Workspaces are separate desktop screens that have different application windows. You can use workspaces to organize the working environment by grouping open application windows by task. For example, you can group windows for a particular system maintenance activity (such as setting up a new remote server) in one workspace, and you can group email and other communication applications in another workspace.

Choose between two methods to switch between workspaces. The first method is to press Ctrl+Alt+LeftArrow or Ctrl+Alt+RightArrow to switch between workspaces sequentially. The second is to switch to the Activities overview and click the chosen workspace.

An advantage of using the Activities overview is that you can click and drag windows between workspaces by 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 the current virtual training and self-paced training environments provided by Red Hat, your web browser does not usually pass Ctrl+Alt key combinations to the virtual machine in the classroom environment.

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

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 the workspace to switch to.

Start a Terminal

To get a shell prompt in GNOME, start a graphical terminal application such as GNOME Terminal. Use one of the following methods to start a terminal:

  • From the Activities overview, select Terminal from the dash, either in Favorites or with the Show Applications button.

  • Search for terminal in 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 you open a terminal window, a shell prompt is displayed for the user who started the graphical terminal program. The shell prompt and the terminal window's title bar indicate the current username, hostname, and working directory.

Lock the Screen and Log Out

Lock the screen, or log out entirely, 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, you can press Enter, Space, or click the left mouse button. 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 Power Off/Log OutLog Out. A window is displayed that offers the option to Cancel or confirm the Log Out action.

Power Off or Reboot the System

To shut down the system, from the system menu in the upper-right corner, select Power Off/Log outPower Off or press Ctrl+Alt+Del. A window is displayed that offers the option to Cancel or confirm the Power Off action. If you do not make a choice, then the system automatically shuts down after 60 seconds.

To reboot the system, from the system menu in the upper-right corner, select Power Off/Log outRestart. A window is displayed that offers the option to Cancel or confirm the Restart action. If you do not make a choice, then the system automatically restarts after 60 seconds.

References

GNOME Help

  • yelp

GNOME Help: Visual Overview of GNOME

  • yelp help:gnome-help/shell-introduction

GNOME 40 Web Page

Revision: rh124-9.3-770cc61