Abrindo Aplicativos Gráficos
métodos para abrir aplicativos de
Interface gráfica do usuário, ou GUI,
em vários ambientes.
Os aplicativos gráficos podem ser iniciados a partir de uma janela de terminal ou sessão de console simplesmente digitando o nome do aplicativo.
Nomes de Arquivos x Nomes de Aplicativos
Os programas são abertos na linha de comando usando o nome do arquivo
executável fornecido no pacote do programa. Uma entrada no menu da área de
trabalho geralmente terá um nome diferente do arquivo que executa. Por
exemplo, o utilitário de gerenciamento de disco GNOME aparece no menu como
Discos, e o arquivo que executa é
Quando um programa é executado na linha de comando, o terminal fica ocupado
até que o programa seja concluído. Quando uma aplicação gráfica é executada
a partir da linha de comando, a saída de erro do programa, ou
enviada para a janela do terminal. Isso pode ser especialmente útil ao
[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 Current Video Mode: 3200x1080 32bit Xinerama/TwinView detected. Screen count: 2 Screen #0: (0, 0) x (1920, 1080) Screen #1: (1920, 0) x (1280, 1024) Supported resolutions list: 640x480 16bit 640x480 32bit 640x480 0bit 768x480 16bit <output truncated>
To launch a graphical application, but fork the additional output into the
background and return the terminal for immediate use, use the shell’s
[fedorauser@localhost]$ emacs foo.txt &
Ending a session
Applications that hold the command line prompt until they complete will close when the terminal session ends, even if they are forked into the background.
GUI programs can also be launched on one
TTY and displayed on another by
DISPLAY variable. This can be useful when running multiple
graphical sessions, or for troubleshooting problems with a desktop session.
Switch to another TTY using the key combination Ctrl+Alt+F2 and log in. Note that consoles are available by default with F2 through F6.
Identify the X session you want to target. The
DISPLAYvariable is always an integer preceded by a colon, and will be :0 in most cases. Check the arguments of the currently running X process to verify the value. The command below shows both the
DISPLAYvariable as well as the TTY that X is running on,
[fedorauser@localhost]$ ps aux|grep /usr/bin/X root 1498 7.1 1.0 521396 353984
tty1Ss+ 00:04 66:34 /usr/bin/X
:0vt1 -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
DISPLAYvariable when executing the program.
[fedorauser@localhost]$ DISPLAY=:0 gnome-shell --replace &
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.
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.
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.
The GNOME menu, called the
overview, can be accessed by either clicking
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
Selecting an item from the menu is best accomplished using the
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
overview can also be browsed. The bar on the left, called the
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.
To learn more about using GNOME shell, visit https://wiki.gnome.org/GnomeShell/CheatSheet
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.
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.