Dedors’s Weblog

10. Dezember 2008

Run KDE4 in Chroot (Gentoo/Debian/Ubuntu Howto)

As I have some home server services running on a same machine I use as surf/music/mail/chat station. I like to mess around with the new KDE  as I want the newest features but still a stable and safe to run always base system with nfs, samba, music deamon, dns, router, printer and webserver.

So I set up a Chroot for KDE with that I can mess around as much as I want 🙂 But it’s a little bit tricky, so here I share my knowledge: This is not fully polished or redone yet, so no guarantee. Let me know if you have any problems.

#Short Basics: Set up Chroot
#you have several ways to do that, beginning from copy the current system to a new subdir or partition, or create a chroot with downloading
#strage3 or on a debian system with dchroot. google is your friend here and its not difficult to find your way.
#in the chroot you can choose to take a non-stable build, like portage 2.2 with kde-crazy overlay, or ubuntu with kde-nightly. May I add later more informations on how to set that up.

i had to enable rc_parallel=“YES“ in both /etc/rc.conf and (chroot)/etc/rc.conf to allow to start in-chroot services on a gentoo-chroot-gentoo system (should work with debian or mixed)

Create these 3 files:


mount -a
mount /extchroot
mount -o bind /proc /extchroot/proc
mount -o bind /dev /extchroot/dev
mount -o bind /sys /extchroot/sys
mount -o bind /tmp /extchroot/tmp
mount -t devpts none /extchroot/dev/pts
mount -o bind /media /extchroot/media
mount -o bind /var/lib/dbus /extchroot/var/lib/dbus
mount -o bind /usr/src/linux /extchroot/usr/src/linux #you set the later linux kernel in the chroot and compile it in the real root.
ln -s /home/dedi/.Xauthority /extchroot/home/dedi/.Xauthority #only need once
chroot /extchroot /bin/bash

nano (chroot)/usr/bin/hichroot

mount /media
/etc/init.d/dhald start
/etc/init.d/dbus start
/etc/init.d/xdm restart

nano (chroot)/usr/bin/byechroot

/etc/init.d/dbus stop
/etc/init.d/hald stop
umount /media
umount -a

now chmod +x all of these 3 files

to enter the chroot just run „prepchroot“, it will set up everything that is needed inside

after you entered the chroot run „hichroot“, it prepares to start X

to end a session (e.g. for reboot) you should NOT reboot it from KDE. Quit the Session, run „byechroot“ in the console, then exit and reboot.

A side note:  I have nfs setup already, and just getting all my storage with nfs from the chroot to outside, as ln and mount -o seems not to work. if anyone knows a better solution, please tell me.

Another side note:  at the beginning i had the problem not being able to start /etc/init.d services in the chroot, something made this gone away, i think its the reason i wrote up there. If not, you can still start dbus inside chroot directly, and start X with „startx“, after you „su user“ as you dont have a login that way.

29. Juli 2008

Howto: World of Warcraft – Wrath of the Lich King (WoW – WotLK) Beta running on wine


its just e beta so everything can change quickly, and not everything works

WHAT WORKS: most things like in the 2.4 Version
: Deathknight Quest line (when using the Eye) -> see Workarounds below

  • Slow Mouse when using opengl
  • MAJOR memory leak during the installation
  • Shadows under d3d engine screw transparency of models up (switch to opengl engine to work around)
  • Shadows with shadow-level above 4 (nvidia 8600 gts tested) blank the screen out
  • Screenfog blanks the screen out (switch to d3d engine to work around)
  • Installer fails to activate the agree button on EULA (install ies4linux to work around – bug #13321)
  • Compiz + Wine = major fps drop and screen redraw problem, use metacity (run metacity –replace from console)

TESTED ON: Kubuntu Hardy 8.04 x86_64, Wine 1.12, nvidia closed drivers
WHAT WAS NOT TESTED: OSS, Window Mode, Ingame Communications

Step 1: Install Wine

Get the most recent Wine from the wine-site (wine in the repos is old)

wget -q -O- | sudo apt-key add –

Next, add the repository to your system’s list of APT sources: For Ubuntu Hardy (8.04): (goto for other versions/distros)

sudo wget -O /etc/apt/sources.list.d/winehq.list

Install wine:

sudo apt-get update
sudo apt-get install wine

Run winecfg to create necessary ~/.wine directory and set ALSA as sound output


Step 2: Install Wow

you can now install World of Warcraft, choose your preferred method:

After the install, you have to tweak your

nano  ~/.wine/drive_c/Programme/World of Warcraft/WTF/

and add the following values at the end of the file:

SET SoundBufferSize „200“
SET gxApi „opengl“
SET ffxDeath „0“
SET ffxDeath „0“
SET gxResolution „800×600“

start Wow:

wine „C:\Program Files\World of Warcraft\WoW.exe“ (default install path)


wine WoW.exe (from installed dir)


if you get a „Segmentation Fault“ when starting WoW, you have to reinstall your closed source drivers, or update to the most recent, something like that:

sudo sh

Additional Stuff / Troubleshooting & Workarounds

Black Screen (except UI)

If you get a Black Screen during Quests (which uses Screen frog like the Deathknight Quest line when you have to use the eye), you have to switch to d3d for that part, so do:

close Wow
start wow with -d3d option:

wine path-to-wow-wotlk/WoW.exe -d3d

do the quest part, after that shutdown wow again and now use -opengl instead of -d3d to restart your wow

When you use compiz:

run from console to fix the huge FPS drop:

metacity –replace

to shutdown compiz and run metacity

Registry Tweak

There is also e Registry Tweak, but not tested if this is still required:

Open a Terminal and type


and follow this steps:

  1. Find HKEY_CURRENT_USER\Software\Wine\
  2. Highlight the wine folder in the left hand pane by left clicking on it. The icon should change to an open folder.
  3. Click right on the wine folder and select [NEW] then [KEY].
  4. Replace the text „New Key #1“ with OpenGL (CaSe Sensitive).
  5. Right click in the right hand pane and select [NEW] then [String Value].
  6. Replace „New Value #1“ with „DisabledExtensions“ (CaSe sensitive).
  7. Then double click anywhere on the line, a dialog box will open.
  8. In the value field type „GL_ARB_vertex_buffer_object“ (without the quotes).

related links

27. Juli 2008

Mini-Howto: Multiple Monitors (DualHead) with the OpenSource „nv“-Driver (using RandR extension)

Filed under: Linux — dedors @ 07:14
Tags: , , , , , ,

I finally managed to get dualhead running with the nv-driver. I switched away from the nvidia binary ones due the slow performance on kde4. no glossy anymore, but at least its fast, compared to the binary its a rocket. Really easy to do, when you know how 😉

so, edit xorg.conf or take mine as example (you should not have any mess from other drivers)

thinks to change are marked bold

Section „InputDevice“
Identifier      „Generic Keyboard“
Driver          „kbd“
Option          „XkbRules“      „xorg“
Option          „XkbModel“      „pc105“
Option          „XkbLayout“     „ch“

Section „InputDevice“
Identifier      „Configured Mouse“
Driver          „mouse“
Option          „CorePointer“

Section „Device“
Identifier      „Configured Video Device“
Driver          „nv“
BusID          „PCI:1:0:0“

Section „Monitor“
Identifier      „Configured Monitor“

Section „Monitor“
Identifier      „Configured Monitor1“

Section „Screen“
Identifier      „Default Screen“
Monitor         „Configured Monitor“
Device          „Configured Video Device“
DefaultDepth    24
SubSection „Display“
Depth          24
Virtual              1280 1792


Section „ServerLayout“
Identifier      „Default Layout“
Screen          0 „Default Screen“
InputDevice    „Generic Keyboard“
InputDevice    „Configured Mouse“

Section „ServerFlags“
Option „RandR“ „on“

after restarting X (Ctrl-Alt-Backspace) you can do the following comands (as the kde4 display options dont let me setup anything other than clone)

xrandr #to see what your output names are
xrandr --output DVI0 --auto --below VGA2

if you get a „connot be larger than“ error, you have to adjust the „Virtual“ in xorg.conf


After Upgrading to KDE 4.1 Release it dont save my xrandr settings anymore, so i created a litte script like this:

nano ~/.kde4/Autostart/bashscript
xrandr --output DVI0 --auto --below VGA2

19. Juli 2008

Howto: rsync SSH Configuration for backuppc

Filed under: Linux — dedors @ 00:32
Tags: , , ,

It’s a little diffrent from normal SSH connection, so i post it as stand-alone howto. I use here [LAPTOPUSER] as client username, and has to be replaced in the commands.

Generate a public/private key on the server machine in /home/backuppc/.ssh/laptop & Generate a public/private key on the client machine in /home/$USER/.ssh/laptop. Replace [LAPTOPUSER]

sudo su backuppc
cd ~
ssh-keygen -t dsa -f ~/.ssh/laptop2
scp ~/.ssh/ [LAPTOPUSER]@

Create the folder ‘.ssh’ if it doesn’t exist and configure the public key to OpenSSH’s liking. Replace [LAPTOPUSER]

if [ ! -d .ssh ]; then mkdir .ssh ; chmod 700 .ssh ; fi ; mv .ssh/ ; cd .ssh/ ; if [ ! -f authorized_keys ]; then touch authorized_keys ; chmod 600 authorized_keys ; fi ; cat >> authorized_keys ; rm;

Test if you can connect without being prompted for a password, but you should have to enter the passphrase

ssh -i ~/.ssh/laptop2 [LAPTOPUSER]@

Manually Rsync via SSH

rsync -avrz   $USER@laptop:/home/$USER/ -i ~/.ssh/laptop2

Now you need the ssh-agent,

ssh-add laptop2

but you will propably get the following error (with user backuppc):

Could not open a connection to your authentication agent.

then just use this command:

eval `ssh-agent`

Edit backuppc settings:

type: rsync
rsyncclientcmd: replace root with [LAPTOPUSERNAME] and add -i ~/.ssh/laptop2

that should work and backup with your clients username

18. Juli 2008

Howto: Connect to SSH Server without entering Password or Passphrase

Filed under: Linux — dedors @ 15:03
Tags: , ,


Here is assumed that client and server username is the same.

Generate a public/private key on the server machine in ~/.ssh/laptop & Generate a public/private key on the client machine in ~/.ssh/laptop

ssh-keygen -t dsa -f ~/.ssh/laptop
scp ~/.ssh/ $USER@

Create the folder ‘.ssh’ if it doesn’t exist and configure the public key to OpenSSH’s liking

ssh $USER@ 
if [ ! -d .ssh ]; then mkdir .ssh ; chmod 700 .ssh ; fi ; mv .ssh/ ; cd .ssh/ ; if [ ! -f authorized_keys ]; then touch authorized_keys ; chmod 600 authorized_keys ; fi ; cat >> authorized_keys ; rm;

Test if you can connect without being prompted for a password, but you should have to enter the passphrase

ssh -i ~/.ssh/laptop $USER@

Add passphrase to ssh-agent:

ssh-add .ssh/latop

Manually Rsync via SSH

rsync -avrz   $USER@laptop:~/ .

16. Juli 2008

howto: 32bit 4GB+ support with working nvidia binary drivers

Filed under: Linux — dedors @ 22:25


#Get needed files to compile

sudo apt-get install linux-kernel-devel fakeroot build-essential kernel-package
sudo apt-get build-dep linux-image

#get source to /usr/src/git

cd /usr/src && sudo mkdir git && sudo chown $USER:$USER git && cd git
git clone git:// linux-source-hardy
cd linux-source-hardy

sudo apt-get source linux-image #get the source
ln -s linux-2.6.XX linux #make new source link
cd linux

#Do the Configuration

sudo make oldconfig #get old config in the new source
sudo make menuconfig #now search in the 4. option there you can switch from "4GB" to "64GB".

#Build it!

AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules binary-generic

sudo make-kpkg clean
sudo make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers

#and finally install it

sudo dpkg -i

#now about the same for the ubuntu modules

cd ../..
git clone git:// linux-source-hardy-modules
sudo apt-get source linux-ubuntu-modules-2.6.24-20-generic
apt-get source linux-restricted-modules-2.6.24-20-generic
cd linux-source-hardy-modules
cd linux-ubuntu-modules-2.6.24-20-generic
fakeroot debian/rules binary-modules-generic
cd ../linux-restricted-modules-2.6.24-20-generic
fakeroot debian/rules binary-modules-generic
cd ..
sudo dpkg -i linux-ubuntu-modules-2.6.24-20-generic.deb
sudo dpkg -i linux-restricted-modules-2.6.24-20-generic

at this point you can reboot and the new nvidia module will be compiled automatically during boot.

but for my laptop, using a iwl4965 module which is only available as a ubuntu module, the wlan does not work anymore, so i tried the following (not successfull yet):

sudo make modules

sudo make modules install

for the linux-ubuntu-modules i tried also the following found on the web, but it was not working:

mkdir /tmp/test
cd /tmp/test

apt-get source linux-ubuntu-modules-$(uname -r)

cd linux-ubuntu-modules*

sudo aptitude install fakeroot kernel-wedge linux-headers-$(uname -r)

fakeroot debian/rules binary-arch arch=i386 flavours=“generic“

15. Juli 2008

Using Mint Elyssa based on Ubuntu 8.04, you can use the server kernel to address more than 3 GB RAM on a 32bit system.

Filed under: Linux — dedors @ 15:06

Using Mint Elyssa based on Ubuntu 8.04, you can use the server kernel to address more than 3 GB RAM on a 32bit system.

sudo apt-get install linux-restricted-modules-server linux-headers-server linux-image-server linux-server

Warning: you might lose support for restricted-modules, so for me nvidia closed drivers dont work anymore (but read on the web that it is possible)

Erstelle eine kostenlose Website oder Blog – auf