Wednesday, March 05, 2008

Problems installing vmplayer on Debian

I downloaded VMware-player-2.0.2-59824.i386.rpm and converted it with alien.


# alien VMware-player-2.0.2-59824.i386.rpm --scripts


I had installed it before, then removed it to install vmware-server (because vmware-server complained that installing it caused file conflicts with vmplayer) and later removed vmware-server again and reinstalled vmplayer.

The bits left behind by vmware-server seem to break it...
The nice thing would be to find them and remove them, but I found a workaround.

When I first tried to install the player again I got error messages from some of the install scripts:


dpkg: error processing vmwareplayer_2.0.2-59825_i386.deb (--install):
subprocess pre-installation script returned error exit status 1
/var/lib/dpkg/tmp.ci/postrm: line 25: [: abort-install: integer expression expected
Errors were encountered while processing:
vmwareplayer_2.0.2-59825_i386.deb


So I backed up the deb file and built a copy of it with no scripts using:


# alien VMware-player-2.0.2-59824.i386.rpm


(and renamed that vmwareplayer_2.0.2-59825_i386.deb.no_scripts)

I was able to install it, but when I tried to run the player I found more hangovers of having had vmware-server installed:


$ vmplayer
Unable to load image-loading module: /build/mts/release/bora-59824/bora/build/release/ws/vmui/../libdir/libconf/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: /build/mts/release/bora-59824/bora/build/release/ws/vmui/../libdir/libconf/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: cannot open shared object file: No such file or directory


I made sure it was there:


$ locate libpixbufloader-png.so
/usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so


Eventually I found the solution was to run:


# /usr/bin/vmware-config.pl


but... that failed:


# /usr/bin/vmware-config.pl
Making sure services for VMware Player are stopped.

sh: /etc/init.d/vmware: No such file or directory
sh: /etc/init.d/vmware: No such file or directory
Unable to stop services for VMware Player

Execution aborted.



OK, so fake it:

Make a copy of /etc/init.d/vmware containing:


#!/bin/bash

echo $1


then:


# chmod +x /etc/init.d/vmware


Now run the config again:


# /usr/bin/vmware-config.pl
Making sure services for VMware Player are stopped.

status
stop

Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the theme icons?
[/usr/share/icons]
...


and go through the rest of the config.

After this (if you have your correct compiler etc installed, you should find that vmplayer will start happily)

Once that works you will find you can now go back and over-install the copy of vmwareplayer_2.0.2-59825_i386.deb that DOES have scripts without it erroring, so you get your correct startup scripts etc...

Once you've reinstalled it you will again need to run


# /usr/bin/vmware-config.pl


one more time otherwise trying to run vmplayer will give you:


$ vmplayer
vmware is installed, but it has not been (correctly) configured
for this system. To (re-)configure it, invoke the following command:
/usr/bin/vmware-config.pl.

Tuesday, February 26, 2008

Overriding Recommends in aptitude install


> When I try and install powersaved using aptitude it wants to install a whole
lot of kde stuff and I don't use kde (I use fluxbox) - am I right in thinking
this could be triggered by a number of programs recommending rather than one
depending on them? - if so - can I ignore the recommendations?
<gsimmons> JohnGH: You can instruct aptitude to not treat recommendations as dependencies by supplying the -R option.
> gsimmons: thank you



# aptitude install powersaved
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
Building tag database... Done
The following NEW packages will be installed:
hdparm{a} kdelibs-data{a} kdelibs4c2a{a} kpowersave{a} libakode2{a} libarts1-akode{a} libarts1c2a{a}
libartsc0{a} libavahi-qt3-1{a} libdbus-qt-1-1c2{a} libjasper1{a} libmad0{a} libopenexr2ldbl{a}
libsamplerate0{a} libvorbisfile3{a} libxxf86misc1{a} menu-xdg{a} powersaved x11-xserver-utils{a}
0 packages upgraded, 19 newly installed, 0 to remove and 0 not upgraded.
Need to get 24.6MB of archives. After unpacking 74.6MB will be used.
Do you want to continue? [Y/n/?] - kpowersave
The following NEW packages will be installed:
hdparm{a} powersaved
The following packages are RECOMMENDED but will NOT be installed:
kpowersave
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 502kB of archives. After unpacking 2400kB will be used.
Do you want to continue? [Y/n/?]
Writing extended state information... Done
Get:1 http://ftp.us.debian.org lenny/main hdparm 7.7-1 [66.9kB]
Get:2 http://ftp.us.debian.org lenny/main powersaved 0.14.0-8 [435kB]
Fetched 502kB in 3s (135kB/s)
Selecting previously deselected package hdparm.
(Reading database ... 55225 files and directories currently installed.)
Unpacking hdparm (from .../archives/hdparm_7.7-1_i386.deb) ...
Selecting previously deselected package powersaved.
Unpacking powersaved (from .../powersaved_0.14.0-8_i386.deb) ...
Setting up hdparm (7.7-1) ...
Setting up powersaved (0.14.0-8) ...
Reloading system message bus config...done.
Starting power management daemon: powersaved.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done
Building tag database... Done

Thursday, February 21, 2008

How to set the default web browser in Evolution

After reading from:





And trying it out...:



Read existing settings (recursively):



$ gconftool-2 -R /desktop/gnome/url-handlers

Backup settings to a file in case you want to roll back:



$ gconftool-2 -R /desktop/gnome/url-handlers > ~/.gconf/desktop/gnome/url-handlers.default

Get existing setting and type:



$ gconftool-2 -T -g /desktop/gnome/url-handlers/http/command

Set new setting and type



$ gconftool-2 -t string -s /desktop/gnome/url-handlers/http/command "x-www-browser %s"


Check new setting and type



$ gconftool-2 -T -g /desktop/gnome/url-handlers/http/command

Set new setting and type for https



$ gconftool-2 -t string -s /desktop/gnome/url-handlers/https/command "x-www-browser %s"

Done - try clicking on a link now... :-)

Read/Write NTFS support

Just

# aptitude install ntfs-3g

and add something like:


/dev/sda1 /mnt/windows ntfs-3g uid=1000 0 0


to /etc/fstab

and you're done.

I've removed the old posts from 27/12/2004 and 06/08/2006 - this is much simpler and superceeds them.

Mounting VMWare vmdk files in Linux

http://www.jameslittle.me.uk/how-to-mount-vmdk-files-in-linux/

http://ubuntuforums.org/archive/index.php/t-154738.html

Where does the VMWare Player "Recent Virtual Machines" list live?

From
here:

The VMWare Player list of "Recent Virtual Machines" is stored in the file
[drive]:\Documents and Settings\[user]\Application Data\VMWare\preferences.ini



At the bottom of the file, there are entries like (where X is a sequential number):



pref.mruVMX.filename = "..."
pref.mruVMX.displayname = "..."


You can edit the entries here then save the file & start VMWare Player to see the changes. (VMWare Player saves its settings on exit, so will need to be closed before you make the changes, or they will be overwritten.)

Wednesday, February 20, 2008

grub error: /dev/sda does not have any corresponding BIOS drive

On an IBM Thinkpad T43 the Debian install refused to install grub or LILO.



When I tried to run it from the command line:



# grub-install hd0

it returned:



/dev/sda does not have any corresponding BIOS drive.



I tried changing the partition sizes so that they ended on cylinder boundaries - wondering if it was that - but it wasn't.



What I needed to do to fix it was to go into the BIOS settings and disable the legacy floppy support (I don't have a floppy drive, so don't use that)



The clue that tipped me off was lots of repeating errors in dmesg about fd0 each time I ran grub-install - and the fact that it would go away and wait for 10 or 15 minutes or more.



The things I had to do were:



# mkdir /boot/grub

# grub-install --no-floppy --recheck hd0

( this created /boot/grub/device.map )



# update-grub

(this created /boot/grub/menu.lst)

Monday, February 18, 2008

DIY VMWare Linux Image

Like using VMWare Player, but can't find the image you want, or they're too big to download quickly?

This is how to get a working Debian box in VMWare without burning a CD:

I found:

http://whiletrue.nl/blog/?p=61

and:

http://www.sqlservercentral.com/articles/Miscellaneous/useisoimageswithoutburningtodisk/1369/

All you need to do is download the blank VMX from:

http://www.mediafire.com/?bnvmhcghmw3


Which was originally from http://www.boonzaaijer.com/files/BlankVMX.zip
but I don't want to leech their bandwidth by hot linking - all of 4KB ;-)

Unzip it into a folder (I use C:\VMWare\BlankVMX here)

Download the ISO image you want to install from - I'm using the latest NetInst ISO image here:

http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/i386/iso-cd/

and save it (I save it as C:\VMWare\

Change the "Other Linux 2.6.x kernel.vmx" file:

Change the lines:

ide1:0.present = "TRUE"
ide1:0.fileName = "auto detect"
ide1:0.deviceType = "cdrom-raw"

To read something like:

ide1:0.present = "TRUE"
ide1:0.fileName = "C:\VMWare\debian-testing-i386-businesscard.iso"
ide1:0.deviceType = "cdrom-image"

Then run the .vmx file - it will boot and launch into your install image as if it had booted off a burned copy of the install CD.

Further reading:

http://www.linux.com/feature/54411

Monday, September 17, 2007

corkscrew (not screwdriver!)

I can't believe I didn't have a post about corkscrew already!

This is a great link:

http://www.mtu.net/~engstrom/ssh-proxy.php

install corkscrew via apt (synaptic/aptitude/apt-get whatever)

Edit your ~/.ssh/config file:


Host my.server my.other.server
    ProxyCommand corkscrew proxy.domain.com 8080 %h %p ~/.ssh/proxy_auth
    User remoteuser


in ~/.ssh/proxy_auth put:


username:password


It's a pain if you don't use the Host line because you have to comment the ProxyCommand line when you need to access a local machine (i.e. not through the proxy server)

Talking about proxies... a LONG time ago in another country (oots mon!) I used to use APS - I don't know if I'll need it again, but just in case, there it is.

Friday, September 14, 2007

VMware

I'm using the Debian Etch image from here with VMware Player

To get it to use a UK keyboard mapping I needed to do

loadkeys uk

for console, and

dpkg-reconfigure xserver-xorg
and/or
setxkbmap -layout "gb"

for X.

You also might need to start networking manually, and I exported my proxy details:


export http_proxy="http://proxy-server:port/"


Then ran synaptic - NICE - hadn't used it before.
Upgraded to a 686 kernel from the 486 one, stripped out all the gnome packages and put in fluxbox and wdm instead - it's much faster now.

I also did this

dhclient kept overwriting /etc/resolv.conf so I added this to /etc/dhcp/dhclient.conf


supersede domain-name-servers ns1-ip-address, ns2-ip-address;
supersede domain-name "domain.com";


as per one of the answers here: http://forums.debian.net/viewtopic.php?t=7239