command list

command arguments

What does “—” (double-dash) mean? (also known as “bare double dash”)



restart x

ctl+alt+backspace to kill x. to get back to the gui login screen enter #/etc/init.d/$DM restart. replace DM with gdm or kdm depending on which desktop manager your using.

edit application menu
sudo gedit /usr/share/applications/virgoftp.desktop

[Desktop Entry]
Comment=FTP down

virtual system within another account

gdmflexiserver —xnest

one button to turn monitor off
sleep 1 && xset dpms force off

more useful : lock screen and turn monitor off :
gnome-screensaver-command --lock && sleep 1 && xset dpms force o
add a new source and update packages

echo "deb http://packages.medibuntu.org/ hardy free non-free" | sudo tee -a /etc/apt/sources.list
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update

chinese input

How can I activate SCIM inside a NX session?

The Smart Common Input Method (SCIM) provides an input method user interface for a number of languages such as Chinese, Japanese and Korean.

In order to activate SCIM inside your NX session, you need to add some
environmental variables to the /etc/profile system configuration file.

For example, if you want to activate SCIM for Chinese, you will need to add the
following lines to the /etc/profile system configuration file:

export LC_CTYPE="zh_CN"
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim

This will set the Chinese language for all the users. If you would like to
allow each user to change this, the user should set these variables
in the ~/.bash_profile file in his / her user's home.

SCIm general setup


network connection

Mount samba shares with utf8 encoding using cifs


testing /etc/fstab before rebooting: sudo mount -a

mount Samba


         //    /mnt/myworldbook        cifs    guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

manual mount

        sudo mount -t cifs // /mnt/myworldbook -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777
CIFS VFS: Error connecting to IPv4 socket


placing the following in my /etc/rc.local file before the last line:

sleep 30
/bin/mount -a
I see this too on my slow (500 MHz P3, 256 MB memory) Hardy box (Mythbuntu). It hangs for about 30 - 45 seconds on every boot with a message that the network is inaccessible. This problem appeared when I added some CIFS mounts to my /etc/fstab. After the delay, the continues with the boot, and after boot-up, the mounts have in fact happened.

I also was seeing the even longer hang at shutdown mentioned in a comment to this bug report, but found a solution on the Ubuntu forums. Just do:

      sudo ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh
      sudo ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh

and that fixes it completely (but doesn't help the delay at start-up).

mount NFS system


manual mount

        sudo mount /mnt/myworldbook-nfs/  -o rw

mount windows NTFS partition


         # Entry for /dev/sda1 :
         UUID=98B41FE7B41FC6A2 /media/sda1 ntfs-3g defaults,locale=zh_CN.UTF-8 0 1 
         # Entry for /dev/hda1 :
         /dev/sda1 /media/hda1 ntfs-3g defaults,locale=zh_CN.UTF-8 0 1

manual mount

        sudo mount -t ntfs-3g /dev/sda1 /mnt/sda1 -o defaults,locale=zh_CN.UTF-8

Fix cif server shutdown error

Instructions are very simple:
1)uncompress archive : unzip ./mountcifs.zip
2) sudo chmod a+x ./mountcifs
3)sudo cp mountcifs /etc/init.d/
4)cd /etc/rc0.d
5)sudo ln -s /etc/init.d/mountcifs K02mountcifs
6)cd /etc/rc6.d
7)sudo ln -s /etc/init.d/mountcifs K02mountcifs

Fix network manager shutdown issue

install Wicd, as it will automatically remove gnome-manager

it is : deb http://apt.wicd.net hardy extras


mplay set up


too many packets in buffer

sudo vim /usr/share/applications/mplayer.desktop
add -framedrop as : Exec=gmplayer -framedrop %F


install java


install LAMP

sudo apt-get install apache2 php5 mysql-server-5.0 phpmyadmin
sudo /etc/init.d/apache2 restart
the instructions at the following link is wrong.


fix apache2 errors : Apache error - server's fully qualified domain name

sudo vim /etc/apache2/apache2.conf
add :
ServerName "localhost"

fix [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3

contents of /etc/phpmyadmin/apache.conf are already being loaded by phpmyadmin.conf located in /etc/apache2/conf.d which means that you can remove the following line from your /etc/apache2/apache2.conf file.

INCLUDE /etc/phpmyadmin/apache.conf

install tomcat


install maven

Download and install Maven 2.0.9+.
download: http://apache.seekmeup.com/maven/binaries/apache-maven-2.0.9-bin.tar.bz2
installation: http://maven.apache.org/download.html#Installation

Installing Torrent-Flux

db name : torrentflux , password : x
access name: user/x

PHP Admin:


acrobat acroreader

Install Adobe Reader 8.1.2 on Ubuntu 8.04

All you’ll need to do in order to install Adobe Reader is add the Medibuntu repository. This can be done via:

sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list

Once that is done you’ll likely want to add the Medibuntu GPG key as well:

sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

..and finally install Adobe Reader v8.1.2 (at the time of this writing) by using:

sudo apt-get install acroread

webdav and mozillar weave


HOWTO Enable WebDAV with Apache 2.x on Ubuntu Linux

HOWTOsThis HOWTO will show you how to create WebDAV enabled directories hosted on your Apache webserver. I wrote this using Ubuntu Server 7.04, but it should work on previous Ubuntu releases and (with only minor modifications) any other Linux distro.

1. What is WebDAV?
2. WebDAV stands for Web-based Distributed Authoring and Versioning. It was designed to allow groups of individuals to edit and manage files stored on a web-server. The protocol allows the creation of "web-shares" which can be used for file storage, collaborative projects, editing websites themselves, and any number of other things. WebDAV supports features like editing, copying, and moving of files, file locks, resource lists, and file property modification. Most operating systems, including MS Windows, support WebDAV directories. Install the Proper Software
The first thing you will need (obviously) is a functioning apache2 webserver. If you happened to have install Ubuntu Server Edition with the LAMP option, then you're set. Otherwise, you'll need to get a few things with apt. Do this however you want; I will use the command line. While you're at it, you might as well get PHP to go with it.

apt-get install apache2 php5 libapache2-mod-php5

3. Add Modules
Fortunately, Apache 2.x comes with mod_dav already installed, we just have to activate it. We can do this by making some symlinks.

cd /etc/apache2/mods-enabled
ln -s ../mods-available/dav* .

4. Create LockDB file for WebDAV
Next we need to set up a DAVLockDB file for WebDAV to use. This is a very important step, as you'll wind up with Internal Server Errors if you try to use WebDAV without it.

mkdir /usr/share/apache2/var
touch /usr/share/apache2/var/DAVLock
chown -R www-data:www-data /usr/share/apache2/var

5. Setup Authentication and Add Users
WebDAV can open your web server up to security risks. You don't want just anyone to wander in and change your files! There are several ways you can do authentication for your WebDAV directory, but htpasswd is the easiest and probably best for most cases. We'll make the passwords using MD5 and store them where we store the apache configurations and add an initial user while we're at it.

htpasswd -m -c /etc/apache2/.htpasswd

6. You can use this command to add more users later or change their passwords. Just remember to remove the -c option or you'll truncate your password db every time! Create the WebDAV Directory
Okay, almost done. Let's make a directory in our web document root where we will run our WebDAV. I'm calling it myWebDAV. This is the folder in which your authorized users will be able to add, delete, and modify files. The directory will need to be writable by the web server.

mkdir /var/www/myWebDAV
chown www-data:www-data /var/www/myWebDAV

7. Configure Apache
Now all we need to tell Apache how to use WebDAV and where to enable it. This consists of adding a few definitions to the user-defined config file at /etc/apache2/httpd.conf. Open that file with an editor and add lines similar to those below.

## Location of the DavLock file
DavLockDB /usr/share/apache2/var/DavLock

## Set up the myWebDAV directory to use WebDAV and authentication
<Directory "/var/www/myWebDAV">
Dav On
AuthName "WebDAV Login"
AuthType Basic
AuthUserFile /etc/apache2/.htpasswd
## Limit access for enhanced security
require valid-user
Order allow,deny
Allow from all

8. Restart Apache and Test
That's it! Restart your web server and you're good to go. You and your friends/coworkers/etc can now login and modify the files at http://your.domain.com/myWebDAV.

/etc/init.d/apache2 restart

then set up mozillar weave


change the environment variable in /etc/environment to make it available system-wide.
For example, my LANG was "en_US" in /etc/environment, but /usr/lib/locale/en_US did not exist. /usr/lib/locale/en_US.utf8 did,
so 1)changing LANG to "en_US.UTF8" fixed the problem.
or 2) cd /usr/lib/locale ; sudo ln -s zh_CN.utf8 zh_CN

virtual box

download virtualbox from sun site, please NOT OSE version, because it has no USB support



Open a terminal window and type in:
sudo apt-get install amule
killall gnome-panel

The second command refreshes the GNOME panel.

After that you can find aMule in the Gnome menu under Applications -> Internet.



  • sudo apt-get install apache2
  • sudo apt-get install php5 libapache2-mod-php5 php5-cli php5-dev
  • sudo /etc/init.d/apache2 restart
  • testing php, create a file phpinfo.php in /var/www:
  • http://localhost/phpinfo.php
  • sudo apt-get install mysql-server
  • sudo apt-get install phpmyadmin
  • sudo mysqladmin -u root password mypassword to set up mysql root password.
  • ln -s /usr/share/phpmyadmin /var/www/
  • http://localhost/phpmyadmin log in with root and password set up in previous step.

sudo and xdisplay

in the linux machine:

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License