Configuration notes of Bt5

Source: Internet
Author: User
Tags gz file filezilla

BT5 was originally modeled on Ubuntu 10.04. Therefore, when I configure BT5, I basically configure it according to the configuration method of Ubuntu 10.04.
1. Basic System settings
1.1 install Ubuntu10.04
When partitioning, allocate the most disk space to the root directory, allocate 200 MB to the boot directory, and allocate twice the memory space to the swp directory.
 
1.2 use a USB flash drive UltraISO to create Ubuntu 10.04
Install Apsara Stack
Insert USB flash drive
Run Apsara stack as an administrator
Start the CD-> write the hard disk image
Select usb flash drive and write mode usb-hdd +
Complete
 
1.3 update source
(1) backup source sudo cp/etc/apt/sources. list/etc/apt/sources. list_backup
(2) edit the source sudo gedit/etc/apt/sources. list
Edit your source List, delete all the original content, add a source that best suits you, copy it to your list, and save the list. I use the 163 Source:
(3) update source sudo apt-get update
(4) upgrade sudo apt-get upgrade
(5) upgrade the system sudo apt-get dist-upgrade.
 
1.4 change the position of the close button on the left
The biggest change of ubuntu10.04 may be that the "maximize" and "close" buttons are moved to the left.
Press alt + F2 to enter the application program, enter gconf-editor to enter the configuration editor, and enter/apps/metacity/general/button_layout in turn.
Change the key values close, minimize, and maximize to menu: minimize, maximize, and close.
Use sudo gconf-editor to modify the above content again.
 
1.5 Chinese garbled characters
1.5.1 gedit
After editing the txt file in Windows and opening it with Gedit in Ubuntu, garbled characters are displayed. This is caused by different encoding methods. In Windows, the txt file is encoded in GBK format. By default, Ubuntu Gedit does not support GBK. You need to manually configure it.
(1) Open the terminal, enter "gconf-editor", Press enter to open the configuration editor;
(2) Find/apps/gedit-2/preferences/encodings on the left Tree node and click it;
(3) double-click the auto_detected key on the right to open the "Edit key" dialog box;
(4) Click "add" on the right of the list, enter "GB18030", and click "OK". A "GB18030" is added at the bottom of the list ". If you are not at ease, you can add GBK and GB2312 encoding.
(5) Select "GB18030" to move it to the top of the list. If you find no garbled characters after Step 4, this step can be omitted.
(6) but after this solution, it will lead to new problems, that is, when an empty document is opened, gedit will crash, so the solution I have summarized is, put the UTF-8 to the top of it.
(7) Use sudo gconf-editor to modify the above content again to solve the problem of Chinese garbled characters editing documents using sudo gedit.
 
1.5.2 Chinese Characters in Flash are displayed as squares
Edit the/etc/fonts/conf. d/49-sansserif.conf File
Modify row 18th and set
<Edit name = "family" mode = "append_last">
<String> sans-serif </string>
</Edit>
Change
<Edit name = "family" mode = "append_last">
<String> sans </string>
</Edit>
 
1.5.3 Chinese garbled characters in pdf
Sudo apt-get install poppler-data
Sudo mv/etc/fonts/conf. d/49-sansserif.conf/etc/fonts/conf. d/49-sansserif.conf.backup
 
1.5.4 more Chinese Fonts
(1) copy the required font in windows, usually in C/WINDOWS/FONTS.
(2) In home/your username, create a folder named ". fonts" (the previous dot indicates a hidden folder) and put the copied folder in ". fonts"
 
1.6 how to enable the system to start from windows by default
The file names of script files in the/etc/grub. d directory start with numbers, which determines the order in which each file content is executed when update-grub is executed.
We only need to change the number 30 of the 30_os-prober file name to a number between 05 and 10 (not many options are 06, 07, 08, AND 09), for example, 08_os-prober.
In this way, the menu items in the created grub. cfg are automatically sorted before ubuntu.
Cd/etc/grub. d
Sudo mv 30_os-prober 08_os-prober
You can also manually modify the grub2 STARTUP configuration file.
Sudo cp/boot/grub. cfg/boot/grub. cmd_backup
Sudo gedit/boot/grub. cfg
 
1.7 right-click the terminal and choose
Sudo apt-get install nautilus-open-terminal
 
1.8 open the folder as root
Sudo apt-get install nautilus-gksu
 
1.9 Firefox settings
Enter "about: config" in the address bar of Firefox, and then modify the options given below to the corresponding values.
Network. http. pipelining> set to True
Network. http. pipelining. maxrequests> is set to 8 or 10.
Network. http. proxy. pipelining> set to True
 
1.10 enable 3d Desktop
Sudo apt-get install compizconfig-settings-manager
 
Http://forum.ubuntu.org.cn/viewtopic.php? T = 140531
 
1.11 shortcut keys
Basic shortcut for Ubuntu operations
* Open the main menu = Alt + F1
* Run = Alt + F2
* Display desktop = Ctrl + Alt + d
* Minimize the current window = Alt + F9
* Maximize the current window = Alt + F10
* Close current window = Alt + F4 * capture full Screen = Print Screen
* Truncate window = Alt + Print Screen
* Show All window Programs = F10
* Display the top program of the current window = F11
* Show All Programs in the current window = F12
* Switching window = Alt + Tab
* Rotate the 3D desktop = Ctrl + Alt + left/right arrow
* Rotate the 3D desktop (the activity window follows) = Ctrl + Shift + Alt + left/right arrow
* Manually rotate the 3D desktop = Ctrl + Alt + Left click and drag the blank area on the desktop
* Window Transparency/opacity = possible with the "transset" utility or Alt + scroll wheel
* Zoom in once = super key + right-click
* Manual zoom in = super key + scroll up
* Manually zoom out = super key + scroll down
* Move the window = Alt + left-click
* Place a border when moving the window = left click to start dragging and then Ctrl + Alt
* Adjust the window size = Alt + medium click
* Bring up the window below the top window = Alt + middle-click
* Dynamic effect deceleration = Shift + F10
* Water print = press Ctrl + super key
* Rain = Shift-F9
* Expand desktop = Ctrl + Alt + down arrow, then press Ctrl + Alt and left/right arrow to select Desktop
Nautilus
Shift + Ctrl + N-new folder, useful
Alt + Enter-view the properties of the selected file/folder, instead of right-clicking to select Properties
Ctrl + 1/2-change the folder view, icon view/List View
Ctrl + W-close the current Nautilus window
Ctrl + Shift + W-close all Nautilus windows
Ctrl + T-create a new tag in Nautilus
Alt + Up/Down Arrow-move to parent folder/selected folder
Alt + Left/Right Arrow-backward/forward
Alt + Home-move directly to the main folder
F9-The Nautilus sidebar is displayed
Ctrl + H-hide folder
Others
Ctrl + Alt + L-lock screen
Alt + F1-open the application menu
Alt + F2-open the "run application" dialog box
Win + scroll wheel-zoom in/out the screen
 
2 Software Installation
2.1 install additional copyrighted programs for Ubuntu
Sudo apt-get install ubuntu-restricted-extras
 
2.2 install the RAR compression/decompression program
Sudo apt-get install rar unrar
Create soft link
Sudo ln-fs/usr/bin/rar/usr/bin/unrar
In this way, you only need to enter unrar in the command line to decompress Or compress the file. After the installation is complete, the archive Manager also integrates the rar component.
Install the 7zip decompression software
Sudo apt-get install unrar p7zip-full cabextract
 
2.3 install the ibus Input Method
2.3.1 Input Method self-start
After Ubuntu is installed, the ibus input method is provided, which is disabled by default in the English environment.
To configure automatic Startup of ibus, you can select System-Preferences-Startup Applications from the Ubuntu System menu. In this window, add a program:
Name: ibus-daemon
Command: ibus-daemon-d-x Cr
 
2.3.2 install smart pinyin
By default, ibus provides relatively poor Chinese input methods, and requires additional installation of ibus-pinyin. The command is as follows:
Sudo apt-get install ibus-pinyin
In this case, you also need to start the ibus-pinyin input method. Choose System-Preferences-IBus Preferences from the Ubuntu System menu,
In the "Select an Input Method" drop-down box on the input method page, Select and Add Chinese C Pinyin, which is the one with a large "spelling" in the icon, and then click the Add button, finally, use the Up button to move the Input Method to the top.
After the system is restarted, press Ctrl + space to call up the ibus input method.
 
2.3.3 install sougou dictionary
Download http://code.google.com/p/hslinuxextra/downloads/list's sougou-phrases-full.7z
Move the unzipped Andriod. db to/usr/share/pinyin-database
Change the original main. db name, and rename Andriod. db to main. db. Just deregister and re-enter the system. The success mark can be used to display the determining factor of fredeham.
 
2.4 install the compiling environment
Install gcc g ++ make and so on
Sudo apt-get install build-essential
 
2.5 install gvim
2.5.1 install vimgdb for debugging
To install vimgdb, recompile and install vim, refer to the following URL:
 
Http://wiki.ubuntu.org.cn/%E8%80%81%E6%97%A7%E6%96%87%E7% AB %A0/Gvim%E7%9A%84%E5% AE %89%E8%A3%85%E5%8F%8A%E9%85%8D%E7%BD% AE
 
To compile and install vim, you must first install and compile the vim-gtk dependency package.
Sudo apt-get build-dep vim-gtk
 
2.5.2 install ctags
Tar-xzvf ctags. xxxxxx
./Configure-prefix = installed directory
Make
Sudo make install
Ctags-version test whether the installation is successful
Or run the following command:
Sudo apt-get install exuberant-ctags
 
2.5.3 Add a gvim startup Item
Sudo cat>/usr/share/applications/gvim. desktop <"EOF"
[Desktop Entry]
Name = Gvim
Comment [zh_CN] = Gvim Editor
Exec = gvim
Icon =/usr/share/pixmaps/gnome-word.png
Terminal = false
X-MultipleArgs = false
Type = Application
Categories = Application; Development;
Encoding = UTF-8
StartupNotify = true
 
2.5.4 ignore Error alerts after gvim Compilation
Alias gvim = "gvim-reverse 2>/dev/null"
Alias tvim = 'gvim-remote-tab-silent '2. 5.5 create gvim as the IDE2.5.6. vimrc configuration file
Cp/usr/share/vim/vim72/vimrc_example.vim ~ /. Vimrc
Vim ~ /. Vimrc
Add the following content at the end of the file:
"By djk 2010.9.22 for Ubuntu 10.04
"Edit settings
Set number
Set cursorline
Set tabstop = 4
Set sw = 4
Set expandtab
Set autoindent
Set cindent
Set nobackup
Set nowritebackup
Set showmatch
Set statusline = % <% F % h % m % r % h % w % y \ % = \ line: % l \/% L \ % = \ col: % c % V \ % = \ % p %
Set laststatus = 2
Syntax enable
Syntax on
: Match diffadd' \ %> 80 v .*'
Colorscheme desert
Auto-complete brackets
Inoremap [[] <esc>: let leavechar = "]" <cr> I
Inoremap {<esc> o} <esc>: let leavechar = "}" <cr> O
"Set code folding
Set foldcolumn = 0
Set foldmethod = indent
Set foldlevel = 3
"Set Font
"Set guifont = Bitstream_Vera_Sans_Mono: h12: cANSI
"Set gfw = Yahei_Mono: h10.5: cGB2312
Solve Chinese Encoding Problems
Let & termencoding = & encoding
Set fileencodings = UTF-8, gbk, ucs-bom, cp936
Add and update the copyright according to F4.
Map <F4> ms: call TitleDet () <cr>'s
Function AddTitle ()
Call append (0, "/* =================================================== =================== ")
Call append (1 ,"#")
Call append (2, "# Author: JK David-")
Call append (3 ,"#")
Call append (4, "# Last modified:". strftime ("% Y-% m-% d % H: % M "))
Call append (5 ,"#")
Call append (6, "# Filename:". expand ("%: t "))
Call append (7 ,"#")
Call append (8, "# Description:")
Call append (9 ,"#")
Call append (10, "======================================================== =============== */")
Echohl WarningMsg | echo "Successful in adding the copyright." | echohl None
Endf
Function UpdateTitle ()
Normal m'
Execute '/# * Last modified:/s @:. * $ @ \ = strftime (": % Y-% m-% d % H: % M ")@'
Normal"
Normal mk
Execute '/# * Filename:/s @:. * $ @ \ = ":". expand ("%: t ")@'
Execute "noh"
Normal 'K
Echohl WarningMsg | echo "Successful in updating the copy right." | echohl None
Endfunction
Function TitleDet ()
Let n = 1
While n <8
Let line = getline (n)
If line = ~ '^ \ # \ S * \ S * Last \ smodified: \ S *. * $'
Call UpdateTitle ()
Return
Endif
Let n = n + 1
Endwhile
Call AddTitle ()
Endfunction
"Compile and run the program
If (has ("win32") | has ("win95") | has ("win64") | has ("win16 ″))
Let g: iswindows = 1
Else
Let g: iswindows = 0
Endif
"F5 single file Compilation
Map <F5>: call Do_OneFileMake () <CR>
Function Do_OneFileMake ()
Exec "w"
If expand ("%: p: h ")! = Getcwd ()
Echohl WarningMsg | echo "Fail to make! This file is not in the current dir! Press <F7> to redirect to the dir of this file. "| echohl None
Return
Endif
Let sourcefileename = expand ("%: t ")
If (sourcefileename = "" | (& filetype! = "Cpp" & filetype! = "C "))
Echohl WarningMsg | echo "Fail to make! Please select the right file !" | Echohl None
Return
Endif
Let deletedspacefilename = substitute (sourcefileename, '',", 'G ')
If strlen (deletedspacefilename )! = Strlen (sourcefileename)
Echohl WarningMsg | echo "Fail to make! Please delete the spaces in the filename !" | Echohl None
Return
Endif
If & filetype = "c"
If g: iswindows = 1
Set makeprg = gcc \-o \ % <. exe \ %
Else
Set makeprg = gcc \-o \ % <\ %
Endif
Elseif & filetype = "cpp"
If g: iswindows = 1
Set makeprg = g ++ \-o \ % <. exe \ %
Else
Set makeprg = g ++ \-o \ % <\ %
Endif
"Elseif & filetype =" cs"
"Set makeprg = csc \/nologo \/out: % <. exe \ %
Endif
If (g: iswindows = 1)
Let outfilename = substitute (sourcefileename, '\ (\. [^.] * \ {', '.exe', 'G ')
Let toexename = outfilename
Else
Let outfilename = substitute (sourcefileename, '\ (\. [^.] * \) $', ", 'G') let toexename = outfilename
Endif
If filereadable (outfilename)
If (g: iswindows = 1)
Let outdeletedsuccess = delete (getcwd (). "\". outfilename)
Else
Let outdeletedsuccess = delete ("./". outfilename)
Endif
If (outdeletedsuccess! = 0)
Set makeprg = make
Echohl WarningMsg | echo "Fail to make! I cannot delete the ". outfilename | echohl None
Return
Endif
Endif
Execute "silent make"
Set makeprg = make
Execute "normal :"
If filereadable (outfilename)
If (g: iswindows = 1)
Execute "!". Toexename
Else
Execute "!. /". Toexename
Endif
Endif
Execute "copen"
Endfunction
"Make settings
Map <F6>: call Do_make () <CR>
Map <c-F6>: silent make clean <CR>
Function Do_make ()
Set makeprg = make
Execute "silent make"
Execute "copen"
Endfunction
"F2 display or hide the menu bar and toolbar
Set guioptions-= m
Set guioptions-= T
Map <silent> <F2>: if & guioptions = ~ # 'T' <Bar>
\ Set guioptions-= T <Bar>
\ Set guioptions-= m <bar>
\ Else <Bar>
\ Set guioptions + = T <Bar>
\ Set guioptions + = m <Bar>
\ Endif <CR>
"Ctrl + F12 update the tags File
Set tags = tags
Au FileType cpp, c set tags + = ~ /. Vim/stl_tags
Set autochdir
Map <c-F12> :! Ctags-R-c ++-kinds = + p-fields = + iaS-extra = + q. <cr>
"-----
Plug-in management
"-----
"Taglist. vim
": Tlist open taglist window
Let Tlist_Show_One_File = 1
Let Tlist_Exit_OnlyWindow = 1
Let Tlist_Use_Right_Window = 1
Let Tlist_Sort_Type = "name"
Let Tlist_File_Fold_Auto_Close = 1
Let Tlist_Auto_Open = 0
Let Tlist_Auto_Update = 1
Let Tlist_Hightlight_Tag_On_BufEnter = 1
Let Tlist_Enable_Fold_Column = 0
Let Tlist_Process_File_Always = 1
Let Tlist_Display_Prototype = 0
Let Tlist_Compact_Format = 1
"Command wm show fileexplorer window and taglist window
Let g: winManagerWindowLayout = 'fileexplorer | taglist'
Nmap wm: WMToggle <cr>
"A. vim
"Exchange head file and source file
": A. Open the source file and header file.
": AV open source files and header files and split the screen
"Grep. vim
"Press F3 to search
Nnoremap <silent> <F3>: Grep <CR>
"Auto completion
Filetype plugin indent on
Set completeopt = longest, menu
"Omnicppcomplete
Let OmniCpp_DefaultNamespaces = ["std"]
Let OmniCpp_GlobalScopeSearch = 0
Let OmniCpp_NamespaceSearch = 1
Let OmniCpp_DisplayMode = 1
Let OmniCpp_ShowScopeInAbbr = 0
Let OmniCpp_ShowPrototypeInAbbr = 1
Let OmniCpp_ShowAccess = 1
Let OmniCpp_MayCompleteDot = 1
Let OmniCpp_MayCompleteArrow = 1
"NERD_commenter.vim
"Press ctrl + h to uncomment, and then press ctrl + h to cancel the comment.
"[Count], cc cursor following count line by line add comment (7, cc)
"[Count], cu cursor following count line by line uncomment (7, cu)
"[Count], cm cursor below count row try to add block annotation (7, cm)
", CA inserts/**/at the end of a row and enters the insert mode.
Let NERDShutUp = 1
Map <c-h>, c <space>
"Shell. vim www.2cto.com
"Press F11 to fullscreen
"Press F6 to open files directories urls and email under the cursor"
"Snipmate
Let snippets_dir = '/home/djk/. vim/snippets'
"Crefvim
"Press \ cr to invoke C-reference
"Stlrefvim
"Place the cursor over the function
"Press \ tr to go to the documentation for it
"Press \ te to go to an example that uses this function
 
2.5.7 gvim open a new file in tab Mode
Gvim-remote-tab-silent filename
You can add it to. bashrc for convenience.
Alias vim = 'gvim-remote-tab-silent'
Alias gvim = 'gvim-remote-tab-silent'
 
2.6 install the translation software stardict
Sudo apt-get install stardict
Dictionary Selection
Dictionary
Place the downloaded dictionary in a directory and enter the directory. Run the following command to install all the dictionaries At A Time:
For I in stardict * .tar.bz2; do sudo tar xjvf "$ I"-C/usr/share/stardict/dic/; done2.7 install openfetion
You can also use webfetion to send text messages free of charge using fetion.
Installation Library
Apt-get install libxml2-dev
Sudo apt-get install libgtk2.0-dev
Sudo apt-get install libssl-dev
Sudo apt-get install libnotify-dev
Sudo apt-get install libgstreamer0.10-dev
Sudo apt-get install intltool
Download the openfetion source code, go to the src directory, and execute the following command
./Configure
Make
Sudo make install
Add/usr/local/lib in/etc/ld. so. conf
Run the following command.
Sudo ldconfig
 
2.8 install smplayer
Media Player
Sudo apt-get install smplayer
 
2.9 install chmsee
View chm files
Sudo apt-get install chmsee
 
2.10 install scilab
Scientific Computing Software similar to MATLAB
 
2.11 install lunar calendar
Sudo aptitude install lunar-applet
However, there is a small problem. Because the locale I use is en_US.utf8, the calendars are displayed in pinyin. The solution is as follows:
Sudo ln-s/usr/share/locale/zh_CN/LC_MESSAGES/liblunar.mo/usr/share/locale/en/LC_MESSAGES/
 
2.12 install Eclipse
Sudo apt-get install eclipse
 
2.13 install openssh-server
In this way, you can remotely log on to ubuntu.
Sudo apt-get install openssh-server
 
2.14 install the ftp graphical interface tool filezilla
Sudo apt-get install filezilla
 
2.15 install the time management software gtg
Sudo apt-get install gtg
 
2.16 install doqi.com
Sudo apt-get install docky
 
2.17 install latex
Sudo apt-get install texlive-full
 
Http://forum.ubuntu.org.cn/viewtopic.php? T = 150168
 
3 FAQ
3.1 How to delete compiled and installed software
Cd source code src directory
Make clean
./Configure
Make
Make uninstall
 
3.2 configure the tar.gz File
Unpack the package first, and run tar-zxvf xxx.tar.gz to generate a folder named after the file name. There will be some README, INSTALL, DOC and other documents, read carefully, you can know what special settings are required for the software installation.
* Generally, a script file named configure is included in the software package to complete the configuration. You can add many parameters. You can run./configure-help to get help. For example,./configure-prefix = xxx is used to set where the software is installed. Set parameters and run./configure to generate the makefile file. This is the basis for subsequent compilation.
* Next we need to compile the file. It is very simple. Because the makefile file exists, you only need to run make to compile the file. Make is to read all the production files created by the configure script program. These files will tell make which files need to be compiled and in what order, because there may be hundreds of source program files. When make works, every command being executed and all parameters related to the command are displayed on the screen. These outputs are usually the call declaration of the compiler and all the parameters passed to the compiler. If the compiler completes the job smoothly, no error message will appear. Most compilers have clear and clear error messages, so you don't have to worry about missing an error. If you see an error, you don't have to worry about it. Most error messages do not reflect a problem in the program itself, which is usually a problem in the system or in the system. In typical cases, most of the information is generated because the file access permission is incorrect or because the file is not found.
* After compilation, the software is installed. This is simpler. make install. This command will start the installation script. Because the make command will display it when executing each command, so there will be a lot of text in front of you. If no error message is displayed, the software package is installed.
* The reverse installation is "make uninstall ".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.