Thursday, August 28, 2008
Install various linux partition on USB drive
If you want to bring your favorite Linux distro with you, why don't you prepare a USB stick ? UNetBootin will do it for you. There are a windows version and a linux version. Check it out : http://unetbootin.sourceforge.net/
Friday, July 18, 2008
Taking control on a PC stuck at GDM
Have you ever been in the situation where you PC at work have rebooted and is now sitting at the GDM display waiting for you to enter a username and password ? Well this happened few times to me. The solution is rather simple. You only need to have an ssh access to your PC.
1 ) Logon to your PC using your ssh access.
2 ) install (if not already there) x11vnc : sudo apt-get install x11vnc
3 ) The tricky part is that gdm using a different xauth file than X11 server. So you need to find out which and where this file is. A simple ps -ef | grep gdm will give you the answer :
The part you need is : -auth /var/lib/gdm/:0.Xauth
4 ) then you launch x11vnc with this argument. I usually use root :
jboismar-desktop ~ # x11vnc -auth /var/lib/gdm/:0.Xauth
The last lines should look like this :
18/07/2008 11:35:18 WARNING: the warning message printed above for more info.
18/07/2008 11:35:18
The VNC desktop is: jboismar-desktop:0
PORT=5900
******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?
The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval. It should work with any VNC viewer. Try it by running:
x11vnc -ncache 10 ...
more info: http://www.karlrunge.com/x11vnc/#faq-client-caching
5 ) You can then run a vnc client to access your remote screen. Once you login, GDM will terminate to start the X server. Your x11vnc program will also terminate at this point.
1 ) Logon to your PC using your ssh access.
2 ) install (if not already there) x11vnc : sudo apt-get install x11vnc
3 ) The tricky part is that gdm using a different xauth file than X11 server. So you need to find out which and where this file is. A simple ps -ef | grep gdm will give you the answer :
jboismar-desktop ~ # ps -ef | grep gdm root 5683 1 0 11:12 ? 00:00:00 gdm root 5684 5683 0 11:12 ? 00:00:00 gdm root 6300 5684 0 11:31 tty7 00:00:00 /usr/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7 gdm 6313 5684 0 11:31 ? 00:00:01 /usr/lib/gdm/gdmgreeter root 6320 5726 0 11:33 pts/0 00:00:00 grep --colour=auto gdm |
The part you need is : -auth /var/lib/gdm/:0.Xauth
4 ) then you launch x11vnc with this argument. I usually use root :
jboismar-desktop ~ # x11vnc -auth /var/lib/gdm/:0.Xauth
The last lines should look like this :
18/07/2008 11:35:18 WARNING: the warning message printed above for more info.
18/07/2008 11:35:18
The VNC desktop is: jboismar-desktop:0
PORT=5900
******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?
The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval. It should work with any VNC viewer. Try it by running:
x11vnc -ncache 10 ...
more info: http://www.karlrunge.com/x11vnc/#faq-client-caching
5 ) You can then run a vnc client to access your remote screen. Once you login, GDM will terminate to start the X server. Your x11vnc program will also terminate at this point.
Tuesday, July 15, 2008
Compiling Synergy on Ubuntu 8.04
I'm using a lot synergy at work to use one keyboard/mouse to control my laptop and my desktop. It's a wonderfull software. Unfortunately, it is buggy in Ubuntu 8.04. So I decided to re-compile and see if it is any better.
First, you need to get the latest cvs tree :
cvs -z3 -d:pserver:anonymous@synergy2.cvs.sourceforge.net:/cvsroot/synergy2 co -P synergy
now, go to synergy/src directory and try a ./configure. In my case it ended up like this :
checking for X... no
checking for XTestQueryExtension in -lXtst... no
configure: error: You must have the XTest library to build synergy
After googling everywhere, I finally found this page. So, to get the XTest library, we do :
sudo apt-get install libxtst-dev
Then we need to specify where synergy can get the X include and library files :
./configure -x-includes /usr/include -x-libraries /usr/lib --prefix=/usr
and voila ! The configure process should now be happy. You can then make and make install.
First, you need to get the latest cvs tree :
cvs -z3 -d:pserver:anonymous@synergy2.cvs.sourceforge.net:/cvsroot/synergy2 co -P synergy
now, go to synergy/src directory and try a ./configure. In my case it ended up like this :
checking for X... no
checking for XTestQueryExtension in -lXtst... no
configure: error: You must have the XTest library to build synergy
After googling everywhere, I finally found this page. So, to get the XTest library, we do :
sudo apt-get install libxtst-dev
Then we need to specify where synergy can get the X include and library files :
./configure -x-includes /usr/include -x-libraries /usr/lib --prefix=/usr
and voila ! The configure process should now be happy. You can then make and make install.
Tuesday, June 17, 2008
Determining version of Solaris
Ever wonder if you are running Solaris 32 or 64 bits ? You can find out with isainfo command.
[root@xxxxxx:/root]
#isainfo
sparcv9 sparc
sparcv9 means you are running 64bits version of the OS. To make sure, use :
#isainfo -b
64
This gives you the name of the instruction set(s) used by the operating system kernel components such as device drivers and STREAMS modules.
This command also gives you if your system runs 32 and 64 bits apps :
#isainfo -v
64-bit sparcv9 applications
32-bit sparc applications
[root@xxxxxx:/root]
#isainfo
sparcv9 sparc
sparcv9 means you are running 64bits version of the OS. To make sure, use :
#isainfo -b
64
This gives you the name of the instruction set(s) used by the operating system kernel components such as device drivers and STREAMS modules.
This command also gives you if your system runs 32 and 64 bits apps :
#isainfo -v
64-bit sparcv9 applications
32-bit sparc applications
Wednesday, May 21, 2008
Directory diff
Bridged networking in Ubuntu with VirtualBox
I got so frustrated with the installation of vmware on linux ( having to apply the any any patch + editing files.... ) that I decided to try VirtualBox. What a surprise ! I found a very mature virtualization software. The installation went smoothly and the gui is very simple yet efficient.
The only drawback is the networking part. Basically VirtualBox is fine if one wants to run a VM with any OS to access internet. But if you want to create VMs and use them to host network services like Web servers, mysql servers and so forth, then the default network mode NAT will not let you do that.
You want to setup host networking ( or bridged networking ). Here is how I did it on Ubuntu 8.04 and VirtualBox 1.6.
Note : This is actually from the user documentation of VirtualBox page 75, chapter 6.7.1.1.
First you installed the bridge utilities :
sudo apt-get install bridge-utils
Then you define the bridge by adding the following section to /etc/network/interfaces :
auto br0
iface br0 inet dhcp
bridge_ports eth0
And restart the network :
sudo /etc/init.d/networking restart
You define a virtual interface using the VirtualBox tools :
sudo VBoxAddIF vbox0 br0
Here is the user running VirtualBox ( the one you logged in with in your ubuntu/gnome session ).
You're done with the command line configuration.
To tell VirtualBox to use the interface, select the virtual machine which is to use it in the main window of the VirtualBox application, configure one of its network adapters to use Host Interface Networking (using “Settings”, “Network”, “Attached to”) and enter vbox0 into the “Interface name” field. You can only use a given interface (vbox0, vbox1 and so on) with a single virtual network adapter.
The only drawback is the networking part. Basically VirtualBox is fine if one wants to run a VM with any OS to access internet. But if you want to create VMs and use them to host network services like Web servers, mysql servers and so forth, then the default network mode NAT will not let you do that.
You want to setup host networking ( or bridged networking ). Here is how I did it on Ubuntu 8.04 and VirtualBox 1.6.
Note : This is actually from the user documentation of VirtualBox page 75, chapter 6.7.1.1.
First you installed the bridge utilities :
sudo apt-get install bridge-utils
Then you define the bridge by adding the following section to /etc/network/interfaces :
auto br0
iface br0 inet dhcp
bridge_ports eth0
And restart the network :
sudo /etc/init.d/networking restart
You define a virtual interface using the VirtualBox tools :
sudo VBoxAddIF vbox0
Here
You're done with the command line configuration.
To tell VirtualBox to use the interface, select the virtual machine which is to use it in the main window of the VirtualBox application, configure one of its network adapters to use Host Interface Networking (using “Settings”, “Network”, “Attached to”) and enter vbox0 into the “Interface name” field. You can only use a given interface (vbox0, vbox1 and so on) with a single virtual network adapter.
Saturday, May 3, 2008
View directory tree and disk usage in Windows

I know this isn't a unix software but it is similar to Kdiskview ! I missed so much this kind of tools when trying to find where windows disk space has gone. And I must say, this freeware is very well made. Congrats to the developers !!! here is their website.
Subscribe to:
Posts (Atom)
