Tuesday, June 1, 2010

NX on fedora 13

After upgraded to Fedora 13, freenx stopped working. Tried various ways, but failed. Random web surfing and picked up a tip.

Simple solution:
in sshd configuration file,  /etc/ssh/sshd_config commented out this line
#AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedKeysFile /usr/NX/home/nx/.ssh/authorized_keys2

restart sshd

sudo /sbin/service sshd restart

NX login from a remote is working.

Saturday, May 29, 2010

Stewed Chestnuts


Alternative to Roasted Chestnuts, Stewed Chestnuts

Winter in Armidale is a season for chestnuts. That refreshed my memory of roasted chestnut in Lanzhou. Today (05/29/10), after visited Bunnings' grant opening in Armidale, we bought a bout 1 kg of chestnuts, looks like good quality, as there were fatty round and big.




I can't make roasted chestnuts here. Instead I cooked it as boiled chestnuts. The finished product is not bad.
1st Cut chestnut halfway through. This is an important step, to peal shell after cooked.




2nd pour into pan and add water, just cover the nut. Put on oven and boiling for 30 minutes.


this is the finished product. taste great!








Wednesday, May 26, 2010

Fedora 13 first hand on

I started red hat linux from RH2? FC1 .. Fedora 12. Yesterday, I noticed some discussion on fedora list on Fedora 13 (Goddard). I was curious about others' experiences. In last versions, I normally started upgrading after about 3-6 months since the release. After through some posts, my hands started itching, couldn't help to start it.

After a few backup, starting preupgrate. hope it is a smooth run.

YES, It was a smooth run. All steps went well. I am happy Fedora 13 user. gthumb photo import and category management seems much improved. GOOD Work!

There is a long list of features of fedora 13, as reviewed here. A few things interesting to me:



Gnome 2.30

Fedora 13 would include GENOME 2.30. This will ensure that Fedora ships with the current version of Genome desktop. It would stay in sync with upstream. nice applications as evolution, gthumb etc

NetworkManager Mobile Status

ModemManager already has D-Bus methods to get the required information from various cards, but user needs to add some nm-applet icons for better cellular signal strength. They must compel  nm-applet/NM listen for signal strength changes, or poll modem-manager for such changes while connected. With the feature it would be easier to use mobile broadband. Users would know know when their device has a signal and if they are roaming or not.

Thursday, May 20, 2010

evince view chinese pdf

Evince, as document viewer in linux. It can display chinese characters. I posted a question online, "Evince is unbale to display Chinese pdf file? how to fix it? my system is 2.6.18-1.2239.fc5 and evince is 0.5.1", clearly, when I used FC5. Later I found a fix myslef " install xpdf". This fix does nit owrk this time. I will keep looking for solution.

Here is another post online:


upgrade from gutsy to hardy, does not get the problem in gutsy.
The pdf file that include chinese could not display, just echoed as some squares, but some of them displayed correctly.
I have installed poppler-data and xpdf-chinese-
simplified packages, and xpdf and adobe reader can display the pdf file without any problem.

Wednesday, April 28, 2010

Evolution on Fedora 12 CAN connect to Exchange 2007

As I stated previously "I was eager to upgrade my Fedora 11 to Fedora 12. I expect the F12 will make evolution work with MS exchange 2007. Since working place switched mail server  to Exchange 2007. The evolution on Fedora 11 became useless. There were reports on successful connections from evolution 2.28 to M$ exchange 2007." Well, evolution on F12 is 2.28.0, connection to echange 2007 via evo-mapi crahsed every time. Some guys from Ubuntu claimed good connection with evo 2.28.1. But this is not avaliable for F12. I looked at  
http://koji.fedoraproject.org/koji/packageinfo?packageID=3D175
It is there, why not departed to F12?? 
 
Now, evolution-mapi is working. 
SOLUTION: 
Using DavMail as a bridge, edit account, receive server as 
localhost:1110 etc, works well. It retrieves mails in inbox. 
Some suggests that imap will get new mail from all folders. 
I got a error. Back to pop at the time being.

Friday, February 26, 2010

tip connect to PC behind firewall

This is a very nice tip on this topic from

Comfortable SSH Access to a Computer Behind a Firewall

Rationale

Sometimes your university takes security serious and firewalls every computer on their intranet, even if you are interested to access it from outside. The following steps enable a comfortable, nearly transparent SSH tunnel to penetrate the firewall. All that is needed is a computer outside with SSH access that can operate as a relay.
The software needed should be already installed on any current unix system: secure shell client/server and netcat (nc).

Server Configuration

Login to the computer behind the firewall.
  1. Generate a new ssh private key that is to be used as the authentication for the tunnel. It will have no password to enable automatic login.
    ssh-keygen -f ~/.ssh/tunnel-id -t rsa -N ""
  2. Create a new entry in your ~/.ssh/config that will be used to initiate the tunnel. Set the Host entry to an uncommon name so that you will also be able to login to the relay computer normally. It will establish a connection from port 11111 on the loopback interface on the relay computer to the ssh port on the loopback interface on the server.
    Host relay
    HostName relay.hostname.com
    RemoteForward 11111 localhost:22
    IdentityFile  ~/.ssh/tunnel-id
  3. Copy the public key to the relay server:
    ssh-copy-id -i .ssh/tunnel-id relay.hostname.com
  4. To make it easy to start the tunnel, create a script in ~/bin/setup-tunnel.sh:
    while true; do 
        /usr/bin/ssh relay
        sleep 1
    done < /dev/null & disown

Relay Configuration

Login to the relay computer.
  1. The ssh-copy-id appended the public key to the ~/.ssh/authorized_keys file. Because we want to limit the havoc that can be caused by the key, change the entry that was just created
    ssh-rsa AAAAB3...= user@server.domain.com
    to
    command="sleep 604800" ssh-rsa AAAAB3...= user@server.domain.com
    This will give the tunnel a livetime of a week, make it work without a local terminal on the server side (we used < /dev/null) and limit the commands that can be executed with this key.

Client Configuration

Login to the client computer.
  1. To make it possible to transparently connect to the server through the tunnel, we use netcat on the relay computer and a ProxyCommand in the ~/.ssh/config file on the client. Add a new entry with
    Host server
    HostName server.hostname.com
    ProxyCommand ssh relay.hostname.com bin/nc localhost 11111

Usage

Whenever you want to have the tunnel enabled, start ~/bin/setup-tunnel.sh on the server. Afterwards you will be able to connect from the client with ssh server. You will be asked for a password two times, once for the relay and once for the server.
The following diagram shows the general idea of the created tunnel:

+--------+       (          )      +----------------------+
| Client |------(  Internet  )---->|  relay.hostname.com  |
+--------+       (          )      +----------------------+
    :                                         /|\          
    :                                          |           
    :                                        [ X ]         
    :                                          |           
    : Forwarded ssh connection      +-------------------+  
    :..............................>| server.domain.com |  
      over "server" ssh alias       +-------------------+  
                                                           
--- real connection                                        
... virtual connection                                     
[X] switch                                                 


Wednesday, February 24, 2010

Collect evolution to MS exchange server 2007 via DavMail


Using DavMail as a bridge, edit account, receive server as 
localhost:1110 etc, works well. It retrieves mails in inbox. 
Some suggests that imap will get new mail from all folders. 
I got a error. Back to pop at the time being.

Davmail can used as bridge for fetchmail too

here is a example of fetchmailrc

poll localhost
 port 1110
        with protocol pop3
        username DOMAIN\user password mypasswd keep is localuser;

Build Evolution from Source Made Simple

 http://mad-scientist.us/evolution.html

Evolution site

 http://projects.gnome.org/evolution/index.shtml

Thursday, February 18, 2010

R installing on Unix/Linux - no root access

R installing on Unix/Linux - no root access

I am luck to get hints from  http://onertipaday.blogspot.com/2008/04/r-installing-on-unixlinux-no-root.html


1. downloaded the tar.gz of the development version of R from
ftp://ftp.stat.math.ethz.ch/Software/R/
2. uncompress it to a directory you have write access to, say ~/R
3. change into the uncompressed directory, eg ~/R/R-2.10.1
4. run "./configure"
5. run "make"
Afterwards you can start R by executing ~/R/R-devel/bin/R;
to simplify that either add the bin directory to your path or create an alias for R
You do not need to run "make install" to work with R.
to install packages,

~/R/R-2.101.1/bin/R CMD INSTALL pkg.gz -l ~/R/R-2.10.1/library/

Wednesday, January 27, 2010

Vi tips & trciks

This starts with my curiousity. I sent a question to fedora list

I come cross a remote server, when I type vim x.pl, it pops up a
default format as below. It is nice. I look through my server,  can't
figure out how to set up the vi parameters. Could some one show me
how?

I am on gnome desktop of F12.


#!/usr/bin/perl
#=============================


#FILE:  x.pl
#USAGE:  ./x.pl

#DESCRIPTION:

#OPTIONS:  ---
#REQUIREMENTS:  ---
#BUGS:  ---
#NOTES:  ---
#AUTHOR:   (), <>
# COMPANY:
#VERSION:  1.0
#CREATED:  01/27/2010 07:55:21 PM CST
#REVISION:  ---
#=============================

use strict;
use warnings;

got hint from a reader http://lonehacks.blogspot.com/. I installed vim-perl-support. It works brightly. Here is an addition link for vi fun vi-vim-tips-and-tricks.

Happy Vi

Tuesday, January 26, 2010

Configure Gtalk/Pidgin behind proxy firewall

How to set proxy for Gtalk on pidgin? 

most connections, web, pidgin etc must go through a proxy. the proxy set as

host proxy.aaa.bbb.cc
port 8080
user username
password passwd

Take Gtalk as my test case, I work on gnome desktop of F12

1. System -> Preferences -> Network Proxy "directly internet connection' checked, that means no global or system environmental proxy setting
2. Pidgin Tools -> Preferences -> Proxy -> Configure Proxy -> 'Direct Internet Connection' checked
3. Pidgin -> Accounts ->Add -> Google Talk
Basic tab
  Protocol: Google Talk
  Username:
  Domain: gmail.com
Advanced tab
  Require SSL/TLS check
  Force old (port 5223) ssl checked

  Connect Port: 443
  Connect Server: talk.google.com
  File transfer proxies: proxy.eu.jabber.org
Proxy tab

set you http proxy
  proxy server:
  port:
  username:
  password:

click Add

You are good to connect

Tuesday, January 19, 2010

Firefox tips

Clearing Your Complete Web Browsing History in Firefox

An Address Bar that pops up and reports a list of your previously visited websites can clutter your browser and allow others to invade your privacy. Follow these tips to clean up your Address Bar History and keep its contents from prying eyes.

Step 1 Delete single URL address from the Auto Complete feature by typing the beginning of the domain name in the Address Bar. Highlight the address with either an arrow key or your mouse and clicking "Shift" and "Delete" on your keyboard. The address should disappear from Firefox's Auto Complete function.

Step 2 Remove drop-down lists of address bar history by selecting "Tools" from the browser's menu and choosing "Clear Private Data." Make sure that "Browsing History" is checked before pressing "Clear Private Data Now."

Step 3 Disable history to ensure that Address Bar History won't show up again. Go to "Tools" and "Options" in your browser's menu. Locate the "Remember visited pages for the last...days" field and change the number to "0" before clicking "OK" to save your changes. This configuration ensures that your browser won't remember what websites you visit and the addresses won't show on your Address Bar's History on the drop-down menu.


The one-stop solution


1) Type “about:config” (without the quotation marks) into the location bar
2) Click the “I’ll be careful, I promise!” button
3) Filter “browser.urlbar.maxRichResults”
4) Double click the row and reset the value to “0″



 

Sunday, November 22, 2009

Evolution on Fedora 12 CAN connect to Exchange 2007

As I stated previously "I was eager to upgrade my Fedora 11 to Fedora 12. I expect the F12 will make evolution work with MS exchange 2007. Since working place switched mail server  to Exchange 2007. The evolution on Fedora 11 became useless. There were reports on successful connections from evolution 2.28 to M$ exchange 2007." Well, evolution on F12 is 2.28.0, connection to echange 2007 via evo-mapi crahsed every time. Some guys from Ubuntu claimed good connection with evo 2.28.1. But this is not avaliable for F12. I looked at  
http://koji.fedoraproject.org/koji/packageinfo?packageID=3D175
It is there, why not departed to F12?? 
 
SOLUTION: 
Using DavMail as a bridge, edit account, receive server as 
localhost:1110 etc, works well. It retrieves mails in inbox. 
Some suggests that imap will get new mail from all folders. 
I got a error. Back to pop at the time being.

Wednesday, November 18, 2009

Upgrade Fedora 11 to Fedora 12

I was eager to upgrade my Fedora 11 to Fedora 12. I expect the F12 will make evolution work with MS exchange 2007. Since working place switched mail server  to Exchange 2007. The evolution on Fedora 11 became useless. There were reports on sucessful connections from evolution 2.28 to M$ exchange 2007.

My laptop has not CD-ROM. The options for me were Boot from Fedora 12 live USB, installation from harddisk or preupgrade. Since Fedora 11, the preupgrade function has been enabled. I tried this with
sudo /usr/bin/preupgrade-cli. It started with downloading images and related rpms. After this completed and starting reboot and get to upgrade-installation. This step was smooth.

Unfortunately the first boot after update was frozen. Xorg was not started. I booted it up with a live Ubuntu USB and changed the start level to 3. After reboot it, I can login at the console or at a networked PC. This signalises the installation was basically ok. Only need to fix X window. I did not got any fix after sent out a few email to fedora-list.

Check anaconda.xlog Xorg.0.log, one warning message was a bit informative, google this message and leading to this page
http://fedoraproject.org/wiki/Common_F12_bugs#Miscellaneous_problems_with_Intel_graphics_adapters
it suggested to add nomodeset to kernel argument. In fact, It worked after removed nomodeset.

After started to level 5, login to gnome desktop. Looks nice. Tried firefox, jpilot, etc. Most of applications work, a few not-working:

evolution to exchaneg crashed.
OO writer can't read Chinese doc

Overall, this is a nice upgrade since I started with redhat, FC1 to Fedora 11.

Nice day

Sunday, November 15, 2009

ssh ABC

Access Remote GUI Programs Using SSH Forwarding
ssh -C -X user@host.domain gnome-terminal

> vi /etc/ssh/sshd_config

and set:
X11Forwarding yes

> vi /etc/ssh/ssh_config

and set:
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes

> /etc/init.d/ssh restart

You done and can connect with forwarding

Auto login via ssh
  1. Create a public ssh key, if you haven’t one already.
    ssh-keygen will create key as .ssh/id_rsa
  2. Make sure your .ssh dir is 700:
    chmod 700 ~/.ssh
  3. Get your public ssh key on the server you want to login automatically.
    A simple scp ~/.ssh/id_rsa.pub remoteuser@remoteserver.com: is ok.
  4. Append the contents of your public key to the ~/.ssh/authorized_keys and remove it.
    Important: This must be done on the server you just copied your public key to. Otherwise you wouldn’t have had to copy it on your server.
    Simply issue something like cat id_dsa.pub >> .ssh/authorized_keys while at your home directory.
  5. Instead of steps 3 and 4, you can issue something like this:
    cat ~/.ssh/id_rsa.pub | ssh -l remoteuser remoteserver.com 'cat >> ~/.ssh/authorized_keys'
  6. Remove your public key from the home directory on the server.
Change ssh port or get more port
sudo vi /etc/ssh/sshd_config

change or add

Port 22
Port 446

Reverse SSH or Tunnel ssh

SSH is one of the most versatile tools for Linux, but most people only ever use it one way - to use the server to send data to the client. What you might not know is that it's also possible to switch the usual logic SSH and use the client to send data to the server. It seems counterintuitive, but this approach can save you having to reconfigure routers and firewalls, and is also handy for accessing your business network from home without VPN.
You'll need the OpenSSH server installed on your work machine, and from there you need to type the following to tunnel the SSH server port to your home machine:
ssh -R 1234:localhost:22 home_machine
You'll need to replace home_machine with the IP address of your home machine. We've used port number 1234 on the home machine for the forwarded SSH session, and this port needs to be both free to use and not blocked by a local firewall. Once you've made the connection from work, you can then type the following at home to access your work machine:
ssh workusername@localhost -p 1234
This will open a session on your work machine, and you will be able to work as if you were at the office. It's not difficult to modify the same procedure to access file servers or even a remote desktop using VNC. The only problem you might find is that the first SSH session may time out. To solve this, open /etc/ssh/sshd.conf on your work machine and make sure it contains 'KeepAlive yes' and 'ServerAliveInterval 60' so that the connection doesn't automatically drop.

this part was adopted from
http://www.tuxradar.com/content/command-line-tricks-smart-geeks

IT and Ecology

This is a starter for this blog. A few words on IT and ecology resonates in my mind. Sound IT item should be a friendly one, to user, to environment, socially and economically. Simple and pratice solutions, tips may fit this frame. Multiple functionalities of modem devices may be a bad things, or waste, many of them are not used. I hope my blogger will follow this logics.