27/11/2007

Who is using IDL anyway?

I am porting some video data analysis scripts (written in IDL) to Linux just now. Installing was the usual struggle: Archimedes' mainboard is not supported by older OS's, so 10.3 it had to be. On the other hand, the slightly dated IDL version (new licences are pretty expensive) doesn't work with xorg-x11-libs > 6.8. Makeshift workaround: install/deinstall the old lib before and after using IDL and use no other graphical apps inbetween. I'm not amused.
Should have learned Python right away.

24/11/2007

ATI Catalyst 7.11 (AKA fglrx 8.433), AIGLX and compiz

This time I adhered to The Gospel According To CyberOrg:

I prepared my kernel sources as I did with fglrx 8.40, forced an aticonfig and edited my xorg.conf by hand instead of having it written by sax2. Benefits: much smaller file.


# cd /usr/src/linux
# make mrproper
# make cloneconfig
# make modules_prepare
# make clean
# rpm -e $(rpm -qa |grep fglrx)
# cd <directory where you put the driver>
# sh ./ati-driver-installer-x.xx.x-yy.run --buildpkg SuSE/SUSE102-AMD64
# rpm -Uhv <some or other fglrx>.rpm
# aticonfig --initial --input=/etc/X11/xorg.conf --force

Don't run sax2 now!
Modify /etc/X11/xorg.conf
Section “Module”
     Load “dbe”
     Load “type1″
     Load “freetype”
     Load “extmod”
     Load “glx”
     Load “dri”

EndSection

Section “ServerFlags”
     Option “AllowMouseOpenFail” “on”
     Option “IgnoreABI” “on”
     Option “AIGLX” “true”
EndSection

Section “Device”
     Identifier “aticonfig-Device[0]”
     Driver “fglrx”
     Option “FSAAEnable” “off”
     Option “Capabilities” “0×00000000″
     Option “VideoOverlay” “on”
     Option “OpenGLOverlay” “off”
     Option “FSAAScale” “0″
     Option “XAANoOffscreenPixmaps” “true”

EndSection

Section “Extensions”
     Option “DAMAGE” “true”
     Option “Composite” “true”

EndSection

Modify
/usr/bin/compiz-manager:
COMPIZ_OPTIONS="--no-libgl-fallback --ignore-desktop-hints --replace"
WHITELIST="nvidia intel ati radeon i810 fglrx“


and change "Xgl" for "Xorg" in /etc/sysconfig/displaymanager.

Works, at least if I don't run Compiz and video apps at the same time.

23/11/2007

Bloody bleeding edge - KDE4 in openSuSE 10.3

openSuSE is known to be somewhat experimental in its package selections - like shipping a new release including an Xorg RC...
In 10.3 they have some fun with mixing up KDE 3 and 4 by default - such as including krdc/KDE4 in default KDE, which program completely failed to connect me to any VNC server.
Equally confusing is the fact that in KDE4 they isolated some programs out of rpms containing entire suites in KDE3. For example, if you search for "karamba" by name and summary in Yast, you will get KDE4-Superkaramba only (didn't work on KDE3 for me). A search by description gives you the kdeutils3-extra suite containing KDE3-Superkaramba.

I hope they will clear this up before releasing KDE4 for openSuSE...

15/11/2007

Beautifying Katapult

During my quest to polish Pandora's looks, I also figured out how to remove that ugly second shadow from the Katapult window when running compiz. It's as easy as running ccsm, going to the "Window Decoration" plugin and entering !name=katapult in "Shadow windows".

Truetype fonts on KDE

Installing additional TrueType fonts on KDE:

KDE Control Centre -> System Administration -> Font Installer

Life can be so easy...

HowTo run KDE applications as root

If you get "foo: cannot connect to X server" when you try running KDE applications as su from the shell - don't worry, apparently this is a security feature, and not a bug. I remember being able to do so under openSUSE 10.2, but anyway... it can be fixed the following ways:

You can either use

> kdesu foo &

Or, before you become root, enter the following

> xhost +
> su
# foo &

If you now get the error "bash: foo: command not found", then you need to add /opt/kde3/bin to root's $PATH. First, check whether the file /root/.bashrc already exists. If not, create it. Then add the following line

export PATH=$PATH:/opt/kde3/bin

Then log out and back in - you need to log in after you modify the file for bash to find your new $PATH.

# exit
# su

and check whether the new directory is now in your $PATH

# echo $PATH

Upgrade your nVidia drivers to the very latest version

This is sort of an addendum to my last post, since fixing the eyecandy suddenly made Pandora have resume and session switching issues. As it turns out, this is a bug in the nVidia drivers, which has fortunately been fixed in the latest version. Thanks to the folks at opencompositing.org for pointing this out! At the time of writing, this version (100.14.23) is not in the openSUSE repository yet, neither can it be found on nvidia.com - however, it's been hiding out on the German nVidia website since October, so go ahead and download it from there.

The following HowTo only applies if you used YaST to install your nVidia drivers. If you used the installer script before, I suppose you know how to do this already...

Now backup your xorg.conf if you haven't done so already - in fact, you should always have a backup of your working xorg.conf, it saves you soooooo much trouble!

> cd /etc/X11
> su
# cp xorg.conf xorg.conf.working

Revert your xorg.conf to a state prior to the installation of the proprietary drivers:

# cp xorg.conf.nvidia-postun xorg.conf

Uninstall the following packages via YaST or your favorite package management tool:

nvidia-gfxG01-kmp-kernelflavor
x11-video-nvidiaG01

Make sure you disable any startup scripts that start compiz by default. Restart your computer to check whether the uninstallation worked ok.

End your current session (not before you write down the following!). At the login prompt, go to "System" --> "Console login". Log in as root and change into the directory where you saved the installer.

# sh NVIDIA-Linux-x86-100.14.23-pkg1.run -q

and follow the instructions. If you are an X-Phile like me, smile at the "Searching for conflicting X-files" bit :-) Once the installer has finished, run

# sax2 -r -m 0=nvidia (that's a zero, in case you are wondering)

Once that's all finished, restart your computer (shutdown -r now). If you had compiz running previously, simply replace your current xorg.conf with your backup file:

# cp xorg.conf.working xorg.conf

Restart your X server and enjoy!

14/11/2007

Blurring my window decoration

As of today, I can finally use my favorite Emerald window decoration again (unblurred it looked really awful) so I guess now that I have my eyecandy working again, I have no excuse not to post anymore....

So without further ado, I present you my very first post, HowTo get compiz working with xorg and native nVidia drivers (and make sure your window decorations are blurred).

First of all, make sure you have the proprietary nVidia drivers installed - in openSUSE 10.3, this can easily be achieved via 1-click install.

Then, install the following packages:

compiz
compizconfig-settings-manager
compiz-emerald
compiz-emerald-themes
compiz-fusion-kde
compiz-fusion-plugins-extra
compiz-fusion-plugins-main
compiz-fusion-plugins-unsupported
compiz-kde


Modify your xorg.conf:

Section "Module"

Make sure the following two lines are commented out if they exist:

# Load "dri"
# Load "GLcore"

Ad the following line:

Load "glx"


Section "Device"

Add the following lines below "Driver":

Option "RenderAccel" "true"
Option "AllowGLXWithComposite" "true"


Section "Screen"

Make sure "DefaultDepth" is set to 24, if it isn't already, then add the following lines below "EndSubSection" or above the first "SubSection":

Option "AddARGBGLXVisuals" "true"
Option "DisableGLXRootClipping" "true"


Restart your X server.


Open the Compiz Settings Manager (ccsm), go to the "Window Decoration" plugin and in "Command" enter the following:

"emerald --replace" if you want Emerald as your window decorator or

"kde-window-decorator --replace" if you want the classical KDE window decorator.


Use the following command to start compiz:

compiz --replace ccp &


If your window decorations are not blurred (which seems to be a problem with some nVidia cards), try the following:

Start the Emerald Theme Manager (emerald-theme-manager -i) and go to the "Emerald Settings" tab, and make sure "Compiz Decoration Blur Type" is set to "All decoration".

If your decorations still aren't blurred, start compiz with the following options:

compiz --replace --no-libgl-fallback ccp & .


To return to use the default KDE window manager, run: kwin --replace &


To make compiz automatically load upon login, create a file called compiz.sh in ~/.kde/Autostart, and into it paste the following:

::cut here::
#!/bin/sh

sleep 12

compiz --replace --no-libgl-fallback ccp &

::cut here::

Make the file executable:

# chmod +x compiz.sh

12/11/2007

Getting the full orchestra in timidity

I'm typesetting quite a bit of sheet music with lilypond these days, and it helps a lot with proofreading to check the midi output with timidity. Plain vanilla timidity will play piano only, which can be quite cumbersome for more polyphonic pieces.
Luckily, there are sound patches for all those who always wanted to hear the Ninth performed by the Silicon Valley Midi Philharmonics.

Download freepats, move and unpack it.
> sudo tar -xjf freepats-20060219.tar.bz2 -C /usr/share/timidity
This should give you a 'freepats' directory from the archive. Make the directory readable for everybody.
> sudo chmod -R a+r /usr/share/timidity/freepats
Edit the config files:
> sudo vi /etc/timidity.cfg
Add these two lines somewhere in the file:
dir /usr/share/timidity/freepats
source /usr/share/timidity/freepats/freepats.cfg


Try it on some midi file.
Some timidity usage tips: the -ia, -ik, -ig, -im options give you a GUI where you can scroll through the file etc. timidity -Ow foo.mid generates a .wav file.
(adapted from linuxwiki)

11/11/2007

Compiz Manager deinstallation fails

If you used the package compiz-manager-0.0.1_git071019-11.1.noarch and you wanted to update or deinstall it, you probably have experienced error messages like:

/var/tmp/rpm-tmp.56909: line 8: syntax error near unexpected token `fi'
/var/tmp/rpm-tmp.56909: line 8: `fi'
error: %postun(compiz-manager-0.0.1_git071019-11.1.noarch) scriptlet failed, exit status 2

The trick is, to deinstall this stuff via a root console by executing rpm -e --noscripts compiz-manager - this will remove it from the database and you can install the updated version.

10/11/2007

Holy palmer's kiss...

Sorry, pun right from the bottom of my niveau limbo.
My biological dis-organiser somewhere above my shoulders is getting increasingly buggy these days, so I invested into a Palm Tungsten E2.
I am quite impressed by the palm implementation in Linux/KDE, Kpilot worked without a glitch up to now (however, occasional problems even resulting in data loss have been reported elsewhere). Kontact is synchronised automatically.
What Kpilot can't do is install programs on the Palm's SD card. This is possible with the pilot-link library, to be precise, pilot-xfer. Although Kpilot seems to build on pilot-link, the library has to be installed separately to be used from command-line. However, pilot-link is available from the main SuSE-repository.

Do the following to install to SD (taken from the pilot-xfer man page):
Shut down Kpilot.
Press the HotSync button.
avocadohead@tisiphone:~/misc._soft/palm> pilot-xfer -p /dev/pilot -i teapot_en.prc -D /Palm/Launcher
Listening for incoming connection on /dev/pilot... connected!
Installing 'teapot_en.prc' ... (77738 bytes) 75 KiB total.
Thank you for using pilot-link.

I will certainly never let my tea brew too long again ;-).
According to its extremely useful man page (check out the other usage examples!), pilot-xfer is the "swiss-army-knife of the entire pilot-link suite". The -p option specifies the port (note: /dev/pilot exists only on HotSync), -i is of course the install option, and -D lets you choose the directory. I don't know much about Palm OS directory structure handling, but apparently the /Palm/Launcher folder on the card is recognised as a root dir.

N.B.: If this isn't working, try installing FileZ on your palm, install to main memory and shift your apps inside Palm OS. Or take an external card reader and transfer the file directly to the Palm/Launcher dir on your SD card.

09/11/2007

CUPS in openSUSE 10.3 doesn't like Brothers - the solution: CUPS 1.3.4

Trying to use CUPS for my beloved Brother Laserprinter HL-1440 (yes I know, old model, but still very useable and at least some drivers for Linux available) on Thukydides (Samsung P35 XVM 1600 II) is obviously tricky.

First, the installed CUPS wasn't running properly, since the url http://localhost:631 typed into Konqueror and Firefox only showed an "Error 404". So I decided to reinstall it (i.e. choose right-click and then "force reinstall" for all CUPS packages) which after a reboot worked pretty well and instantly found my Brother HL-1440 and made it available.

But there are still problems: one (and the most severe one) the first job is printed fine, but after the first job, CUPS doesn't print any following job and says "Printer not connected; will retry in 30 seconds...". Interestingly, giving an lsusb on a console still shows the printer connected. If I switch off the printer and switch it on again, CUPS is willing to send the following job from the queue to the printer and then again claims the printer not to be connected.

No solution found for the behaviour mentioned above yet - but in the log files of cups which you can find in /var/log/cups/ you'll find quite some errors, and the configuration file of cups /etc/cups/cupsd.conf is a mere mess in documentation - especially capital and non-capital letters seem to be messed up. Maybe this could be fixed sometimes, SUSE?

I found the solution in the bug database of www.cups.org: this problem is fixed since some version 1.3 so I decided to install the actual stable version 1.3.4. I mainly followed these steps I'll just document here

1. Download the tarball 1.3.4 from www.cups.org

2. build the rpm according to the hints given in the documentation - I used the command: sudo rpmbuild -ta cups-1.3.4-source.tar.gz --without php on a console. The rpms are created in /usr/src/packages/RPMS/i586/

3. Go into YaST and add the directory /usr/src/packages/RPMS/i586/ as "pure RPM directory" as installation source

4. Update the CUPS and ignore the dependencies for "CUPS client".

5. Restart the machine.

One thing I changed in the configuration file /etc/cups/cupsd.conf was to allow to stop and restart the printer without Authentication, otherwise the hotplug-system bitches in the cups-error log (which you can btw easily read out with the nice gui frontend called ksystemlogs):
sudo vi /etc/cups/cupsd.conf and add a section after the section
# All administration operations require an administrator to authenticate...
<Limit ... >
</Limit>

as follows

# The following stuff is switched, because the hotplug-system otherwise complains all the time about...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer>
AuthType None
Order deny,allow
</Limit>

and remove the Pause-Printer Resume-Printer Enable-Printer Disable-Printer from the section administration operations.


A comment: obviously this "Brother printer not seen"-problem seems to be known, see the bug report here and here

05/11/2007

ATI driver 8.42.3, Radeon X1300 and compiz

Tonight I squandered a few hours of valuable sleeping time on the ATI 8.42 driver, which is rumoured to support AIGLX, and Xanthippe's Radeon X1300. Installing the thing worked OK, there was reasonable output from glxgears and fglrxinfo. Enabling AIGLX following this thread got me simply no 3d acceleration and the KWin window manager, while running the driver on XGL I experienced compiz with a nice desktop freeze.
I suppose I'll just wait for the next release...

N.B.: At least I'm not alone - and ATI seem to ship monthly driver releases right now.

03/11/2007

No volume control in KMix

I had issues with KMix, as moving the slider didn't change the volume a bit; the same behaviour occurred in Amarok, Kaffeine, Audacity etc.
Solution found here: Right click on the KMix icon and choose PCM under "Select Master Channel...". Apart from that the linked forum discussion has quite some information on alsa, audio in Yast and KMix settings.

Kile on NTFS partitions: bug report

Whenever I try to compile a LaTeX file on a NTFS or external FAT partition, Kile claims:
[PDFLaTeX] Sorry, the file /sda5/.../(filename).tex does not exist.

Kile bug report is submitted. The problem seems to have something to do with the KIO slaves (thanks to the bugs.kde.org people for pointing that out immediately). Navigating by point-and-click in the "Open file" dialog invariably gets you the media:// slave, while using the mount point specified in fstab (e.g. /windows/D/.../) makes Kile find the file. If you don't like typing paths - set a bookmark in the Kile file open dialog.