Sunday, 18 March 2007

Wine: DC++ #2

There are some problems with the settings menu in the wine installation of DC++. Although buttons work, checkboxes don't, which is a shame for the verbose configuration menus of DC++. The file hashing works as well, in fact it is trying to hash some 40 gigs right now, it works smoothly, as I have said so often lately.

I also added export PATH=$PATH:~/.wine/drive_c/bin to the /etc/bash.bashrc file so that I can put scripts that run my wine programs into wine's C:\bin, and I can run them from console without having to track down where the executable is. The command that runs DC++, for instance, is:

wine ~/.wine/drive_c/Program\ Files/DC++/DCPlusPlus.exe


I put this in a file, and put the file into C:\bin. I also gave everybody the permission to execute it. I could connect to my servers as well, receive the chat just as perfectly. But I still have a connection problem as I have expected, and these things won me nothing in the short term. Well, long live the "do unnecessary things to avoid doing the necessary stuff" way of thinking.

Wine: DC++

Due to some problems I have been facing with Linux ports of DC++, I decided to try out the Windows version over wine. I am pretty sure that even if this works, my problems are in a lower level and thus won't be fixed. Yet, it's for the thrills as always.

I experimented with an already install DC++ on my Windows partition, it ran just fine on wine.

I will use version 0.698 of wine, just because I ran into it in my download heap and am too lazy to grab one from the net right now.

Installation was smooth as expected. No difference from the original Windows installation. It even polluted my "Other" category in the XFCE menu with its icons. Only two lines were dumped:

fixme:shell:SHAutoComplete SHAutoComplete stub fixme:shell:BrsFolder_OnCreate flags 40 not implemented

Then I ran the program. The initial dump was:

fixme:commctrl:InitCommonControlsEx Unknown class! dwICC=0x4000
fixme:htmlhelp:HtmlHelpW HH case HH_INITIALIZE not handled.
fixme:listview:LISTVIEW_SetColumnOrderArray iCount 11 lpiArray 0x53bad0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
fixme:propsheet:PROPSHEET_UnImplementedFlags PSH_RTLREADING
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0
err:toolbar:TOOLBAR_GetImageListForDrawing bitmap for ID 0, index 0 is not valid, number of bitmaps in imagelist: 0

The GUI is right here, just for the glory:

Saturday, 3 March 2007

Installing JACK

So I wanted to use Rosebud, a music production software, a couple of months ago. It needed some mysterious sound server called JACK. I had a load of trouble trying to get audio and midi work, and I gave it up. Today, I will try again and I will write whatever I do here. Sources are at the end of the post.

So, there are two packages apparently, jackd and oss2jack. First one is the jack daemon, the second one is the OSS emulator for JACK. Here we go.

1. Update the apt sources file so that we can install jackd and oss2jack. Add the line

deb http://neogate.homelinux.org/debian/ edgy sound

to /etc/apt/sources.list file, change edgy to whatever version you have. Also refresh your package list as well by typing

$ sudo apt-get update

to the shell.

2. Install the packages and eventually launch the oss2jack configuration by typing
$ sudo apt-get install jackd oss2jack

It should look something like this:


3. The configuration program asks whether it should replace the alsa oss modules. Since this was my intention to begin with, I said yes. You might say yes to see how it works first.

4. The setup should be done now.

Now apparently we also need a kernel module named fusd-kor. I could not find any precompiled module for my kernel, but you might see for yourself by typing the command

$ sudo apt-get install fusd-kor-module-`uname -r` fusd-kor

So now with what I did:

1. First we install the module assistant:

$ sudo apt-get install module-assistant
$ sudo m-a prepare
$ sudo apt-get install gcc-`grep LINUX_COMPILER /usr/src/linux/include/linux/compile.h | sed 's/.* \([0-9]\+\.[0-9]\+\).*/\1/'`

2. Then we let the assistant do our dirty work of configuring, building and installing the module:
$ sudo apt-get install fusd-kor-source
$ sudo m-a a-i fusd-kor
$ sudo apt-get install fusd-kor

3. We're done.

Just for kicks, and for higher performance, let's also install the realtime kernel module. You know the drill, but here it goes anyway.

1. Type
sudo apt-get install realtime-lsm-module-`uname -r` realtime-lsm

If it works, yay! Otherwise, proceed.

2. Install the module assistant.
sudo apt-get install module-assistant
sudo m-a prepare
sudo apt-get install gcc-`grep LINUX_COMPILER /usr/src/linux/include/linux/compile.h | sed 's/.* \([0-9]\+\.[0-9]\+\).*/\1/'`

3. Let the good times roll.
sudo apt-get install realtime-lsm-source realtime-lsm
sudo m-a a-i realtime-lsm

4. Done again.

We have to rechannel esd output from ALSA to our beloved JACK. We do this by installing the package libesd0.
sudo apt-get install libesd0

Remember to make yourself a member of the audio group by:
sudo adduser  audio

if you had not done so previously.

Finally, let's make jackd fire up at every boot. You may not want to do this, some programs like Amarok don't have JACK support. I did not do this.

Edit the /etc/rc.local to have the following lines just before "exit 0".

# Start jackd
nice -n -1 jackd -R -d alsa -p 256 > /dev/null 2>&1 &

# Waiting for jackd to become ready
ISR=0
C=0
while [ "$ISR" = "0" -o "$C" = 4 ]; do
C=$(($C + 1))
jack_lsp TEST > /dev/null 2>&1 && ISR=1
if [ "$ISR" = "0" ]; then
sleep 1
fi
done

# Starting oss2jack
nice -n -1 oss2jack > /dev/null 2>&1 &

# Wait for oss2jack to become ready
# FIXME: make/use a small OSS client, to determine of the OSS device is ready ...
sleep 1

# GNOME will start esd now - wait for it,
# then wait for esd to exit (at the end of session) and kill jackd and oss2jack
sh -c "while [ \"\$(pidof esd)\" = \"\" ]; do sleep 1; done; while [ ! \"\$(pidof esd)\" = \"\" ]; do sleep 3; done; kill $(pidof jackd) $(pidof oss2jack)" &

This is the contents of the script /usr/share/doc/oss2jack/examples/.gnomerc, obviously originally intended as a replacement for ~/.gnomerc in Gnome. I copied this script to my home directory with the name .oss2jack.sh. Whenever I want to use JACK, to use Rosebud for example, I type:

$sudo sh ~/.oss2jack.sh

When I'm done, I terminate the daemon by typing:

$sudo killall jackd

Done with the installation. Configuration may follow.


Sources:
http://www.ubuntuforums.org/showthread.php?t=208488&highlight=jack+install
http://www.linux.com/article.pl?sid=06/01/03/1728227

Friday, 2 March 2007

Configuring xserver-xorg

A simple walkthrough for sudo dpkg-reconfigure xserver-xorg.

1. Well, the configuration starts with a screen that lists graphics card drivers. You do need to know this, but I will just demonstrate through my configuration. If you need to find out what you are using you can go to your computer manufacturer's website, or if you have another OS, could check it from there as well. I will go with nvidia.

Note to NVidia users: There are (probably) two drivers for you here; nv and nvidia. nvidia is the official linux driver, and works flawlessly as far as I can tell. nv is a user-developed driver, and it has presented me with problems when it comes to glx, so I would recommend against it unless you know that it's not the case for you or you know how to tweak to get it right. If you do, let me know.

If you don't have nvidia drivers in the list, you might want to get automatix2 installed (sudo apt-get install automatix2). It is an easy way to automate the installation of commonly used packages such as the nvidia drivers.

2. Coming soon...

Thursday, 1 March 2007

Basic X Tasks

Restarting the X Server: Press Ctrl+Alt+Backspace

Starting the X Server from Terminal:
$
startx

Configuration Tool for xorg.conf:
$
sudo dpkg-reconfigure -phigh xserver-xorg

Wine: Nokia PC Connectivity Suite #3

Due to some unposted parts of the dump, I am also providing wine with wbtapi.dll, irprops.cpl, TosBtAPI.dll and WidcommSdk.dll. I will keep posting the results.

Wine: Nokia PC Connectivity Suite #2

Part2 (after taking an examination and further examination):

There are a few problems (many problems but these bug me more than the others):

1. PC Suite stacks up in the tray and cannot be closed gracefully. The icons are responsive (they display hints, they bring the window to focus when clicked, right clicking and holding reveals a menu), but they cannot be gotten rid of. I had to kill the processes to close the application (the launcher starts some other executables) as well as explorer.exe to get rid of the tray icons.

2. When I say "Manage Connections", a dialog box appears saying that it simply couldn't be done and a reinstallation is necessary (then curiously disappears). Terminal says:

fixme:atl:AtlModuleInit SEMI-STUB (0x40cc10 0x40c340 0x400000)
fixme:atl:AtlAxWinInit semi-stub
fixme:htmlhelp:HtmlHelpW HH case HH_INITIALIZE not handled.
fixme:win:GetProcessDefaultLayout ( 0x34f0fc ): No BiDi
fixme:win:GetProcessDefaultLayout ( 0x34e4b4 ): No BiDi
err:ole:CoGetClassObject class {a9ac8fde-6da4-4d90-b6f8-5eb24ca74b9b} not registered
err:ole:CoGetClassObject no class object {a9ac8fde-6da4-4d90-b6f8-5eb24ca74b9b} could be created for context 0x1
err:ole:CoGetClassObject class {aa8a5b6c-da1e-4926-8e69-8221f609df4e} not registered
err:ole:CoGetClassObject no class object {aa8a5b6c-da1e-4926-8e69-8221f609df4e} could be created for context 0x1
fixme:atl:AtlAdvise 0x809978 0x1ce98c 0x40c2d8 0x1ce9b8
fixme:ole:CoSuspendClassObjects
fixme:ole:CoResumeClassObjects stub
(this is where the dialog box disappears)
fixme:ole:CoCreateInstance no instance created for interface {92880b10-95b3-4709-bf03-5b453dc14f04} of class {2a6ce3ef-9d1b-4cb3-9221-9acfaeaa42a6}, hres is 0x80004005

Wine: Nokia PC Connectivity Suite

Oh, and started using wine, which is a good thing. I managed to run puTTy, it's just wine putty.exe. I tried to install Nokia PC Connectivity Suite (v6.70.25), managed to do so with some errors. As far as I can remember I just needed to add mfc42u.dll under ~/.wine/drive_c/windows/system32. Running is still a task at hand though, here's the dump:

Instantaneous Correction:

Shit, it worked! LaunchApplication.exe is the key, not GetConnected.exe, apparently. I got the user interface, will go on later. Here's the capture:



...and the shell dump (for the above capture):

err:ole:CoInitializeEx Attempt to change threading model of this apartment from apartment threaded to multi-threaded
fixme:atl:AtlModuleInit SEMI-STUB (0x451418 0x450ee8 0x440000)
fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE
fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE
wine: Call from 0x7b840580 to unimplemented function atl.dll.AtlComQIPtrAssign, aborting
wine: Call from 0x7b840580 to unimplemented function atl.dll.AtlComQIPtrAssign, aborting
err:ole:CoInitializeEx Attempt to change threading model of this apartment from apartment threaded to multi-threaded
fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE
fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE
wine: Call from 0x7b840580 to unimplemented function atl.dll.AtlComQIPtrAssign, aborting
wine: Call from 0x7b840580 to unimplemented function atl.dll.AtlComQIPtrAssign, aborting
err:ole:CoInitializeEx Attempt to change threading model of this apartment from apartment threaded to multi-threaded
fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE
fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE
wine: Call from 0x7b840580 to unimplemented function atl.dll.AtlComQIPtrAssign, aborting
wine: Call from 0x7b840580 to unimplemented function atl.dll.AtlComQIPtrAssign, aborting
fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE
fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE
wine: Call from 0x7b840580 to unimplemented function atl.dll.AtlComQIPtrAssign, aborting
wine: Call from 0x7b840580 to unimplemented function atl.dll.AtlComQIPtrAssign, aborting
fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE
fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE
wine: Call from 0x7b840580 to unimplemented function atl.dll.AtlComQIPtrAssign, aborting
wine: Call from 0x7b840580 to unimplemented function atl.dll.AtlComQIPtrAssign, aborting
fixme:systray:handle_incoming unhandled tray message: 4
fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE
fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE
wine: Call from 0x7b840580 to unimplemented function atl.dll.AtlComQIPtrAssign, aborting
wine: Call from 0x7b840580 to unimplemented function atl.dll.AtlComQIPtrAssign, aborting
fixme:win:SetLayeredWindowAttributes (0x20040,0x00000000,229,2): stub!

Why Xubuntu?

Well it is justice to justify myself to my future self here. I was a long running Fedora fan when I had to help a friend get acquainted with Linux, so I referred him to Fedora. Then my Fedora broke, and I got tired of the near-Windows speed of a bulky installation. I searched around for alternatives, and decided to give the Ubuntu series a try. I was used to Gnome and KDE, and wanted something faster.

This is where Xubuntu kicked in, and what a kick it is. I already have a reasonably fast laptop, 2.0ghz pentium m, 1 gig ram, 120 gigs of hard disk, 256 mb geforce go graphics and so on, but I did not know how bulky my other installation was. I was also amazed to notice the extensive "out-of-the-box"ness of the Ubuntus.


I was already using Ubuntu Forums extensively before, Google lead me there all the time. But it is when you actually start using the distribution that the community effect becomes obvious. Ubuntu is an example of what online civilian initiative can be. It is like an extensive humanitarian organisation that helps users of a specific type of system. Seriously, I believe that humanitarian organisations' next (maybe current) step is internet, and communities like Ubuntu's are a good example of what people can do just by being "people".

Got to take a test now, to be continued...

Getting Lexmark x1270 All-in-one Printer to Work

Well, this is already addressed in the Ubuntu Forums here. The thing is, this blog's one purpose is to be a list of things I keep doing over and over again in every fresh installation so that I don't have to google things over and over again.

I am still working on the scanning part, which might work eventually. I doubt the copying will ever work without a mule load of labour. Copying is done by software in Windows, and I'm not aware of a Linux counterpart yet, nor am I enthusiastic about providing one myself at the moment.

1. Well, download CJLZ600LE-CUPS-1.0-1.TAR.gz.
2. Install alien (to convert rpm's to deb packages) by typing sudo apt-get install alien or choosing alien in whatever package manager you are using.
3. Here you go with the steps to follow (enter these to a shell prompt):

$ mkdir lexmark
$ mv CJLZ600LE-CUPS-1.0-1.TAR.gz lexmark # move the package to a folder. optional, but recommended.
$ tar -xvzf CJLZ600LE-CUPS-1.0-1.TAR.gz # extract the driver.
$ tail -n +143 z600cups-1.0-1.gz.sh > install.tar.gz # the sh script is broken for newer systems. use `tail` to extract the binary portion of the script.
$ tar -xvzf install.tar.gz # extract the contents produced by tail
$ alien -t z600cups-1.0-1.i386.rpm # convert unusable rpm packages to tgz.
$ alien -t z600llpddk-2.0-1.i386.rpm # convert unusable rpm packages to tgz.
$ sudo tar xvzf z600llpddk-2.0.tgz -C / # extract the tgz's to / putting the files in their right place
$ sudo tar xvzf z600cups-1.0.tgz -C / # extract the tgz's to / putting the files in their right place
$ sudo ldconfig # DO NOT SKIP THIS STEP or your printer backend won't find required libraries
$ cd /usr/share/cups/model
$ sudo gunzip Lexmark-Z600-lxz600cj-cups.ppd.gz # unzip the ppd, which should _not_ be gz