How to remote login to Linux using Vista ssh

Ahh! I finally found a free solution to do remote login and display the X graphics to my windows vista. I need to run a software from outside the campus. So I need to VPN. I am trying to VPN using Kubuntu but so far failed! So sad, but life goes not. So I installed the VPN setting from my university website, and I can VPN. But now the problem is that I need to run a software that display the X graphic to my Vista.

In the campus, I use Linux (since I don’t need to vpn). Or if I use windows, the university provides Exceed. But it’s not free.

Well, I know that the other alternative is to install Cygwin. But somehow when I tried to find the free software, I found this XWinLogon. Much easier, and suits my needs. It is actually based on Cygwin.

Just download the software and install from the .exe file. The website said that we shouldn’t have any cygwin installation before.

So now I can ssh, and then display the Gnome desktop in my Linux server. To start with Gnome, you will need to put “gnome-session” at the command during the setup.

You can also save the configuration into a BAT file, and then simply clicking the file will bring you to the remote login.

How to check Matlab License

This is the command to check Matlab license in my server:

% cd /apps/matlab/r2006b/etc
The folder might be different from yours. But you need to go to the /etc folder and then run lmstat -a to show all info.
% ./lmstat -a

Type ./lmstat –help if you want to use other options

Writing Equation using Latex in OpenOffice

I previously used Zoho Writer for collaboration in writing some academic paper. The feature that I loved most is that we can write mathematical expression using latex. But the collaborative tool is very limited. So I decided to use OpenOffice. I found an extension that enable me to write math expression in Latex.

It’s called OOoLatex!

Since I am using Kubuntu, I followed the step in this thread, and it installs successfully.

CVS Cheat Sheet

I found this wonderful cheat sheet in using CVS:

Resetting forgotten root password in mysql

I forgot my root password for mysql. This is how to restore it
First, I need to stop the server:
%sudo /etc/init.d/mysql stop

then run the server in safe-mode with –skip-grant-tables to enable login without password
%sudo /usr/bin/mysqld_safe --skip-grant-tables &

Then we can login without the password and access mysql database
%mysql --user=root mysql

In MySQL client, do this:
mysql> update user set Password=PASSWORD('new-password-here') WHERE User='root';
Query OK, 2 rows affected (0.04 sec)
Rows matched: 2 Changed: 2 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)

mysql> exit

after this type “fg” and “ctrl-C” to kill the server in safe mode. Now start the server again.
%sudo /etc/init.d/mysql start

Now you can try logging in with the new password:
%mysql --user=root --pass=new-password-here

Monitoring CPU and Memory Usage in Kubuntu Hardy

I found a good article on how to monitor your system in Kubuntu/Ubuntu Linux.

enjoy the article.

Little difficulties in Installing packages for Octave 3.0.1

I encountered problems to install packages in Octave 3.0.1 by typing “pkg install”. It turns out a simple error.

You can read the forum post here for more detail.

Installing SuiteSparse from scratch using Intel compiler

I need to install Octave using SuiteSparse. I have written a post last time on how to build Suitesparse. But this time the server that I am installing doesn’t have gfortran, but rather it has intel fortran compiler.

Moreover, I would like to use Metis 4.0 within Suitesparse. You can download it from this page.

first copy Metis 4.0 tar source file to SuiteSparse directory, and then untar the archive there. Then cd into metis-4.0 directory and modify the Makefile.in if you want to, otherwise just type “make” immediately”.

Then, modify the file UFconfig/UFconfig.mk

To use Intel’s compiler, find the section

# Using Intel’s icc and ifort compilers:
#   (does not work for mexFunctions unless you add a mexopts.sh file)
F77 = ifort
CC = icc
CFLAGS = -O3 -xN -vec_report=0
CFLAGS = -g
# old (broken): CFLAGS = -ansi -O3 -ip -tpp7 -xW -vec_report0

# 64bit:
F77FLAGS = -O -m64
CFLAGS = -O3 -fexceptions -m64
BLAS = -lgoto64 -lfrtbegin -lg2c -lpthread $(XERBLA)
LAPACK = -llapack64

uncomment the options, in the above example, I also use the options for 64-bit. After this, type “make” under the SuiteSparse directory.

Besides that, it turns out that the compilation couldn’t find libgoto64. So I use the one available in the server which is found in
/usr/lib/libgoto_itanium2-64-r0.99.so
you can check yours by typing “locate goto”.
Then I need to change the option in BLAS above, to

BLAS = -lgoto_itanium2-64-r0.9 -lfrtbegin -lg2c -lpthread $(XERBLA)

Another problem occurs when it runs the UMFPACK demo. Checking the output file, it turns out that it couldn’t find the xerbla library. So I changed also the UFconfig/UFconfig.mk file to use the provided libcerbla.a. This is shown below

# The BLAS might not contain xerbla, an error-handling routine for LAPACK and
# the BLAS. Also, the standard xerbla requires the Fortran I/O library, and
# stops the application program if an error occurs. A C version of xerbla
# distributed with this software (UFconfig/xerbla/libcerbla.a) includes a
# Fortran-callable xerbla routine that prints nothing and does not stop the
# application program. This is optional.
XERBLA = ../../UFconfig/xerbla/libcerbla.a

# If you wish to use the XERBLA in LAPACK and/or the BLAS instead,
# use this option:
#XERBLA =

# If you wish to use the Fortran UFconfig/xerbla/xerbla.f instead, use this:
# XERBLA = ../../UFconfig/xerbla/libxerbla.a

so basically I use the C version of Xerbla.

Adobe Acrobat Reader 8.12 takes 100% CPU in Linux Kubuntu Hardy

I am using Kubuntu Hardy, and installed Adobe Reader 8.12. I got this problem that whenever I open pdf from a website using firefox, after a while it will take 100% CPU.

I found that this is a known problem, check this blog.

The current solution is to run Adobe reader, go to “Preferences”. Click the tab “Internet”, and change from “Direct connection to Internet” to “Manual Proxy Configuration”.

I left the field empty, and now if I open Adobe, it no longer takes 100% of my CPU.

GCJ webplugin is not working in Box.net

I have an account in Box.net but I can’t use the java applet to upload the file. It turns out that it is due to the GCJ java webplugin used by my firefox 3. This is the default in Kubuntu Hardy.

In order to enable it, I need to use the Sun Java plugin. To install, just type

%sudo apt-get install sun-java6-plugin

and then you need to switch the java plugin to use the Sun Java plugin. To do that, follow the procedures in this post.