Archive for the ‘kubuntu’ Category

h1

ScreenCast on Linux

March 17, 2007

I needed to do some screencast on my PC. After reading around the net I found vnc2swf and Istanbul. I decided to give a try first to Istanbul as it had a deb package ready. I am a bit reluctant to installing gnome based software and their lib on my KDE but well…
So well, the usual :
sudo apt-get install istanbul
But at launch I would end with :
Traceback (most recent call last):
File "/usr/bin/istanbul", line 30, in ?
from istanbul.main import main
File "/var/lib/python-support/python2.4/istanbul/main/main.py", line 33, in ?
from istanbul.main.gconf_client import GConfClient
File "/var/lib/python-support/python2.4/istanbul/main/gconf_client.py", line 19, in ?
import gconf
ImportError: No module named gconf

I read that it was fixed with later version of Istanbul, So I went to install the new version. But first you’ll need newer libxml2 library aswell (here link for amd64) :
wget http://http.us.debian.org/debian/pool/main/libx/libxml2/libxml2_2.6.27.dfsg-1_amd64.deb
sudo dpkg -i libxml2_2.6.27.dfsg-1_amd64.deb

wget http://http.us.debian.org/debian/pool/main/i/istanbul/istanbul_0.2.1-3_amd64.deb
sudo dpkg -i istanbul_0.2.1-3_amd64.deb

Later if a software require older version of libxml2, you can overwrite the newer you installed with the previous ubuntu version, istanbul should continue to work correctly.
You’re done, you can launch and record through the icon in tray bar.

It’s really easy to use but the output is only OGG Theora and unfortunately web browsers don’t all handle that format.

That’s why I switched to vnc2swf which produces directly flash format.
Couldn’t be easier to install, you need a vnc server, ie :
sudo apt-get install x11vnc
Then install vnc2swf. I installed pyvnc2swf as it’s the one under development and maintained contrary to the C older version.
sudo apt-get install python-tk
sudo apt-get install python-pygame
wget http://www.unixuser.org/~euske/vnc2swf/pyvnc2swf-0.9.1.tar.gz
tar xzvf pyvnc2swf-0.9.1.tar.gz
cd pyvnc2swf-0.9.1/

Now you can launch vnc server :
x11vnc -localhost -viewonly -wait 10 -defer 10 &
And you can launch vnc2swf :
python vnc2swf.py
You might land on this message :
open /dev/sequencer: No such file or directory
You should install kernel module : kernel/sound/pci/emu10k1 as stated here.

h1

Upgrading to Beryl 0.2.0

March 17, 2007

Beryl 0.2.0 is out with many cool features and fixes :

    New Plugins :

  • Thumbnail: Thumbnails on the taskbar (window list) which show a mini view of the actual window
  • Snap: Allows windows to “snap” to each other, or provide edge resistance
  • Opacify: Makes windows behind the active window transparent
  • Group: Allows windows to be group, to easily switch between a set of windows
    New system requirements check :

  • The improved check has much better accuracy
  • The check is a lot faster
    New Window Decorators :

  • Since 0.1, we have two new window decorators
  • Heliodor: Uses metacity themes
  • Aquamarine: Uses Kwin themes.
    Newly Rewritten Beryl-Settings :

  • Written in Python
  • More user-friendly UI
  • Better profile support
    New Translations :

  • Thanks to all of our foreign speaking users, we’ve had a much better time getting translations

Now how to upgrade your version (mine used to be 0.1.4) on your kubuntu edgy ?
Edit your /etc/apt/sources.list and add the following lines :
deb http://ubuntu.beryl-project.org edgy main
deb-src http://ubuntu.beryl-project.org edgy main

Update the list :
sudo apt-get update
And upgrade the following packages :
sudo apt-get install beryl
sudo apt-get install beryl-core
sudo apt-get install beryl-manager
sudo apt-get install beryl-plugins
sudo apt-get install beryl-plugins-data
sudo apt-get install beryl-settings
sudo apt-get install emerald
sudo apt-get install emerald-themes
sudo apt-get install libberylsettings0
sudo apt-get install libberylsettings-dev
sudo apt-get install libemeraldengine0
sudo apt-get install libemeraldengine-dev

Reboot and enjoy!

h1

Adding a folder to System Menu applet from KDE Task Panel

February 18, 2007

I found it frustrating not being able to add a folder to System Menu in KDE by just right-clicking or through the KDEMenu Editor. After some search, in fact the folders you see in this menu are located in /usr/share/apps/systemview/. To add one you’ll need to :
mkdir ~/.kde/share/apps/systemview/
And copy an existing .desktop, for example media.desktop
cp /usr/share/apps/systemview/media.desktop \
~/.kde/share/apps/systemview/somestuff.desktop

Then just edit the newly created somestuff.desktop by changing Name= and Path= to point on the folder.
On next login to your session it will appear!

New System Menu View

h1

Installing RadRails on Ubuntu Edgy amd64

February 13, 2007

For a future post about Ruby IDE I needed to install RadRails. I did it in the past without problem on windows. Unfortunately the official (and snapshot) versions come with a 32 bits shared library (libswt-pi-gtk-3232.so). So I was landing on an error message quoted later. The only solution I read while investigating on the net was to use RadRails the oldway : install Eclipse and add RadRails and RDT Plugin to it… I didn’t want to download the overbloated eclipse platform while a standalone RadRails version exists which is lighter (still 40MB…) So I convinced myself to get those bloody 64 bits shared libraries to work.
The laziest way is to find a solution without any compilation (compilation of such libraries can be a nightmare when they depend on zillions of projects and I have no fun messing with that anymore).
So let’s go!
Download Eclispe RPC eclipse-RCP-3.2.1-linux-gtk-x86_64.tar.gz from eclipse site.
wget http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/R-3.2.1-200609210945/eclipse-RCP-3.2.1-linux-gtk-x86_64.tar.gz
Untar
tar xzvf eclipse-RCP-3.2.1-linux-gtk-x86_64.tar.gz
Get RadRails (0.7.2 or snapshot) from RadRails site
wget http://www.web20.com/downloads/radrails-0.7.2-linux-gtk.tar.gz
Untar
tar xzvf radrails-0.7.2-linux-gtk.tar.gz
Launch RadRails once (you need to do that to init RadRails configuration)
./radrails/RadRails
An error message will popup :
An error has occurred. See the log file
/del/radrails/workspace/.metadata/.log.

By editing this file you’ll read that a 32 bits shared library is doing some mess
!STACK 1
java.lang.UnsatisfiedLinkError: /del/radrails/radrails/configuration/org.eclipse.osgi/bundles/59/1/.cp/libswt-pi-gtk-3232.so: /del/radrails/radrails/configuration/org.eclipse.osgi/bundles/59/1/.cp/libswt-pi-gtk-3232.so: wrong ELF class: ELFCLASS32
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1660)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)

Backup the existing faulty jar containing the bloody 32 bits library.
mv radrails/plugins/org.eclipse.swt.gtk.linux.x86_3.2.0.v3232m.jar radrails/plugins/org.eclipse.swt.gtk.linux.x86_3.2.0.v3232m.jar.backup
And replace it with the jar you downloaded from eclipse site containing 64bits shared libraries (like libswt-pi-gtk-3235.so)
cp eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64_3.2.1.v3235.jar radrails/plugins/org.eclipse.swt.gtk.linux.x86_3.2.0.v3232m.jar
You can finally relaunch RadRails!

h1

Installing Miro PCTV Remote Control to run with xdtv

February 8, 2007

I was missing my PCTV Remote control from Windows so I couldn’t lazily switch off my pc by air anymore 🙂
So I decided to install lirc.
I though a simple sudo apt-get install lirc would be enough, but that was not. I wouid get the error message :
could not get file information for /dev/lirc
And indeed /dev/lirc didn’t exist.
So I looked again on the quality ubuntu forum to find the solution that I updated a bit here.
So I decided to install middle-way from apt and oldway.
wget http://prdownloads.sourceforge.net/lirc/lirc-0.8.1.tar.bz2
tar xvjf lirc-0.8.1.tar.bz2
cd lirc-0.8.1/
./configure
# here setup will prompt you
# for your hardware settings :
# PCTV / COM port...
# with a sweet dialog display
# else you should edit /etc/lirc/hardware.conf
# and
# sudo cp /usr/share/lirc/remotes/\
# pinnacle_systems/lircd.conf.pctv \
# /etc/lirc/lircd.conf
make
sudo make install
# backup
sudo mv /usr/sbin/lircd /usr/sbin/lircd-original
sudo mv /usr/sbin/lircmd /usr/sbin/lircmd-original
# if you installed lirc through apt-get previously
sudo rm /dev/lirc
# install the apt-way
sudo apt-get install lirc
# finish the oldway install
sudo make install
# and replace the apt binaries
sudo cp /usr/local/sbin/lircd /usr/sbin
sudo cp /usr/local/sbin/lircmd /usr/sbin

Now that all is installed it’s time to test it.
Launch in one terminal :
sudo /etc/init.d/lirc stop
sudo lircd --nodaemon

And launch in another terminal lirc tool :
irw
Now you can type on your pctv remote and you should see in this terminal some things like :
00031 00 1 PinnacleSysPCTVRemote
00031 00 1 PinnacleSysPCTVRemote
00031 01 1 PinnacleSysPCTVRemote
00031 02 1 PinnacleSysPCTVRemote
00032 00 2 PinnacleSysPCTVRemote

Now you can edit your settings (~/.lircrc) to make it work with xdtv. (.lircrc content doc)
Ok so now you can restart it correctly as daemon.
sudo /etc/init.d/lirc restart

h1

How to run your windows firefox on kubuntu with wine ?

January 28, 2007

I needed to run my windows firefox to retrieve some login (not password!) for things like my bank account…
Here comes an easy one, you’ll just need wine :
sudo apt-get install wine
Then you can launch your windows firefox (my partition is mounted on /media/sda1) :
wine /media/<YOUR_WINDOWS_PARTITION>/\
Program\ Files/Mozilla\ Firefox/firefox.exe

The problem is that your profile won’t be loaded. At first I wanted to link (ln) the profile from windows partition but that wouldn’t work as I have the basic ntfs driver that mount the partition as read only, and firefox would complain (and anyway I wouldn’t want wine to put a mess in my windows firefox profile…). So you’ll just need to copy it :
cp -R /media/<YOUR_WINDOWS_PARTITION>\
/Documents\ and\ Settings/<YOUR_WINDOWS_USERNAME>\
/Application\ Data/Mozilla/Firefox/ ~/.wine\
/drive_c/windows/profiles/<YOUR_KUBUNTU_LOGIN>\
/Application\ Data/Mozilla/

chmod -R 700 ~/.wine/drive_c/windows/profiles\
/<YOUR_KUBUNTU_LOGIN>/Application\ Data/Mozilla/Firefox

And you’re done, you can relaunch and your profile will be loaded.

h1

How to get symlinks to point tv and webcam in a non random manner ?

January 27, 2007

Starting with 2.5x kernels, all physical and virtual devices in a system are visible to userspace in a hierarchical fashion through sysfs. udev is replacing the functionality of devfs.

The order in which devices with the same function appear in /dev is essentially random. E.g., if you have a USB web camera and a TV tuner, sometimes /dev/video0 refers to the camera and /dev/video1 refers to the tuner, and sometimes after a reboot the order changes to the opposite one.

To get round this problem we will identify our hardware and create correct symlinks pointing to the right device.
For that :
udevinfo -a -p /sys/class/video4linux/video0
I got :
looking at device '/class/video4linux/video0':
KERNEL=="video0"
SUBSYSTEM=="video4linux"
SYSFS{name}=="Creative Labs Webcam 5"
SYSFS{dev}=="81:0"

This is my webcam, I don’t have that much device identification for it apart from the name and dev.
For my pctv card i get :
udevinfo -a -p /sys/class/video4linux/video1
looking at device '/class/video4linux/video1':
KERNEL=="video1"
SUBSYSTEM=="video4linux"
SYSFS{card}=="39"
SYSFS{name}=="BT878 video _Pinnacle PCTV Stud"
SYSFS{dev}=="81:1"
looking at device '/devices/pci0000:00/0000:00:09.0/0000:05:06.0':
ID=="0000:05:06.0"
BUS=="pci"
DRIVER=="bttv"
SYSFS{modalias}=="pci:v0000109Ed0000036Esv000011BDsd00000012bc04sc00i00"
SYSFS{local_cpus}=="01"
SYSFS{irq}=="66"
SYSFS{class}=="0x040000"
SYSFS{subsystem_device}=="0x0012"
SYSFS{subsystem_vendor}=="0x11bd"
SYSFS{device}=="0x036e"
SYSFS{vendor}=="0x109e"
looking at device '/devices/pci0000:00/0000:00:09.0':
ID=="0000:00:09.0"
BUS=="pci"
DRIVER==""
SYSFS{modalias}=="pci:v000010DEd0000005Csv00000000sd00000000bc06sc04i01"
SYSFS{local_cpus}=="01"
SYSFS{irq}=="0"
SYSFS{class}=="0x060401"
SYSFS{subsystem_device}=="0x0000"
SYSFS{subsystem_vendor}=="0x0000"
SYSFS{device}=="0x005c"
SYSFS{vendor}=="0x10de"
looking at device '/devices/pci0000:00':
ID=="pci0000:00"
BUS==""
DRIVER==""

Here we get more identification for the pctv device, we will ignore the ones with DRIVER==””, so we have the first 2 to keep.
Now we can create /etc/udev/rules.d/83-duplicate_devs.rules with identifications in :
# Persistent symlinks for webcam and tuner
KERNEL=="video*", BUS=="pci", \
SYSFS{device}=="0x036e", SYSFS{vendor}=="0x109e", \
SYMLINK+="tvtuner"
KERNEL=="video*", SYSFS{name}=="Creative Labs Webcam 5", \
SYMLINK+="webcam"

Now you can reboot and change the kde shortcut of your xdtv (or any tvsoft that doesn’t autodetect the device) with the new symlink here :
xdtv -c /dev/tvtuner

For more information on the subject : refer to this.