Monday, May 14, 2007

bzip2 annoyance and more linux

Guess I didn't mention I've got a Linux at work as well. Developing necessesity, it appears.

The good thing was I received a brand new computer for my new job. The bad thing was I had to install it myself. :)

Vista... well, that was easy. But I still didn't like it.

And then there was Debian. And a brand new computer.

The first downloaded installer (stable version, you know) failed to detect the harddisk, due to a SATA something bus (oh, where are the IDEs gone?), so I had to look for a more experimental version supporting my hardware, and got something named Sarge. That worked pretty well.

The second hurdle was the graphical card, an ATI Radeon X1650 or whatever. Not that I need much graphical power, but there's two monitors (also a great perk). And for the holy kebab I just couldn't kick that thing to work. But lucky me, after a week or so another version of the drivers came up, and it worked! 3D effects would take more work, but I don't need them. It's also very tricky to play with the settings in the xorg.conf file to make two monitors work... ah, whatever.

Now only to make the soundcard work. :D

---

And at last, the question of bzip2 shall be examined. This insidious little trojan masquerades as an archiving/packing utility, and lies in wait on unsuspecting Unix beginners.

As a proper semi-expert I don't stoop as low as reading manual pages or program help beyond the basic introduction. It is obvious some fiendish person decided to abuse this rational and time-saving behaviour, and designed this "tool".

So what's the fault? The default behaviour is not merely packing, but also deleting the source files! Yes, you hear that right. Instead of the lovely unpacked files, you have suddenly ugly packages that may have a smaller size, but of course loose their former functionality. And this is not mentioned right at the start of the documentation. Seriously.

So, if you happen to pack anything important with this, you may look pretty much like a fool in the end. :(

Like I did. :)

3 comments:

manfred said...

Some useful and necessary things I came upon:

Shutting up the PC speaker, which beeps extremely annoyingly all the time:
run 'rmmod pcspkr' as root
edit /etc/modprobe.d/blacklist
add line: blacklist pcspkr


How to setup two monitors with a single desktop, attached to one graphical card - an example of xorg.conf (and it still has little bugs!):


Section "Device"
Identifier "ATI RADEON X1650 0"
Driver "fglrx"
Screen 1
BusID "PCI:2:0:0"
Option "DRI" "true"
EndSection

Section "Device"
Identifier "ATI RADEON X1650 1"
Driver "fglrx"
Screen 0
BusID "PCI:2:0:0"
Option "DRI" "true"
EndSection

Section "Monitor"
Identifier "Generic Monitor 0"
Option "DPMS"
HorizSync 30-70
VertRefresh 50-160
EndSection

Section "Monitor"
Identifier "Generic Monitor 1"
Option "DPMS"
HorizSync 30-70
VertRefresh 50-160
EndSection

Section "Screen"
Identifier "Default Screen 0"
Device "ATI RADEON X1650 0"
Monitor "Generic Monitor 0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "800x600"
EndSubSection
EndSection

Section "Screen"
Identifier "Default Screen 1"
Device "ATI RADEON X1650 1"
Monitor "Generic Monitor 1"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Default Screen 0"
Screen 1 "Default Screen 1" RightOf "Default Screen 0"
Option "Xinerama" "on"
# Option "Clone" "On"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
EndSection
---

MySQL

While compiling an old MySQL version: "too few arguments to function mysql_shutdown"

solve: edit mysql.c
change mysql_shutdown(sock); to
mysql_shutdown(sock, SHUTDOWN_DEFAULT);

(via http://www.jsw4.net/info/listserv_archives/interchange/05-03/msg00069.html)

manfred said...

Today, the clock suddenly stopped working correctly. I couldn't make time-admin run, it kept complaining about:

** (time-admin:29002): WARNING **: Could not open */usr/share/zoneinfo/zone.tab*
** ERROR **: Unable to load system timezone database.

With a bit searching, I have found useful instructions here

I have installed the 'tzdata' and reinstalled 'locales' package, fooled around with setting the correct time and timezone... and it worked.


No idea why this all happened though.

manfred said...

Thanks to a nice article, I have now a PDF 'printer' on the computer.

Probably useless, but hey neat! (Plus it worked the first time!)