Monday, 25 March 2013

yum downgrade

OK Found a nice yum command: downgrade.

Doesn't sound very useful, but it solved some of my trouble here:

…blablabla…
--> Finished Dependency Resolution
Error: Package: openssh-clients-5.3p1-81.el6_3.x86_64 (updates)
           Requires: openssh = 5.3p1-81.el6_3
           Installed: openssh-5.3p1-84.1.el6.x86_64 (@anaconda-CentOS-201303020151.x86_64/6.4)
               openssh = 5.3p1-84.1.el6
           Available: openssh-5.3p1-81.el6.x86_64 (base)
               openssh = 5.3p1-81.el6
           Available: openssh-5.3p1-81.el6_3.x86_64 (updates)
               openssh = 5.3p1-81.el6_3
 
The text  "Available: <package+version>" means the package can be installed, but yum doesn't want to, since it's not the latest version (-81). Latest version is already installed (-84).

Luckily it's easy to revert to the previous version when a package depends on that.

Just yum downgrade openssh-5.3p1-81.el6.x86_64
 
yum then understands it's actually your meaning to install a not-newest package :D

Wednesday, 20 March 2013

Opengazer for cerebral palsy

The son of one of my friends appears to have cerebral palsy. That means no motion control. Except for maybe his eyes. He's 10 and never was able to communicate.

For now, this is my plan:
Connect an eye mouse (opengazer) to dasher or something similar.

A Tobii device would be great, but costs $×n, so just for checking if my little friend can use it, it's definately overkill. Could be we could fund it in the future, if applicable.

For now, I got dasher to speak spanish via espeak :
  1. In one terminal, start "espeak -v es-la".
  2. In another, start "dasher --appstyle=direct"
  3. Focus on the first terminal (little seems to happen: dasher keeps grabbing focus)
  4. Start using dasher to make up words. Espeak will speak it when you hit a paragraph mark ¶  (technical details: espeak reads line by line).


Now, building opengazer (on linux mint 14) I ran into a few problems:

1 VXL libraries. Now, the docs suggest these MUST be installed from source. It kind of works anyway here.
Solution: apt-get install libvxl1.14 libvxl1-dev

2 Make errors
change PointTracker.h (thanks to http://ubuntuforums.org/showthread.php?t=2041502):
from:
class TrackingException: public exception {};
to
class TrackingException: public std::exception {};

3 Linking errors - change Makefile (thanks to https://github.com/opengazer/OpenGazer/issues/1):

# the object must come BEFORE linking
Originally the %.o rule is as below:
g++ -c $(CPPFLAGS) -o $@ `pkg-config cairomm-1.0 opencv gtkmm-2.4 --cflags` $(INCLUDES) $<
I had to change the order to make it look like:
g++ -c -o $@ $(INCLUDES) $<  `pkg-config cairomm-1.0 opencv gtkmm-2.4 --cflags` $(CPPFLAGS)

Also the opengazer rule was:
g++ $(CPPFLAGS) -o $@ `pkg-config cairomm-1.0 opencv gtkmm-2.4 --libs`  $(LINKER) $^
And I modified it to be:
g++ -o $@ $^ `pkg-config cairomm-1.0 opencv gtkmm-2.4 --libs`  $(LINKER) $(CPPFLAGS)

4 Change Makefile to be aware of the VXL libs:
from:
VXLDIR = /opt
to:
VXLDIR = /usr

# due to .h files loated in /usr/include/vxl/core/

----------
make
and it kind of works. "Kind of", because I can't hold my head entirely still :D


I like dvorak. But I like my custom dvorak layout even better. So how do I add that to the gnome desktop in centOS?

In Linux mint I used a hacked "no" symbols file, available in my xkb folder on google drive.

Turned out this was an easy one. Download and:
# cp no /usr/share/X11/xkb/symbols/

and then add the layout with the keyboard layout manager (Norwegian → Dvorak).

Bob's my uncle. I can write spanish, french and math as easy as before :D


Monday, 18 March 2013

clementine on centos 6.3

Hmm clementine didn't work out-of-the-box

The correct solution is here: http://pkgs.org/centos-6-rhel-6/nux-dextop-i386/clementine-1.0.1-5.el6.nux.i686.rpm.html

and consist in this:

rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/i386/
yum install clementine

Now, after that I ran into gstreamer trouble. It's related to gstreamer-plugins-bad not using latest libvpx. To fix:


yum remove libvpx
rpm -ivh ftp://ftp.pbone.net/mirror/atrpms.net/el6.3-x86_64/atrpms/stable/libvpx-0.9.7.1-1_1.el6.x86_64.rpm
yum install gstreamer-plugins-bad

(note that my machine is 64bit. Could be you need to adjust that link)



apt-get? yum.

Being used to apt-get (network-auto-install) and dpkg (install downloaded packages) in linux mint, I found counterparts in centOS:

apt-get = yum
dpkg = rpm

Some useful yum commands:

yum search <something> - searches for a package. Can use partial name, and it's case insensitive.
yum install <something> - installs a package and its dependencies. Can use -y to skip the "install? y/n", but that isn't always a good idea, for example I once uninstalled X and gnome automagically this way.
yum whatprovides <some missing system file> - Looks for packages that provide a specific file; for example I found that "yum whatprovides libQtGui.so.4" was in qt-x11, needed for VirtualBox to run.

Some useful rpm commands:

rpm -ivh <something> - install an rpm package.
rpm -e <something> - remove an installed program.

A NOT so useful rpm command:

rpm --force <something> - force the install of some package. This made me suffer a lot, uninstall X & gnome, causing incompatibilities and broke yum. Time to repeat an advice given on irc: "Don't use --force. Yum doesn't have that function, and for a reason."

from mint to centOS

OK I need to take some notes on going from linux mint to centOS.

First, I have nothing against linux mint. In my opinion it's the best Desktop OS.

But I needed centOS to learn the RedHat way of doing things on servers.
So I switched.

Now, I tried centOS in Virtualbox first, but found I couldn't use centOS as a guest OS and benefit from the vtx in the processor. centOS had to be the OS installed directly on to the metal.