Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Thursday, September 24, 2009

keep aventail vpn working after kernal upgrade

I made aventail vpn client working a while back, here is the note I made.
http://a-developers-notes.blogspot.com/2009/05/aventail-vpn-under-kubuntu-904-fixed.html


But after each kernel update, the client will break due to the new kernel comes with a newer version of the openssl library.

Luckily the aventail client is looking for a specific version of ssl library, 0.9.7 being specific. so it is easy to make it work again. Here are the scripts:

Voila, got vpn client again!

Tuesday, May 19, 2009

aventail vpn under k/ubuntu 9.04 fixed

Just fixed my vpn issue with kubuntu 9.04. Actually the solution is not limited to k/ubuntu, google results showed that several other distros have the same issue too.

The symptom: through the web client, I am able to login, get web access, then get web and client/server access, but the Aventail OnDemand Tunnel shows status error, without any details. Or in the binary console client, you got DoHandShake Failed message.

Ben Smith got a great post
which eventually helped me solve my issue. Several points to watch out:

  1. Most importantly, try to compile different versions of openssl if one version didn't work, not necessarily a newer version. I started with 0.9.8g, then tried 0.9.8k without luck, then tried 0.9.8i and it worked. Dont ask why becuase it's way over my head.
  2. Make sure your aventail binary client's version matches your vpn server's version
Hat off to Ben, :)

Thursday, May 29, 2008

screen resolution for k/ubuntu 8.0.4 hardy heron running on virtualbox

Just fixed a resolution issue for my ubuntu hardy heron guest system running in virtual box (host is kubuntu 8.0.4). The solution is based on this thread.

There are two things I changed in xorg.conf to make it work:

  1. find the video driver device second and add Driver "vboxvideo". see following:
    Section "Device"
    Identifier "Configured Video Device"
    Driver "vboxvideo"
    EndSection

  2. find the screen section and add a display subsection including the modes.
    Section "Screen"
    Identifier "Default Screen"
    Monitor "Configured Monitor"
    Device "Configured Video Device"
    SubSection "Display"
    Modes "1280x800" "1024x768" "800x600"
    EndSubSection
    EndSection
Voila! it works. The only drawback is that the auto-resize guest display function of virtual box doesn't work.

starting vmware server on ubuntu 8.0.4 hardy heron

It wasn't an easy task to get vmware server installed on my kubuntu 8.0.4 box with kernel 2.6.24-17. And after jumping through all those hoops and firing up vmware, I cannot start any virtual machined created. The message I am getting is: Unable to change virtual machine power state: The process exited with an error: End of error message.

After a couple fruitless google searches, I saw a post mentioning about the debug information. Then I went to "edit virtual machine settings" -> "options" -> "advanced" and enabled the "run with debug infor" option. Hah, I got the actual error right away.

It turned out to be that I installed the vmware server with "sudo" and it created a ".vmware" folder in my home folder with root:root permission. Changing the permission fixed my issue.

Ehh.

Monday, October 08, 2007

Kubuntu/ubuntu run command dialog doesn't run script.

I put together a Eclipse launch script to start eclipse with JDK 1.6 while my system's default JDK is 1.5. Some extra VM parameters are also used to make eclipse run a little bit faster because I live in it all day long.

The script loads Eclipse fine in bash console. But when I try to launch it from run command dialog by pressing Alt-F2, nothing happens. Eventually I figured out that the problem is in my launch script: I forgot to push "#!/bin/sh" at the beginning of the file.

I am not sure why nothing happens when the sha-bang '#!' is left out, but if you encounter something similar, it might be cause.

Monday, April 23, 2007

Accessing remote X-window from windows box

This is not pretty, but it's needed sometimes. (Yeah, I know, your company made you use windows)

There is a good deal of information on this wiki page about Cygwin/X. But to me it seems like too much information so I simplified it for my own reference.

Here are three simple steps to access remote X after you get Cygwin with X installed:

  1. open a Cygwin window and start X server: X -multiwindow &
  2. export DISPLAY=127.0.0.1:0.0
  3. ssh -X username@remote.server
  4. run xclock (personally I prefer xeyes) to test
One thing to keep in mind is that the remote server has to enable X11 forwarding. It is configed in sshd config file /etc/ssh/sshd_config. Search for X11Forwarding.

That is it. If you prefer putty which is another nice tool I use occationally. You can do this:
  1. open a Cygwin window and start X server: X -multiwindow &
  2. Open putty, in Connection --> SSH --> X11 tab, check the box "Enable X11 Forwarding".
  3. Login and you are done, now open an X app like xclock or xeyes, you should see it.

Thursday, December 07, 2006

Copy files from windows to linux

Setting up a cron job to transfer files among linux boxes is easy. But when you mix some windows boxes into the picture, things get complicated. That is because most windows boxes don't have ssh daemon setup.

But one thing you can do is to run pscp on windows to fetch files from Linux. You can download pscp here http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

To get started you make a .bat file like this on your windows box: c:\path\to\pscp.exe –pw password username@host.of.linux:/path/to/file c:\path\to\destination
Then you use windows scheduler to schedule a task to run this batch file.

Of course to make it more secure (or just for the peace of mind) you want to hide your password, you can use a public/private key pair. For details reference this doc: http://www.tartarus.org/~simon/puttydoc/Chapter5.html