You are currently browsing the category archive for the 'Linux World' category.

I’ve always been one of the (not so) few geeks who run Linux on PowerPC.
Sometime ago, Linus himself was one of us, however, it appears that now
he uses a different machine.

Since Apple dropped PPC, the Linux PPC world is quite in turmoil. The architecture is perceived as almost dead. However, new interest comes from the Linux on PS3 projects.

In any case Ubuntu dropped official support for PPC. That was a sad piece of new, since I was quite satisfied with it. I had to recompile the kernel in order to fully support my machine (but this would have been solved in successive releases).

I got back to Debian. I’ve been a Debian user since Woody, and I liked it ever since. I was a Debian unstable user, and I have always been satisfied with it. However, this time it was different. I’ve had many more troubles: each upgrade broke something I needed.

I don’t know if it’s a matter of developers paying more attention to Ubuntu or whatever: the point is that using Debian unstable as a ‘reliable’ desktop system on power pc seemed quite hard. I don’t want to blame Debian developers: it’s unstable. No warranties. I used it at my own risk.

Since Debian is unsuitable for my present needs (no hassle, no config, no time), I considered switching Yellow Dog. I know that these days a PPC community mantained version of Ubuntu has been released.

Ydl5

I bought a Yellow Dog Enhanced account, since I did want to support their work and I was interested in support, if something was not perferct in the first place. Remember, no time.

I installed the distribution from the DVD. My hardware was entirely recognized correctly. From the soundcard to the backlit keyboard. My video card should also work with dual head, though I haven’t tried it yet. YD comes with a nice GUI to do this.

The only thing that was not working was the airport card. I just had to get the fwcutter and extract the firmware. Then it worked. Moreover, the network applet that stays in the notification area works great. I don’t know why, but in Debian and Ubuntu for some reasons it did not work properly (in Ubuntu from a certain moment the whole network-manager stopped working). I did not investigate as I needed less time to write a couple of shell scripts to configure the network interfaces when I needed to switch.

I have always been skeptical about rpm-based distros. Once I used SuSE, but after using Debian I got somewhat convinced of the superiority of the Debian packages. More accurate studies on rpm done recently seem to go in another direction: it was not that deb is better than rpm. It is just that deb repositories were maintained more carefully.

YellowDog repositories are maintained quite carefully. However, there is not a lot of software. I suppose something like 1000 packages (Debian has got ten times that). So I had to learn how to cook my own rpms or simply build software from sources and install it with make install. This is probably the major drawback. However, I’m pretty satisfied with Yellow Dog.

An image is worth a thousand words.

It was a matter of mod-probing i2c-dev.
It is a custom Linux 2.6.20 Kernel on Debian Unstable. Cool!

It happens quite often that I use synaptic to manage packages on my debian.
However, sometime I save the markings in order to perform the installations another time.
For example I need to apt-get something quickly without waiting for the whole thing to be
downloaded and installed.

The standard procedure would be running synaptic again and then loading the markings.
However, in this cases I don’t feel like I need to start the whole synaptic thing.
I’d prefer a small command line utility that processes the saved markings.

I wrote one. It is very simple. It uses sudo, so every now and then it asks the password.
Of course one could do a better job, but I had not time to do something better.

#!/usr/bin/env ruby

args = $*
if args.size == 0
  puts "You should provide a file to process"
  exit 0
end

dict = Hash.new

File.open(args[0]) do |f|
  f.each_line do |line|
    key, action = *line.split
    dict[key] = action
  end
end

# sudo apt-get #{v} #{k}

dict.each do |k, v|
  exec(”sudo apt-get -y #{v} #{k}”) if fork.nil?
  Process.wait
end

Ubuntu discontinued?

Recently there are rumors that Ubuntu PPC will be discontinued.
In fact there is an IRC log about it:

Something asked a few times: Will PPC support be discontinued soon?
We will make a final decision on PPC for Feisty by the end of next week
if there is sufficient community contribution on this, then the community port can be just as good as a Canonical-supported one
we would keep the builds in place, but not block the release if things failed to build
so if people step up to unblock issues when they occur, then PPC would be on the same footing as it currently is
sabdfl, will “but ps3 is ppc” be a valid argument? (asked a few times as well)
the extra architecture costs us a lot in terms of testing bandwidth at release time, and figuring out issues like how to deal with the live CD are compicated
if SONY fund Ubuntu-on-PS3 then I guarantee it will happen :-)

I have to say I’ve not been pleased about it. Of course Canonical should make its own interests: that is to say, if they feel that supporting PPC is not worth it, they are doing the right thing. However, it’s quite sad: there are a loto of perfectly functioning G3, G4 and G5 machines out there. Dropping support like this, seems to be the way commercial companies act.

The point is that we must realize that Canonical is a commercial company. You just can’t do anything about it and accept it.

Since at the moment I run Linux mostly on a PPC machine (my notebook), PPC support becomes a key factor in chosing the right distribution. My choice was obvious: I had been using Debian for ages before Ubuntu, why not going back to Debian? Welcome home, Debian!

Debian PPC

I downloaded the DVD iso for testing. Since I’m running on PPC, the new graphical installer is still experimental. Moreover, I quite feel at home with good old Debian textual installer.

Installation was really smooth. Debian recognised all my hardware with no need for manual intervention. Of course the airport card did not work without bcm43xx-fwcutter. Unfortunately enough, I left my working ethernet cable at the university, in the office I share with some fellow students. This was just a small delay.

Quite interesting Debian recognised my display better than Ubuntu (I still don’t know why, but I had to set the resolution manually or Ubuntu would not start X11). However, Debian did not preload pbbuttons (that are used for the notebook multimedia keys, volume, lcd backlight, etc).

In fact I think a noob prefers to find a system with no multimedia buttons and working graphics than vice-versa. It seems that the guys at Debian did a pretty good work. Nonetheless, I’m quite sad for the exclusion of pbbuttons: I did chose a macro-package (when installing) called ‘laptop’ or something like that. I think that pbbuttons should be included in the first DVD. In fact most PPC machine out there should be laptops (well, maybe not ‘most’, but surely a great number).

Everything else worked smoothly. I recompiled the kernel (I would like to have that backlit keyboard working, it should work even with the 2.6.18 default kernel, but maybe something useful was not compiled into it). The backlit keyboard still does not work, which is a pity, but is something I can live without. Beryl does not work too (but it didn’t work with Ubuntu, either). And it should work. But that is another thing I can happily live without.

I’s a couple of day I’m hacking with xmodmap and keycodes to make my keyboard behave as I expect.
Recently it sprang to my mind that with SuSE 7.1 I used a utility called xkeycaps.

Unfortunately enough xkeycaps generates an .Xmodmap with keycodes expressed as hex numbers, while xev shows code as decimal numbers

This simple ruby oneliner converts an .Xmodmap file with hex codes to one with decimal codes

cat .Xmodmap.hex |
ruby -n -e "if $_ =~ /keycode\s*(0x[A-F0-9][A-F0-9])\s*=\s*(.+?)\n/; puts \”keycode #{$1.hex} = #{$2} \” else puts $_ end”>
.Xmodmap.dec

provided you called the hex .Xmodmap ‘.Xmodmap.hex’.

A window maker screenshot

How much I love windowmaker…
Now it is much less used than once… Most people do use KDE or GNOME (or XFCE) and the good old Window Managers are kind of forgotten (or maybe simply unknown to the masses). However, when I started KDE was slow and took every single byte of RAM from my machine. GNOME was somewhat lighter. However, the desktop environment was not polished and practical (it wasn’t even the 2.0).

In fact some window managers/desktop environment had higher usability (at least in my opinion) even though you had to renounce to a good file-manager (and back than gmc/nautilus was not as good as today).One of those is WindowMaker.

Simple and powerful. As it is today. Well… I restored it on my Ubuntu. Without the debian menu you have to build the application menu yourself (and that is a pain in the ass). However, since most of the times I’m only using firefox, emacs and a terminal, I managed to do it in a very short time.

Easy…

;; mouse-wheel: scroll
(global-set-key [mouse-4] ’scroll-down)
(global-set-key [mouse-5] ’scroll-up)

I found a lot of posts about this, but none worked for me. I just took some pieces of information here and there and I came up with this (that works for me).

Emacs 21.4 on Ubuntu PPC.

ppc-ubuntu-1.jpg

ppc-ubuntu-2.png
ppc-ubuntu-3.png

After such a long title (mainly for tagging reasons) I suppose I have to write a long article.

One of the things I didn’t really like about Ubuntu standard configuration, was the track-pad.
In fact, although correctly recognized (using the synaptics Xorg driver) default was really poor: the mouse moved so slowly it was unusable. For the first hours you can use an external three button mouse and live happily. However, I wanted to fix my track-pad. I found some articles on the net.

There are plenty of blog posts on this subject and if you use synaptics as a key you find even more. This is a good starting point. However, I strongly advise to read synaptics manual (man synaptics). It is synaptics with a trailing s, not synaptic, the package manager.

If you read the manual, you get a lot of informations about how to configure your trackpad. You also have some GUI configurators (gsynaptics, ksynaptics, qsynaptics). They offer less
Options (but are easier to use).

While I was able to set tracking speed and acceleration correctly (mainly using the link I posted) I’m still somewhat unsatisfied with scrolling facilities. Two finger scroll does not seem to work, and edge scrolling (using the edges of the trackpad to scroll) is far from perfect.

The best thing is that I can use tapping to emulate buttons. Tapping in the right upper corner is a middle click and right lower a right click. Now I can use the powerbook without an external mouse.

I’m to post my xorg.conf. And remember… using ‘radeon’ codecs instead of ‘ati’ should be a good thing (I’ve not investigated, I only read it somewhere)
My XOrg:

  # /etc/X11/xorg.conf (xorg X Window System server configuration file)
  #
  # This file was generated by dexconf, the Debian X Configuration tool, using
  # values from the debconf database.
  #
  # Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
  # (Type "man /etc/X11/xorg.conf" at the shell prompt.)
  #
  # This file is automatically updated on xserver-xorg package upgrades *only*
  # if it has not been modified since the last upgrade of the xserver-xorg
  # package.
  #
  # If you have edited this file but would like it to be automatically updated
  # again, run the following command:
  #   sudo dpkg-reconfigure -phigh xserver-xorg  

Section "Files" 	

  FontPath	"/usr/share/X11/fonts/misc"
  FontPath	"/usr/share/X11/fonts/cyrillic"
  FontPath	"/usr/share/X11/fonts/100dpi/:unscaled"
  FontPath	"/usr/share/X11/fonts/75dpi/:unscaled"
  FontPath	"/usr/share/X11/fonts/Type1"
  FontPath	"/usr/share/X11/fonts/100dpi"
  FontPath	"/usr/share/X11/fonts/75dpi"
  FontPath	"/usr/share/fonts/X11/misc" 	# path to defoma fonts
  FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
End

Section "Module"
	Load	"i2c"
	Load	"bitmap"
	Load	"ddc"
	Load	"dri" 	#
	Load	"dbe"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10" 	#
	Load	"record" 	#
	Load	"v4l"
	Load	"type1"
	Load	"vbe"
End

Section "InputDevice"
  Identifier	"Generic Keyboard"
  Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"			"xorg"
	Option		"XkbModel"			"pc105"
	Option		"XkbLayout"			"it"
	Option		"Xkb
	Options"			"lv3:ralt_switch"
	Option		"XkbVariant"			"nodeadkeys"
End

Section "InputDevice"
  Identifier	"Configured Mouse"
  Driver		"mouse"
	Option		"Device"			"/dev/input/mice"
	Option		"Protocol"			"ExplorerPS/2"
	Option		"ZAxisMapping"			"4 5"
	Option		"Emulate3Buttons"			"true"
End

Section "InputDevice"
  Identifier 	"Synaptics Touchpad"
  Driver 		"synaptics"
	Option		"CorePointer"
	Option 		"SendCoreEvents" "true"
	Option 		"Device"			"/dev/psaux"
	Option 		"Protocol"			"auto-dev"
	Option 		"SHMConfig"			"true"
	Option 		"MinSpeed"			"0.30"
	Option 		"MaxSpeed"			"1.10"
	Option 		"EdgeMotionMinSpeed"			"200"
	Option 		"EdgeMotionMaxSpeed"			"200"
	Option 		"FastTaps"			"1"
	Option 		"MaxTapTime"			"100"
	Option 		"AccelFactor"			"0.030"
	Option 		"HorizScrollDelta"			"0"
	Option		"VertTwoFingerScroll"			"1"
	Option		"HorizTwoFingerScroll"			"1"
	Option		"CircularScrolling"			"1"
	Option		"CircScrollTrigger"			"0"
	Option 		"FingerLow"			"1"
	Option 		"FingerHigh"			"3"
	Option 		"LeftEdge"			"80"
	Option 		"TopEdge"			"80"
	Option 		"RightEdge"			"850"
	Option 		"BottomEdge"			"560"
	Option 		"TapButton1"			"1"
End

Section "Device"
  Identifier	"ATI Technologies, Inc. RV350 NP [Mobility Radeon 9600/9700 M10/M11]”
  Driver		“radeon”
  BusID		“PCI:0:16:0″
	Option		“UseFBDev”			“true”
End

Section “Monitor” 	Identifier	“Generic Monitor”
	Option		“DPMS”
End

Section “Screen”
  Identifier	“Default Screen”
  Device		“ATI Technologies, Inc. RV350 NP [Mobility Radeon 9600/9700 M10/M11]”
  Monitor		“Generic Monitor”
  Default
	Depth	24 	Sub
    Section “Display”
    	Depth		1
    	Modes		“1280×786″
    End

    Subsection “Display”
    	Depth		4
    	Modes		“1280×786″
    End

    Subsection “Display”
    	Depth		8
    	Modes		“1280×786″
    End

    Subsection “Display”
    	Depth		15
    	Modes		“1280×786″
    End

    Subsection “Display”
    	Depth		16
    	Modes		“1280×786″
    End

    Subsection “Display”
    	Depth		24
    	Modes		“1280×786″
    End
End

Section “ServerLayout”
  Identifier	“Default Layout”
  Screen		“Default Screen”
  InputDevice	“Generic Keyboard”
  InputDevice	“Synaptics Touchpad”
  InputDevice	“Configured Mouse”
End

Section “DRI”
  Mode	0666
End

Recently I had to install a GNU/Linux system on my notebook. My
work-group is heavily Linux-based and the software which I’m going to
use/extend for my thesis at the moment compiles only on Linux (and
probably on BSD, however, not on MacOS X).
Although it’s a Prolog
software some parts are written in C++ and I haven’t had time to make
it work on MacOS X. Modifications are quite trivial (it’s a matter of
building a dylib). However, I should port the build system to libtool
to make it work on both platforms.

So I decided to install a GNU/Linux distribution. My first choice was Fedora. I’m not particularly fond of RH little sister, but that is the first choice in my team. The PPC version quite sucks. It’s not that things do not work: simply it seems just a bit more than a recompilation of the x86 version. For example package pbbuttons (that makes multimedia keys of my pb work, wasn’t even on the repositories).
It’s not that I particularly want to have the buttons working: it is like those who built it never used it. I mean no one ever tried to use it on a notebook? Moreover, it’s painfully slow. Six minutes to boot. To start some applications (Emacs, the gnome ‘quick’ disc burner, etc) it takes minutes. This does not happen on the x86 version.

Partitioning

So I tried Ubuntu 6.10. It’s heaven. Everything worked without my intervention. Well, almost everything.

The live CD did not recognize properly my screen. It thought it was a 20000×30000 pixel screen (and of course that was *wrong*): I just had to fix that manually. After booting the live CD, I started the installation. Everything went quite smoothly. Details in next posts

/*! \class WindowsNT
 *  \brief Windows Nice Try.
 *  \author Bill Gates
 *  \author Several species of small furry animals gathered together
 *          in a cave and grooving with a pict.
 *  \version 4.0
 *  \date    1996-1998
 *  \bug It crashes a lot and requires huge amounts of memory.
 *  \bug The class introduces the more bugs, the longer it is used.
 *  \warning This class may explode in your face.
 *  \warning If you inherit anything from this class, you're doomed.
 */

class WindowsNT {};

I know this ain’t no piece of news… still I installed SuSE Linux today and I found it really well done and “easy” just from a visive point (that means the user is more likely not to panic).

Really well done. Still I’m in love with Debian.