Opening Graphical Applications

methods for opening Graphical User Interface, or GUI, applications in various environments.

Opening graphical applications from the command line

Graphical applications can be launched from a terminal window or console session by simply typing the name of the application.

[fedorauser@localhost]$ firefox
File names vs Application names

Programs are opened from the command line using the name of the executable file provided in the program’s package. An entry in the desktop menu will often be named differently from the file it executes. For example, the GNOME disk management utility appears in the menu as Disks, and the file it executes is /usr/bin/gnome-disks.

When a program is executed on the command line, the terminal is occupied until the program completes. When a graphical application is executed from the command line, the program’s error output, or STDERR, is sent to the terminal window. This can be especially useful when troubleshooting.

Example 1. Viewing errors by launching graphical applications from the command line
[fedorauser@localhost]$ astromenace-wrapper
	AstroMenace 1.3.1 121212

	Open XML file: /home/fedorauser/.config/astromenace/amconfig.xml
	VFS file was opened /usr/share/astromenace/gamedata.vfs

	Vendor     : OpenAL Community
	Renderer   : OpenAL Soft
	Version    : 1.1 ALSOFT 1.15.1
	ALut ver   : 1.1

	Font initialized: DATA/FONT/LiberationMono-Bold.ttf

	Modo de Vídeo Actual: 3200x1080 32bit

	Xinerama/TwinView detected.
	Pantallas: 2
	Pantalla #0: (0, 0) x (1920, 1080)
	Pantalla #1: (1920, 0) x (1280, 1024)

	Lista de resoluciones soportadas:
	640x480 16bit
	640x480 32bit
	640x480 0bit
	768x480 16bit
	<output truncated>

Para lanzar una aplicación gráfica, pero bifurque la salida adicional en segundo plano devuelva el terminal para su uso inmediato, utilice la función de shell job control.

[fedorauser@localhost]$ emacs foo.txt &
Terminando una sesión

Las aplicaciones que acaparan el indicador de línea de comando hasta que terminan se cerrarán cuando la sesión de terminal finalice, incluso si están bifurcados en segundo plano.

Los programas GUI se pueden lanzar también sobre una TTY y visualizados en otra especificada en la variable DISPLAY variable. Esto puede ser útil cuando se ejecutan múltiples sesiones gráficas o para resolución de problemas con una sesión de escritorio.

  1. Conmute a otra TTY usando la combinación de teclas Ctrl+Alt+F2 y acceda. Advierta que las consolas están disponibles de modo predeterminado con F2 hasta F6.

  2. Identifique la sesión X que desea como objetivo. La variable DISPLAY es siempre un entero precedido de dos puntos y será :0 en la mayoría de los casos. Compruebe los argumentos del proceso X en ejecución para verificar el valor. El comando de abajo muestra tanto la variable DISPLAY como la TTY sobre la que está corriendo la aplicación X, tty1.

    [fedorauser@localhost]$ ps aux|grep /usr/bin/X
    root      1498  7.1  1.0 521396 353984 tty1    Ss+  00:04  66:34 /usr/bin/X :0 vt1 -background none -nolisten tcp -auth /var/run/kdm/A:0-22Degc
    
    root     23874  0.0  0.0 109184   900 pts/21   S+   15:35   0:00 grep --color=auto /usr/bin/X
  3. Especifique la variable DISPLAY cuando ejecute el programa.

    [fedorauser@localhost]$ DISPLAY=:0 gnome-shell --replace &
  4. Switch back to the TTY the graphical session is running on. Since the example above shows X running on vt1, pressing Ctrl+Alt+F1 will return to the desktop environment.

Launching Applications with Alt+F2

Most desktop environments follow the convention of using the key combination Alt+F2 for opening new applications. Pressing Alt+F2 brings up a prompt for a command to be entered into.

Commands entered into this dialog box function much as they would if entered in a terminal. Applications are known by their file name, and can accept arguments.

GNOME command entry dialog box
Figure 1. Using Alt+F2 with GNOME
KDE command entry dialog box
Figure 2. Using Alt+F2 with KDE
LXDE command entry dialog box.
Figure 3. Using Alt+F2 with LXDE
MATE command entry dialog box.
Figure 4. Using Alt+F2 with MATE
XFCE command entry dialog box.
Figure 5. Using Alt+F2 with XFCE

Launching applications from the Desktop Menu

Applications can also be opened from the menu system provided by the desktop environment in use. While the presentation may vary between desktop environments, the menu entries and their categories are provided by the individual application and standardized by the freedesktop.org Desktop Menu Specification. Some desktop environments also provide search functionality in their menu system to allow quick and easy access to applications.

Using GNOME menus

The GNOME menu, called the overview, can be accessed by either clicking the Activities button in the top left of the primary display, by moving the mouse past the top left hot corner, or by pressing the Super ( Windows ) key. The overview presents documents in addition to applications.

Selecting an item from the menu is best accomplished using the search box. Simply bring up the overview, and begin typing the name of the application you want to launch. Pressing enter will launch the highlighted application, or you can use the arrow keys or mouse to choose an alternative.

Typing the name of an application into the overview search box will display matching menu entries. The search also matches descriptions
Figure 6. Using the GNOME search box

The overview can also be browsed. The bar on the left, called the dash, shows frequently used applications and a grid icon. Clicking on the grid icon brings up a grid in the center of the window that displays frequently used applications. The grid will display all available applications if selected using the All button at the bottom of the screen.

The GNOME menu has a bar on the left for frequently used applications
Figure 7. Browsing GNOME menu entries

To learn more about using GNOME shell, visit https://wiki.gnome.org/GnomeShell/CheatSheet

Using KDE menus

The KDE menu is opened by clicking the Fedora button at the bottom left corner of the screen. The menu initially displays favorite applications, which can be added to by right clicking any menu entry. Hovering over the icons in the lower portion of the menu will display applications, file systems, recently used applications, or options for logging out of the system.

The KDE menu displays applications in categories. The contents of the categories are displayed when clicked.
Figure 8. The KDE desktop menu.

Search functionality is also available in the KDE menu system. To search for applications, open the menu and begin typing. The menu will display matching entries.

The KDE menu will search for matching applications if you type into the search box. For example
Figure 9. Searching with the KDE menu.

Using menus in LXDE, MATE, and XFCE

Menus in LXDE, MATE, and XFCE have a varied appearance but a very similar structure. They categorize applications, and the contents of a category are displayed by hovering the cursor over the entry. Applications are launched by clicking on an entry.

LXDE Menu
Figure 10. The LXDE menu
MATE menu
Figure 11. MATE menu
XFCE Menu
Figure 12. XFCE Menu