Linux For Cynics One user's experiences with Linux


Install Oracle Java 7 in Ubuntu 12.10

Installing Oracle Java 7 in Ubuntu can be difficult to do by hand. The Webupd8 team has provided a very easy installer in the webup8team ppa. All you have to do is add that ppa:

sudo add-apt-repository ppa:webupd8team/java

And install the oracle-java7-installer:

sudo apt-get update
sudo apt-get install oracle-java7-installer

You might encounter a few dialogue boxes that ask you to agree to license terms.

All done!

After that, you should be able to invoke Java on the command line with java, or by right-clicking on a .jar in Nautilus and selecting "Open with Oracle Java 7 Runtime".

For example, to run a jar, called jdiskreport-1.4.0.jar, just right click on it in Nautilus:
Or, in a terminal, type:

java -jar jdiskreport-1.4.0.jar

Ubuntu 12.10 Broke My External HDD Shares

The set up I have for my NAS computer might not be typical, so perhaps this doesn't apply to most people. But when I upgraded to Ubuntu 12.10, my external hard drive was no longer accessible from the network. I would get the ""Unable to mount location. Failed to mount Windows share" error dialogue. What was most puzzling was that when I connected through ssh and tried to access /media/My Book, it was there, but I would get

ls: cannot open directory My Book/: Permission denied

The problem is that the mount points for external media have changed. For your user, they are now:


So, in order to share them over the network, your /etc/samba/smb.conf must reflect that (replace <username> and <drivername> with your details):

[My Book]
path = /media/<username>/<drivename>
available = yes
browsable = yes
public = yes
writable = yes
force user = <username>

And restart the samba service:

 sudo service smbd restart

Still won't work? Try this: How to share an external harddrive


Unity Panel in Gnome-Shell

One of my favorite things about Unity is the global menu. By "global menu" I mean the feature that combines the title bar and menu of the currently maximized application into the left side of the top panel. It saves screen space and very clean-looking.

I also like how the notification area is in the top right in Unity, instead of having its own ugly bottom panel that autohides like in Gnome-shell.

Well, it's possible to use Unity's top panel in Gnome-shell! Just run:


You'll also want to move gnome-shell's top panel to the bottom with an extension. Panel Settings will do the trick.

Clearly we're not done. Now the normal gnome-shell panel is on the bottom but it still does much of what our Unity-2d-panel does. You'll have to either hide it, or give it different functionality using gnome-shell extensions. I leave that up to you.

Be warned that Unity2D will be deprecated in Ubuntu 12.10.


How to Add Shutdown Shortcut in Ubuntu Unity

I hate that there's no keyboard shortcut for system shutdown in Unity. Here's how to add one:

1. System Settings
2. Keyboard
3. Shortcuts tab
4. Custom Shortcuts
5. Then the little + icon.

You can give it the name "Shutdown", and the command:

gnome-session-quit --power-off --force

, then apply whatever keyboard shortcut you want to it.


Ubuntu on Asus Eee PC 1201N

asus1201nA few years ago netbooks were quite popular and although I am not usually a hardware early adopter, I fell for this fad and got an Asus eeePC 1201N, one of the first with the Nvidia Ion card. It came with Windows 7, I installed Ubuntu, but kept the Windows partition for games (yes, this netbook can run some games).

This post is probably years over due, but recently I dusted off the old netbook and decided I would install Crunchbang 10 on it. I reformatted the Windows partition. After giving #! a shot I went back to Ubuntu (Xubuntu, actually).

[[EDIT: There is more that needs to be done to make Ubuntu behave properly on the 1201N. I will summarize what've read, but here are the sources: , , ]]

Anyway, here's what I did to make it usable:


To get the majority of the hotkeys to function properly, you need to modify how GRUB boots Linux, as follow.

Open a terminal and edit your Grub configuration file:

sudo gedit /etc/default/grub

And change the option GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" as follow:

GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux acpi_backlight=vendor splash"

Then update Grub installation with the command:

sudo update-grub

and restart your netbook.

Super Hybrid Engine: Heat, Fan Control, Cpu Frequency Scaling

Unfortunately, the Eee PC 1201N is incompatible with cpufrequtils. As far as I know, there's no way to control cpu frequency on this machine. Instead, front side bus freqency is controlled by Asus's "Super Hybrid Engine". In order to make use of this, we can install the power control applet Jupiter)

First we need to install laptop mode:

sudo apt-get install laptop-mode-tools

Then we proceed to install Jupiter:

Step 1 : Run the following command to add the PPA for Jupiter on your Ubuntu system.
sudo add-apt-repository ppa:webupd8team/jupiter
Step 2 : Update your Ubuntu system.
sudo apt-get update
Step 3 : Now install Jupiter on your Ubuntu system.
sudo apt-get install jupiter
Step 4 : Finally install support for EeePC - required for SHE (Super Hybrid Engine) on your Ubuntu system.
sudo apt-get install jupiter-support-eee

It still runs a little hot my system, but it is a huge improvement.


Change Boot Screen in Ubuntu/Mint

plymouth screenshot

Plymouth is the application which provides the graphical "splash" screen when booting and shutting down an Ubuntu or Ubuntu-based system. I never really gave it much thought until I installed xbuntu-desktop and noticed that my boot screen had changed to the xubuntu logo.

If you find yourself in the same situation or just want to customize your installation, first find a new plymouth theme, which can be accomplished by searching for "plymouth-theme" in the package manager (or don't, if you are just reverting to your original theme if you installed a different desktop environment). Then, in terminal:

sudo update-alternatives --config default.plymouth

Select the theme you want, and then:

sudo update-initramfs -u

That's it!

Now, if you go searching for a way to switch themes using a GUI, you may come across Mario Guerriero's plymouth-manager. However, if you add the ppa and try to install plymouth-manager, you might find there is no version for Ubuntu 12.04.