Friday, July 23, 2010

World of Warcraft 3.3.5 Wine 1.2 Slackware 13.1 kernel 2.6.33.4

Blizzard broke WoW with the 3.3.5 patch.. but not for long :)

Fist off, as always I install every game on its own separate WINEPREFIX. My WoW is installed to WINEPREFIX=~/.wine-wow

Installing WoW:

WINEPREFIX=~/.wine-wow sh winetricks vcrun2005

If you are like me and have enough bandwidth to supply all of Russia, then you can use the online installer.

Download the online installer

WINEPREFIX=~/.wine-wow wine /path/to/WoW/installer.exe

Go outside and play with friends or whatever, but make sure you turned your sound off on the computer. In about four hours you can come back and it will either be done or very close to done.

Ready to play.. hah, you wish!

******* BEGIN COPY BELOW LINE *********
commit f86e9325b7add7d47daf0a13683a8fddc6c1be16
Author: Frederic Weisbecker
Date: Wed Jun 30 15:09:06 2010 +0200

x86: Send a SIGTRAP for user icebp traps

Before we had a generic breakpoint layer, x86 used to send a
sigtrap for any debug event that happened in userspace,
except if it was caused by lazy dr7 switches.

Currently we only send such signal for single step or breakpoint
events.

However, there are three other kind of debug exceptions:

- debug register access detected: trigger an exception if the
next instruction touches the debug registers. We don't use
it.
- task switch, but we don't use tss.
- icebp/int01 trap. This instruction (0xf1) is undocumented and
generates an int 1 exception. Unlike single step through TF
flag, it doesn't set the single step origin of the exception
in dr6.

icebp then used to be reported in userspace using trap signals
but this have been incidentally broken with the new breakpoint
code. Reenable this. Since this is the only debug event that
doesn't set anything in dr6, this is all we have to check.

This fixes a regression in Wine where World Of Warcraft got broken
as it uses this for software protection checks purposes. And
probably other apps do.

Reported-and-tested-by: Alexandre Julliard
Signed-off-by: Frederic Weisbecker
Cc: Ingo Molnar
Cc: H. Peter Anvin
Cc: Thomas Gleixner
Cc: Prasad

diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 3339917..b1e85b0 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -529,11 +529,20 @@ asmlinkage __kprobes struct pt_regs *sync_regs(struct pt_regs *eregs)
dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
{
struct task_struct *tsk = current;
+ int user_icebp = 0;
unsigned long dr6;
int si_code;

get_debugreg(dr6, 6);

+ /*
+ * If dr6 has no reason to give us about the origin of this trap,
+ * then it's very likely the result of an icebp/int01 trap.
+ * User wants a sigtrap for that.
+ */
+ if (!(dr6 & ~0xffff0ff0) && user_mode(regs))
+ user_icebp = 1;
+
/* Catch kmemcheck conditions first of all! */
if ((dr6 & DR_STEP) && kmemcheck_trap(regs))
return;
@@ -575,7 +584,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
regs->flags &= ~X86_EFLAGS_TF;
}
si_code = get_si_code(tsk->thread.debugreg6);
- if (tsk->thread.debugreg6 & (DR_STEP | DR_TRAP_BITS))
+ if (tsk->thread.debugreg6 & (DR_STEP | DR_TRAP_BITS) || user_icebp)
send_sigtrap(tsk, regs, error_code, si_code);
preempt_conditional_cli(regs);
******* END COPY **************************

Save file as 2.6.33.diff or whatever .diff I can care less.

Patch your kernel, compile, apply, reboot

Since I am on Slackware I follow this guild for kernel compiling:

http://blog.tpa.me.uk/slackware-kernel-compile-guide/

After that is done (time depends on your processor)

login as user

emacs ~/wow.sh

#!/bin/sh
WINEPREFIX=/home/pegasus/.wine-wow/ wine "c:\Program Files\World of Warcraft\Wow.exe" -opengl

chmod +x ~/wow.sh

make a menu-item that points to wow.sh if your WM already created a link, delete it and run this one, you will most likely want/need the -opengl switch

WINEPREFIX=~/.wine-wow winecfg

make sure you are in windows xp, click on the Audio tab, make sure ALSA is selected and also select OSS (I had to do this to get sound to work, some do not, so troubleshoot to see if this works)

If all went well, your 8 hours of installing WoW and compiling your kernel (I do hope you compiled a custom and didn't JUST apply the patch) enables you to now play WoW on *nix with Wine!!!!!

(My main is a lvl 80 Gnome Warlock Europe Server Saurfang, name kamii) challenge me to a duel, if you dare, but tell me you saw this message and lets duel *nix style, then we can join a group together and pwn some Horde!!!!

****IF you have installed via the online installer, the installer files are still on your computer inside the wow WINEPREFIX. I forget where exactly, but search around and either burn them to some DVD's or delete it, because its like 20 gigs or something. Also, if you had problems with WoW updating itself with one of the updates (I had this issue) use google and try to find that update that isn't working and manually apply it, then let WoW do the rest. To save space when all updates have finished, delete them, because you do not need them anymore****

CURSE CLIENT

Want some addons in WoW? So do I, curse client works in Wine.. but don't get version 4, it wants/needs .net and doesn't work in wine, but we don't care you can still download and use version 3.

I installed my Curse Client in the same WINEPREFIX as WoW.

WINEPREFIX=~/.wine-wow wine /path/to/curse.exe

ie6, .net 2.0 is required for this to work

removepkg ttf-indic-fonts-0.4.7.4-noarch-1 (version may have changed so use pkgtool)

emacs /usr/share/fonts/TTF/fonts.dir

Search for string Samyak

Remove that line log out, log back in (don't just log out of X)

WINEPREFIX=~/.wine-wow/ winetricks ie6 corefonts fontfix dotnet20

When its done installing in 2.5 seconds you can load it up and start installing your WoW addons, or updating the ones you already have!

Sims 3 + Wold Adventures under Wine without .net

I am using Wine 1.2 with a fallout 3 patch for my NVIDIA Graphics Card.

Slackware 13.1 custom kernel 2.6.33.4-smp-WoW (-WoW indicates it was patched for World of Warcraft 3.3.5)

First, I ALWAYS install each and every game/program in its own WINEPREFIX. Why? Because if we all know how horrible Windoze is and how easy a *doze environment can/will become corrupt. So its better to lose just one program than EVERYTHING. So how do you install something under its own WINEPREFIX? Easy!

WINEPREFIX=~/.wine-prefixname

Installing Sims 3:

I am assuming you have already installed wine 1.2 or later (right now 1.2 is the latest) and I am assuming you have also installed cabextract (*nix package) and winetricks. If not. Use google.

WINEPREFIX=~/.wine-sims winetricks vcrun2005sp1 d3dx9

Insert your Sims 3 CD

WINEPREFIX=~/.wine-sims wine /mnt/point/to/sims3/cd/Autorun.exe

This will start the Sims 3 install to your .wine-sims prefix (If for some reason when you put the CD in, it started the Autorun.exe file, DO NOT CLICK INSTALL!! IT WILL NOT INSTALL TO YOUR ~/.wine-sims PREFIX!!!!

Now that Sims 3 has installed, DO NOT LET IT INSTALL THE AUTO UPDATER (it requires .net and we don't want that on *nix)

Now you will need to upgrade your Sims 3 to 1.10.6

The best way to do this is to download the patches off the EA.games website.

***These patches are region specific, so make sure you go to the EA website for your region. unsure what region you are in, there are also worldwide patches, which makes me wonder why they made region patches at all, don't ask me, ask EA Games***

Now that you are patched to 1.10.6 (when you install the patches make sure you do it with WINEPREFIX=~/.wine-sims wine /location/and/name/of/patch.exe

Insert the World Adventures CD and do the same thing you did with the Sims cd

WINEPREFIX=~/.wine-sims wine /location/of/cd/Autorun.exe

All done? Click no again for the auto updater.

Go online again, and grab all the patches for World Adventures and install those the same way as the last time. Now you are upto date.

Now... how do you launch it?

Depending on your window manager, you may or may not have a menu item created.

emacs ~/sims.sh

#!/bin/sh
WINEPREFIX=~/.wine-sims/ wine ~/.wine-sims/drive_c/Program\ Files/Electronic\ Arts/The\ Sims\ 3/Game/Bin/TS3.exe

chmod +x sims.sh

create a menu-item in your WM that points to ~/sims.sh

click on it to make sure it works. Let sims load up, and go ahead and create a new world inside sims 3

now exit the game

Sims 3 now created a ~/Electronic Arts directory this is where all your saved data and stuff is.

If you want to add mods and user packages you need to make those directories yourself:

mkdir ~/.wine-sims/drive_c/Program Files/Electronic Arts/The Sims 3/Mods

mkdir ~/.wine-sims/drive_c/Program Files/Electronic Arts/The Sims 3/Mods/Packages

add any and all packages you want in the Packages directory, relaunch the game and have fun with Sims 3 in Wine without .net! You will need to manually check ea.games website for future updates and patches because there is no auto-updater running, but who wants .net running anyway?

NFS with Slackintosh as host

I am using Slackintosh 12.1 as my host machine and connecting a 1TB external ext2 fs HDD as my shared nfs drive.

This one took hours and hours and lots of time on ##slackware channel with a lot of friendly people to help me out. I will not post their names because I did not ask for permission.

login as root:

On Slackintosh (host) chmod +x /etc/rc.d/rc.nfsd

emacs /etc/exports

/shared/folder client.ip.address(rw,no_root_squash) other.client.ip.address(rw,no_root_squash)

emacs /etc/hosts.allow

portmap: client.ip.address , other.client.ip.address
lockd: client.ip.address , other.client.ip.address
rquotad: client.ip.address , other.client.ip.address
mountd: client.ip.address , other.client.ip.address
statd: client.ip.address , other.client.ip.address

emacs /etc/hosts.deny

portmap:ALL
lockd:ALL
rquotad:ALL
mountd:ALL
statd:ALL

/etc/rc.d/rc.nfsd restart

emacs /etc/fstab

/dev/??? /mnt/point fstype user,rw,auto 0 1 (Since mine is an external i have this entered. yours may not be an external, if it is already being mounted in fstab, skip this portion).

ON CLIENT MACHINES

login as root

chmod +x /etc/rc.d/rc.rpc

emacs /etc/fstab

ip.to.host:/shared/folder /mnt/point nfs rw,nfsvers=3 0 0

/etc/rc.d/rc.rpc start

mount /mnt/point

It should now be mounted and you should have rw access to that drive as user.

The chmodding we did earlier will ensure that nfs services for the host and client machines will be turned on at bootup. And the line in your client fstab ensures that nfs system will auto mount at bootup.

Tuesday, July 20, 2010

Slackintosh 12.1

Slackintosh 12.1 PPC iBook G4 1.2 GHz 12" white

My adventures of installing and setting up Slackintosh on my 5 year old + iBook G4 that was running super slow with OS X Leopard.

This machine is only used for IM, Email, Twitter, eggdrop, and other small various tasks. OS X was just too much for it, wanted to use a lot of CPU for junk I never use. Therefore I decided to finally check out Slackintosh and see if its worth the effort. So far, I could not be happier and wonder why I did not do this a few years ago.

Download either the CD or DVD iso

md5sum /location/and/nameof.iso

If the md5checksum is correct, burn the file with verify. (This will do another md5checksum to make sure the burn was good)

***BACK UP ANY AND ALL PERSONAL FILES***

Put the CD/DVD in the drive, reboot the computer

When you hear the apple sound as its booting up, press and HOLD the 'c' key until you see it is starting to boot up from the CD. You will know, it will look completely different than OS X boot. If you booted into OS X, you hit the 'c' key too late, or you did did not hold it down long enough. Try Try again.

login: root

FDISK

Type:

mac-fdisk /dev/hda

This is the only way to run FDISK on your Macintosh. You can duel boot, but I did not.

Fdisk commands are straight forward there is even a nice helper in there for you. I deleted all partitions, and then made an Apple_Bootstrap, a Linux Swap, and a Linux partition. You can set your system up different if you want. Your choice really.

***Make sure to add an Apple_Bootstrap***
***Make sure you WRITE the partition table***

After you wrote the partition table quit mac-fdisk.

Run "setup" and complete the following steps:

* Remap your keyboard (mine is SV)
* "Swap Space detected": Select OK, if the displayed information is correct
* "Select Linux Installation Partition": Select the partition, which should contain the root file system (/)
* "Select other Linux partitions for /etc/fstab": Set the mount points for the remaining partitions
* Select the installation media. Choose "Install from a Slackintosh CD or DVD" and later "auto detect"
* "Package Series Selection": I selected all except for "k", "kde", "kdei" and "t"
* "Prompting Mode": I used "full"
* Time for a coffee or beer if its after 16.00
* "Next installation CD": Select "Quit", if you don't have other installation CDs
* "Yaboot configuration settings": OK
* "Yaboot Configuration": select N and C. Select also O if you also have OS X installed before.
If yaboot gives you errors about not finding directories, you did not make an Apple_Bootstrap.
Start all over again, this time during F-disk, make the Apple_Bootstrap like I told you to!
* Skip "Make Bootdisk"
* "Modem Configuration": choose "/dev/ttyS0" I chose none because, who uses a modem anymore?
* Enable Hotplug/UDEV -> Yes"
* Mouse Config -> choose ps2 -> OK
* GPM configuration -> Yes
* Configure Network -> Yes
* Enter Hostname: BeCreative
* Enter Domain: Yor.choice
* "Setup IP Adress for 'BeCreative.Yor.choice'": -> DHCP
* Confirm Setup complete -> Yes
* Confirm Startup Services to run: deselect PCMCIA
* Custom screen fonts -> No
* "Hardware Clock Set To UTC?" -> No (but you can do yes if you want)
* Timezone select
* Select default window manager to use -> XFCE (but you can choose a different one)
* "Warning: No Root Password Detected": set one!

Press CTRL+ALT+fn+Backspace to reboot your computer. If everything goes well, you will end up with a prompt like this:

**Sit at your computer and watch as this reboots and loads up. There are some messages about different commands you can throw at bootup if you get some funny things, like screen flickering etc..."

login as root:

CREATE USER ACCOUNT:

useradd -G audio,cdrom,tty -s /bin/sh -m becreative
passwd becreative

ALSA SOUND

Run these commands to setup ALSA: (Change any settings to what you need/want)

alsaconf
alsamixer
alsactl store

TRACKPAD

Run this command:

less -eX /proc/bus/input/devices

look for your mouse, if it says ADB Mouse then:

nano /etc/pbbuttonsd.conf

scroll down to [MODULE PMAC]

To turn off trackpad tapping: (I HATE tapping, so I turned this off)

TPMode=notap

(for other options man pbbuttonsd)

If it says anything else, especially Synaptic Touchpad or such. you need to edit /etc/X11/xorg.conf and use google because I am not going to go into this. You also need to create a few files for HAL to use... but again, google is your friend here.

/etc/rc.d/rc.pbbuttonsd restart

Enabling Right Click Emulation: **Requires a reboot to take effect**

I created a "/etc/sysctl.conf" with the following contents:

dev.mac_hid.mouse_button3_keycode = 96
dev.mac_hid.mouse_button_emulation = 1

This will make the keyboard key (to the right of the right apple key, your new right click button. It is NOT used in conjunction with the mouse button. This IS now a mouse button, your Right mouse button). Furthermore you can also add:

dev.mac_hid.mouse_button2_keycode = 125

This will emulate a middle button, but since I don't use that, I have never bothered with it.

THERMOSTAT MODULE

***IMPORTANT***

Type this:
/sbin/modprobe therm_adt746x

Your cpu fan should start up a few seconds pressing enter. If not, then you did something wrong, check to make sure you typed it in correctly, double check, triple check! If its still not working, turn off the computer, get on another computer and use google.

If your fan did start then Add this line to /etc/rc.d/rc.modules by doing this:

nano /etc/rc.d/rc.modules

# ADT746x thermostat in iBook G4/Powerbook G4
/sbin/modprobe therm_adt746x

X11

Setting up X11 on the iBook was simple. Run "xorgsetup" and choose the following options:

* 24 color
* generic 105-key (Intl) PC (unless you have a different keyboard)
* sv (Unless your using a different keyboard/language)
* nodeadkeys
* none - Do not select an additional layout

This created a new "/etc/X11/xorg.conf" which is directly usable. Of course your settings for the keyboard layout may be different. To verify, if X is able to start, login as normal user and run "startx"

quit X
type exit
login as root

PATCHES:

Download the latest patches off the slackintosh website. I put them in /root/patches

(wget is a great tool)

Put the machine in single user mode:
telinit 1
upgradepkg /root/patches/*.tgz
telinit 3

(Why single user mode? Just to be safe, in case there is a kernel update or something major like that, its faster to telinit 1 and run upgradepkg than it is to check every single package and determine if it requires a telinit 1 session or not.)

You are now back in mulit-user mode, fully patched and up-to date.

Login as your user and run startx: (unless you already started X before, then skip to Editing/Configuring the Terminal)

logout of x

EDITING/CONFIGURING THE TERMINAL

nano ~/.config/Terminal/terminalrc

[Configuration]
BackgroundMode=TERMINAL_BACKGROUND_TRANSPARENT
MiscAlwaysShowTabs=FALSE
MiscBell=FALSE
MiscBordersDefault=FALSE
MiscCursorBlinks=TRUE
MiscCursorShape=TERMINAL_CURSOR_SHAPE_UNDERLINE
MiscDefaultGeometry=85x17+0-0
MiscInheritGeometry=FALSE
MiscMenubarDefault=FALSE
MiscMouseAutohide=FALSE
MiscToolbarsDefault=FALSE
MiscConfirmClose=FALSE
MiscCycleTabs=TRUE
MiscTabCloseButtons=TRUE
MiscTabCloseMiddleClick=FALSE
MiscTabPosition=GTK_POS_TOP
MiscHighlightUrls=TRUE
BackgroundDarkness=0.000000
ColorForeground=#e2f3c68418c1
ColorCursor=#eec7e1030ef4
ScrollingBar=TERMINAL_SCROLLBAR_NONE
CommandLoginShell=TRUE
FontName=DejaVu Sans Mono 10

(These are my settings obviously, please do not be stupid and mindlessly copy what I have down, READ the file, everything is self explanatory if you understand English. Furthermore, there are a lot more functions you can place in here, man Terminal for more information).

INTERNATIONAL KEYBOARDS: AltGr

nano ~/.Xmodmap

keycode 115 = ISO_Level3_Shift

This will turn both Apple keys into AltGr keys (both Apple keys have the same keycode.

Unfortunately Apple does not list "¶ { [ ] } \ ~ |" keys on the keyboard. Either remember where they are or use some sort of permanent marker to mark your keys. I just remember them.

Also currency keys from AltGr + 3 - 6 are arranged in a different order than you are use to. But you can of course change this if you want.

SETUP COMPLETE

Reboot your system so the keyboard settings can take effect, there is probably a way to do this without the reboot, and the telinit 1 switching may have taken care of that, but I just reboot, that way I know everything is loading as my new defaults, so if something is broken, its easier to troubleshoot.

Login: user (don't type user, unless that truly is the username you chose).

startx

Check your mouse/trackpad to see if it is functioning the way you set it up. Open a terminal session and see if that is configured the way you told it to. Do some typing with the keyboard, using the Apple Command keys (now AltGr) to make sure they function properly. Also use your right mouse (keyboard) button. All should be working if not, you typed something wrong, go back, and see.

TWITTER:


http://github.com/mattn/gtktwitter

simple, easy to use (little bit buggy)

Or if you like emacs:

http://emacswiki.org/emacs/TwIt

CONKY:

Go to slackbuilds.org search for conky under 12.1 download source and slackbuild. You may need to edit the SBo script. Look at a Slackbuild script in the sources tree of slackintosh for a reference. Also may need kernel sources for this build.

**I could not get Conky 1.8.0 to compile**

F-KEYS

Use fn + F keys to get their other uses to work (sound volume, screen contrast, eject cd numlocks) Eject cd has a slight delay, so be patient.

PIDGIN:

MSN not working? Then you probably did not apply the 2.7.0 patch. Grab it from the slackintosh website and upgradepkg. If you did and its not working... then that's something new that Micro$aft tried to do to screw the *nix community yet again. Use Google, sue Micro$aft, or abandon MSN and try to get your friends to follow you, you probably won't have much luck with that...

SKYPE:

Heh... unless they either release the source code (doubt it) or they spend the 5 minutes to build a PPC Linux binary, then your out of luck here... I know, it sucks, but nothing we can do about it.

WIFI:

No idea, I never use it

SUSPEND:

Works fine with me, but since my iBook G4 battery is toast, I neverclose the lid. I did try it out once to see if it works. HDD sounded like it turned off and restarted like it did under OS X. As for going unplugged, again, my battery is toast. Some people have reported that battery power is sucked fast because the CPU is turned up, but I have not tested this. There are scripts out there where you can manipulate your CPU when it is plugged in or unplugged, I am unaware if any of them have been included in 12.1. Google it.