Archive for July, 2008

Luxer 2 Beta Information

I know I’ve been slacking off with Luxer updates/releases, so I’d figure I would drop all of you a bit of knowledge.

As per the screenshot posted earlier, Luxer 2 is coming along quite nicely. I have not spent much time on it, but during the time I’ve spent on it I’ve been doing right, which means you’ll have a very functional, very feature-full bot when 2.0 rolls out.

As for releases, I’m going to try to put out a beta release before I go on vacation. I’ll post more on Luxer 2.0 later, after I do some more work on it.

Comments (1)

Starcraft in WINE with a widescreen/dual screen setup on Ubuntu

For anyone who has tried running Starcraft in WINE in either a dual-screen setup or on a widescreen monitor has probably ran into this problem: The resolution doesn’t work.

Because of Starcraft’s lovely static 640×480 resolution, TwinView, as well as a wide screen monitor, aren’t going to like it very much. The solution, surprisingly, is rather simple.

Let’s get started. Like all WINE applications, let’s create our WINE prefix. Open a new shell from Applications -> Accessories -> Terminal. Once the shell appears, enter these commands:

mkdir .wine_sc
env WINEPREFIX=”/home/YOURUSERNAME/.wine_sc” winecfg

Replace your YOURUSERNAME with the name of your home folder. If you don’t know the name of your home folder, type “cd && pwd”. Whatever is after “/home/” is the name of your home folder.

Once the wine configuration window opens, set your default Windows version to Windows 98 (from the popup menu.) Then click on the audio tab. Click on “Apply” if it is enabled, and then “OK”.

Now that we’ve got our WINE prefix setup, let’s install Starcraft into it. If you are installing from a CD, insert it. If you are installing from an ISO, mount it using the way you are accustom to. Either way, open up the disc. You should now see a Nautilus window with a file named “INSTALL.EXE” in it.

Open up a terminal so that both the Nautilus window and the terminal are visible. In the terminal, enter the following but do not press return. There is a space at the end.

env WINEPREFIX=”/home/YOURUSERNAME/.wine_sc” wine

Next, click and drag INSTALL.EXE into the Terminal window. This will put the path to the EXE into the terminal, at the cursor. The line should now look something like this:

env WINEPREFIX=”/home/YOURUSERNAME/.wine_sc” wine /path/to/your/INSTALL.EXE

Press enter, and go through the Starcraft installation. Make sure to create all of the shortcuts it suggests.

Now, for the fun part. Open up your xorg.conf file (you may want to back it up first) by pressing Alt + F2 and entering:

gksudo gedit /etc/X11/xorg.conf

Go to the bottom of the file, and then add this:

Section “ServerLayout”
Identifier “SCLayout”
Screen 0 “StarCraft Screen”
InputDevice “Keyboard0″ “CoreKeyboard”
InputDevice “Mouse0″ “CorePointer”
EndSection

Section “Screen”
Identifier “StarCraft Screen”
Device “Device0″
Monitor “StarCraft Monitor”
DefaultDepth 24
SubSection “Display”
Virtual 640 480
Depth 24
Modes “640×480@60″
EndSubSection
EndSection

Section “Monitor”
Identifier “StarCraft Monitor”
VendorName “Plug ‘n’ Play”
ModelName “Plug ‘n’ Play”
Gamma 1
ModeLine “640×480@60″ 25.2 640 656 752 800 480 490 492 525 -hsync -vsync
EndSection

Keyboard0, Mouse0, and Device0 should be the defaults. If they are not, I will assume you changed them and know what they are.

Now, we need to allow user access to Xorg. Edit /etc/X11/Xwrapper.config, and the change the line:

allowed_users=console

To:

allowed_users=anybody

Save your xorg.conf file, and restart your X session by either rebooting or pressing control + alt + backspace. Once you’ve logged in again, we’ll create the shortcut to run Starcraft.

Open gedit or your favorite text editor (Applications -> Accessories -> Text Editor) and copy and paste the following into a new document:

#!/bin/sh
X :1 -layout SCLayout -ac &
XPID=$!
sleep 2
DISPLAY=:1 env WINEPREFIX=”/home/YOURUSERNAME/.wine_sc/” wine “c:\Program Files\Starcraft\starcraft.exe” — /usr/bin/X :1 -layout SCLayout
sleep 1
kill $XPID

Save the document as sc.sh in your home folder. Make sure to replace YOURUSERNAME with the name of your home folder. Close your text editor.

Open a new terminal window. In it, type the following:

chmod +x sc.sh
mv sc.sh .wine_sc

You may now close the terminal. Next, right click on the Ubuntu logo in the upper left hand corner of your screen and select “Edit menus”. Click on the triangle next to Wine, then the triangle next to Programs. Select the Starcraft folder. On the right side of the window, right click on the Starcraft icon and select Properties. In the command field, enter:

/home/YOURUSERNAME/.wine_sc/sc.sh

Click on the Close pushbutton. Now, click and drag the Starcraft icon into your Games menu. Close the “Main Menu” window.

Ta da! If you go to Applications -> Games -> Starcraft, Starcraft will open in its own X session, allowing you to play it like normal. To switch back to your main X session while in a game, press Control + Alt + F7. To then go back to Starcraft, press Control + Alt + F8. When you quit Starcraft, you will automatically go back to your standard X session.

Comments (12)

TeamSpeak in Linux with Logitech (or other) USB desktop microphone on Ubuntu

Teamspeak seems to be one of those applications that is just needed. You don’t raid without it. You don’t shot without it. You don’t live without it. Therefore, if it is so needed, should Linux users be excluded from the fun?

The Linux version of Teamspeak is crap. Total crap. You can only select on audio interface, and despite my hours of screwing around with padsp, I still could not get it to work with my desktop microphone. But there is a solution. Use the Windows version of Teamspeak in WINE!

I assume that if you are a Linux gamer who wants to user Teamspeak that you already have WINE installed. If not, follow the instructions here.

Once you have WINE installed, we need to install the native Linux version of Teamspeak (why?) to get the icon so our WINE launcher looks pretty. Go to Applications -> Add/Remove… and search for Teamspeak. Install it.

Once the Linux version of Teamspeak is installed, open a new terminal by going to Applications -> Accessories -> Terminal. Enter the following commands:

cd
mkdir .wine_ts
cp /usr/share/pixmaps/teamspeak.xpm ./.wine_ts

Don’t close your terminal just yet. Now, go to Applications -> Add/Remove… and uninstall Teamspeak by searching for it, unchecking the box, and clicking apply. Switch back to that Terminal.

Time for the tricky part. Well, kind of. A monkey’s common sense should get you through here. Enter this command:

cat /proc/asound/cards | grep USB

This will give you something that looks like this:

1 [default ]: USB-Audio – AK5370

If it does not, Linux is not even seeing your USB microphone. This guide can’t help you, sorry.

Find the number next to the USB device you want to use as your microphone. In my case, this was “1″. In that same terminal window, enter:

cd
gksudo gedit .asoundrc

Into the new gedit window that opens, copy and paste the following:

pcm.headset {

type hw

card 1

}

ctl.headset {

type hw

card 1

}

Replace the 1s with the number you had.

Now, run winecfg on our new wine prefix.

env WINEPREFIX=”/home/YOURUSERNAME/.wine_ts” winecfg

Replace your YOURUSERNAME with the name of your home folder. If you don’t know the name of your home folder, type “cd && pwd”. Whatever is after “/home/” is the name of your home folder.

Once winecfg opens, click on the audio tab. Ignore any errors and click “Ok” to close winecfg. Now, open the wine registry editor by entering the following into the terminal:

env WINEPREFIX=”/home/YOURUSERNAME/.wine_ts” wine regedit

Once again, replace YOURUSERNAME with the name of your home folder.

  1. Click on the plus next to “HKEY_CURRENT_USER”
  2. Click on the plus next to “Software”
  3. Right click on the “Wine” folder and go to New -> Key. Name the new key “Alsa Driver” (without quotes.)
  4. Right click on the newly created “Alsa Driver” folder and select New -> String value.
  5. Set the name to “AutoScanCards” (without quotes)
  6. Double click on the row of the new value. Enter “N” (without quotes) in the value field.
  7. Repeat step 4 to 6 for the following name/value pairs:
    • Name: DeviceCount Value: 2
    • Name: DevicePCM1 Value: default
    • Name: DevicePCM2 Value: headset
  8. Click the close button on the Registry Editor window.

Now, time to go back to winecfg window. Run this command, in case you have forgotten:

env WINEPREFIX=”/home/YOURUSERNAME/.wine_ts” winecfg

Click on the audio tab, and set “Hardware Acceleration” to “Emulation”, and check the “Driver Emulation” check box. Click on the apply button, then the OK button. Now, we need to download Teamspeak and install it in WINE.

First we need to download Teamspeak. For the newest version, go to http://goteamspeak.com and download the Windows installer. Move it into your home folder. If you would like to use a version that I know works, run this:

wget ftp://ftp.freenet.de/pub/4players/teamspeak.org/releases/ts2_client_rc2_2032.exe

… and wait for the download to finish. Once you’ve got the Teamspeak installer downloaded, run it with this command:

cd
env WINEPREFIX=”/home/YOURUSERNAME/.wine_ts” wine ts2_client_rc2_2032.exe

If you downloaded a newer version, replace ts2_client_rc2_2032.exe with the name of your installer.

Click through the installer (yes, yes, accept, you own my soul, accept…) and ignore the error about codecs not installing. Make sure to create a desktop shortcut! Close the Teamspeak installer.

Now, making it all a nice part of the Ubuntu system is something I always like doing. Right click on your little Ubuntu logo (in the upper left of your screen. Yes, that one.) and select “Edit menus”.

Click on “Internet” and click and drag the Teamspeak launcher on your desktop into the pane on the right. Once it is there, right click on it, and select “Properties.” In the window that appears, click on the icon button (which is probably currently a bottle of wine.), and enter this into the field at the top:

/home/YOURUSERNAME/.wine_ts/teamspeak.xpm

… and press enter. Close the “Main Menu” and “Launcher Properties” windows.

Now you can open Teamspeak! Go to Applications -> Internet -> Teamspeak 2 RC2. Once it opens, go to Settings -> Options. You should be able to select “USB Audio” as your input method and the only option for output. Set the sound driver to Wave and check the force 8 bit recording box. Click apply and then close.

My configured Teamspeak settings

Ta da!

Comments (4)