Posts Tagged ‘program’

If you’ve installed a program for working with specific file types, you might find that Ubuntu‘s file manager Nautilus has no idea about it when you right-click a file and go to Open With, where a list of alternative programs to the default are presented. While in most cases that new app will be found when you choose Other Application… from the context menu, sometimes this isn’t the case.

Back in Gnome 2.x, if the program wasn’t listed, you could choose to add a custom application, which let you specify the command manually. However, this is no longer the case, but there should be another way to rectify this (see also the command-line interface method at the bottom).

In this example, we’ll look at getting Nautilus to recognise PDF Editor (pdfedit) as a viable program when right-clicking PDF documents, since the file manager doesn’t know it exists, and one can no longer just specify pdfedit as a custom command (at least via the GUI).

While you could be forgiven for thinking you’d need to hack a list of applications (for example, ~/.local/share/applications/mimeapps.list), the answer in fact lies in editing the .desktop file of the newly-installed program, and simply inserting three characters into it. Basically, this will allow Nautilus to add it to its context menu (actually, it specifies that the application can be passed a filename, which is what is missing).

All you need is the actual command that runs the program (e.g. pdfedit for PDF Editor), and you should be able to guess the .desktop file’s name (e.g. pdfedit.desktop), and open it for editing with the following command (replacing pdfedit with the appropriate name in your case):

gksudo gedit /usr/share/applications/pdfedit.desktop

(Note that the .desktop files should be in /usr/share/applications, but if not will be in ~/.local/share/applications, so change the path accordingly if you need to. Also, if you cannot correctly guess the .desktop file’s name, you can get the correct name by going to the folder and browsing for it).

[Desktop Entry]
Name=PDF Editor
Comment=PDF Editor

Find the Exec= line and you will see the command listed after it. Simply go to the end of the line, hit the spacebar, and add %f, so the line looks like:

Exec=pdfedit %f

(Once again, substitute your command’s name for pdfedit).

Simply save the file when exiting, and you shouldn’t even need to restart Nautilus, let alone log out or totally reboot. You should immediately see the desired program in the list of apps presented in Other Application…, and once you open a file with it, the app should be easily accessible in the list of secondary programs found in Open With.

If you want to make that program the new default for opening the particular filetype, you can now right-click one, choose Properties, go to the Open With tab, click on the app under Recommended Applications, and click the Set as default button.

CLI Method to Change Application & Set Default:

You can easily open a file with another application using the mimeopen command in the terminal. However, if the program isn’t already in the list of recommended applications, you’ll need to make it the default for that filetype first. Simply open a terminal in the folder where the file is and run a command like the following (substituting Recipes.pdf with the appropriate filename and filetype):

mimeopen -d Recipes.pdf

Please choose a default application for files of type application/pdf

1) GIMP Image Editor (gimp)
2) Adobe Reader 9 (AdobeReader)
3) Document Viewer (evince)
4) Other…

use application #4
use command: pdfedit

Simply choose the number that corresponds to Other… (in this case it’s 4), then type the command of the program after use command: (you probably won’t need to specify the path, but if it doesn’t work without it, it should be something like /usr/bin/pdfedit).

After that, you can switch default applications quite easily with the above command, or use the --ask option to just open the file in the desired app without changing the default (note there is no option to choose Other…, which is why you have to use the -d switch first):

mimeopen --ask Recipes.pdf

Please choose an application

1) pdfedit (pdfedit-usercreated-2)
2) GIMP Image Editor (gimp)
3) Adobe Reader 9 (AdobeReader)
4) Document Viewer (evince)

use application #


That’s it – hopefully with either of the methods you’re not cursing Nautilus any more, and have more control of your filetypes than your file manager currently provides.


Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

If you find yourself trying to figure out which package contains a certain command, or any other file for that matter, apt-file is a command that will make this easy. It probably won’t be installed by default, so do so with this command:

sudo apt-get install apt-file

You will then be presented with the message:

The system-wide cache is empty. You may want to run ‘apt-file update’ as root to update the cache. You can also run ‘apt-file update’ as normal user to use a cache in the user’s home directory.

It’s probably best to run the former option (that is, as superuser), so enter the following:

sudo apt-file update

Let it update the cache, then you can search for the command or package or file. Simply use apt-file search followed by whatever it is you’re looking for. For example, we’ll search for the command ccsm, which is what runs the Compiz-Config Settings Manager, as there is no actual package of that name:

apt-file search ccsm

You might find the list presented is quite long, so it may pay to set your terminal to unlimited scrolling beforehand. In the case of the example, the line we’re looking for:

compizconfig-settings-manager: /usr/bin/ccsm

is not visible, since it is right near the top, which is beyond scrolling. If this happens to you, edit your terminal settings and run the command again.

Generally speaking, if it’s a command/program, then the line that has /usr/bin/ followed by the command (like ccsm) will be the correct one. The actual package that contains it will be listed at the beginning, in this case being compizconfig-settings-manager.

Remember, this can work with other types of files too, so if you’re looking for a specific config file or icon or whatever, just specify that at the end of the command. Eg:

apt-file search ccsm.desktop

Hopefully this is all you need to find that elusive file, or the package that installs a program you’re after.


Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

While Ubuntu‘s new Unity interface has been designed for less clutter, and generally makes getting to common tasks a breeze, many have found navigating through the rest a bit of a nightmare. While everything is supposed to be more simplified, some would argue having all your launchers accessible via categories in the old Applications menu was actually simpler and quicker.

But you can actually have the best of both worlds, so if you’re avoiding Unity and using the Classic Desktop simply for access to the Applications and System (or Wine) menus, read ahead.

While you can’t actually add the old menu system to the Unity panel, since it is not gnome-panel that is running, there is actually an “indicator” available for Unity that will do the same thing. So while this new (or old?) menu won’t replace Unity‘s “Dash“, you will see an Ubuntu icon in your system tray’s notification area. Click that, and you will see the old familiar Applications menu, with all the categories you’re used to.

To install Classic Menu Indicator, enter the following commands in sequence in a terminal:

sudo add-apt-repository ppa:diesch/testing

sudo apt-get update

sudo apt-get install classicmenu-indicator

Once installed, hit Alt+F2 and enter classicmenu-indicator as the command to run.

Apart from easy access to all your launchers, you’ll find your old System menu is there too, split into the familiar Preferences and Administration sub-menus.

More importantly for many, you will also have your old Wine menu back for running Windows programs. Unity‘s Dash menu system does not currently show a Wine section, and finding those apps can be near-impossible, but classicmenu-indicator will rectify this.

If you find that this menu/indicator does not automatically run upon your next boot (which it should), simply add classicmenu-indicator to your Startup Applications, and it will be forced to load from then onwards (it should already be in there, so check it isn’t disabled).


Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

AnyMeal is a recipe database program for Linux that is a great way to store and edit your recipes, and because it is compatible with the Mealmaster program for Windows, you can find thousands of recipes online to import. To install it, simply enter the following into a terminal:

sudo apt-get install anymeal

You’ll also need to make sure the packages mysql-server and mysql-client are installed, as the database won’t work without them. If not, you can open Synaptic and enter mysql-server in the Quick search bar, and when you select if for installation, it will automatically mark all the other packages it needs. Or you can install everything at once with:

sudo apt-get install anymeal mysql-server

This should install all the needed MySQL stuff, as well as some packages AnyMeal will need, like the KDE Wallet Manager (since AnyMeal is in fact a KDE program, but runs absolutely fine in Gnome once it has installed a few KDE packages).

Once installed, open AnyMeal (Applications > Accessories > anymeal), click the Connect button, and enter your normal password to open the KDE Wallet Manager.

You will then be presented with the “Connect To Datasource” dialogue, and you will notice the default Server is “Embedded“, with User being your username.

You’ll need to change the Server toNetwork“, which will be listed as “localhost“, and set the User toroot“. However, this will only work once you’ve created a user called “root“. If you have never created a password for the root user, you will be doing so shortly, so make sure you write it down somewhere, as it is something you don’t want to forget!

Click the New button at the bottom of the dialogue box, then Next when you get to the “Welcome to AnyMeal” message. You’ll see pretty much what you saw before, so change the Server to “Network“, and the User to “root“. Then click the Connect button beneath, then Next. In the next screen, you will be asked for a name for the database, which you can just leave as “anymeal“. Click the Create/Connect button, followed by Next.

In the “Setup MySQL Datasource” box, you can leave the Client as “localhost“, but change User to “root“. You will then need to enter the password for root, and confirm it, then click Create/Use, then Next.

You will then be told “You can import some recipes already, if you want to” (if you do, click the Import Recipes button), so click Finish.

You are now ready to start adding to your recipe database, which you can do via Edit > New Recipe (or the “Edit new recipe” toolbar button). You can also use File > Import > Mealmaster (or the “Import recipes from Mealmaster-file” toolbar button) to import recipes stored in the .mmf format for the popular Mealmaster program. Just do a Google search for “Mealmaster recipe” and you’ll find thousands online to choose from.

As an example, here is the seafood page from one of the more popular recipe sites:

Open a desired recipe in a new tab, then click the small “Display Recipe for Import” link at the bottom so it opens as text-only without all the banners and links.

Save the page, but make sure the extension is .mmf, not .txt or .html; it is very likely most recipes you will come across will be either plain text (.txt) or a web page (.html) – since the browser knows how to display these – so just rename the suffix to .mmf (and don’t forget to give it a descriptive name).

You will occasionally come across web pages with multiple recipes in Mealmaster formatting one after the other, so you will need to copy and paste each recipe into its own .mmf text file. Similarly, if you find a site that has one recipe per page, but has no plain text version to view (ie: the page also has images and links), you will need to copy the text and paste it into new .mmf files for importing.

In AnyMeal‘s “Batch Import Mealmaster” box, click Add and browse for and select a recipe you downloaded. You’ll notice the file has been added to the import list (which can feature multiple files), but the OK button is disabled. Next to Input Encoding you will need to select “UTF-8“, then under Handling Of Erroneous Recipes select either “Abort on error” or “Ignore errors“, then click OK.

When you return to AnyMeal, it will probably look empty, but if you go to Edit > Search (or click the “Search recipe by title and category” toolbar button) and click OK (no need to type anything), your imported recipes will appear. You might need to do this again if the list of recipes is not refreshed after adding more.

To view a recipe, simply double-click it. If it is maximised, you can use the Search button to get back to the recipe list, unless you have a Back button at the top of your keyboard, which should work fine. Of course, you can also just use the Restore button (between Minimise and Close) to restore it to a smaller window, and you’ll be able to see your list behind it. Just make sure you don’t use the Restore button in AnyMeal‘s titlebar, but the one in the row of buttons beneath.

To delete a recipe from the database, right-click it and choose Delete. You’ll notice while you’re in the context menu that you can also Export your recipes in a number of formats, so you can even share your own recipes with Mealmaster users.

Also, you can choose to Edit a recipe, and you’ll see just how well AnyMeal did with converting that plain text file you imported into useful and editable information. You can add your own ingredients, change quantities and amount of servings, etc, as well as change the title. The latter is useful as many imported recipes will contain recipe numbers, or be in upper-case (which you can be forgiven for finding annoying!), and even contain typos, all of which can be edited. It’s also the place to change ingredient names to those you use in your own country, like if you’re an Aussie you’ll probably prefer to see “prawn” instead of “shrimp” (especially since we call tiny prawns “shrimps“), and “chick peas” instead of “garbanzo beans“. And let’s not forget converting American measurings (ie: pounds and ounces) to the modern metric system the rest of the world uses (ie: kilos and grams)!

For some info on the recipes stored, like the total amount of ingredients for all recipes in the database, go to Database > Database info.

This should be all the info you need to get you started, so have fun saving your recipes, and of course browsing through all those recipes you’ll be importing!

Extra Notes:

» Note that if you disconnect from the database and then reconnect, you will be asked for your password again to open KDE Wallet Manager, but since it is already open, you can actually ignore it and click Cancel.

» If the fact that the launcher is all in lower-case (ie: “anymeal“) bugs you, just right-click the Applications menu, choose Edit Menus, select the Accessories folder, then select anymeal and click the Properties button to the right of it, enter the new name (ie: “AnyMeal“), and click Close.

» For command-line options, check out the manpage (you can pick your version of Ubuntu under the top banner, though it really shouldn’t make any difference).

» You can resize AnyMeal so that your list of recipes is accessible on one side while viewing recipes on the other.


Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

K3b is an excellent disc burning program with lots of features, and one of those is the ability to customise the quick start pane that is shown when there is no open project.

The 2 default buttons are New Audio CD Project and New Data Project, but you can add more to these, or replace them with whatever you please. As an example, I’ll show you how to add a button for movie DVDs while removing the rarely-used audio CD button.

To add a new button, you can right-click any existing button, and from the Add Button menu choose your option.

Alternatively, just right-click anywhere in that pane (other than on a button) and automatically the Add Button menu is displayed. Simply click on your choice and a button for it will be added to the end (right of existing buttons).

To remove a button, simply right-click it and choose Remove Button, and it will be gone from sight. Note that you cannot delete the More actions… button (which is actually a good thing).

As I said, you can add as many buttons as you want. In fact, you can pretty much eliminate the need to go back into the More actions... menu ever again.

However, if you want to keep it neat and tidy, and only really use a couple of options – like burning data discs and movie DVDs – just display buttons for those.

As you can see, it is incredibly easy to tailor K3b‘s quick start pane to your needs, so set it up how you want and you will rarely ever need to click More actions… again.


Click here for all K3b tips



Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

K3b is a versatile CD/DVD burning utility that makes a great addition to anyone’s arsenal of multimedia apps. It has features many others lack, like the ability to successfully burn VIDEO_TS folders to playable movie DVDs, and even if you’re happy with your current burning app, it’s good to have just in case. But it is so feature-rich and easy to use that it could well become your disc burning app of choice.

K3b is actually made for KDE (Kubuntu’s desktop environment), but runs fine in Gnome. If you have KDE installed as a secondary desktop environment, then you’ll already have all the libraries and dependencies K3b will need; if you’re only running Gnome, when you install K3b any bits and pieces of KDE it needs will be installed along with it. It will probably look a bit different than your Gnome apps, because it will be themed by KDE, but should work absolutely fine.

K3b is user-friendly, yet has advanced options, and is even customisable. If you’re using another app and come across something it can’t do for you, you’ll probably find K3b has no such problem. And even if K3b can’t seem to do it, there is probably a way, if you just look around.

In this post you will find all tips related to K3b, so hopefully you can find answers for your burning needs, whether you currently use another program (like the default Brasero) or already use K3b.

If you don’t already have K3b, you can install it via Synaptic, or enter sudo apt-get install k3b into a terminal. Any dependencies will be installed automatically.


Burn VIDEO_TS Folders to Playable Movie DVDs

Customise K3b: Add or Remove Quick Start Buttons

Long File-Name Support for Burning Data Discs with K3b



Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

When you uninstall a program in Ubuntu, sometimes bits and pieces like configuration files are left behind. Occasionally this is a good thing, like when you remove a program due to some issues you’re having with it and then reinstall it again, since your old settings are usually restored.

But more often than not, when a program is uninstalled it is because the user doesn’t want it, so any remaining configuration files are just wasting space. And often in the case of trying to reinstall a program to get it to work properly, a configuration setting is what is causing the issue, so a complete removal is needed.

There are 2 ways to go about this: via the user-friendly GUI of Synaptic (or your preferred package manager), or the much faster way of command-line in a terminal.

Either way, you’ll of course need to know the name of the program, and if possible the actual package name. While often the package name is the same as the program’s displayed name, but in lowercase, this isn’t always the case, so if unsure check out these ways of finding out.

If you want to use Synaptic, open it and enter the name of the program or package in the Quick search bar. When it and related packages appear, right-click the main package and choose “Mark for Complete Removal“.

It is usually fairly easy to tell which is the main base package; if the name isn’t a give-away, the information after it should clear things up. For example, AbiWord is actually abiword, so is instantly recognisable from the other packages that install with it.

When you “Mark for Complete Removal“, you will be informed if other packages also need to be removed, meaning you don’t have to do this manually.

When you accept the proposed changes, you will see that the program and additional packages will be removed. If there are other related packages that haven’t been automatically selected, you can do so manually before proceeding.

When ready, simply click the Apply button in the Synaptic toolbar. You will receive a final request for confirmation, after which the program will be removed, along with the extra packages and any configuration files.

As in the case of the AbiWord example, not everything is always automatically selected for removal, so it pays to look through the search results and see if anything needs to be removed manually (abiword-common is actually larger than the other packages combined at nearly 9Mb). Doing this before proceeding with the last step will save you coming back later.

If you prefer the quicker command-line method, open a terminal and enter:

sudo apt-get purge packagename (replacing “packagename” with the actual name of the package in question).

If you’re familiar with apt-get remove and wondering what is the difference, especially since additional packages are also marked for removal, the answer is that configuration files are often left behind if you simply “remove” the app. To get that command to work, the --purge option needs to be added (eg: sudo apt-get remove --purge packagename). You will still see much mention online that this is the way to do it, but since then the purge command has been added to apt-get, so this is no longer needed (though for backwards compatibility, remove --purge will continue to work).

Either way you choose to do it, you should be able to get rid of all the junk that programs can leave behind when simply removed. Just keep in mind that if you ever saved any settings or user profiles etc, occasionally these can still be left behind, but they will be in config folders within your home folder (you might need to enable displaying of hidden files and folders). If you ever get a message that a certain folder could not be removed, or a certain file, just go in there later and remove it.


Leave some unwanted packages behind? It’s actually pretty easy to get rid of the vast majority of packages that weren’t automatically selected for removal. When you install via the terminal, you will notice that a list of orphaned packages is presented along with the simple command to remove them all in one go.

As you can see in the example, after uninstalling AbiWord the abiword-common package was left behind (not to mention a few libraries), but you can easily remove it and others taking up space with the following command:

sudo apt-get autoremove


Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

Sometimes the easiest solution is right in front of our eyes, and we fail to see it (probably because it’s too obvious). While looking through the forums it’s become evident to me that some people are needlessly driving themselves nuts browsing through categories in Synaptic Package Manager, desperately trying to find that program to install or remove, when they could be using the Quick search bar in plain view in the toolbar.

While the program’s displayed name and actual package or command name can vary, in most cases, typing in either will get you results.

If you know the actual package name, type that in, otherwise just type in the displayed name you’re familiar with. Results will immediately appear underneath.

You can even use this just to find out the package name, which could be handy for recreating a launcher you deleted. As an example, if you accidentally deleted the “Compiz Fusion Icon” launcher from your System Tools menu, you could type that into the Quick search bar and find that fusion-icon is the actual command, so use that info to make a new launcher.

Of course, if you’re looking for new software for specific tasks, and don’t know any program names, you need another approach. While I actually recommend Googling to find what’s out there, so you can read reviews and see screenshots, it’s actually very easy to use Synaptic to do it all for you. While there are different categories you can browse on the left, that can be somewhat overwhelming. So simply enter the type of software you are looking for, and you should get some results to browse through.

You can then view all the info that the developer has given by clicking on a program and reading what’s in the Description tab at the bottom.

You can add important words to help limit your results. For example, “video convert” will weed out the players, libraries, plugins and codecs that would also be presented if you merely typed in “video“.

You can then look at the Description to see if the programs are what you need.

Using these simple methods, you should be able to find all the software you’ll ever need. Note that to increase your chances of finding everything that’s available, Synaptic‘s list of repositories (ie: places to find software) needs to be a fair bit more extensive than you get in a vanilla install of Ubuntu. So check out these topics on how to add more repos:

Add the Universe and Multiverse Repositories

Add More Repos & Play Encrypted DVDs with Medibuntu


Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

Programs and packages available for Ubuntu generally come in both 32-bit (“i386”) and  64-bit (“amd64”) versions, and Synaptic will only look for those that suit your hardware architecture. But occasionally you may hear of a good app or game that you need to download from the author’s site, only to find there is no 64-bit version available.

If there is a source version that you need to compile manually (it will usually have a .tar.gz extension), then that is your best option for a 64-bit system. But increasingly developers are packaging their programs directly for Ubuntu (ie: as .deb installers), but only in 32-bit. If you try to install a 32-bit program in Ubuntu, you will likely get the following error message:

Error: Wrong architecture ‘i386’

At this point the installation will halt, but there is a way to install 32-bit programs on 64-bit systems. You can force install them by opening a terminal in the folder with the package, then entering the following command:

sudo dpkg --force-architecture -i filename.deb

Just remember to replace the last bit with the actual file name, which you can avoid typing by dragging the file to the terminal after typing the bulk of the command.


Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

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
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
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
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.


Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

Older Posts »