Use Gloobus Preview to preview your files - gHacks Tech News

Use Gloobus Preview to preview your files

There are many ways to preview your files in Linux. Most often there is a single application used to preview a different file type. You have the Eye of GNOME for images, the Document Viewer for PDFs, and more. But what about a single application that will preview all types? Is there such a thing? Why yes there is. That "thing" is Gloobus Preview. This application is an amazingly flexible tool that can preview a large amount of file types.

Let's take a look at installing, using, and creating a Nautilus action for Gloobus Preview.

Installation

I am going to illustrate the installation of Gloobus Preview on Ubuntu (10.04 to be exact). Since the PPA has been updated, installing on Ubuntu is quite simple. Just follow these steps:

Open up a terminal window.

Issue the command sudo add-apt-repository ppa:gloobus-dev/gloobus-preview.

Now issue the command sudo apt-get update.

Finally issue the command sudo apt-get install gloobus-preview.

Once the software is installed you can close the terminal window.

Usage

Figure 1

Using Gloobus Preview is a bit tricky - which is why I want to show you how to add a Nautilus Action for this command. You can see just how Gloobus Preview will work by issuing the gloobus-preview command from within a directory that contains a file you want to preview. Say you want to preview the file image.jpg. To open this in Gloobus Preview you would issue the command gloobus-preview image.jpg. When you do this Gloobus Preview will open with the image inside (see Figure 1).

As you can see there are two arrow buttons and a square icon. The up arrow changes Gloobus Preview to full screen, the down arrow switches back to normal view, and the square opens the file in the standard, default file type viewer (such as Eye Of GNOME for images).

Nautilus Action

Now, let's create a Nautilus Action so you can simply right click a file within Nautilus and open that file in Gloobus Preview. To do this open up the Nautilus Actions Configuration tool (click System > Preferences > Nautilus Actions Configuration. From within this tool set up the following configurations:

Under the Action tab:

Check Display item in selection context menu.

Check Display item in location context menu.

Context label: Gloobus Preview.

Check Display item in the toolbar.

Leave all else default.

Under the Command tab:

Change the command path to /usr/bin/gloobus-preview.

Change the Parameters to %M

That's it. Now click the Save button and you're almost ready to test it out. Before you test it, however, you need to restart Nautilus. To do this click ALT-F2 and, in the run dialog, enter nautilus -q. Now open up Nautilus to a directory containing any of the following file types:

Images: jpeg, png, icns, bmp, svg, gif, psd, xcf
Documents: pdf, cbr, cbz, doc, xls, odf, ods, odp, ppt
Source: c++, c#, java, javascript, php, xml, log, sh, python
Audio: mp3, ogg, midi, 3gp, wav
Video: mpg, avi, ogg, 3gp, mkv, flv
Other: folders, ttf, srt, plain-text

If you right-click any of those files you will see a Gloobus Preview entry in the context menu. Select Gloobus Preview and the file will open up in your newly created Gloobus Preview Action.





  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. Chetan said on November 25, 2010 at 8:43 pm
      Reply

      Cool…:)
      Can we add keyboard shortcut for that (like spacebar, when an item is selected)…..instead of Right Clicking and selecting the Nautilus Action…

      1. sa1 said on November 25, 2010 at 10:11 pm
        Reply

        Yeah, if you use Nautilus Elementary, pressing spacebar would directly open it in Gloobus. You can install nautilus elementary using the following commands:
        sudo add-apt-repository ppa:am-monkeyd/nautilus-elementary-ppa
        sudo apt-get update
        sudo apt-get dist-upgrade
        nautilus -q

        If you’d like to keep using Nautilus, you can use the following extension:
        https://github.com/DaKTaLeS/nautilus-gloobus-preview

        1. atarixle said on February 22, 2011 at 3:59 am
          Reply

          I can install nautilus elementary a 1000 times, but spacebar will open files and folders. It just wont work the way you said, so what else can I do?

    2. Kalesh Gopi said on November 26, 2010 at 4:25 pm
      Reply

      Don’t add fullstops after sudo commands copy-pasting with fullstops don’t work. Thanks for sharing this useful app.

    Leave a Reply