Showing posts with label vmware player. Show all posts
Showing posts with label vmware player. Show all posts

2012-03-13

VMware Player & USB



While on the go, I use an HUAWEI Mobile Broadband E1692 HSDPA USB Stick for 3G connection.
After some time that I wasn't using it, it stopped working. No error messages, it just won't get recognized any more in the USB devices. Nothing at all, not even an unknown device, just as if it wasn't even plugged in.

After some fiddling I recalled that I had installed VMware Player. Just as I removed it, the USB stick returned to life.

Note that I wasn't using it in a VM, but directly on the host. And there weren't any VMs running nor the player itself running.

I suspect, as the player can redirect USB ports to the VMs, that some kind of USB device filter was installed by the player that prevented the USB stick to be seen by the host OS. It seems to have affected only that particular stick, as other USB devices were running as usual.

2011-09-19

An alternative to Xming: an X Window virtual appliance

sometimes Xming misbehave connecting to some machines, so i devised a way to use a real, native, X server on a windows desktop.

install VMware player and create a new VM with the following parameters:
128MB
1CPU
5GB HD
NAT networking

i used Red Hat 5, but other linux distribution will do: just make sure you choose one that supports Unity (seamless integration of VM windows on the Windows host desktop).
install only the base X, and do not select any graphic desktop.

after base OS install, add the packages that are needed to support graphics connections:

yum install gnome-terminal
yum install *metacity*
yum install gnome-themes
yum install gnome-session

make sure VMware tools are installed by now
edit Xclients to make sure a terminal is spawned at startup

#vi /etc/X11/xinit/Xclients

change the bottom of the file to look like this:

# Argh! Nothing good is installed. Fall back to twm
{
    # gosh, neither fvwm95 nor fvwm2 is available;
    # fall back to failsafe settings
    [ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45'

#    if [ -x /usr/bin/xclock ] ; then
#       /usr/bin/xclock -geometry 100x100-5+5 &
#    elif [ -x /usr/bin/xclock ] ; then
#       /usr/bin/xclock -geometry 100x100-5+5 &
#    fi
#    if [ -x /usr/bin/xterm ] ; then
#        /usr/bin/xterm -geometry 80x50-50+150 &
#    fi
#    if [ -x /usr/bin/firefox -a -f /usr/share/doc/HTML/index.html ]; then
#       /usr/bin/firefox /usr/share/doc/HTML/index.html &
#    fi
    if [ -x /usr/bin/metacity ] ; then
        /usr/bin/gnome-terminal &
        exec /usr/bin/metacity
    fi
    if [ -x /usr/bin/twm ] ; then
        exec /usr/bin/twm
    fi
}


add an unprivileged user

#useradd user

enable it to sudo

#visudo

add this line at the end of file

user    ALL=(ALL)       NOPASSWD: ALL

set autologon to user

#vi /etc/gdm/custom.conf

in the [deamon] section add the following lines

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=user


now it's time to trim down the VM by stripping all the unneeded packages:

yum remove yum-updates ypbind wpa_supplicant wdaemon
yum erase xinetd yum-updatesd
yum erase vnc-server
yum erase openssh-server smart* sendmail*
yum erase system-config-*
yum erase nfs*
yum erase cyrus-sasl
yum erase rhnsd
yum erase readahead*
yum erase iputils
yum erase portmap pcsc* bluez*
yum erase anacron
yum erase atd
yum erase audit
yum erase cups
yum erase dnsmasq
yum erase iptables*
yum erase krb5*
yum erase krb5-wo*
yum erase mcstrans
yum erase ntp psacct
yum erase irda*

and switch off what we can't remove

chkconfig atd off
chkconfig avahi-daemon off
chkconfig avahi-dnsconfd off
chkconfig gpm off
chkconfig mcstrans off
chkconfig netfs off
chkconfig restorecond off

create a windows shortcut to start your VM in Unity mode like this:



put a "-U" before the pathname of your vmx file: that will cause the VM to startup in Unity mode.
Launching that shortcut will open a gnome terminal right on your desktop.
From there you can connect to other machines with

ssh -X l user remotehost

and then run any graphic application alongside other windows applications on your desktop.