Feeds:
Posts
Comments

Archive for the ‘System’ Category

Caja is a great file-manager, but one unfortunate limitation is that you can’t customise the toolbar in the Preferences dialogue, like you can in Nemo (though it’s worth noting that you’re very limited in the buttons you can add in Nemo). However, you can in fact add new buttons to Caja’s toolbar, and a whole bunch of them at that, as well as reorder the buttons, and remove unwanted ones, and I’ll show you how. So just click on the links below, and soon you’ll be populating your toolbar with all the handy buttons you could need!

Copy, Cut & Paste

Create New Folder

“Open New Tab” & “Open New Window”

Open Trash, Move to Trash, Delete & Empty Trash

Undo & Redo

File/Folder Properties

“Open in Terminal” Button?

The Open in Terminal context-menu option is provided by the extension caja-open-terminal (which also gets installed with the caja-extensions package), so you cannot add a toolbar button for it (as it’s not built into Caja). However, I have an even better solution: open the terminal in the current folder with the F4 key!

Network Locations

Clear History

Add Bookmark

“Preferences”, “Templates”, “Backgrounds and Emblems”& “Rename”

See also:

Add/Remove Separators & Reorder/Remove Buttons

Read Full Post »

Caja is a great file-manager, and unlike Nautilus it still has a toolbar, but one limitation is that you can’t customise the toolbar in the Preferences dialogue. However, you can in fact add new buttons, and remove unwanted ones, and I’ll show you how.

It comes down to specifying toolitems in the config file caja-navigation-window-ui.xml, and wherever you paste the code will determine where the buttons end up. For example, if you add the code for your custom buttons after the entry for the Home button, that’s where they will end up; if you add them after all the default buttons, they will end up on the right end of the toolbar. So you can add your buttons where you want, reorder them as you please, and even get rid of unwanted ones.

And here I’ll show you how to add 4 different buttons related to the deleting of files and managing the Trash/Rubbish/Bin (the naming of that folder can vary: in most screenshots of Caja I’ve seen it is Trash, whereas when I first installed Caja in KDE it was Bin, but when I log into my MATE desktop it’s displayed as Rubbish – so I’ll go with Trash in this tutorial, especially since that’s the term used in the code we’ll be adding).

Caja Toolbar Button to Open Trash/Rubbish Folder

These will be Open Trash, Move To Trash, Delete (bypass Trash and completely delete), and Empty Trash.

Caja Toolbar Button to Move Items to Trash/Rubbish

While it’s easy enough to hit the Delete key to move files and folders to the Trash, and to totally delete them it’s just Shift+Delete, having buttons for these can save you reaching for the keyboard if you’ve just selected files/folders with your mouse (I’ve found the Delete button to be more useful than I imagined). And while you can right-click Trash in Caja’s sidebar and choose Open, Open in New Tab, Open in New Window, and Empty Trash, having a button to open it in the current tab – or middle-click that button to open the Trash folder in a new tab (very handy!) – is quicker, and I’ve found the ability to empty the Trash simply by clicking a button to be extremely useful.

Adding the Delete & Various Trash Buttons

Caja Toolbar Button to Completely DELETE Items, Bypassing Trash/Rubbish

Here I’ll show you how to add all 4 buttons, but you can of course leave out buttons you have no use for, as well as rearrange their order. Personally, I don’t have one for Move to Trash (simply “Trash” in the code below), as hitting the delete key is quicker, but having one for Delete saves me from using both hands to hit the Shift+Delete combo. I middle-click the Open Trash button (“Go to Trash”) to open it in a new tab quite often, but leave that out if you don’t think you’ll use it. But most of us will probably find being able to Empty Trash via a toolbar button to be quite handy.

Caja Toolbar Button to Empty Trash/Rubbish

First off, open the file for editing with the following command:

pluma admin:///usr/share/caja/ui/caja-navigation-window-ui.xml

The second half of the file deals with the toolbar, so locate the button you want to put your custom ones after. Hit Enter at the end of that line, and paste the code below into the empty paragraph beneath it, making sure to preserve the indent (if pasting the whole block at once, you’ll need to hit the spacebar a few times before the second line onwards so the indents line up).

<toolitem name="Go to Trash" action="Go to Trash"/>
<toolitem name="Trash" action="Trash"/>
<toolitem name="Delete" action="Delete"/>
<toolitem name="Empty Trash" action="Empty Trash"/>

Personally, I put these near the end of the toolbar, but you can add them wherever you please.

Code for Caja Toolbar Buttons

Once you’ve added your custom buttons, save the file, then reload Caja (either by manually closing all windows, or running caja -q in the terminal, then opening Caja again). Your new toolbar buttons will be there and ready to use!

For info on how to Add or Remove Separators, Reorder Existing Buttons, and Remove Unwanted Buttons, check out this guide!

See also: Full List of Available Caja Toolbar Buttons

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

The tutorial above is TOTALLY FREE, and I hope you found it useful! But if this information really made your day, because it rescued you from hours of headache, or allowed you to accomplish something you thought was impossible, then please consider making a donation via PayPal, to buy me a donut, beer, or pizza for my time and effort! Many thanks in advance!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

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!

Read Full Post »

If you’ve upgraded your Ubuntu system only to find you don’t have permission to do pretty much anything, as I did after upgrading to 13.10, it can be pretty annoying even for an advanced user, and downright scary for a novice. The symptoms are pretty obvious, as when you go to install updates, all you get is an error message saying “This operation cannot continue since proper authorization was not provided“. And using the Shutdown button seems to do nothing, and even using a terminal command to power off might see the shutdown process halt half-way through, forcing you to use the PC’s power button.

On top of that, even mounting removable drives (or other partitions on your internal drive) ends in being told you can’t, and even trying to play a DVD ends with “Unable to access “DVDVIDEO”. Not authorized to perform operation.

While there are ways around all of these situations for more advanced users, those less experienced with Ubuntu/Linux would find it all quite daunting, and pretty much look at their system as unusable. And one shouldn’t have to go through the bother of manually mounting drives through the terminal, or invoking the Software Updater as superuser, or any other thing we usually take for granted.

Luckily, the fix – which involves PAM (Pluggable Authentication Modules) – is actually quite simple, and should have everything back to normal in no time.

In a terminal, enter the following command to edit the PAM authentication file for the LightDM display manager:

gksu gedit /etc/pam.d/lightdm

Under the first line “#%PAM-1.0” paste the following 2 lines:

session required pam_loginuid.so
session required pam_systemd.so

Save and exit the file, then log out and back in again, and all should now be fine (you shouldn’t need to reboot).

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

Another method, which fixed the problem for some (but not in my case, and many others) is to run:

sudo pam-auth-update --force

This opens PAM‘s config within the terminal, at which you either check or uncheck items, or just hit Tab to go to OK, and hit Enter.

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

If need be, like you have GDM installed and it is interfering with LightDM, run dpkg-reconfigure gdm and select lightdm (you may need to reboot).

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

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’ve attached an external hard drive for backing up your files, or created a new partition for storage, only to find you don’t have the permissions to use it, you’d be understandably frustrated. But it’s actually quite easy to remedy by simply running a command in the terminal in the form of:

sudo chown -R username:username /partition/mount-point

Note that the above isn’t the actual command you’ll be using, as you’ll need to replace each instance of username with your actual username, and also determine your mount-point, which is not the device name (eg: /dev/sdb1).

To find the mount-point, run mount in the terminal, and locate the line that corresponds to the drive or partition in question. If you have never named (or set the label for) it, it will probably look something like:

/dev/sdb1 on /media/bf9a2c45-491a-4778-9d76-47832fe38820

If you have set the label with something descriptive, it should like similar to:

/dev/sdb1 on /media/1Tb Pocket Drive

As you can see, your mount-point will look something like /media/bf9a2c45-491a-4778-9d76-47832fe38820 or /media/1Tb Pocket Drive, so all you need to do now is run a command like one of the following, replacing the relevant info with what is appropriate to you:

sudo chown -R billgates:billgates /media/bf9a2c45-491a-4778-9d76-47832fe38820

sudo chown -R billgates:billgates '/media/1Tb Pocket Drive'

Note that if your custom label contains spaces (e.g. 1Tb Pocket Drive) , you will need to enclose the entire mount-point path in single quotes, but won’t need them if it’s a single word or multiple words joined by hyphens or underscores.

That’s it – you should now be able to do whatever you want with the drive or partition in question, as you’re now the owner.

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

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!

ption]

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 »

If you’ve been looking at reviews of Ubuntu 12.04, you may have noticed mention of the new app in System Settings, “Privacy“. With it, you can delete the history of your activity recorded by Zeitgeist, and even turn the “Record Activity” feature off, or just exclude certain types of files – like images, emails, and even websites – or simply tell it to exclude certain folders.

If you upgraded, however, you may find the Privacy app doesn’t exist on your machine. But fret not, as it’s really simple to rectify this.

Simply open a terminal, and paste the following:

sudo apt-get install activity-log-manager-control-center

That’s it – now when you go to System Settings, you’ll find Privacy in the Personal section.

To clear your history, go to the Recent Items tab and click the “Delete history” button.

If you want to exclude certain programs, go to the Applications tab and add them with +.

To exclude certain types of files and/or specific folders, you’ll find what you need in the Files tab.

And of course, if you’d rather just stop logging of your activity, set “Record Activity” to OFF.

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

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 »