23 May 2013

429. Briefly: Wine, libGL/liubGLU, Blender and nvidia -- 3D acceleration under Wine

The short version:
sudo apt-get install libgl1-nvidia-glx:i386

The longer version:
I looked into the possibility of running Blender for 32 bit windows under wine due to a series of comments to a post: http://verahill.blogspot.com.au/2013/05/416-wine-1530-in-chroot.html?showComment=1369252731918#c3560166574961895965

On this particular system I have a Geforce 430. It's running Debian Wheezy 64 bit, and has 32 bit wine 1.5.30 compiled as shown in this post: http://verahill.blogspot.com.au/2013/05/416-wine-1530-in-chroot.html


False start
First I downloaded and installed Blender. Running it using
wine ~/.wine/drive_c/Program\ Files/Blender\ Foundation/Blender/blender.exe
led to
err:ole:CoGetClassObject class {24e669e1-e90f-4595-a012-b0fd3ccc5c5a} not registered err:ole:CoGetClassObject no class object {24e669e1-e90f-4595-a012-b0fd3ccc5c5a} could be created for context 0x1 err:module:load_builtin_dll failed to load .so lib for builtin L"GLU32.dll": libGL.so.1: cannot open shared object file: No such file or directory err:module:import_dll Loading library GLU32.dll (which is needed by L"C:\\Program Files\\Blender Foundation\\Blender\\blender.exe") failed (error c000007a). err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files\\Blender Foundation\\Blender\\blender.exe" failed, status c0000135
Using locate I found something that sounded right-ish
sudo ln -s /usr/lib/i386-linux-gnu/libGLU.so.1 /lib32/libGLU.so.1

Tried again:
wine: Call from 0x7b83c562 to unimplemented function ntoskrnl.exe.IoAssignResources, aborting wine: Unimplemented function ntoskrnl.exe.IoAssignResources called at address 0x7b83c562 (thread 003c), starting debugger... err:module:load_builtin_dll failed to load .so lib for builtin L"GLU32.dll": libGL.so.1: cannot open shared object file: No such file or directory err:module:import_dll Loading library GLU32.dll (which is needed by L"C:\\Program Files\\Blender Foundation\\Blender\\blender.exe") failed (error c000007a). err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files\\Blender Foundation\\Blender\\blender.exe" failed, status c0000135
And more
sudo ln -s /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1.2 /lib32/libGL.so.1

And tried again
wine: Call from 0x7b83c562 to unimplemented function ntoskrnl.exe.IoAssignResources, aborting wine: Unimplemented function ntoskrnl.exe.IoAssignResources called at address 0x7b83c562 (thread 003c), starting debugger... err:module:load_builtin_dll failed to load .so lib for builtin L"GLU32.dll": libGL.so.1: cannot open shared object file: No such file or directory err:module:import_dll Loading library GLU32.dll (which is needed by L"C:\\Program Files\\Blender Foundation\\Blender\\blender.exe") failed (error c000007a). err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files\\Blender Foundation\\Blender\\blender.exe" failed, status c0000135
OK, so /lib32 isn't in the ld path:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib32

And tried again.
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default ALSA lib dlmisc.c:254:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so err:winediag:X11DRV_WineGL_InitOpenglInfo Direct rendering is disabled, most likely your OpenGL drivers haven't been installed correctly (using GL renderer "GeForce GT 430/PCIe/SSE2", version "1.4 (2.1.2 NVIDIA 304.88)"). Writing: /tmp/\blender.crash.txt
Fine. Back to the drawing board.

(Btw, libasound2-plugins:i386 would lead to broken packages re the libasound_module_pcm_pulse.so message.)

Solution:
aptitude show libgl1-nvidia-glx-ia32
Package: libgl1-nvidia-glx-ia32 New: yes [..] Replaces: nvidia-glx-ia32 (< 195.36.31), nvidia-glx-ia32 (< 195.36.31) Description: please switch to multiarch libgl1-nvidia-glx:i386

Half the time these things break when installing the i386 packages, but sure, let's try:
sudo apt-get install libgl1-nvidia-glx:i386
Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: libgl1-nvidia-alternatives-ia32 Use 'apt-get autoremove' to remove it. Recommended packages: libxvmcnvidia1:i386 The following packages will be REMOVED: libgl1-nvidia-glx-ia32 The following NEW packages will be installed: libgl1-nvidia-glx:i386

Try again:
wine ~/.wine/drive_c/Program\ Files/Blender\ Foundation/Blender/blender.exe

It works!

Note that this means that you can run Facio 17.1.1 on Wine as well (it's an unofficial GUI for e.g. GAMESS US/WinGAMESS, Firefly, etc.)

22 May 2013

428. system-config-kickstart on debian

Don't know much about kickstart, but you can compile the redhat tool using the Canonical-patched sources. This is in response to this post: http://forums.debian.net/viewtopic.php?f=17&t=104286

Note that:
1. The Debian way to create pre-configured installations is using Preseed
2. Debian has python-pykickstart for those who want kickstart.
3. I haven't tested system-config-kickstart beyond making sure that it runs

Dependencies and preparation:
sudo apt-get install build-essential gfortran checkinstall python-all-dev cdbs debhelper quilt intltool python-central rarian-compat pkg-config gnome-doc-utils samba python-libuser libuser1 python-glade2 console-setup hwdata python-apt
sudo apt-get install isoquery
mkdir ~/tmp
cd ~/tmp

localechooser
cd ~/tmp
wget http://archive.ubuntu.com/ubuntu/pool/main/l/localechooser/localechooser_2.49ubuntu4.tar.gz
tar xvf localechooser_2.49ubuntu4.tar.gz
cd localechooser/
dpkg-buildpackage -uc -us
sudo dpkg -i ../localechooser-data_2.49ubuntu4_all.deb 

system-config-kickstart
cd ~/tmp
wget http://archive.ubuntu.com/ubuntu/pool/main/s/system-config-kickstart/system-config-kickstart_2.5.20.orig.tar.gz
tar xvf system-config-kickstart_2.5.20.orig.tar.gz
wget http://archive.ubuntu.com/ubuntu/pool/main/s/system-config-kickstart/system-config-kickstart_2.5.20-0ubuntu22.diff.gz
gunzip system-config-kickstart_2.5.20-0ubuntu22.diff.gz
patch -p0 < system-config-kickstart_2.5.20-0ubuntu22.diff
cd system-config-kickstart-2.5.20/
dpkg-buildpackage -uc -us
sudo apt-get install ../system-config-kickstart_2.5.20-0ubuntu22_all.deb

Edit line 46 in /usr/share/system-config-kickstart/packageGroupList.py
availparse = apt_pkg.TagFile(availfile)

ParseTagFile is deprecated in Debian, so you'll need to do a bit of impromptu patching:
sudo sed -i 's/ParseTagFile/TagFile/g' /usr/share/system-config-kickstart/*.py
sudo sed -i 's/availparse.Step/availparse.step/g' /usr/share/system-config-kickstart/*.py
sudo sed -i 's/availparse.Section/availparse.section/g' /usr/share/system-config-kickstart/*.py

Then start with
gksu system-config-kickstart

21 May 2013

427. Very Briefly: encfs on windows (XP, Vista)

I'm using encfs to encrypt files in dropbox -- and it turns out that I'm not the only one. In fact, I'm a late-comer to this apparently.

I've just installed Windows on physical hardware for the first time in a couple of years -- I figured I should learn more about this experimental, unstable OS that a lot of people have been talking about. I hear that it's not even based on linux, and that their leader isn't Torvalds (it's some guy called Gates, apparently). It looks pretty slick actually, but their software management model leaves a lot to desired (you have to use your browser to download software and there's no way of keeping track of security updates for anything other than the core OS). I also haven't figure out how to switch to any of the other virtual desktops/workspaces.

Whatever. The FOSS connection lies in the use of Dokan and encfs4win.

Anyway, to get encfs up and running on Windows, go to http://dokan-dev.net/wp-content/uploads/DokanInstall_0.6.0.exe and install

Then go to http://members.ferrara.linux.it/freddy77/encfs.html and download encfs.zip

I dragged the entire encfs4win folder to Program Files. Start encfsw. A notification icon (shaped like a key) should show up in the task tray. Left-click on it, select Preferences and set to Launch at Startup.

To mount an existing encrypted directory, or to create a new one, left-click, select Open/Create and follow the instructions. Simple.