Feeds:
Posts
Comments

You can find out the version number of any program in Ubuntu, right down to the specific package number, quickly and easily via the terminal. Simply enter apt-cache policy followed by the name of the program, command or other package. As you can see from the following example, you can get info on multiple packages at once:

apt-cache policy k3b kalarm gedit
k3b:
Installed: 1.68.0~alpha3-0ubuntu1
Candidate: 1.68.0~alpha3-0ubuntu1
Version table:
*** 1.68.0~alpha3-0ubuntu1 0
500 file: karmic/main Packages
500 http://us.archive.ubuntu.com karmic/main Packages
100 /var/lib/dpkg/status
kalarm:
Installed: 4:4.3.2-0ubuntu6
Candidate: 4:4.3.2-0ubuntu6
Version table:
*** 4:4.3.2-0ubuntu6 0
500 http://us.archive.ubuntu.com karmic/main Packages
100 /var/lib/dpkg/status
gedit:
Installed: 2.28.0-0ubuntu2
Candidate: 2.28.0-0ubuntu2
Version table:
*** 2.28.0-0ubuntu2 0
500 file: karmic/main Packages
500 http://us.archive.ubuntu.com karmic/main Packages
100 /var/lib/dpkg/status

If you don’t know the actual command name of the program in question, look at the properties of its launcher to find out.

It doesn’t matter whether you’re using Windows, Mac OS, or a Linux distro like Ubuntu, the names programs display in the titlebar and the names of the actual files that run them can be quite different. A familiar example for many would be Microsoft Office Word (or Word for Windows in the old days) – or winword.exe, to be precise.

In Ubuntu, you can guess the package names of many programs simply by making all characters lower-case, and perhaps removing a space between words, or even abbreviating it. For example, KAlarm is actually kalarm, tovid GUI is tovidgui, and Downloader for X is d4x.

But you can’t guess them all, so you’ll need to look at the properties of launchers to the programs you want to know more about. Since you can’t really right-click launchers in the Applications menu for this purpose, by far the easiest method is to temporarily add them to your panel (or desktop), then just delete them when no longer needed. You can actually get the properties of launchers while editing the Applications menu, but this method is simpler and quicker.

For any program you need to know the package name of, right-click it in the Applications menu and choose either Add this launcher to panel or Add this launcher to desktop. When you right-click the new launcher on your panel or desktop, choose Properties, and the Command field will reveal the program’s actual name.

Just remember to ignore any options on the end of a command, since a program name must be one word without spaces (this can of course include many words strung together with hyphens or underscores). So while Amarok’s launcher says amarok %U, the %U is an option, and amarok is the command. Even if you can see nothing familiar, you can bet whatever the command starts with, and is before the first space, is the command. For example, Downloader for X is actually no longer d4x, and since the command string is now nt -a %U, one has to assume nt is now the name of the command that runs this program.

The exceptions to this rule are when the path or address of the command is specified, or when another command precedes it. A good example is gksu /usr/sbin/firestarter for Firestarter, as not only is the path specified before the command, firestarter, but in order to run it with superuser privileges, the whole lot starts with gksu (basically, sudo for GUI programs). In a situation like this, one would look to the end, not the beginning.

If you need to find out the version numbers of installed packages, read this.

Dolphin became the default file manager when KDE went to 4.0, so Kubuntu users already know what a great program it is (unless they preferred to stick with the previous default file manager, Konqueror). While Ubuntu’s desktop environment, Gnome, has certainly stepped up of late when it comes to visual effects, screenlets and the like, KDE has always been about “bells and whistles”. And while Gnome can end up looking pretty stunning, the same can’t be said about its default file manager, Nautilus, which is about as plain as they come.

Dolphin, on the other hand, has the little niceties one would expect of a KDE file manager, like animated folder icons, and a lot more. There is an easy to access zoom slider for thumbnails, and has some pretty unique “views”. You can customise it in ways you could only dream of in Nautilus or Thunar, like not only add extra panes, but also move them where you like, and resize them to your needs.

If you look at the above pic, you’ll see that you can add a Folders (“tree”) pane and put it above the Information pane on the right (you could put it under Places, of course, but why not save that for shortcuts). Also, you can add a Terminal to the bottom, so whatever folder you’re in, you can just type commands without having to open a terminal in each folder (or continually change paths).

The views are Icons (like the same in Nautilus, but smaller, and just the icon, no preview),Details (your standard row-by-row format with information next to each file), Columns (starts off with 2 columns, and every sub-folder you click on opens another), Preview (turns your icons into thumbnails, and folders will show previews of pics inside), andSplit (gives you 2 columns you can browse with).

When you are inSplit mode, you can look at the beginning and end of a large folder at the same time, or use the second column to browse another folder or drive. The Columns mode offers another interesting and useful way of browsing, so you certainly have a few choices in ways to browse.

Some things to note are that with Dolphin, like other KDE file managers, the default is to treat a single-click as a double-click. This can confuse Gnome users, as even slowly clicking a file will open it. All you need to do to select a file is click the green + that appears in the top left corner when you hover your cursor, and it will select it. But if you’re selecting a file simply to know the filesize, like you would in Nautilus, then you don’t need to, as that information will appear in the status bar and the Information pane simply by hovering your cursor over the file.

Not only that, but if you are in Icons view, hovering over picture files will show the preview in the Information pane. In Preview mode, another nice feature is that when you hover your mouse cursor over a folder, its preview thumbnail will cycle through other pictures in the folder (which you can see in the second pic, as the selected folder looks different from the preview in the Information pane).

So there are some great reasons to try out Dolphin. There’s a lot more you can do to customise its interface, and if the single-click/double-click issue ends up annoying you, then don’t worry, you can change the setting to what you’re used to. You can change that and other default settings via Settings > Configure Dolphin.

While Dolphin needs certain KDE libraries, etc, to function, any such dependencies will be installed with the program into your Ubuntu/Gnome system. Mark it for installation in Synaptic, or enter in a terminal:

sudo apt-get install dolphin

Thunar is the default file manager for Xubuntu’s Xfce desktop environment, and is as stable in Ubuntu as the default app, Nautilus (especially since Xfce uses a lot from Gnome anyway). In many ways, you can’t tell the two programs apart, but for a time Thunar was way ahead of Gnome’s file manager. That’s not just because of advanced features like custom actions you could add, but because of the various views you could have. For example, for newbies tentatively moving away from Windows, the Tree view in the side pane is assuringly similar to Windows Explorer.

While Nautilus has certainly caught up, with being able to add to context menus via actions, and 6 different views for the side pane, Thunar is still worth installing because you can get the best of both worlds. You can leave Nautilus with the Places pane on the left and “Icon View” (thumbnails) on the right, and for when you want to browse via a Tree pane with “Compact List” icons (“List View” in Windows Explorer), you can open Thunar.

Also, unlike with Nautilus, you can still access the defined shortcuts (usually available via the left pane) while in Tree view by clicking a button at the end of the address bar. If you are thinking Thunar might be good to have as a backup in case Nautilus is having problems (which it is), but prefer it to look like Nautilus, then you can always change things back to how you like them (change the Tree pane to Shortcuts).

If you like this idea, but are thinking the icons in “Compact List” view are too small, you can always make them bigger (seen above), via the View menu, or zoom with your scroll wheel.

If you look at the pics, you’ll see some minor differences between the two file managers. Firstly, while Thunar uses the same icons for toolbar buttons that Nautilus does (they both get them from the current icon theme), Thunar’s are bigger (which I personally like). You’ll also note from the second pic that in your home folder (and elsewhere), hidden folders and files are listed first.

Other things worth mentioning are the differences between thumbnails and folder settings between the two, and that the Thunar context (right-click) menu will probably have less entries than you’re used to (though you should getOpen Terminal Here by default, while with Nautilus you have to install a package to get Open in Terminal).

Lastly, since the Information pane in Nautilus is rather useless right now when it comes to info, you can use Thunar to get more info at a glance than Nautilus can offer. For example, when you’re in your ~/Pictures folder and what to know the size in pixels of certain images, you generally need to right-click each file and view the info via Properties > Image. But with Thunar, all you have to do is click each file and look at the bottom to the info displayed on the status bar (which can be enabled via the View menu if it is missing).

So you could even do what I did: set up Thunar to display over-sized icons in “Icons” view, and then create a panel launcher to have your ~/Pictures folder open in Thunar (the command for such a launcher would be: thunar /home/yourusername/Pictures). That way, you don’t have to mess with icon size in Nautilus, but still get really large thumbnails of all your pictures, as well as info on dimensions presented in the status bar.

To install Thunar, as well as select some plugins for installation, simply search for “thunar” in Synaptic. Or you can install the program and all related plugins via the terminal:

sudo apt-get install thunar thunar-media-tags-plugin thunar-volman thunar-thumbnailers thunar-archive-plugin

To get more info about the plugins, simply paste their names (individually) into the Quick search field in Synaptic.

The default “view” in both Nautilus and Thunar file managers is the Icon or thumbnail view, which you can of course change if ever you want via the View menu. If you’re happy with thumbnails, but they’re too big for your liking, or you actually want to make them larger, like in your ~/Pictures folder, hold the Ctrl button while you zoom in or out with your mouse scroll wheel.

In Nautilus (the default file manager in Ubuntu), you can make the thumbnails of pics rather huge, like only 2 fitting in each row, and the icons for any folders in there won’t be too large. On top of that, the change will only be recorded in the folder you’re in, so you can have most of your folders displaying thumbnails at the default size, have a few where the thumbnails are quite small, and then have huge thumbnails for folders like ~/Pictures.

In Thunar (Xubuntu’s default file manager), you can only go so big, and in your ~/Pictures folder the icons for any folders in there might actually look bigger than the thumbnails for pics; also, do that to one folder, and it is a global change (ie: it happens to the rest).

For those who don’t know this, you can use you UP arrow on your keyboard to cycle through previous commands you’ve entered in the terminal. Your “bash history” records them, and you’ll be presented with them in the order of last used first. If you go too far, use your DOWN arrow to find the command you passed. Similarly, if you decide to type in a new command, just use the DOWN arrow to get past the previous entries and back to an empty prompt.

If VirtualBox opens fine, but when you try to start a virtual machine (VM) you get the following error:

Failed to start the virtual machine Windows XP.
VirtualBox can’t operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).

… it means another virtualisation package – kvm – is interfering with VirtualBox. kvm isn’t installed on Ubuntu by default, so you probably installed qemu, the popular open-source emulator.

A quick fix is to stop kvm via the terminal:

sudo /etc/init.d/kvm stop

To stop this happening completely, mark the following packages for complete removal in Synaptic if they’re installed: kvm, qemu, qemu-kvm & qemu-launcher. Or you can do it via the terminal, and ignore errors regarding packages that weren’t installed (so can’t be uninstalled):

sudo apt-get remove kvm qemu qemu-kvm qemu-launcher

You should now be able to start your VM, without having to close and restart VirtualBox.

A common complaint from newbies is the lack of Flash support in Firefox when they first encounter a site that needs it. However, the solution is quite simple, and the fact that it is even seen as a problem is evidence that many people simply do not look at what is front of them (sorry, but it’s evidently true).

When you go to a site that relies on Flash, don’t look at the error message on the web page – look just above it and you’ll see Firefox is well aware of the issue, and is presenting the solution to you.

All you need to do is click the “Install Missing Plugins…” button and you will be presented with a list of plugins to choose from, both official (ie: the Adobe one) and open-source. You can try any you please, especially if you’d like to try slimmer, open-source alternatives that probably use less system resources, but pick “Adobe Flash Player (installer)” if you prefer to play it safe (I’d recommend that).

Select your choice, click the Next button, and that’s it (Firefox might need to be restarted, though probably not).

If you want a simpler method you can implement straight after an Ubuntu install, before you even load Firefox, once again the terminal is the answer. Just enter the following command, and it will take care of everything:

sudo apt-get install flashplugin-installer

↔↔↔↔↔↔↔↔↔↔↔↔↔↔

If you’d like to make sure the plugin is successfully installed, enter about:plugins in the address bar. It will list all installed plugins, with the first one being the most recently installed, Flash.

↔↔↔↔↔↔↔↔↔↔↔↔↔↔

In case you’re wondering what other web browsers this plugin supports, any browser based on Netscape or Mozilla can use the Flash plugin. Here is the list of those currently supported:

Mozilla, Mozilla-Firefox, Firefox, Iceweasel, and Iceape. Also Galeon and Epiphany can use the Flash plugin. Konqueror can also use the Flash plugin if konqueror-nsplugins is installed.

You probably already know that you can change the default application a specific file-type opens with, or specify one if there aren’t any listed, via Properties > Open With. But for those extensions that don’t have an actual mimetype defined, things can be problematic, as unknown file-types are seen as generic files, and classified according to what the system thinks they may be.

A good illustration of what this means is the .mht web archive format, which is actually a fancy version of a .html web page with pictures included (rather than separate in folders). Ubuntu does not know this extension by default, but determines it is a text file. So when you double-click it, it will open in the text editor, which will show you the text, but the pictures will be a huge mess of code.

And if you decide to get clever and make Opera or Firefox (with the unMHT plugin) the default for .mht files, it will backfire, as all your different types of text files will now open in your browser. Similarly, if you change the icon of .mht files to something more like a .html icon, the change will also happen to your text files of other extensions.

The way to get around all this is to create your own mimetype with assoGiate. You should be able to install it via Synaptic (if not, you may need more software sources), or you can go to the download page (note that the link for Ubuntu packages currently seems to be dead, but you can get the source code there, if you prefer compiling anyway; otherwise, you can get the i386/32-bit version and amd64/64-bit version here). Once installed, it will end up in Applications > System Tools > File Types Editor.

In assoGiate, use the New button to create a blank mimetype. You’ll see there are 5 tabs in the dialogue box that pops up, and generally you will only be putting information into General and Filenames. Some just require you to type data in an empty field (like the General tab), while others will require you to click an +Add button to do so (like the Filenames tab).

As an example of something basic you could do, I’ll use the .dmg file-type, which Mac OS users will know are program installers, like .exe files in Windows, and .deb files in Ubuntu. I download programs for Mac users, so I don’t actually need them opening in anything, but I just want the type registered, so it would be listed as “Mac OS Program Installer”, and have an easy-to-recognise icon.

General:
Category: Multipurpose files
Name: x-extension-dmg
Description: Mac OS Program Installer

Use the Browse button [...] to select a Mac icon of your choice for the .dmg extension.

Next, you specify the file extension in the Filenames tab with the +Add button. Note that you can register more than one extension while you’re there.

Filenames:
Filename pattern: *.dmg

And that’s it. You’ve created a mimetype, even if it’s not that useful. But all you have to do is look through the various file-types, and you’ll soon see you can make your own by using existing mimetypes as examples. And you could do things like add another extension to an existing mimetype via the Filenames tab.

So we’ll use the example of an extension for text files called .Ubuntu. The scenario is that you’ve decided to separate your text files containing Ubuntu tips and tricks by renaming those with this extension. First go to Text and source code in the left pane of assoGiate, locate (Category) text (Name) plain, and double-click it to edit it. If the Description: is other than something like “Plain Text Document” (mine got hijacked by an Adobe product), you can change it there in the General tab.

Now all you need to do is go to the Filenames tab and +Add a new extension by entering *.Ubuntu. It will now be treated as a text file and open with the default text editor.

But if you want to have .Ubuntu files display a custom icon (like the Ubuntu logo) instead of the generic text icon, to have a descriptive name for that extension, and even have it open in another program, you’ll need to create a new mimetype for it instead of using the previous method. Click the New button and enter the data as follows:

General:
Category: Multipurpose files
Name: x-extension-Ubuntu
Description: Ubuntu Information Document

If you’re wondering whether you could have chosen Text and source code as the category, the answer is yes, but that the specified icon might not show up, and still be the generic text icon. At least putting it under Multipurpose files will ensure this is not the case.

Related types:
Parent types: text/plain

Filenames:
Filename pattern: *.Ubuntu

And there you have it – you’ve just created your own mimetype for specific text files that will be easy to locate because of the icon you specified. If you’d now like to change the default application your .Ubuntu files open with, like have them open in Leafpad (which is more basic than the default Gedit, so loads a bit faster), check out how to do so here.

For a more advanced use of assoGiate, check out this post on registering MHT web archives. If you ever research a specific mimetype and are supplied with a bunch of technical data about it, you could probably use that in assoGiate to successfully register it as a file type in Ubuntu.

When you right-click a file, there is a wealth of options available in the context menu that appears. At the bottom, you’ll notice Properties, and clicking it will let you change all sorts of things, and give you lots of info about the file (depending on the file-type).

In the first tab, Basic, you’ll see you can rename the file, and if you click on the icon on the left, you can change it to whatever you want. Note that this will change the icon only for the file specified, not all others of the same extension. If you want to change the icon for a whole file-type, read about creating your own mimetypes in Ubuntu.

If you’re ever having permissions trouble with a file, go to the Permissions tab and make sure you have full Read and write access. Also, if files of a specific extension are not opening in anything (and a default program has been specified), or if scripts aren’t being executed, or certain text files not opening, then you may need to tickAllow executing file as program.

The last thing you can do is change the default application for the whole file-type under Open With, and all you need to do is select another from the list. You can +Add more, and if the app you want isn’t in the list that is presented to you, you can create your own custom command instead. In this example of .txt documents, if the desired program, Leafpad, isn’t in the Open With list, and isn’t presented after clicking +Add, you could type leafpad as the custom command.

So there you have a few ways to get greater control over your files. As you can see, changing the default program a file-type opens in is a quick and easy task, and you can customise your most important files to have their own unique icons.

Older Posts »