[Learn OpenCV Introduction] [001] [Ubuntu installation and configuration]

Source: Internet
Author: User

Learning environment:

1. Operating system UBUNTN

2. Study book "Learning OpenCV"

3.OpenCV version opencv-1.0.0

Root Login Configuration

UBUNTN does not allow the root user to login by default, only ordinary users and guest users can be seen in the login window. We do development need to use root permissions often, so the root user is set to automatically log on users.

1. After logging in as a normal user, enter in the terminal:

sudo passwd root to add a password to the root user.

2.su root, switch to root user.

3.vim/etc/lightdm/lightdm.conf, modify the configuration file as follows:

[Seatdefaults]

User-session=ubuntu

Greeter-session=unity-greeter

Allow-guest=false

Autologin-user=root

Autologin-user-timeout=0

Autologin-session=lightdm-autologin

4. Restart the system, do not need to enter the user name and password is good to automatically enter the root user.

Terminal Path Configuration

Ubuntu will currently display the current path in the terminal, and sometimes it will appear long when the file path is very deep. So setting the terminal path here does not echo.

1.vim ~/.BASHRC, edit the lowercase w in the line below, and change to uppercase W. Indicates that only the current directory name is displayed.

If ["$color _prompt" = yes]; Then    PS1 = ' ${debian_chroot:+ ($debian _chroot)}\[\033[01;32m\]\[email protected]\h\[\033[00m\]:\[\033[01;34m\] \w \[\033[00m\]\$ ' else    PS1 = ' ${debian_chroot:+ ($debian _chroot)}\[email protected]\h:\w \$ '

Vim installation Configuration

1. Installing Vim,apt-get install Vim

2. Set Vim to suit the style of writing code, VIM/ETC/VIM/VIMRC, the file is a public profile and is valid for all users.

Move to the bottom of the configuration file by adding the following configuration options:

1. Set (soft) tab width to 4

Set tabstop=4

Set softtabstop=4

2. Set the number of indent spaces to 4

Set shiftwidth=4

3. Set each row to be equal to the previous line

Set Autoindent

4. Set the display line number

Set Nu

SMB Installation Configuration

Ubuntu 12.04 has the latest version of the Samba server installed, without installation. If you need to install it, you can install it by using the following command:

1. Uninstalling Samba,smbclient,samba-common

Apt-get Remove Samba

2. Installing the Samba server

sudo apt-get install Samba

sudo apt-get install Smbfs

Set the password for the user to log on to the Samba server

Smbpasswd-a Root

Configure the Samba service, vim/etc/samba/smb.conf, add the following information in the share definitions location of the file to configure the root user to log in to the Samba user

[Root]

Comment = Root directories

Path =/

browseable = yes

writable = yes

Valid users = root

[Learn OpenCV Introduction] [001] [Ubuntu installation and configuration]

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.