Monday, October 11, 2010

x11vnc

I finally gave up trying to start vino on my remote linux box after numerous failures. The new VNC server I use now is x11vnc. The command is simply:

x11vnc -rfbauth ~/.vnc/passwd -bg -forever -display :0

"-rfbauth ~/.vnc/passwd" specifies the passwd file, "-bg" lets the server run in the background, and "-forever" keeps the server running forever (versus "-once" which stops the server after the viewer exits).

To store the password file, use

x11vnc -storepasswd PATH

and the prompt will ask you to input the password and confirm it. The default path for the file is ~/.vnc/passwd.

Two independent problems:

  • On one of my linux box the shift key is disabled somehow. I found the following post which is very helpful (http://www.openg.info/tag/x11vnc-enable-shift-key). It suggested adding "-nomodtweak" which worked!
  • On the other one I had the problem via ssh that x11vnc failed to start ":0" and it suggested me using "XAUTHLOCALHOSTNAME=localhost" which didn't help. But it worked fine if I started x11vnc directly on the box. It turned out that x11vnc couldn't find the .Xauthority file which was put in a weird place. All I needed to do was to type "x11vnc -findauth" on the box and use the output location when connecting via ssh. "x11vnc -auth XAUTHORITYPATH ...". Bravo!
  • x11vnc has a GUI that makes changing the setting easier. To open the GUI, type

    x11vnc -gui connect

    It takes effect immediately for the running sessions. Common options include "-share" (whether multiple viewers are allowed for the same session), "-norepeat" (no repeating of a key when pressed for an extended time) and etc.

Tuesday, April 6, 2010

Change names of multiple files in a shell

Example: change all files whose name starts with "kIM" to "kIM_partial" with the same file type (.doc->.doc, .mat->.mat)

1. ls kIM* > namelist
2. cat namelist | awk '{c=split($0, s, "."); print "mv "$0" "s[1]"_partial."s[2]""}' | sh

Monday, February 8, 2010

Start VNC server from command line

$ssh user@server
$DISPLAY=:0.0 /usr/lib/vino/vino-server&

Friday, January 1, 2010

Acer GameZone trick

Go to the installed path and click on the .exe files of the games to play. No time restriction. They are "green" programs, so you can make a copy of the whole folder, and uninstall them from the control panel.

Windows activation after upgrading harddrive or migration

If the online activation doesn't work, call MS to activate it by phone.

Chinese MUI for Windows XP

Can be easily found online. Also install the SP3 update, WMP MUI and IE8 MUI.

HP dv5t unknown device in Device manager in Windows 7

Install the HP smart protect software and it fixes the problem.