Friday, April 08, 2016

How to create an icon to launch a new Terminal on the Desktop of an Oracle Linux 7 installation

Oracle Linux 7 uses  a new Gnome version. Since then it is no longer possible to "drag & drop" an icon from the menus to the desktop.

To create a new icon on your desktop to launch a Terminal session, do the following:
  1. Go to the "Desktop" folder of your login account
  2. Create a new file with the extension "desktop" e.g. gnome-terminal.desktop 
  3. Put the following content into that file:

    #!/usr/bin/env xdg-open

    [Desktop Entry]
    Name=Terminal
    Name[de]=Terminal
    Comment=Use the command line
    Comment[de]=Befehlszeile verwenden
    Keywords=shell;prompt;command;commandline;
    Keywords[de]=Shell;Prompt;Befehl;Befehlszeile;
    TryExec=gnome-terminal
    Exec=gnome-terminal
    Icon=/usr/share/icons/gnome/48x48/apps/utilities-terminal.png
    Type=Application
    X-GNOME-DocPath=gnome-terminal/index.html
    X-GNOME-Bugzilla-Bugzilla=GNOME
    X-GNOME-Bugzilla-Product=gnome-terminal
    X-GNOME-Bugzilla-Component=BugBuddyBugs
    X-GNOME-Bugzilla-Version=3.8.4
    Categories=GNOME;GTK;Utility;System;TerminalEmulator;
    StartupNotify=true
  4. Make the file "executable":
    chmod +x gnome-terminal.desktop
  5. Done :-)

No comments: