Feeds:
Posts
Comments

Archive for the ‘Gnome 3’ Category

If you’ve upgraded to Ubuntu 13.04, you may have noticed that its file manager, Nautilus, has lost some of its functionality. One of the glaring omissions in the 3.6x versions (the current is 3.6.3) is the Open With sub-menu when right-clicking a selected folder. Previously, you could use it to open a folder with a program, like Movie Player (now called Videos, though technically it’s totem) to open a folder full of video clips, or a folder full of pictures with Image Viewer (or eogEye Of Gnome – to be precise).

In this guide I’ll show you how to do both, but you can of course apply this to any program you want, as long as it has the ability to open a folder starting with the first file. In the case of Image Viewer, it will open the first file within the folder and continue to cycle through the rest as you use your arrow keys; in the case of Videos, it will open the media player with all videos from the selected folder in its playlist, in alphanumerical order.

To get around the missing Open With option, you will first need to install Nautilus Actions. To do so, run the following command in the terminal:

sudo apt-get install nautilus-actions

Once installed, you can use the Nautilus-Actions Configuration Tool to define your own actions (in Unity’s Dash menu, just start typing the name; in Gnome Classic, it will be in Applications > System Tools).

New Menu Item for Image Viewer:

In the Nautilus-Actions Configuration Tool, click the Define a new action button and name that action to what you want to appear in the menu (eg: Open with Image Viewer; whatever name you choose will also appear in the Context label: field in the first tab in the right-pane, Action).

Nautilus-Actions: Adding Image Viewer to Context Menu

Making sure that the new action is selected in the left-pane, in the right-pane go to the second tab – Command – where you define what that menu option will do. For the Path: enter eog (or the full path /usr/bin/eog), for Parameters: enter %b (for first basename), and finally for Working directory: enter %d (for first base directory). While there are a bunch of other tabs in the tool, that is all you should need to do.

Nautilus-Actions: Adding Image Viewer to Context Menu Step 2

If you want to add an icon for that menu option, you will see Icon: in the Action tab, where you can browse for an icon to use.

Nautilus-Actions Icon Chooser

Once you’re finished, click the Save button, and exit the tool. You will find your new action in the Nautilus-Actions actions sub-menu in your context menus.

Nautilus-Actions: Adding Image Viewer to Context Menu (DONE!)

(OPTIONAL: If you also want this action to appear in context menus for locations – in other words, not just the selected folder, but when you right-click an empty area of the folder you’re currently in – check the box next to Display item in location context menu in the Action tab)

New Menu Item for Movie Player (Videos):

In the Nautilus-Actions Configuration Tool, click the Define a new action button and name that action to what you want to appear in the menu (eg: Open with Movie Player or Play Movies in Folder; whatever name you choose will also appear in the Context label: field in the first tab in the right-pane, Action).

Nautilus-Actions: Adding Movie Player/Videos to Context Menu

Making sure that the new action is selected in the left-pane, in the right-pane go to the second tab – Command – where you define what that menu option will do. For the Path: enter totem (or the full path /usr/bin/totem), for Parameters: enter %b (for first basename), and finally for Working directory: enter %d (for first base directory). While there are a bunch of other tabs in the tool, that is all you should need to do.

Nautilus-Actions: Adding Movie Player/Videos to Context Menu Step 2

If you want to add an icon for that menu option, you will see Icon: in the Action tab, where you can browse for an icon to use.

Nautilus-Actions Icon Chooser

Once you’re finished, click the Save button, and exit the tool. You will find your new action in the Nautilus-Actions actions sub-menu in your context menus.

Nautilus-Actions: Adding Movie Player/Videos to Context Menu (DONE!)

(OPTIONAL: If you also want this action to appear in context menus for locations – in other words, not just the selected folder, but when you right-click an empty area of the folder you’re currently in – check the box next to Display item in location context menu in the Action tab).

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

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 upgraded to Ubuntu 13.04, you may have noticed that its file manager, Nautilus, has lost some of its functionality. One of the glaring omissions in the 3.6x versions (the current is 3.6.3) is the ability to open selected folders in their own windows.

Nautilus 3.6 Options for Selected Folders

Nautilus 3.6 Options for Selected Folders

Currently, the only options available when you right-click selected folders are to create a new folder containing whatever is selected, or to open them in new tabs. The Open option simply mimics the next option, which is to open them in new tabs. The only way at all to open another (single) folder in a new window is if you right-click the breadcrumb in the toolbar.

Right-clicking Pictures lets me choose to Open in New Window

Right-clicking Pictures while in a sub-folder lets me choose to “Open in New Window”

However, there is a way around this: Nautilus Actions. To install it, run the following command in the terminal:

sudo apt-get install nautilus-actions

Once installed, you can use the Nautilus-Actions Configuration Tool to define your own actions (in Unity’s Dash menu, just start typing the name; in Gnome Classic, it will be in Applications > System Tools).

Nautilus-Actions: Open in New Window

In the Nautilus-Actions Configuration Tool, click the Define a new action button and name that action to what you want to appear in the menu (eg: Open in New Window; whatever name you choose will also appear in the Context label: field in the first tab in the right-pane, Action).

Nautilus-Actions: Defining the Action

Making sure that the new action is selected in the left-pane, in the right-pane go to the second tab – Command – where you define what that menu option will do. For the Path: enter nautilus (or the full path /usr/bin/nautilus), for Parameters: enter %b (for first basename), and finally for Working directory: enter %d (for first base directory). While there are a bunch of other tabs in the tool, that is all you should need to do.

If you want to add an icon for that menu option, you will see Icon: in the Action tab, where you can browse for an icon to use.

Nautilus-Actions Icon Chooser

Once you’re finished, click the Save button, and exit the tool. You will find your new action in the Nautilus-Actions actions sub-menu in your context menus.

Nautilus-Actions: Open in New Window

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

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 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’re a Gnome 3 Classic (“Fallback“) desktop user, you may have noted that there’s no longer any visible way to get to your Startup Applications. This is made even more frustrating by the fact that after the upgrade to 12.04, Unity users get easy access to it via the system menu at the end of the panel.

While this oversight could do with correcting, you can still access Startup Applications by entering the following command in Run Application via Alt+F2, or in the terminal:

gnome-session-properties

While running this via the user menu would be ideal, you could make a desktop launcher for it, or even one for your panel which would mean one-click access.

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

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 »

Please note: this is an updated version of the guide for restoring the volume button in Ubuntu 10.04/Gnome 2, and is specifically for those using the Gnome 3 “Classic” (Fallback) desktop (though may be applicable for Gnome-Shell and Unity).

ΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘ

If you’ve just upgraded to 12.04 “Precise Pangolin” and found that the volume icon/button is missing from the system tray (at the far-right of the top Gnome panel), you can choose between adding the newer indicator applet, or running the old stand-alone volume button like back in Gnome 2. With the indicator applet, it will load automatically with each boot, but it doesn’t take much to get the legacy volume button to do the same.

Volume Button:

Note: Those who’ve had to do this before in Ubuntu 10.04 through to 11.10 will have noted the package gnome-volume-control-applet no longer exists, but since it has just been renamed, all you need to do is change the command to gnome-sound-applet.

To run it for the current session, hit Alt+F2 to open the Run Application app, paste gnome-sound-applet into the text field, and click the Run button (you can also enter the command into a terminal, but the button will disappear if you close the terminal).

To get it to start automatically from the next reboot, click the cog in the top-right (in Unity) and open Startup Applications and add it as a new entry with a name like “Volume Button”. If you’re using Gnome Classic, your user menu in the top-right won’t include Startup Applications, so just run gnome-session-properties via Alt+F2 or in a terminal.

If for some reason the volume app is missing on your system, run sudo apt-get install gnome-sound-applet in the terminal.

Indicator Applet:

Alt+Right-click an empty area of the panel (if you have Compiz effects enabled, then you will need to hold Alt+Super/Windows while right-clicking), choose Add to Panel, then drag Indicator Applet Complete to next to the clock in the system tray, or wherever you want to put it instead. The volume button will be restored, but as part of the Indicator Applet which also has a mail/message notifier for Evolution and messaging apps, as well as showing when other apps like Rhythmbox music player are open.

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

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 »

Ubuntu has moved on to “Unity“, and Gnome has evolved to version 3‘s “Gnome Shell“, but many people (like myself) still prefer to use the old “Classic” desktop – be it the old Gnome 2 version, or the “Fallback Mode” of Gnome 3 (users of 11.10 upwards have no choice but to use the Gnome 3 version).

While the 2 versions of the “Classic” interface do have some differences – no “System” menu in Gnome 3 (read this if this is your only concern), and having to hold Alt while right-clicking it to access options – both have panels that are much more customisable (and infinitely more useful) than what “Unity” and “Gnome Shell” currently offer.

But things can go awry, like after doing some tweaking, or installing a program, or having to do a hard reboot, and you can find your panel altered (particularly minus the menus), or even completely missing. So we’ll look at a few different scenarios, and how to rectify them, including how to force Gnome to reset your menus back to their defaults (which is probably the quickest and easiest method). Also, because I’ve seen a lot of newbies in forums say “My Applications menu is missing!” when they should be saying “My top panel has totally vanished!”, we’ll look at how to get your panel back as well.

Finally, because some will need to take a harder approach (or just prefer an easier one), we’ll look at how to totally reset your panels back to their defaults. This is by far the most drastic measure, but it’s quick and easy, and for most people there are no customisations to worry about losing. Besides, if your panel has totally died or vanished, and nothing else you’ve tried has worked, then it’s the only option left.

Try A Quick Panel Restart:

First off, it might be enough to simply refresh the panel by forcing it to close then re-open, which can be done by a reboot, or logging out, or simply entering the following command into the terminal or via Alt+F2:

killall gnome-panel

It pays to do that first, in case that’s all that’s really needed, but chances are you’ve already tried logging out or rebooting, so check out the following tips.

Restore Missing Menus to Panel:

If just your main menu (the “Applications” and “Places” menus, and the “System” menu in Gnome 2) is missing, then perhaps all you need to do is add the menu back to your panel. Right-click an empty area of your panel (holding Alt in Gnome 3) and choose “Add to Panel…“, then scroll down till you find “Menu Bar” (ignore “Main Menu“, as that is a small icon version), and drag it to the left area of your panel.

If it’s conceivable that you perhaps accidentally right-clicked the menu and hit “Remove From Panel“, then it might pay to do this, especially if you have panel customisations you don’t want to lose.

Force Reset of Main Menus:

If you can’t add the menus back to your panel, for example you can’t invoke “Add to Panel…” with a right-click, it’s time to reset the menus to their defaults, which is done by deleting some configuration files. Actually, technically you’re not deleting anything, as the 2 files in question are simply renamed with .bak extensions [so they’re still there if you really need them later], forcing Gnome to recreate those files with default values.

To force Gnome to rewrite its panel menus with default values, enter the following command into a terminal:

mv ~/.config/menus/applications.menu ~/.config/menus/applications.menu.bak && mv ~/.config/menus/settings.menu ~/.config/menus/settings.menu.bak

(That should work with either Gnome 2 or 3, though the settings menu part of it probably won’t do anything in Gnome 3).

All you have to do now is log out, then once you log back in again, your panel should be back with all its menus. Or you can simply enter killall gnome-panel into the terminal and it should successfully refresh your panels without having to log out.

Make a New Top Panel if Missing:

If your panel is absent, you could have even accidentally deleted it yourself, if you unwittingly right-clicked the panel and chose “Delete This Panel” (in Gnome 2 – in Gnome 3 that is harder to do, since you need to be holding Alt while right-clicking the panel). But don’t immediately blame yourself, as all sorts of mishaps can result in a missing panel.

Whatever the case, you should be able to recreate your top panel simply by right-clicking the bottom panel (while holding Alt in Gnome 3) and choosing “New Panel“. You’d then move it to the top, then right-click it (holding Alt in Gnome 3) and choose “Add to Panel…” to add back all the various bits and pieces you had before (the “default” panel is actually a blank panel with a bunch of plugins added).

Obviously, this would be the most time-consuming method, but if you plan to customise your panel anyway, you may as well start from scratch. However, the easiest method would be to totally reset your panels, so keep reading.

Force A Complete Panel Reset:

When all else fails, it’s time to force Gnome to completely reset your panels, which is done by deleting the configuration files. That might sound drastic, and in reality this really is the last resort, but if your panel is totally messed up, chances are your old settings are useless anyway, or rather that having to stick some launchers back on a clean panel will be a welcome alternative to having no panel, or one that is buggy, or missing the “Applications” menu or whatever.

To force Gnome to recreate its panels with default values, enter the following commands into a terminal:

gconftool --recursive-unset /apps/panel (This wipes the panel’s settings)

rm -rf ~/.gconf/apps/panel (This deletes the panel’s folders and files)

killall gnome-panel (This forces the panel to close and restart)

Your panel should now be back with all its menus (but of course minus any customisations). If for some reason they don’t appear immediately, a reboot should fix it.

Alternative Commands for Panel Reset:

ΔΔΔ Some guides have gconftool-2 --shutdown as the first command (this shuts down the current user’s gconfd), though gconftool --recursive-unset /apps/panel should work perfectly fine without it. However, if you aren’t having success, then run it first.

ΔΔΔ If you’re running the commands via the Alt+F2 Run Application box, chances are it won’t like the tilde (~) in the second command, so use rm -rf $HOME/.gconf/apps/panel instead.

ΔΔΔ Instead of killall gnome-panel, you can use pkill gnome-panel (which is basically the same thing), or nohup gnome-panel --replace &, or nohup gnome-panel --replace </dev/null &>/dev/null & (note that nohup specifies the command not halt when the terminal is closed, so is not needed if using Alt+F2).

ΔΔΔ If you’d rather make a backup of the panel’s files before deleting them, run mv ~/.gconf/apps/panel ~/Settings/PanelBackup (note the second path can be whatever you want; in this case, it’s a folder called PanelBackup inside a Settings folder within my home folder I have for storing various config files and settings backup). It actually moves the whole folder to a new location, which is basically the same as deleting it, so you shouldn’t need to run the second command (since there is nothing left there to delete, anyway).

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

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 »