Feeds:
Posts
Comments

Posts Tagged ‘default’

While there are ways to change the default web browser via a GUI, this command-line method is even quicker. Also, while your email program and other apps might know which browser to open URLs with, you might find that ApportUbuntu‘s bug reporting system – looks to another browser you have installed. This is especially true if the other browser was at one point the default, and most notably this happens with Opera, though could also happen with Chromium/Google Chrome, Firefox, or any other browser you’ve installed before.

While Apport generally carries on with the bug reporting silently once you’ve clicked to continue, occasionally it require you to log into Launchpad, and will fire up the wrong browser, quite often it being Opera.

But it’s easy to remedy this by entering the following into the terminal:

sudo update-alternatives --config gnome-www-browser

Change Default Browser in Ubuntu

As you’ll see, all you have to do is enter the number corresponding to the browser you want to be the default (in this case 2 for Firefox). To complete the process, enter this command:

sudo update-alternatives --config x-www-browser

Change Default Browser in Ubuntu 2

… and do the same there. That’s it – you’ll no longer have Apport or any other app open the wrong browser again.

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

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!

Advertisements

Read Full Post »

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 »

Nautilus – the default file manager for Gnome, and therefore Ubuntu – is feature-rich and easy-to-use, but you can make it even more powerful, and with very little effort.

With Windows or Mac OS X, if there are features missing in the built-in file browser, the only option is to install another, usually at some expense (software developers in those worlds haven’t quite embraced the concept of open-source). In Ubuntu and other Linux distributions, other file managers – like Thunar (Xfce), Dolphin (KDE) and Konqueror (KDE) – can easily be installed (for free), even if they were made for a desktop environment other than Gnome.

But another way to get some of the features you might find lacking in Nautilus is to install some plugins or “extensions“, most of which are in the official repos and easily installed via Synaptic Package Manager.

Here I’ll feature the most popular and useful ones, but there are others out there, from adding more integration with messaging to technical tasks most of us don’t need (or understand). While I’ll be keeping this post up to date as new extensions are created, a Google search for “nautilus plugin extension” will reveal those I have left out (or missed). And don’t forget that you can also open Synaptic, paste the word “nautilus” into the Quick search bar, and all extensions available in the repositories will be displayed.

Essential Extensions:

Nautilus Open Terminal: Command-Line in the Current Folder

Nautilus GKSU: Open Files & Folders with Administrative Privileges

More Cool Plugins:

Nautilus Image Converter: Easily Resize & Rotate Pictures

Nautilus Pastebin: Send Text Clips to the Web

°ºÒθÓº°

Other Nautilus Enhancements:

Add Buttons for New Folder, Cut, Copy, Paste & Trash/Delete to the Nautilus Toolbar

Add a File/Folder “Properties” Button to the Nautilus Toolbar

°ºÒθÓº°

Guide to Customising & Enhancing Nautilus

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

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

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

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

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

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 »