Thursday, 15 August 2013

ubuntu study

UBUNTU Study
  1. about how to map the local NTFS drive into UBUNTU (2012-3-10)
$ sudo mount -t ntfs -o nls=utf8,umask=0222 /dev/sda2 /home/uqczhan2/d
$ sudo mount -t ntfs -o nls=utf8,umask=0222 /dev/sda1 /home/uqczhan2/c
  1. Resize the driver.
Right now I found that the traditional partition method do not work for the new system, like partition manager. So the only way is to change it into some other software. Gparted seems to be a very good solution, and it is a free software
  1. select a column in a text
geany is an integrated development environment that provides good column editing support which is worth checking out (an example here)
Simply put, press down Alt+Shift instead of just Shift while making selections to invoke column mode. One important limitation is that the edits in column mode are (as yet) not undo-able.
To achieve the same with the mouse, hold down Ctrl while selecting. This actually works with most Scintilla-based editors (including SciTE and Geany).
    1. How to drag a file
    2. how to cancel the preview of files in the browser.
Go to the browser window ->edit->preferences->preview.
    1. Wine HQ
A very good place to check which software is good
    1. delete a directory
sudo rm -rf /home/soft/

8. mount hdrive
$ sshfs uqczhan2@mango.eait.uq.edu.au:/software /home/uqczhan2/software
$ sshfs uqczhan2@mango.eait.uq.edu.au:/home/users/uqczhan2 /home/uqczhan2/hdrive
now I found a new way of doing this
$ gksu gedit /etc/fstab
then add this line at the end of the fil
sshfs#uqczhan2@mango.eait.uq.edu.au:/home/users/uqczhan2 /home/uqczhan2/hdrive fuse comment=sshfs,noauto,users,exec,uid=1000,gid=1000,allow_other,reconnect,transform_symlinks 0 0
after that do
$ sudo gedit /etc/fuse.conf
then add
user_allow_other
then you will get the access to hdrive after inputing the password.

  1. open a xp virtual machine
$ DISPLAY=:0 VBoxManage startvm "winxp"
$ DISPLAY=:0 VBoxManage startvm "xpdomain"
  1. a problem you will have when using idb
Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
the way of solving it is
$ sudo apt-get install gtk2-engines-pixbuf
  1. Install wireless card to my laptop:
My laptop can not install ubuntu 11.04 due to some issues. So I downgraded into 10.04. however, this edition doesn't come up with the Wifi driver. So I have to find it out. Then the big problem comes. The first thing is that installing the package requires installing building-essential, but I can not install the building-essential package individually because it is dependent on some other software. There are several ways to obtain that 1. setup your own repository. 2. using installing disc. 3. using
I can only choose the second.
The file is rtl8192ce_linux_2.6.0006.0321.2011.tar.gz
when you get in, read the readme to get the instruction.
Sudo apt-get install building-essential
sudo su
make
make install
reboot now
    1. add user into virtualbox :
$ sudo usermod -G vboxusers -a uqczhan2

  1. to extract the gar.gz files
$ tar -xzvf *.
  1. To find out where the installation is located
$ whereis eclipse
To get the list of installated files, go for
$ dpkg --get-selections > my_software.txt
  1. To delete a program
$ sudo apt-get purge eclipse-platform
    1. To synchronise files
-a archive mode; equals -rlptgoD (no -H,-A,-X)
means file will be archive all the folders and subdirectories
/home/uqczhan2/syncTest/Gran source path
--delete to delete extraneous files from destination dirs be careful to use it.
But if no this, you will not delete the file, but you also will not sync the new file in archive back to the origin folders
--max-delete=NUM don't delete more than NUM files
--stats give some file-transfer stats
-h, --human-readable output numbers in a human-readable format
--progress show progress during transfer-i,
--itemize-changes output a change-summary for all updates
--out-format=FORMAT output updates using the specified FORMAT
--log-file=FILE log what we're doing to the specified FILE
-u, --update skip files that are newer on the receiver
this means that the newer file in the destination will not be removed
-n, --dry-run perform a trial run with no changes made
finally


$ rsync -a --progress --human-readable --log-file=sync.txt -stat --update /home/uqczhan2/hdrive/Application/ --delete /home/uqczhan2/MobiC/Application/ --dry-run

$ rsync -a --progress --human-readable --log-file=sync.txt -stat --update /home/uqczhan2/hdrive/Saltmarsh/ --delete /home/uqczhan2/MobiC/Saltmarsh/ --dry-run

$ rsync -a --progress --human-readable --log-file=sync.txt -stat --update /home/uqczhan2/hdrive/Study/ --delete /home/uqczhan2/MobiC/Study/ --dry-run

$ rsync -a --progress --human-readable --log-file=sync.txt -stat --update /home/uqczhan2/hdrive/Work/ --delete /home/uqczhan2/MobiC/Work/ --dry-run
sync the file in the mobile drive back into h drive
$ rsync -a --progress --human-readable --log-file=sync.txt -stat --update --dry-run /home/uqczhan2/MobiC/Application/ --delete /home/uqczhan2/hdrive/Application/

$ rsync -a --progress --human-readable --log-file=sync.txt -stat --update --dry-run /home/uqczhan2/MobiC/Saltmarsh/ --delete /home/uqczhan2/hdrive/Saltmarsh/

$ rsync -a --progress --human-readable --log-file=sync.txt -stat --update --dry-run /home/uqczhan2/MobiC/Study/ --delete /home/uqczhan2/hdrive/Study/

$ rsync -a --progress --human-readable --log-file=sync.txt -stat --update --dry-run /home/uqczhan2/MobiC/Work/ --delete /home/uqczhan2/hdrive/Work/
  1. solve the slow scrollI know this topic is outdated, but the problem still exists and I found the answer:
    The module-init-tools package installs the /etc/modprobe.d/blacklist-framebuffer.conf file, in which it blacklists all the console framebuffer modules. For some reason the vga16fb module is not on the list, and (at least for me) it is loaded during startup and causes the slow scrolling. Try to blacklist it and reboot!
  2. Mount disk on the local folders
$ sudo mount -a /dev/sdb1 /home/uqczhan2/MobiC
$ sudo mount -a /dev/sdb5 /home/uqczhan2/MobiD
$ sudo mount -a /dev/sdb6 /home/uqczhan2/MobiE
    1. Checking PCI harddrive
$ lspci
    1. Checking the hard disk condition
$ sudo fdisk -l
$ sudo blkid
25.Using evolution as mail receiver
the problem here still is the calenda. I still could not make it right
  1. changing the default opening program
right click the file-> properties->open with
    1. Nautilus is the file explorer manager. Use ctrl+1 to open it
    2. To disable the prompt: do you want to run '' or display its contents?
Go into the Nautilus Edit-Preferences-Behaviour and set the appropriate option.
  1. Changing eps into png (high resolution)
using Inkscape->export bitmap->export area Drawing and high resolution
  1. connect to Ssh
  1. map folder in the local path
~$ sshfs uqczhan2@barrine.hpcu.uq.edu.au:/home/uqczhan2 /home/uqczhan2/Barrine
  1. Check your id information
$ id
  1. get the virtualbox guest additions
$ sudo apt-get install virtualbox-guest-additions-iso
  1. solving the problem for matlab when opening it.
/usr/local/MATLAB/R2011b/bin/util/oscheck.sh: 605: /lib64/libc.so.6: not found
run this command
$ sudo ln -s /lib/x86_64-linux-gnu/libc.so.6 /lib64/libc.so.6
  1. Three more ways of uninstall the program:
$ sudo apt-get remove google-chrome-stable
$ sudo dpkg -r chromium
find it in sypanic and then uninstall
  1. install deb file
$ sudo dpkg -i abd.deb
  1. add shortcut to .bashrc
$ gvim .bashrc
then add

## chenming shortcut for matlab
alias matlab='/usr/local/MATLAB/R2012a/bin/matlab'
## end shortcut
  1. install intel fortran compiller
a. install build-essential
b. download l_fcompxe_intel64_2011.9.293.tgz from intel website
c. use $ tar -zxvf x.tgz to extract the file
d. install
e. use $ /usr/intel/bin/compilervars.sh intel64 to add the source in the repository
f. add 'source /opt/intel/bin/compilervars.sh intel64' at the end of the .bashrc file excute $. .bashrc to reload the bash file so that the update will be loaded without reinstall the machine.
  1. install invidia driver
if you have a computer with invidia driver, you have to use additional drivers in ubuntu app to install drivers. However, people say the repository is old. Therefore, you can also add the following commands to install the newest
$ sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
$ sudo apt-get update
$ sudo apt-get upgrade
then you will get the newest version of nvidia driver
after that you need to pop in the app Nvidia x server settings to activate the second screen. This is mosly needed if you have two video card. Then you have to save the settings back into a file rather than excute it directly. This is the difference between windows and ubuntu because in ubuntu you have to save the settings in a file and then you can reload after reboot.
For the rotating, you have to add one line in
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Quadro FX 580"
BusID "PCI:3:0:0"
Option "Rotate" "left"
EndSection
$ sudo gedit /etc/X11/xorg.conf

  1. install matlab 2012a
there is one thing you have to be aware of, which is that 'glnxa64' means linux 64 bit, so you have to extract 'matlab_R2012a_glnxa64_installer.zip' file, then you could see install is a excutable file.
Also add alias matlab='/usr/local/MATLAB/R2012a/bin/matlab' in .bashrc to activate shortcut input, then use $ . ~/.bashrc to reload bash file without rebooting.
  1. installing the video card driver to Toshiba laptop.
It is not always correct to install all the drivers from suggestions given by the app 'additional drivers', althrough this method works quite well for the Video card of T550 (choose 'NVIDIA accelerated graphics driver (version current) [recommended]'), this method doesn't apply to the video card of toshiba laptop. From forum it says that usually the suggestion from additional drivers is quite old because the repository is not updating to the newest driver.sfdf
  1. permanently mount a local drive
$ sudo blkid #use this command to find out the UUID
$ gksudo gedit /etc/fstab
then add this line
UUID=<uuid>     /place/to/mount     ext4     defaults    0     2
where <uuid> is the UUID we copied from the blkid command. /place/to/mount is the mount directory. ext4 is the filesystem
then you can reload the fstab file by
$ sudo mount -a
then apply the follow setence to obtain the write permission
$ sudo chown <username>:<username> /place/to/mount
  1. mount CD file *.bin in UBUNTU
$ sudo aptitude install fuseiso
$ fuseiso -p image_file.bin /path/to/mount
$ fusermount -u -z /path/to/mount
the -z in the last command is used when the disk is busy.
  1. install software that sophos do not like in windows
you can stop the process SavService.exe from task manager, then immediately open the file you want to open.
    1. find out where the application is installed.
$ locate chromium
    1. a useful tool to separate the screen
$ sudo apt-get install compizconfig-settings-manager
then you can use $ CCSM to adjust it
  1. installing network card to the desktop
I found the newly bought TL-WN951N 300M doesn't work properly in ubuntu 11.10. when you connect into the network, you couldn't log on internet even if it appears to be connected. and there is no linux driver from the website. However, lateron I used
$ lspci -v
$ lspci -nn
and I found the driver I am using is ath9k. So I downloaded the new driver (compat-wireless-3.4-rc3-1.tar.bz2 )
after extracting it, using
$ ./scripts/driver-select ath9k
$ sudo make install
$sudo make unload
then it works perfectly.
  1. install vpn in ubuntu
choosing PPTP
Gateway: vpn.eait.uq.edu.au
user name: uqczhan2
NT domain: EAIT
activating: MSCHAPv2
tick Use Point-to-point encryption (MPPE)
also after the connection, use $ sudo ifconfig ppp0 mtu 1200
49. check whether you are working on unity 2D or 3D
$ echo $DESKTOP_SESSION

find out whether how good you are working on Unity 3D
$ /usr/lib/nux/unity_support_test -p
50. first console mode
Ctrl+alt+F1
to let it come back
Ctrl+alt+F7






No comments:

Post a Comment