Thursday, 31 August 2017

Packages

Install Package

  • Click on the Terminal icon at the top:


  • A Terminal window will open:

    • Input the following command at the terminal:
      sudo apt-get update
      This will update the list of available updates, and may take a minute or so to run.
      The pi@raspberrypi:~ $ prompt will appear once the command is finished.

    • Input the following command at the terminal:
      sudo apt-get install <package name>
      Where <package name> is the name of the package that you want to install.
      A list of packages can be found at http://www.raspberryconnect.com/raspbian-packages-list

    • The package will install, and this may take a minute or so.
      Press the Y key (followed by the return key) if you are asked if you want to continue.
      The pi@raspberrypi:~ $ prompt will appear once the command is finished.

    • So, if you want to install the gThumb package for example:

      • Input the following commands at the terminal:
        sudo apt-get update
        sudo apt-get install gThumb

      • gThumb will now download and install

      • Once gThumb has installed, an entry for it will be added to the Application menu, under the Graphics sub-menu.
        Obviously the location of the menu item will depend on what package is being installed.

Create a Desktop Shortcut for the Package

  • Right click on the desktop, select Create New... and click on Empty File.

  • A Creating... window will open:

    • Input a name for the empty file.
      The name must end in .desktop, so I usually use <package name>.desktop as the name.
      For gThumb I would use gThumb.desktop as the name.

    • Press the OK button

  • A new file will appear on the desktop.

  • Double click on the new file to open it.

  • The new file will now open into a text editor:

    • Input the following text into the file:

      [Desktop Entry]
      Name=<package name>
      Comment=<package description>
      Icon=<package icon>
      Exec=<package location>
      Type=Application
      Encoding=UTF-8
      Terminal=false
      Categories=None;

      Where:

      • <package name> is the name of the package.

      • <package description> is a description of the package.

      • <package icon> is the location of an icon for the shortcut.
        There are a number of icons that can be used in the /usr/share/pixmaps folder.

        Often, just putting the package name in lowercase will use the package icon.

      • <package location>
        Usually this will be /usr/bin/<package name>.

      Note that if you are unsure about any of these entries should be, the applications menu shortcuts menu items can be found in the /usr/share/applications folder.
      If you right click on one of these items, and click on Text Editor in the menu that appears, then the file will open in a text editor and the associated values can be copied into the desktop shortcut file.

    • So the following could be used for a desktop shortcut for gThumb:

      [Desktop Entry]
      Name=gThumb
      Comment=gThumb image viewer and browser
      Icon=gthumb
      Exec=/usr/bin/gthumb
      Type=Application
      Encoding=UTF-8
      Terminal=false
      Categories=None;

    • Save the file.

No comments:

Post a Comment