Friday, June 29, 2007

Google Earth with XGL

Download google earth for Linux here

Install google earth with this command :
chmod +x GoogleEarthLinux.bin
./GoogleEarthLinux.bin

Execute google earth with this command :
DISPLAY=:0 googleearth

I tried xnest but so far not successful :

Xnest -ac -terminate -geometry 1024x748+0+0 :3 &
DISPLAY=:3 googleearth &

Thursday, June 28, 2007

Google Desktop Linux (gdlinux)

Download the gdlinux beta here

After it is installed, type : gdlinux to activate it.

GDLinux icon will be shown on the top panel like this :

Google Desktop Preferences
Before you could use gdlinux, you have to setup which folders should be indexed. Do not index all data on your hard disk, because indexing process is very slow, and indexes also take up some space (usually maximum is 10% of all your data).

In my case, I only put one folder : /home/thartono/data/shared to be indexed.

This folder is shared between my Linux system and the Windows XP VM (seen as drive z:).

Google Desktop and SeamlessRDP
One main benefit of this setup is that I could make a seamlessrdp script, so if I search for a file, for example "My Network Proposal.vsd" then I could just click on the file, and voila a Visio screen will pop up opening that vsd file (see picture below) :



Below is sample of the visio script file :

#!/bin/bash
echo rdesktop -A -s "'"c:\\seamlessrdp\\seamlessrdpshell.exe C:\\Program Files\\Microsoft Office\\visio11\\visio.exe \"$@\""'" thartono-wxp:3389 -u thartono -p xxxxxx >~/Desktop/rdesktop.cmd.txt
cat ~/Desktop/rdesktop.cmd.txt | sed "s_/_\\\_g" | sed "s_\\\home\\\thartono\\\data\\\shared_z:_g" |sh
rm ~/Desktop/rdesktop.cmd.txt

I know, my script looks messy, but it works for me..... :P

Saturday, June 23, 2007

Login using ThinkFinger

Modify the file /etc/pam.d/common-auth

#
# /etc/pam.d/common-auth - authentication settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authentication modules that define
# the central authentication scheme for use on the system
# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
# traditional Unix authentication mechanisms.
#
# thartono-original (below)
#auth required pam_unix.so nullok_secure

auth sufficient pam_thinkfinger.so
auth required pam_unix.so try_first_pass nullok_secure


#Add your fingerprint in the known fingerprint database
sudo tf-tool --add-user thartono

Now you could login using your userid and swipe your finger !

ThinkFinger Installation on Ubuntu Feisty Fawn

My PC (Lenovo T60) has a built in finger scan reader below the down arrow :


I want to be able to login using my fingerprint - so below what I did :

Download latest ThinkFinger (latest version was 0.3) to the Desktop :
http://sourceforge.net/project/showfiles.php?group_id=179573

# Install Prerequisite
sudo apt-get install build-essential libtool libusb-dev libpam0g-dev

# Extract
tar -xvf thinkfinger-0.3.tar.gz
cd thinkfinger-0.3
sudo mkdir /etc/pam_thinkfinger
./configure --with-securedir=/lib/security --with-birdir=/etc/pam_thinkfinger
make
sudo make install


#Acquire the fingerprint with the command
sudo tf-tool --acquire

#Test your fingerprint
sudo tf-tool --verify
Reference :
https://wiki.ubuntu.com/ThinkFinger?highlight=%28thinkfinger%29

Cisco VPNClient in Ubuntu Feisty Fawn

Ubuntu Feisty Fawn use Linux kernel version 2.6.20. This version is new, and unfortunately is not supported by Cisco VPNclient. However, there is a patch for Cisco VPNclient, so it can be compiled successfully for Feisty Fawn.

# change directory to Desktop
cd ~/Desktop

# download Cisco VPNclient (latest version)
wget ftp://ftp.cs.cornell.edu/pub/rvr/upload/vpnclient-linux-4.8.00.0490-k9.tar.gz

# download patch (latest version)
wget http://tuxx-home.at/projects/cisco-vpnclient/vpnclient-linux-2.6.22.diff

# extract vpnclient
tar -zxvf vpnclient-linux-4.8.00.0490-k9.tar.gz

# apply patch
cd vpnclient
cp ../vpnclient-linux-2.6.22.diff .
patch < vpnclient-linux-2.6.22.diff

# install patched vpnclient
sudo ./vpn_install

# start vpnclient
sudo /etc/init.d/vpnclient_init start

Next steps :
If you already have *.pcf files, then copy all *.pcf files into /etc/opt/cisco-vpnclient/Profiles/

To start the VPNclient session, then you could open gnome terminal and type the following command :

vpnstart connect MyProfile

NOTE
After vpnclient started, then I can't open rdesktop session to my XP VM. However, I can access the samba shared from the XP VM (via console). Weird.... (I'll troubleshoot it later when I have time).

Monday, June 18, 2007

Video Wallpaper


I created the following script to make video file as wallpaper :

thartono@thartono-linux:~$ more coba
killall xwinwrap
xwinwrap -ni -o 0.6 -fs -s -sp -st -b -nf -- mplayer -loop 0 -wid WID "/home/thartono/data/video/human network/Human_Network_Anthem_New_End_30.mpg"

Sunday, June 17, 2007

Seamless RDP vs normal RDesktop (non-seamless)

Just a small note - If your Window Manager crashed (or accidentally closed) while you are working with some Windows XP program, then :
  • If you were using seamlessrdp then you can not recover your session after you relogin (may be there is a way, but I don't know yet - appreciate any information if you know how to recover the hanging session)
  • Else if you were using normal rdesktop session (without seamlessrdp) then you will be able to recover your windows XP session without any data lost

Seamless RDP to XP inside Ubuntu Feisty Fawn

Seamless RDP (Remote Desktop) is easy. Just install seamlessrdp at the XP Guest OS and then connect to XP VMware using by script (i.e. visio).

Below is an example to open visio application by typing "visio". Create "visio" script file in ~/bin :

Visio
#!/bin/bash
rdesktop -A -s "c:\seamlessrdp\seamlessrdpshell.exe C:\Program Files\Microsoft Office\visio11\visio.exe" thartono-wxp:3389 -u thartono -p MYPASSWORD

Other window could be opened as well (i.e. PowerPoint, WinWord, etc.) by similar command, just modify the above script.

Below is a screen capture displaying Microsoft Visio, Office and Internet Explorer. You could resize the window, make it full screen, or copy and paste between application.

Some script to Shutdown and Start RDesktop XP VM session

Today I created customized shutdown script :
- check the XP VMware , if it is running, change it to suspend
- continue poweroff

The scripts are put in the /usr/local/sbin :
- vmxp -> check vm status
- xp -> start xp vm if not running, and launch rdesktop if already running
- matiin -> to shutdown vm and poweroff host

Content of the script :

vmxp
#!/bin/bash
if [ $# == 0 ]
then
vmware-cmd /home/thartono/data/vmware/Windows\ XP\ Professional.vmx getstate
else
vmware-cmd /home/thartono/data/vmware/Windows\ XP\ Professional.vmx $1
fi
xp
#!/bin/bash

VMSTATE=$(vmxp getstate | awk '{print $3}' )

if [ "$1" == "off" ] && [ "$VMSTATE" == "on" ]
then
echo "Suspending VM"
vmxp suspend

else

if [ "$VMSTATE" == 'off' ]
then
echo VM is off, now starting VM
vmxp start

elif [ "$VMSTATE" == "suspended" ]
then
echo VM is suspended, now starting VM
vmxp start

elif [ "$VMSTATE" == "on" ]
then
echo VM is on - starting Remote Desktop
rdesktop -D -K -g 1024x768 -a 16 192.168.207.129 -u thartono -p MYPASSWORD
fi
fi
matiin
#!/bin/bash
xp off
poweroff

Then we could create 2x GNOME Launcher with the following commands :
1. Power Off
sudo matiin # to shutdown vm and poweroff laptop


2. Start Remote Desktop

xp # to autopoweron XP VM, and open remote desktop session to the XP VM


Saturday, June 16, 2007

Use xwinwrap to make video or screensaver as Wallpaper

Getting tired with static wallpaper ?

Xwinwrap could be used easily to make a video file or screensaver as your wallpaper. See below my screenshot using glmatrix screensaver as wallpaper :



Install xwinwrap then issue this command :

xwinwrap -ni -argb -fs -s -st -sp -b -nf -- /usr/lib/xscreensaver/glmatrix -window-id WID

There is also a good script to toggle wallpaper from this site

Use xnest to make VM window wobble with Beryl

I just find a cool way to make my VM window integrates better with Beryl. See the picture below, I could bend or do any Beryl effect on my PowerPoint (running on XP on VMware Server) easily :

Just follow easy step by step from this site.

My screen size is 1024x768, so I modified the rdeskwrapper into :

#!/bin/bash
Xnest -ac -terminate -geometry 1024x748+0+0 :3 &
DISPLAY=:3 rdesktop -a 24 -f $1 &

Create shared folder for VM

Based on my testing, SAMBA still the most stable way to create shared folder between host (linux) and guest os (microsoft windows XP). If you are not careful, the SAMBA shared folder will form a security hole, where other people could enter your shared folder also from remote (as long as they know your ip address). Edit your SAMBA configuration so only your VM could connect to your shared folder (without password), but other people will be blocked.

edit /etc/samba/smb.conf so it looks like this :

[global]
workgroup = MSHOME
netbios name = THARTONO-LINUX
security = share
auth methods = guest
domain master = No
wins support = no
hosts allow = 127.0.0.1 #--> only my VM could connect
hosts deny = 0.0.0.0/0 #--> other people could not connect
#
[shared]
path = /home/thartono/data/shared
comment = read write
available = yes
browsable = yes
public = yes
writable = yes

Banshee the iTunes for Linux

If you are looking for iTunes software for Linux, you wont find any (at least today). But Banshee with appropriate codecs could replace iTunes completely.

Banshee is better
  1. Banshee bypass iPod song protection, so you could savely connect any iPod using USB to your laptop/PC without worry that the song inside the iPod will be overwriten by Banshee.
  2. iPod will also look like an external USB flash drive, so you could copy/put any files (song or other type of file) inside iPod
Apple AAC support
You could install the following codec to be able to play AAC, MP3 etc :

#install banshee
#gstreamer - for playing MP3 files
#gstreamer0.10-plugins-bad-multiverse
#gstreamer0.10-plugins-bad
#gstreamer0.8-faad.
#gstreamer0.10-ffmeg - mpeg, mpeg4, ac3, wmv, and asf
#gstreamer0.10.5-0ubuntu2 (gstreamer0.10-plugins-ugly) - play DVD

sudo apt-get install banshee gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-x gstreamer0.8-faad

Install XP and Vista Fonts on Linux

One reason why Microsoft Powerpoint looks much nicer on screen compared to OpenOffice.Org Impress because Powerpoint use Microsoft proprietary TTFs (true type font).

We could actually copy all Microsoft TTF into our Linux system easily. Just copy all *.TTF file from XP or Vista, and put it into ~/.fonts , and then type fc-cache .

Create .fonts Directory
Make sure that you have .fonts directory at home. If you dont have one, create it :

mkdir ~/.fonts

Obtaining Microsoft Windows XP Fonts
Since I have XP (running in VMware) I could simply cd to c:\windows\font and copy all *.ttf to a shared folder (via SAMBA) then have them copied into ~/.fonts

Obtaining Microsoft Windows Vista Fonts

I dont have Vista, but follow the following procedure to obtain Vista true type fonts :

wget http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe
sudo apt-get install cabextract
cabextract PowerPointViewer.exe
cabextract ppviewer.cab

Then copy all *.ttf into ~/.fonts

Update Fonts Cache
Just issue fc-cache to use all new fonts stored at ~/.fonts

fc-cache

Benefit
One main benefit of using Microsoft TTF is that we could open almost every PPT (powerpoint) files using OpenOffice, and display it without error on the formatting.

Internet Explorer for Linux

My favorite browser is firefox. However, sometime firefox can not display web page correctly for a certain web page that was written specifically for Internet Explorer.

If you need Internet Explorer to run on a Linux platform you could install ies4linux.

sudo apt-get install wine cabextract
wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux

More info on ies4linux :
http://www.tatanka.com.br/ies4linux/page/Main_Page

Download accelerator for Linux

Wget Problem
I rarely could download large ISO files continuously. I often stop and restart download many times (due to limited internet connection at my home). I used wget to download them, because wget is very convenience, it's a command line based, and easy to be scripted. However about 20% of downloaded files are unusable, either the MD5sum was wrong, or wget does not know when to stop (once I downloaded an CD ISO file, and the wget did not stop even after the downloaded file almost 1GByte in size).

Multiget
I replaced wget with multiget (thanks to Bagus who informed me about this software). Multiget is GUI based, very fast, and so far (tried with CD and DVD ISO images) works very well and the MD5 always correct.

Multiget homepage is here : http://multiget.sourceforge.net/

Sametime for GAIM

Gaim could be used to support not only Yahoo Messenger, but also Sametime Connect at the same time. Sametime support is not installed by default, follow the following procedure to enable sametime support :

#install meanwhile
apt-cache search meanwhile
sudo apt-get install libmeanwhile1
#install gaim
sudo apt-get install gaim

Now you can add new account with sametime protocol !

Enable Win (Super) Key

My Win (Super) key was not enabled by a default Ubuntu Feisty installation. To enable the Win key add XKbOptions below the InputDevice on /etc/X11/xorg.conf

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
Option "XkbOptions" "altwin:super_win"
EndSection

Disable Shift Backspace

I was typing fast when suddenly my X11 was closed. It happened several times when my fingers near the bottom left (shift, control, etc.) and upper right (backspace). It turns out that the key combination " shift backspace " reset my X11 (similar with control alt backspace combination).

To avoid this create ~/.Xmodmap that contains the following :
keycode 22 = BackSpace BackSpace

Thursday, June 14, 2007

VMware Server still running even though the GUI crashed

Some reasons why VMware Server is much more reliable compared to VMware Player (or VirtualBox.....) :
  1. VMware Server supports Command Line. You could do anything (i.e. start, suspend, etc.) with your VM from console only (without GUI) using vmware-cmd command. If you need VM when playing around with some new GUI application, it's good to start the VMware server using CLI only (from control-alt-F1 for example....)
  2. If your GUI crashed (i.e. because you press control-alt-backspace by accident, or by a bug in software), as long as your Linux still running, you will not loose your VM session. When you login again to your GUI, and try to start the rdesktop session you will see this pop up :

Just select your last session, and you're done.

Wednesday, June 13, 2007

VMware Server for Seamless Desktop switching between Linux and Windows XP

Why VMware Server ?
I tried seamless desktop switching using VMware Player, but the player need "hostonly" connection, which prevent connection to the Internet via the guest OS (required when we need to browse using Internet Explorer, for example).

VMware is FREE and could be downloaded here

VMware Server is heavier than VMware Player, but on a T60 laptop, the Windows XP Professional guest OS performance is more than enough for me (I am using FAT file system instead of NTFS).

Install VMware Server on Ubuntu Feisty Fawn
Ubuntu Feisty Fawn is not supported by VMware Server, but you could follow a good tutorial how to patch VMware server here.

Patch Windows XP to Support Many User Login
Follow this link to get the patch to enable many terminal server users.

Note : install rar first to extract the files :
sudo apt-get install rar

Follow the instruction inside the rar files.

Screen Capture
Below is a screen capture showing Microsoft Outlook 2003, Powerpoint, and Visio applications running on separate screen on Beryl :

The applications also integrates very well with Beryl Cube :



Create Application Launcher
You could create GNOME application launcher using the following command :

rdesktop -D -K -g 1024x768 -a 16 -u -p

mine is (just for example) :
rdesktop -D -K -g 1024x768 -a 16 192.168.207.129 -u thartono -p mypassword

Up until this step, I am already satisfied with the result, but if you want to go further, you could
follow this link.

Monday, June 11, 2007

VMWare Player 2.0 vs VirtualBox 1.4 on Ubuntu Feisty Fawn

I am using Ubuntu Feisty Fawn as the only OS in my PC. However, I need to run Microsoft Outlook, Visio, and PowerPoint. These applications runs best on Windows XP, that's why I need to run Windows XP on a virtual machine.

There are some virtualization software that runs on Ubuntu, but I tried only two of them (based on popularity) : VMware vs VirtualBox.

Today the latest version of VMware Player is version 2.0, and VirtualBox is version 1.4.

Area where VMware Player Win
VMware Player is slower compared to VirtualBox, but in my laptop (Lenovo T60) the VMware always runs smoothly and never crashed, not even once. Using the same testing, VirtualBox always crashed within several hours.

My testing is running Microsoft Powerpoint Show with random transition effect, clicked automatically (every second), and repeated non-stop. Beryl is active with full effect (cube rotation, 'expose' effect, transparency, etc.).

I did that testing, simply to simulate my presentation in front of public, and I don't want my XP guest OS is crashed in the middle of presentation.

Area where VirtualBox Wins
VirtualBox is much faster, perfect integration with Beryl (every Beryl effect could be triggered regardless of mouse position), perfect full-screen mode (no workaround such as hiding window frame), and much easier to install new guest os (VMware player need some tricks to do this).

Conclusion
VirtualBox is good and practical for playing, while VMware is perfect for my job. Even though VMware slower and have some annoying limitation.