Entries in Ubuntu (7)

Wednesday
Jan042012

How to access better/more advanced power settings in Ubuntu/Linux Mint with Gnome 3

Gnome3 on Linux Mint/Ubuntu comes with a pretty bare-bones power manager. Luckily, there's a better alternative and it's called dconf-editor. Here's how to get it and use it for power management purposes:

$ sudo apt-get install dconf-tools
$ dconf-tools

The relevant settings can be found in org/gnome/settings-daemon/plugins/power

Wednesday
Dec282011

How to get JungleDisk Desktop running on Ubuntu 11.10 and Gnome 3

JungleDisk is broken for Ubuntu again. It won't start when selected from Gnome 3's Activities dashboard, nor will it start when calling it manually from the command line.

$ junglediskdesktop
junglediskdesktop: error while loading shared libraries: libnotify.so.1: cannot open shared object file: No such file or directory 

As suggested by JungleJason (http://askubuntu.com/a/84499), you'll need to symlink libnotify.so.4 to libnotify.so.1. The latest version of Ubuntu (11.10) apparently only comes with the former variant.

If you're running a 32-bit Ubuntu: 

$ cd /usr/lib/i386-linux-gnu/ ; sudo ln -s ./libnotify.so.4 libnotify.so.1

If you're running a 64-bit Ubuntu: 

$ sudo ln -s /usr/lib/x86_64-linux-gnu/libnotify.so.4 /usr/lib/libnotify.so.1

 

Wednesday
Dec282011

How to compile Node.js from source with Ubuntu

UPDATE: Works with Node.js 0.6.6 and 0.6.7 on Ubuntu 11.10 (Oneiric Ocelot) / Linux Mint 12 (Lisa).

There are no pre-compiled packages for Linux, so if you want to use Node.js, you'll have to build it yourself. It's easy enough though, and here's how.

Download and unpack Node.js Source

You can obtain the release version from their website or get an edgier version from their Git source repository. If you acquired it from the former source, you'll need to decompress it first, for instance to /usr/local/src/.

(optional) Install the build tools

If you haven't done this before, your system most likely won't have the required tools for software compilation. You can easily install them: 

sudo apt-get install build-essential checkinstall 

(optional) Install openssl-dev

If you want to compile with SSL support (default), you'll also need to install the OpenSSL Development Packages, like so:

sudo apt-get install libssl-dev

Build Node.js

Open up a terminal witndow and navigate to the directory that contains the Node.js source, e.g. /usr/local/src/node-0.6.6. And execute the following commands in succession: 

./configure
make
sudo make install

If all goes well, you should be able to access the node command from any terminal window.

Tuesday
Aug092011

How to install Flash Builder 4.5 "Burrito" on Ubuntu Linux 11.04 "Natty Narwhal"

Image courtesy of Flickr user guineves

In recent months, Adobe has formally dropped Linux support for it's Eclipse-based Flash Builder IDE. Eclipse itself is cross-platform, however, so it was undoubtedly an artificial measure. Adobe probably figures the Linux developer community is just too small to support. And hey, they may have a point.

I know a lot of developers have a least one foot in Linux-land, still, so when I found out someone ported Flash Builder 4.5 to Linux, I was fast to try it out. It requires a some tinkering, as is customary with Linux, but it's not too bad. Here's how.

fb4linux

fb4linux - a straight port of the Flash Builder Eclipse plugin - is an open source project that resides on Google Code. The project is has medium activity, and supports Adobe's latest release of Flash Builder, i.e. 4.5 "Burrito", which is actually quite surprising. Being an unofficial port though, some features are disabled or don't function properly, e.g. the network monitor and the profiler. These features don't even work decently on a supported platform, so unless you really rely on these features, it's not a big deal.

Installation

It looks like the installation instructions on the project's website are out of date, but with a some common sense, you should be able to get it rolling.
Note: I'm running Ubuntu 11.04 with Unity.

Install Eclipse from Ubuntu Software Center

Open 'Ubuntu Software Center' and type eclipse in the search box in the top right corner.

Eclipse installs to /usr/lib/eclipse by default. This is an important location, since we'll be pasting files into this directory later on. Note that you can find out install locations easily by using the Synaptic Package Manager. Just search for an app, right-click its entry and select Properties from from the contextual menu. The information you need will be under the Installed Files tab.

Get fb4linux

Download burrito4linux here and unpack it. The unpacked archive contains the following top-level directories:

  • /eclipse
    • /features
    • /plugins

Paste /features and /plugins

The next step is to paste the /features and /plugins directories in place into /var/lib/eclipse, overwriting any existing files. In order to accomplish this, however you'll need to sudo. Open up a terminal and enter (disregard the warnings you may get in the terminal window after Nautilus opens):

sudo nautilus

Navigate to /var/lib/eclipse and paste the aforementioned files/folders from the unarchived directory. Make sure Eclipse isn't running, just to be on the safe side.

That's all folks! You should now have a functional Flash Builder. I haven't gotten around to testing all features, but on first look, things looked just fine and functional. I'll update this post if I find any critial bugs.

Sunday
Aug072011

How to solve JungleDisk's "Background Service Error" under Ubuntu 11.04 Unity

JungleDisk Desktop is great cloud backup and sync service run by RackSpace Hosting that offers unlimited online storage at the afforable rate of .15 USD per stored GB. While not as consumer-oriented and user friendly as its competitor Carbonite, I've gone cold turkey and am now using it exclusively on all my systems. Contrary to Carbonite, Jungle Disk is fully cross-platform with support for Windows (desktop and server editions), Mac OS X 10.5+ and Linux (DEB, RPM and TAR).

Linux support is becoming more important to me because I'm currently evaluating whether Ubuntu 11.04 could become by main operating system (I'll most likely stay in a dual-boot environment). In the light of these evaluations, I installed JungleDisk Desktop on all my Ubuntu-based systems. Installation went smoothly thanks to the pre-compiled .DEB packages, so did the initial setup wizard. Great. So I put the JungleDisk Desktop icon in my Unity dock for easy access..

Problem

However, clicking the icon causes the following error dialog to pop-up consistently:

Background Service Error

Jungle Disk Desktop is running in standalone mode and has detected the service is already running, or the service network port is in use. 

Please stop the service, or run Jungle Disk Desktop in non-standalone mode.

I tried running it from the terminal, and looked into JungleDisk's CLI parameters with the --help switch, to no avail. After searching high and low, I decided to contact JungleDisk support, as there was no mention of this behavior anywhere on the net.

Cause

It turns out this behavior is specific to Ubuntu 11.04's new UI shell 'Unity'. Normally, JungleDisk puts an icon in the system tray in the top right. Clicking on this icon opens the Jungle Disk Monitor app, which in this case, can't be accessed because Unity hides the tray icon for some reason. 

Workaround

The workaround to this issue is to install dconf-tools and use it to allow the junglediskdesktop app to install itself into the tray.

First off, fetch and install dconf-tools by firing up a Terminal and entering:

sudo apt-get install dconf-tools

Then, open dconf-editor using the same terminal (don't sudo!). 
In this dialog, drill down the tree to: / > desktop > unity > panel

Here, append the string 'junglediskdesktop' to the systray-whitelist enumeration (see screenshot). You may need to end any existing junglediskdesktop process and restart it to get the tray icon.

That should remedy the situation! I hope I've saved someone some time by documenting this, it wasn't at all obvious to me that the hidden tray icon was the culprit, as I was assuming that using the application shortcut would bring up the JungleDisk Activity monitor. 

I'd like to thank JungleDisk for their speedy, friendly and to-the-point support on the matter. They helped me find the solution to this problem in a day's time. Good job.

Saturday
Aug062011

Disable Password After Sleep in Ubuntu 11.04

With the default account settings, Ubuntu 11.04 requires the user to enter a password when the system comes out of sleep or screensaver mode. The latter setting is easily disabled by navigating to System Settings > Screensaver and unchecking the box Lock screen when screensaver is active.

Disabling the password prompt after sleep (suspend) is not clearly surfaced in the settings pane, however. It can easily be disabled by use of gconf-editor. Here's how to go about it: 

  1. Open a Terminal and enter gconf-editor
  2. In gconf-editor (Configuration Editor), drill down the directory tree on the left: / > desktop > gnome > lockdown 
  3. Uncheck the box with label disable_lock_screen

That's it. I wonder why this setting wasn't exposed in the regular settings UI. It's a potential security/privacy issue, but a valid option to set in case your computer is in a safe environment with no risk of being accessed maliciously when left alone.

Note: Using the disable_lock_screen option will also grey out the checkbox in the Screensaver settings dialog.

Sunday
Nov282010

Set up keyboard layout switching in Lubuntu

While playing around with Lubuntu in a virtual machine I came across an annoying UX flaw. There is absolutely no way to set up keyboard layout switching in Lubuntu. I use this feature all the time on Windows and Mac to switch between QWERTY and AZERTY layouts. On Windows, this is done with a keyboard shortcut: ALT+SHIFT. On Mac there's a little switch on the menu bar. To make this work on Linux, however, we'll need to hop into a Terminal:

setxkbmap -option grp:ctrl_shift_toggle us,be

This causes CTRL+SHIFT to switch between US and Belgian keyboard layouts. Admittedly not extremely user friendly, but if you're setting up Linux in a virtual machine, you're probably not a novice user.

Back to work now ;-).