Xinspace


  • 首页

  • 归档

  • 搜索

Open directories in single window on CentOS

发表于 2014-04-15 | 分类于 Others

The default mode of opening a folder on CentOS is opening in a new window. That’s not convinent for me to go back or forward and it is hard to copy the path of current file.

We can change this mode.

1.Open a window.
2.Click Edit->Preferences->Behavior, click the option:Always open in browser windows.
3.close your window and reopen it.

Install CMake on CentOS 6.5

发表于 2014-04-15 | 分类于 Others

CMake is a cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software.

DOWNLOAD AND EXTRATION

1.Download
wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2-Linux-i386.tar.gz

2.Extration
$tar -xzf cmake-2.8.12.2-Linux-i386.tar.gz

Then you will find cmake-2.8.12.2-Linux-i386 folder in current folder.

INSTALL

$sudo mv ./cmake-2.8.12.2-Linux-i386 /opt/

USAGE

You can use cmake as:
$/opt/cmake-2.8.12.2/bin/cmake …..

Or you can add the /opt/cmake/bin into the $PATH.

ADD INTO $PATH

$sudo vim ~/.bash_profile
$PATH=/opt/cmake02.8.12.2/bin:$PATH

And then save and quit, execute the follow command

$source ~/.bash_profile

ORIGINAL ARTICLE:http://www.geeksww.com/tutorials/operating_systems/linux/installation/downloading_compiling_and_installing_cmake_on_linux.php

Install Eclipse on CentOS 6.5 - jdk

发表于 2014-04-15 | 分类于 Others

Eclipse is a universal IDE for developer. It is strong because you can add plugins to do what you want on eclipse. Now, let me tell you how to instal it.

DOWNLOADS

1.Download JDK from the website:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html:http://www.if-not-true-then-false.com/2010/install-sun-oracle-java-jdk-jre-7-on-fedora-centos-red-hat-rhel/ ORIGINAL ARTICLE(Install Eclipse):http://www.if-not-true-then-false.com/2010/linux-install-eclipse-on-fedora-centos-red-hat-rhel/ “eclipse”)

阅读全文 »

Cannot find -IGL in QT Project

发表于 2014-04-15 | 分类于 Others

When compile a GUI project in QtCreator, the error shows that “Cannot find -IGL”. It is probably because of missing libGL, so you just install the libGL.

COMMANDS

$sudo yum list | grep libGL //This is checking what kinds of libGL libraries in your sources.

The output like:

mesa-libGL.i686 9.2-0.5.el6_5.2 @updates
mesa-libGL-devel.i686 9.2-0.5.el6_5.2 @updates
mesa-libGLU.i686 9.2-0.5.el6_5.2 @updates
mesa-libGLU-devel.i686 9.2-0.5.el6_5.2 updates
mesa-libGLw.i686 6.5.1-10.el6 base
mesa-libGLw-devel.i686 6.5.1-10.el6 base

Thus, we should install the mesa-libGL.i686 & mesa-libGL-devel.i686

$sudo yum install mesa-libGL.i686 mesa-libGL-devel.i686

When completed, compile your project again and it will pass.

Create Alias on Linux

发表于 2014-04-14 | 分类于 Others

To create an alias in CentOS first you need to open your .bashrc file in an editor and add an alias declaration. Each user has their own .bashrc file and the aliases in each of those files only apply to those users when logged into their own account so the aliases for the root user will be in here:

/root/.bashrc

But the aliases for a user named bob would be in here:

/home/bob/.bashrc (if that was the user bob’s home directory)

Ok lets look at the syntax.

A basic alias looks like this:

alias keyword=’target’

Where keyword is the word you will enter and target is the word, phrase or command that will actually be entered in the shell.’’’)

Lets say you are logged in as root and you commonly wish to access a remote server via ssh. Open the .bashrc file in /root in your favorite text editor (we will use vi).

Add a new entry in this format:

alias myserver=’ssh root@192.0.32.10‘

save the file and close your shell. Open a new shell to be able to use the new alias and type myserver and then enter (or return) and it will be just as if you had typed ssh root@192.0.32.10

Each alias goes on it’s own line in .bashrc and remember you won’t be able to use the alias until you open a new shell.

ORIGINAL ARTICLE:http://www.networkredux.com/answers/dev-and-distros/centos/how-do-i-create-an-alias-in-centos

Stop Touchpad

发表于 2014-04-14 | 分类于 Others

I like stoping the touchpad when using laptop bacause my hands may sometimes touch it and the mouse pointer will go somewhere not expected. However, it’s not easy to stop touchpad with GUI on CentOS(not like Fedora, we can stop it in System Settings of Mouse).

Lots of articles tell me to modify the xorg.conf file, and then use the command $synclient TouchpadOff=1/synclient TouchpadOff=0 to stop or start touchpad, but it is not universal for all platforms. Finally, I found a perfect solution and guide me implement it.

INSTALL

Install xinput
$sudo yum install xorg-x11-apps

SOLUTION

1.Look for the pointer id of touchpad
$xinput –list

The output will like this(pic):

2.We find this record: SynPS/2 Synaptics TouchPad id=14. It indicates my touchpad id is 14.

3.Stop or start it:
stop: $xinput set-int-prop 14 “Device Enabled” 8 0
start: $xinput set-int-prop 14 “Device Enabled” 8 1

ALSO

1.Use the script. Starting or stoping it with command everytime will let me crazy. Thus, we can use the script.The content below:

#########################################################################

File Name: Touchpad.sh

Author: Your_Name

mail: Your_Email

Created Time: Your_Create_Time

#########################################################################

#!/bin/bash

#echo “i.e. type command ‘touchpad on’ will TURN ON Touchpad”

if [ $1 == ‘on’ ]
then
xinput set-int-prop 14 “Device Enabled” 8 1
echo “Touchpad On”;
elif [ $1 == ‘off’ ]
then
xinput set-int-prop 14 “Device Enabled” 8 0
echo “Touchpad Off”;
else
echo “Parameter: on/off”;
fi

######################End####Of#####File#################################

I suppose you named the sh file as /opt/commands/Touchpad.sh.

2.Modify the mode and execute it.
$sudo chmod 755 /opt/commands/Touchpad.sh

You now can start or stop touchpad with the command:
start:$/opt/commands/Touchpad.sh on
stop:$/opt/commands/Touchpad.sh off

3.Startup. You also can add the sh file to the startup list of the system. If so, the touchpad will stop as the system start and that’s what I want. We can add a command to the /etc/rc.local, which is the last one to be loaded by system and the command in it will be executed.
$sudo vim /etc/rc.local

And add this line to the file:/opt/commands/Touchpad.sh off
Then save and quit.

4.Restart your computer.

ORIGINAL ARTICLE(script touchpad): http://www.iewb.net/index.php/qg/4017.html
ORIGINAL ARTICLE(startup list): http://www.cnblogs.com/gzggyy/archive/2012/08/07/2626574.html

Install Chinese input method with yum on CentOS

发表于 2014-04-14 | 分类于 Others

INSTALL

1.$sudo yum install “@Chinese Support”

2.Back to Desktop, go to System->Preferences->Input Method, and pop up a dialog. If you do not find Input Method option, log out first, and then log in. Find it again.

3.Choose Enable input method feature in the pop up dialog. Choose Use IBus, and click the button(Input Method Preferences) and you can modify the settings.

ORIGINAL ARTICLE: http://hi.baidu.com/dragonqs/item/d90d974bea2d860dc11613b6

Install flash plugin in firefox in Linux(CentOS)

发表于 2014-04-14 | 分类于 Others

The default web browser in fedora or CentOS is firefox. When watching videos on net, firefox always says “install the flash plugin”. But after downloading from adobe and installing flash plugin, restarting firefox, the saying occured again. It is aweful.

I find an article to solve the problem.

DOWNLOAD
Go to the website:http://get.adobe.com/cn/flashplayer/, and choose a proper plugin, means suit for your system and browser. And I suggest you download the tar.gz file.

阅读全文 »

libavcodec.so.55:undefined reference to vpx_codec_vp9_dx_algo

发表于 2014-04-14 | 分类于 Others

When I install the OpenCV with the guide(in the website:http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html, some errors occured as I excute the command "make", the errors like: Linking CXX executable ../../bin/opencv_perf_core /lib/libavcodec.so.55: undefined reference to `vpx_codec_vp9_dx_algo “OpenCV Guide”)), some errors occured as I excute the command “make”, the errors like:

Linking CXX executable ../../bin/opencv_perf_core
/lib/libavcodec.so.55: undefined reference to vpx_codec_vp9_dx_algo' /lib/libavcodec.so.55: undefined reference tovpx_codec_vp9_cx_algo’
collect2: error: ld returned 1 exit status
make[2]: [bin/opencv_perf_core] Error 1
make[1]:
[modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
make: *** [all] Error 2

So, I went to the net to search why, but nothing benefits me. I had tried these commands:

$sudo yum install ffmpeg
$sudo yum install avcodec

and they had no effects. In the end, I tried the follow command:

$sudo yum install libvpx.i686 libvpx-devel.i686 libvpx-utils.i686

and then it worked.

Install VLC on CentOS 6.5

发表于 2014-04-14 | 分类于 Others

VLC is a useful when we watch videos on CentOS even Linux system.

DOWNLOAD:

Get VLC from the website:http://www.videolan.org/vlc/

You can choose the proper version that suits your computer system.

 

INSTALL

Install VLC with the following commands(symbol ‘//‘ for anotate)

$sudo yum clean all //clean the cache

$sudo yum update

$sudo yum install libvoribis

And now, the basic dependencies are completely installed. Contract VLC install package you download before, and entry the directory, and follow the commands below:

$./configure

When I did this, an error occured:

Error: Package tuple (‘gstreamer1-plugins-base’, ‘i686’, ‘0’, ‘1.2.2’, ‘1.fc20’) could not be found in rpmdb

Then

$sudo yum install gstreamer1-plugins-base

$./configure

Again occured an error:

configure: error: No package ‘libavcodec’ found No package ‘libavutil’ found. Pass –disable-avcodec to ignore this error.

阅读全文 »
1…111213…17

Xinspace

Personal blog from xin.

170 日志
6 分类
1 标签
© 2019 Xinspace
由 Hexo 强力驱动
|
主题 — NexT.Muse v5.1.4