KDE4: Running ssh-agent at Login

21. August, 2011

Here is the recipe if you need to run ssh-agent when you log in. First, create a start-up script $HOME/.kde4/env/start-ssh-agent.sh

#!/bin/sh
eval `/usr/bin/ssh-agent`

To make sure the agent is killed when you log out, you need a script $HOME/.kde4/shutdown/kill-ssh-agent.sh

#!/bin/sh
/usr/bin/ssh-agent -k

Tested with KDE 4.7 on openSUSE 11.4.


Updating StarCraft 2 to 1.0.3 on openSUSE 11.3 SOLVED

19. August, 2010
A Protoss warrior, as displayed in StarCraft II.

A Protoss warrior, as displayed in StarCraft II. (Image via Wikipedia)

I had a lot of problems to download and install the patch to 1.0.3. Here is my solution after 144 failed attempts: Install IE6! The BlizzardDownloader.exe doesn’t work with the IE emulator (gecko) so use winetricks or /opt/cxgames/bin/cxinstaller to install IE6 instead and it won’t crash anymore.

Hint: The crash happens somewhere in the JavaScript DLL js3250:

=>0 0x0245b44c in js3250 (+0xfb44c) (0x0033b4b8)
  1 0x0245b2e6 in js3250 (+0xfb2e5) (0x0033b4d8)
  2 0x02459d62 in js3250 (+0xf9d61) (0x0033b4f8)
  3 0x023fc423 in js3250 (+0x9c422) (0x0033b548)
  4 0x01025b6a (0x0033b594)
  5 0x0033df84 (0x0033df84)
  6 0x02420b5a in js3250 (+0xc0b59) (0x0033dfd4)
  7 0x0239f43d in js3250 (+0x3f43c) (0x0033e1f4)
  8 0x023b21bb in js3250 (+0x521ba) (0x0033e2a4)
  9 0x02368391 in js3250 (+0x8390) (0x0033e2e4)
  10 0x0164c6e5 in xul (+0x5cc6e4) (0x0033e3a4)
  11 0x014eaf8d in xul (+0x46af8c) (0x0033e4e4)
  12 0x014eaa7b in xul (+0x46aa7a) (0x0033e5c4)
  13 0x014ea1c6 in xul (+0x46a1c5) (0x0033ea14)
  14 0x014e7cad in xul (+0x467cac) (0x0033ea74)
  15 0x0156ca4b in xul (+0x4eca4a) (0x0033eb54)
...
  31 0x01c634e4 in xul (+0xbe34e3) (0x0033ef44)
  32 0x01c0b086 in xul (+0xb8b085) (0x0033ef74)
  33 0x01bd77ce in xul (+0xb577cd) (0x0033ef94)
  34 0x7eccecfa WINPROC_wrapper+0x19() in user32 (0x0033efc4)
  35 0x7ecd0819 in user32 (+0xa0818) (0x0033f004)
  36 0x7ecd1cac in user32 (+0xa1cab) (0x0033f044)
  37 0x7ec9541e DispatchMessageW+0x9d() in user32 (0x0033f134)
  38 0x7ec660b9 in user32 (+0x360b8) (0x0033f194)
  39 0x7ec6626f DialogBoxParamW+0x8e() in user32 (0x0033f1b4)
  40 0x00406156 in blizzarddownloader (+0x6155) (0x0033fd84)
  41 0x7e725b64 in ole32 (+0xd5b63) (0x004cd07c)
  42 0x6b735a42 (0x0044303a)
  43 0xfffffec2 (0xe8f18b56)

Look for “xul” and “js3250” in the stack trace. If you use cxgames, start the game with

"$HOME/.cxgames/Starcraft II_ Wings of Liberty/desktopdata/cxmenu/StartMenu.C^5E3A^5Fusers^5FPublic^5FStart^2BMenu/Programs/StarCraft+II/StarCraft+II"

If you need to kill the game, use this line:

kill $(ps -e -o "%p:%a" | grep -E 'winewrapper.exe|wineserver|system32|StarCraft|winedbg|Blizzard'|grep -v grep|cut -d: -f1)

That should get rid of all leftover processes.

[Update] I sometimes get a window asking where to store a download. Ignore it; it closes eventually. Click outside of it, it if bothers you to hide it behind the update manager window.


StarCraft 2 on openSUSE 11.3: Update to 1.0.3 fails [update]

18. August, 2010

Found a solution! See this blog post.


When I tried to start the game today, it told me that 1.0.3 is available and that it needs an upgrade. After 49% of the download, the BlizzardDownloader.exe crashed. So I started it again. And again. And again.

The problem is always the same:

wine: Unhandled page fault on read access to 0x00000000 at address 0x245b44c (thread 0019), starting debugger...

I’ve opened a support ticket on codeweavers.

According to some comments in Wine’s AppDB by MrNice, restarting the installer eventually solves the problem.

[Update] It seems to help to delete the sc2-* files in the program directory and the file sc2-22660-22801-x86-Win-enGB-bnet-bin in the Updates folder. When I restart the game, I get the error dialog. Sometimes, a bit of the file has already been downloaded, sometimes, not even the changelog has been loaded. After closing the error dialog, the download resumes and hangs again at 49% with 3.8MB left.

[Update 2] Some people say that you just need to try often enough. That didn’t work for me. But I found a couple of *.torrent files in the installation folder which I showed to Vuze. After a couple of minutes, Vuze really started to download them … well, 4 of 5 of them. So I can’t play because no one has the 92666 byte file “sc2-16223-16291-x86-Win-deDE-locale”. Tragic.


StarCraft 2 on openSUSE 11.3 [update]

13. August, 2010

As you may have heard, StarCraft 2 works on Linux. It’s even officially supported by CrossOver Games. It’s only Silver (which means “runs with minor issues”.

One of the issues is that the game crashes at startup or shortly afterwards. This seems to be a kernel bug.

To solve the issue on openSUSE 11.3, you need to install a kernel with version 2.6.35. Luckily this is pretty simple:

  1. Add the repository http://download.opensuse.org/repositories/Kernel:/HEAD/openSUSE_Factory/ ¬†with Yast2 (under “Software Repositories”). Give it any name you like.
  2. I suggest to set the priority to 120; that way, the other repositories will be considered first and entries in this new repository won’t pollute your system unless you ask for them.
  3. Open “Software Management” in Yast2
  4. Open the tab “Repositories”
  5. Select the new kernel repository
  6. Locate the package “kernel-desktop” and select it
  7. Click on the “Versions” tab at the bottom
  8. Select the one with version “2.6.35.1” (the last digit can be different).
  9. Click “Accept”

Yast2 will download the new kernel and install it. After a reboot, you can enjoy StarCraft II.

[Update] I’ve played the first six single player missions and had no major problems so far. The frame rate could be better but that’s about it.

[Update 2, 11th Nov. 2010] Kernel 2.6.36 has been released. You can find it here.


Starting the network with openSUSE’s rescue system

1. August, 2010

To start the network after booting into openSUSE’s rescue system:

dhcpcd eth0


Installing openSUSE 11.1 on an Acer Aspire 5737Z

25. July, 2009

Yesterday, I bought an Acer Aspire 5737Z for my mother. I ran into two issues while trying to install openSuSE 11.1 on it:

  1. System error -1012 during partitioning
  2. Installation of the bootloder failed with error 12: Invalid device requested.

In both cases, the openSuSE failed to enumerate the hard disk partitions correctly. The partition layout was as follows:

  • /dev/sda1 – Unknown partition (probably the recovery program)
  • /dev/sda2 – Windows C (20GB)
  • /dev/sda3 – Extended partition for linux
  • /dev/sda5 – swap partition (2GB)
  • /dev/sda6 – root partition (/ 20GB)
  • /dev/sda7 – home partition (/home rest)

The first error happens when the installer tries to set the type of /dev/sda6 to 82 (swap). That should have been /dev/sda5. The solution is to boot using the rescue system and to partition the disk manually. I suggest to use “cfdisk /dev/sda” for this. Make sure you mark the root partition as bootable.

After that has been done, tell the installer to accept the existing partitioning. You’ll still have to assign the mount points, though, and tell the installer to format the partitions.

Later, grub gets confused in a similar matter. It tries to add the Windows boot manager from (hd0,2) (which maps to sda3; grub starts counting with 0!). That should be (hd0,1). Since everything is installed, we just need to boot the rescue system and chroot to the installed system:

  1. mount /dev/sda6 /mnt – Mount the root filesystem
  2. mount -bind /dev /mnt/dev – Map (bind) the devices into the root filesystem (so that you can access the hard disk, etc)
  3. chroot /mnt bin/bash – Start a shell that behaves as if you had booted from the installed system

You can tell that you’re in a new shell by pressing “Up”. That should recall your last command (chroot). Your first task is to fix the broken grub config. Edit /etc/grub.conf. The first line should read setup --force-lba (hd0). Run grub-install. If it still fails, try to run it manually:

grub
root (hd0,5)
setup --force-lba (hd0)

Note that this will overwrite the Windows boot code. I’m not sure how to boot Windows, now, but really, I don’t care.

Next step on the path to hell is the NVidia driver. I didn’t have much luck with the precompiled one from the NVIDIA repository. Instead, I installed kernel-source and gcc. After that, you can do cd /usr/src/linux ; make oldconfig ; make and abort the build when it starts to build stuff in arch/x86/. Now, you can compile the driver from the source. Just sh ./NVIDIA-Linux-x86_64-185.18.14-pkg2.run, answer all the questions and then run sax2.

In sax2, make sure to select an “LCD monitor” with “1360×768” pixel resolution. After a moment, you should have a clean display.