Archive for the ‘Ubuntu’ Category

XRDP on ubuntu

$ sudo apt-get install libpam0g-dev $ sudo apt-get install libcurl4-openssl-dev $ wget http://ncu.dl.sourceforge.net/sourceforge/xrdp/xrdp-0.4.1.tar.gz $ tar -zxvf xrdp-0.4.1.tar.gz $ cd xrdp-0.4.1 $ make $ sudo make install $ sudo apt-get install tightvncserver # don’t use vino $ gconftool-2 –type list –list-type=string –set /desktop/gnome/peripherals/keyboard/kbd/layouts [damnlayouts] # map keyboard layout OR disable the keyboard plugin of the gnome-settings-daemon [...]

Continue reading »

Command Alias

$ sudo cp .bashrc .bashrc.bak # backup $ sudo nano .bashrc # ubuntu $ sudo nano .bash_profile # mac add the following: alias imac=’$ ssh user@ip -p 1234′ alias py3=’/opt/local/Library/Frameworks/Python.framework/Versions/3.0/bin/python3.0′

Continue reading »

crontab scheduling

User level $ crontab -e # m h  dom mon dow   command   * 3 * * * /home/user/public_html/xxx min/hour/day/month/week command $ /etc/init.d/cron restart Root level(after restart system) $ sudo nano /ect/crontab the same, but add root $ /etc/init.d/cron restart Source

Continue reading »

Install Python/Numpy from source

command reference only, plz install from port $ wget http://www.python.org/ftp/python/2.6.2/Python-2.6.2.tgz $ tar zxvf Python-2.6.2.tgz $ sudo apt-get install build-essential libncursesw5-dev libreadline5-dev libssl-dev libgdbm-dev libbz2-dev libc6-dev libsqlite3-dev tk-dev $ cd python-2.6.2 $ ./configure $ make $ make install $ sudo apt-get install python-setuptools $ svn co http://svn.scipy.org/svn/numpy/trunk numpy $ cd numpy $ sudo python setup.py install [...]

Continue reading »

Secured SSH

In client: ssh-keygen -t rsa In client: $ ssh-keygen -t rsa $ scp -P portNum id_rsa.pub username@ip:~/.ssh/authorized_keys $ sftp -o PORT=portNum username@ip

Continue reading »

Ubuntu configuration

First boot $ sudo passwd root $ sudo apt-get update Common command $ rm -r  folder_name #del a folder $ mv -f  from_folder   to_folder #move a folder $ wget -r ftp://name:pwd@ip/path/ # retrieve a folder Install SSH Server $ sudo apt-get install ssh $ sudo nano /etc/ssh/sshd_config change PermitRootLogin no add AllowUsers  USERNAME $ sudo /etc/init.d/ssh [...]

Continue reading »

Follow

Get every new post delivered to your Inbox.