Feeds:
Posts
Comments

Posts Tagged ‘software’

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
Exec=pdfedit
Icon=/usr/share/pdfedit/icon/pdfedit_logo.png
Type=Application
StartupNotify=false
Terminal=false
Categories=TextTools;Viewer;Graphics;Qt;

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 »

If you’ve upgraded your system to 10.10, when you look in System > Administration for Software Sources, you’ll likely find it missing. But is hasn’t been removed, just hidden.

Simply right-click the System menu, and choose Edit Menus. In the left hand pane, go to the bottom and select Administration within System. In the right-hand pane, simply check Software Sources, then click Close.

If you find you have two of them listed, that would be because you have KDE as well as Gnome in the one system. All you have to do to find out which one to enable is right-click them and choose Properties. The KDE version will have the command as something like software-properties-kde, while the Gnome one will be gksu --desktop /usr/share/applications/software-properties-gtk.desktop /usr/bin/software-properties-gtk or similar (the important point being the one with “kde” in the name is likely not the one you want).

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

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 »

The Search bar in Firefox – which many still look at as the “Google bar”, even though it lists other search engines – is extremely useful, but you can make it even more so by adding all sorts of search options.

What we’ll look at here is the “Search Ubuntu packagesadd-on, which (as the name suggests) lets you hunt for software for Ubuntu directly from the Search bar. All you have to do is go to the download page and click the Add to Firefox button, restart Firefox, and it’s done.

Alternatively, if you’re browsing the Firefox Add-on index you can just click the Add to Firefox button next to “Search Ubuntu packages“, and confirm by clicking Add.

Once you restart Firefox, your new search option will be in the Search bar’s drop-down menu. When wanting to search for software, select Ubuntu packages, type the name of the program or package, and hit Enter.

Like all new additions to the Search menu, it will appear at the bottom, so if you’d like to move closer to the top, click Manage Search Engines… (at the bottom of that menu) and move it where you want with the up arrow.

Note that once you’ve used it, it will stay as the default search option till you choose another (so make sure you choose Google or whatever before doing a regular web search).

Search Ubuntu packages

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

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 »

Older Posts »