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:

/usr/bin/prepchroot

#!/bin/bash
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

#!/bin/bash
mount /media
/etc/init.d/dhald start
/etc/init.d/dbus start
/etc/init.d/xdm restart

nano (chroot)/usr/bin/byechroot

#!/bin/bash
/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.

5. November 2008

IWL4965 with Ubuntu Intrepid Ibex and Injection with Compat-Wireless 2.6

Pretty easy compared to some months ago, you don’t need a firmware or a driver-patch anymore!:

wget http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2.6.tar.bz2
tar jxvf compat-wireless-2.6.tar.bz2
cd compat-wireless-2.6
make
sudo make install

sudo rmmod iwlagn iwlcore #(important! these are not known by the install process yet!)

sudo make unload

sudo make load

- done - test with:
sudo aireplay wlan0 --test

29. Juli 2008

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

OVERVIEW

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

WHAT WORKS: most things like in the 2.4 Version
WHAT WORKS WITH A WORKAROUND
: Deathknight Quest line (when using the Eye) -> see Workarounds below
WHAT DOES NOT WORK:

  • 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 http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add –

Next, add the repository to your system’s list of APT sources: For Ubuntu Hardy (8.04): (goto http://www.winehq.org/site/download for other versions/distros)

sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/hardy.list -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

winecfg

Step 2: Install Wow

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

After the install, you have to tweak your config.wtf:

nano  ~/.wine/drive_c/Programme/World of Warcraft/WTF/Config.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)

or

wine WoW.exe (from installed dir)

Done

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 NVIDIA-177.run

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

regedit

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 https://help.ubuntu.com/community/WorldofWarcraft http://www.wowwiki.com/Linux/Wine http://www.wowwiki.com/Linux/Wine/Troubleshooting http://de.gentoo-wiki.com/Wine_World_Of_Warcraft

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“
EndSection

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

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

Section „Monitor“
Identifier      „Configured Monitor“
EndSection

Section „Monitor“
Identifier      „Configured Monitor1“
EndSection

Section „Screen“
Identifier      „Default Screen“
Monitor         „Configured Monitor“
Device          „Configured Video Device“
DefaultDepth    24
SubSection „Display“
Depth          24
# ADD A VIRTUAL LINE TO PROVIDE FOR THE LARGEST SCREENS YOU WILL HOTPLUG
Virtual              1280 1792
EndSubSection

EndSection

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

Section „ServerFlags“
Option „RandR“ „on“
EndSection

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

Update

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
#!/bin/bash
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.

Server-Side:
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/laptop2.pub [LAPTOPUSER]@192.168.0.11:~/

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

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

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

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

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: , ,

Client-Side:

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/laptop.pub $USER@192.168.0.2:~

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

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

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

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

Add passphrase to ssh-agent:

ssh-add .ssh/latop

Manually Rsync via SSH

rsync -avrz   $USER@laptop:~/ .

Erstelle eine kostenlose Website oder Blog – auf WordPress.com.