$ apt-get install wine (as root) $ winecfg
The winecfg (graphical) utility will setup some config file defaults in your ~/.wine directory. Click on Graphics and activate Allow DirectX apps to stop the mouse leaving their window. Also, click on Audio (a dialog will pop up, just click OK). This will autodect your soundcard and setup Wine to use it. Under Drives click Add (this will add D:) and change the path to /media/cdrom, so that Wine knows about your CD-ROM drive. Finally click OK to close winecfg and save the settings.
The next step is to insert the Starcraft CD-ROM into the drive and start the installer using Wine:
$ mount /media/cdrom (as root) $ wine /media/cdrom/setup.exe
Follow the instructions in the installer until the Starcraft install is finished (you'll need your CD key number), then exit the installer (don't start playing Starcraft right away).
The next step is to get the latest patch and get rid of the need to insert the CD-ROM every time.
$ wget http://ftp.blizzard.com/pub/starcraft/patches/PC/SC-1161.exe $ wine SC-1161.exe
After the patch is installed click OK and Starcraft will be started (very annoying). Leave the game again. We'll get rid of the CD-ROM requirement now:
$ cp /media/cdrom/install.exe ~/.wine/drive_c/Programme/Starcraft/StarCraft.mpq
That's a pretty big file, it may take a while. You might have to change "Programme" in the path (I have the German Starcraft version). That's it. You can now play Starcraft (without needing the CD-ROM) using:
$ wine ~/.wine/drive_c/Programme/Starcraft/StarCraft.exe
A good thing is, it even works nice and fast with the open-source nv NVIDIA driver (no need to install the proprietary driver).
I noticed one very annoying "bug" with the mouse behaviour at first. The mouse would sometimes just get stuck during the game (which is a total disaster of course, if you're in the middle of a fast-paced game). Left-clicking somewhere would "unstuck" the mouse, but it's still very bad. After many, many hours of reading bugreports and trying various patches I finally found out the root cause for the problem.
It's somehow related to my window manager (IceWM); whenever you move the mouse to the bottom of the Starcraft screen (where the IceWM status bar is, even though it's not on top or even visible, and even though Wine/Starcraft runs in full-screen mode!), something funny happens with X11/IceWM and the mouse gets stuck. I haven't yet found out if/which IceWM option could fix this behavior, but I have a small work-around. Just start Wine directly on a second X11 server with Starcraft (without any window manager being involved):
$ xinit -e '/usr/bin/wine ~/.wine/drive_c/Programme/Starcraft/StarCraft.exe' -- :1
No patches needed (stock Wine from Debian unstable works fine, that's version 1.0.1 right now). I hope this saves other people some debugging time...
In order to play the Brood War expansion you can follow a similar procedure. Insert the Brood War CD-ROM, then:
$ mount /media/cdrom (as root) $ wine /media/cdrom/setup.exe $ cp /media/cdrom/install.exe ~/.wine/drive_c/Programme/Starcraft/BroodWar.mpq $ wget http://ftp.blizzard.com/pub/broodwar/patches/PC/BW-1161.exe $ wine BW-1161.exe
After you've done that, you can start both Starcraft (classic) and Brood War via:
$ wine ~/.wine/drive_c/Programme/Starcraft/StarCraft.exe
You will be asked in the game whether you want to actually play the Starcraft or Brood War variant.
As of version 1161 for the Starcraft / Brood War patch, there's a new game option which can drastically lower the CPU load while playing Starcraft. First fire up Starcraft and start any game. Then, press F10, select Options / Game speed, and check the "Enable CPU Throttling box". You'll probably need to restart Starcraft afterwards.
Multiplayer LAN games work just fine (didn't try BattleNet that much yet), but if you use a strict firewall rule set as I do (which blocks most ingress as well as egress traffic) you have to open a number of different ports. Here's what I added to my firewall script:
$IPTABLES -A OUTPUT -m state --state NEW -p udp --dport 6111 -j ACCEPT $IPTABLES -A INPUT -m state --state NEW -p udp --dport 6111 -j ACCEPT $IPTABLES -A OUTPUT -m state --state NEW -p udp --dport 6112 -j ACCEPT $IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 6112 -j ACCEPT # BattleNet
Starcraft works just fine on various netbooks; for instance, I tested it on my One A110 netbook (VIA VX800) with 256 MB of RAM, and the whole .wine directory being on a USB thumb drive (thus slow; but my internal SSD was already full). I bet it'll also work fine on the
Audio works fine, and game speed is quite OK, the only minor "problem" is that you should use an external USB mouse, the touchpad is just too small (and too slow to use) for such a fast-paced game.
The full Wine package (and all dependencies) consume quite a lot of space on the (usually very small) hard drive or SSD of a netbook, but luckily you can get away with only a minimal Wine install for playing Starcraft:
$ apt-get install wine-bin libwine-alsa (as root)
That's sufficient, and a lot smaller than installing the full wine package.
Update 2010-06-23: There's a contributed Hungarian translation now (thanks!)
Update 2009-03-04: Added info about patch 1161 and CPU load reduction.
Update 2008-12-19: Added Starcraft-on-netbooks section.
Update 2008-12-13: Added BroodWar and multiplayer info.
FYI, if you're not using xdm/kdm/gdm but are instead starting the X11 server manually with
startx (which is what I usually do) you might have experienced brokenness in Debian unstable recently:
Fatal server error: Unrecognized option: /etc/X11/xinit/xserverrc
--- /usr/bin/startx.orig 2008-05-26 18:21:26.000000000 +0200 +++ /usr/bin/startx 2008-05-26 18:21:36.000000000 +0200 @@ -107,9 +107,7 @@ if [ x"$server" = x ]; then # if no server arguments or display either, use rc file instead if [ x"$serverargs" = x -a x"$display" = x ]; then - server=$defaultserver serverargs=$defaultserverargs - display=$defaultdisplay else server=$defaultserver fi
Hope that saves some people out there lengthy investigations and hassle.
Update: "Testing stuff with QEMU"-articles published so far:
Here's a quick HOWTO to get you started with the QEMU emulator, the Debian installer (etch beta 3), and SELinux. If you execute the following steps you'll be left with an SELinux-enabled Debian unstable QEMU image, but not with a complete working and perfectly configured SELinux system. A more detailed article about SELinux will probably follow...
Basic Debian unstable install in QEMU:
apt-get install qemu
qemu-img create -f qcow /path/to/debian.img 5000M
qemu -hda /path/to/debian.img -boot d -cdrom debian-testing-i386-binary-1.iso
/etc/apt/sources.listif needed, and then dist-upgrade to the latest stuff:
apt-get update && apt-get dist-upgrade
halt" in the emulated Debian, wait for the shutdown to complete, press CTRL+ALT+2 to switch to the QEMU console, and type "
Creating a QEMU overlay image:
QEMU has a nice feature called overlay images which allows you to "clone" an image, where the new (overlay) image will only store the "diffs" to the original one, thus saving lots of space. This also allows you to remove the overlay image at any time and restart from the original image (which is nice for testing stuff which may break).
qemu-img create -b /path/to/debian.img -f qcow /path/to/debian_selinux_overlay.img
qemu -hda /path/to/debian_selinux_overlay.img
Basic SELinux setup:
Luckily the Debian kernels are xattr-enabled by default so we don't have to do anything at all here.
apt-get install checkpolicy policycoreutils selinux-policy-refpolicy-src
setfilesutility is in the wrong place, see #384850), but there's a simple workaround:
ln -s /sbin/setfiles /usr/sbin/setfiles
ln -s /etc/selinux/refpolicy/src /etc/selinux/targeted
selinux=1to enable SELinux in the kernel (press "e" to edit the boot options).
sestatus", which should print some information on the running SELinux system. If it says "SELinux status: disabled" something went wrong.
Congratulations! You now have a QEMU image with minimal SELinux support and you can start playing with it, tweaking the policy, finding and reporting bugs, reading tons of documentation on how SELinux actually works etc. etc.
As SELinux is (half?) a release-goal for Debian etch, it would be nice if many people could test it before the release, and this is one method to do so without breaking your production systems.
Update 2006-08-28: You don't really need
user_xattr support for SELinux, only xattr support (for security.selinux xattrs) for the filesystem you use, which is available per default in Debian kernels (thanks Russell Coker).
Note: This article is part of my OS Install Experiences series.
OK, so let's start with something simple: Debian. Simple in the sense that there probably won't be too many surprises for me as a Debian developer (or for most readers of Planet Debian). For other people this might be interesting, though, and some facts are probably interesting to one or the other experienced Debian user/developer, too...
A few words on the hardware I'll be installing all these OSes on. It's a cheapo (200 Euros) x86 PC (Intel Celeron, 2 GHz), 80 GB IDE hard drive, 256 MB RAM, ATI Radeon 9200 SE graphics adapter, Realtek PCI ethernet controller, CDROM, USB, and all the other standard stuff. Nothing fancy, really.
Now the funny part starts: partitioning the disk. As I will be installing >= 10 OSes, this needs a bit of consideration.
I have chosen to create a 10 GB (primary) partition for a Redmond OS I'll be installing later (for games, testing, proprietary software I'm forced to use, and similar things). This will be the first partition and I marked it bootable, as Windows might choke otherwise.
For the rest, I reserved 5 GB for each OS — that should do. So the next two (primary) partitions are 5 GB each. I'll leave these empty for now, as I might encounter obscure OSes which must be installed on primary partitions. Let's hope it won't be more than two ;-) As you can only have four primary partitions, I then had to create a logical partition, which will "contain" any further partitions.
The next three (secondary) partitions are 1 GB each, intended to be used as swap. One of those I marked as swap in order to use it for Debian. Other Linux installations will be able to reuse this one. The other two are reserved in case I encounter OSes which have another form of swap and cannot use Linux swap partitions...
The rest is easy: create twelve 5 GB partitions => lots of space for more OSes. Here's the resulting fdisk output:
Disk /dev/hda: 81.9 GB, 81964302336 bytes 255 heads, 63 sectors/track, 9964 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 1216 9767488+ 83 Linux /dev/hda2 1217 1824 4883760 83 Linux /dev/hda3 1825 2432 4883760 83 Linux /dev/hda4 2433 9964 60500790 5 Extended /dev/hda5 2433 2554 979933+ 82 Linux swap / Solaris /dev/hda6 2555 2676 979933+ 83 Linux /dev/hda7 2677 2798 979933+ 83 Linux /dev/hda8 2799 3406 4883728+ 83 Linux /dev/hda9 3407 4014 4883728+ 83 Linux /dev/hda10 4015 4622 4883728+ 83 Linux /dev/hda11 4623 5230 4883728+ 83 Linux /dev/hda12 5231 5838 4883728+ 83 Linux /dev/hda13 5839 6446 4883728+ 83 Linux /dev/hda14 6447 7054 4883728+ 83 Linux /dev/hda15 7055 7662 4883728+ 83 Linux /dev/hda16 7663 8270 4883728+ 83 Linux /dev/hda17 8271 8878 4883728+ 83 Linux /dev/hda18 8879 9486 4883728+ 83 Linux /dev/hda19 9487 9964 3839503+ 83 Linux
Update 2006-06-05: Added netstat output and the list of world-writable files.
Update 2006-06-02: Shortened the length of the article on my main webpage as well as the RSS feed. But you can always read the whole article here, of course.
Update 2006-05-19: Updated "why is Debian-exim capitalized?" info as per comments, thanks!
Upon popular request (my post was even featured on Debian Weekly News), I re-ran my previous query on the changelog files in Debian packages. This time, however, I didn't only retrieve 40 random package release names, but "all" of them, for unknown values of "all". I didn't analyze some of the files (missing permissions), and maybe I missed one or two because my query sucked, but I think I've got most of them.
I ran a slightly more complicated query than last time, using the data from gluck:/org/lintian.debian.org/laboratory/. I have not the slightest idea how old the files in that archive are, but there's ca. 10.000 packages in there — more than enough, if you ask me.
The results (78 KB) this time are in alphabetical order, and include the package names where the strings were found. There's a total of 1408 strings.
Here are 20 randomly chosen strings, for some more fun:
gdb: * The "Ahhhhhhhhhhhhhhhhhh!" Release.
glibc: * The "Fuck Me Harder" release.
abiword: * The "Foolin' Myself" release.
opensc: * The "RTFM" release.
directory-administrator: * The "On Train" release
xchat: * The "Merry Christmas, mine beloved Xchat users!" release.
apache: * The "Yes, we know there is a new upstream release" upload.
mmm-mode: * The "But I'm Not Dead Yet!" Release
mozilla-firefox: * The "becoming more and more an iceweasel" release.
nano: * The "Marbella, ciudad hermanada con Benidorm" release.
thy: * The `Empty Spaces' release.
glibc: * The "Chainsaw Psycho" release.
sam: * The `Minime' release.
xchat: * The "Binary only" release.
tellico: * The "pbuider and buildds are not the same" package release
pingus: * The "All you pingus are belong to blendi" release
xchat: * The "Ok, wrong patch, excuse me guys :)" release.
cappuccino: * The "It's time for the upload" release
abiword: * The "Got A Good Thing Goin'" release.
firefox: * The "what he taketh, he giveth back" release.
I also created a small statistic this time. Here's the Top-20 packages (the ones with the most release names):
Feel free to grab the whole results file for more reading fun during boring hours of the day.
If you do any further processing or analysis of any kind with the data, please post a comment and let us all know ;-)
Update 2006-05-23: Enrico Zini has done some interesting things with the data...