Friday, August 31, 2012

Adding custom Application Launcher to Ubuntu Unity

In order to install custom, out-of-repository software, maybe a newer version or one that doesn't exist in the repository at all, you need to do some extra work to get a nice icon in the Unity launcher.

For me, an example is the Eclipse IDE.

Normally, one would copy additional software to the /opt folder. Eclipse has an internal update system which why I installed in my home folder: /home//Programs/eclipse, that is writable by the user that is running the program.

To create a launcher one needs the gnome-desktop-item-edit tool, in the gnome-panel package:

sudo apt-get install gnome-panel

Then, as local user, create a Desktop file for the program, e.g. Eclipse:

gnome-desktop-item-edit --create-new ~/Programs/eclipse/


Now fill in the name, command and choose a Icon, e.g. Eclipse, /home//Programs/eclipse/eclipse and /home//Programs/eclipse/icon.xpm






Now, when you browse to the Programs folder, you can execute the created Launcher and lock it to the Unity menu.

Thursday, August 30, 2012

Printing with Xerox WorkCentre 6015NI on Ubuntu 12.04 LTS 64 bits

Currently, the only available drivers for the Xerox WorkCentre 6015NI for Linux are a 32bits deb package and a 64/32 bits rpm. The last one made me able to get the printer working under Ubuntu 12.04 LTS 64 bits. So download the zipped RPM at the following location:

Xerox WorkCentre 6015 NI Linux Drivers

Unpack the zip file:

unzip Xerox-WorkCentre-6015B_6015N_6015NI-1.0-28.i586.zip

Then use the rpm2cpio command to extract the contents of the RPM file:

rpm2cpio Xerox-WorkCentre-6015B_6015N_6015NI-1.0-28.i586.rpm | cpio -idmv

(hint: use sudo apt-get install rpm2cpio to install this tool)

Now we have the following files:

./usr/lib/cups/filter
./usr/lib/cups/filter/xrhk1ap
./usr/lib/cups/filter/xrhk2ap
./usr/lib/xrhk1acl.so
./usr/share/cups/Xerox
./usr/share/cups/Xerox/dlut
./usr/share/cups/Xerox/dlut/xrhk1alut.dat
./usr/share/cups/model/Xerox
./usr/share/cups/model/Xerox/Xerox-WorkCentre-6015B-fr.ppd.gz
./usr/share/cups/model/Xerox/Xerox-WorkCentre-6015B.ppd.gz
./usr/share/cups/model/Xerox/Xerox-WorkCentre-6015N-fr.ppd.gz
./usr/share/cups/model/Xerox/Xerox-WorkCentre-6015N.ppd.gz
./usr/share/cups/model/Xerox/Xerox-WorkCentre-6015NI-fr.ppd.gz
./usr/share/cups/model/Xerox/Xerox-WorkCentre-6015NI.ppd.gz

Before we start copying these files, make sure that the ownership is set to root.root:

sudo chown -R root.root ./usr

At some point Ubuntu prefers the ppd files unzipped:

sudo gunzip ./usr/share/cups/model/Xerox/*.gz

Now, copy the directory structure into your /usr folder:

sudo cp -R ./usr /usr

Before we can configure the printer in the printer configuration window, make sure the following i386 versions of libraries are installed:

sudo apt-get install libstdc++6:i386 libcupsimage2:i386 libtiff4:i386 libjpeg8:i386 libpng12-0:i386

If the printer is USB connected, the printer installation at System Settings will find the 6015 NI automatically and will find also find the drivers.