Monday, June 28, 2010

Ubuntu没有声音了怎么办? zz

http://forum.ubuntu.org.cn/viewtopic.php?p=964475

1. 问题的根源在于用户失去了访问audio设备的权限。可以通过命令

ls -la /dev/snd

来查看音频设备的使用权限。比如在我的系统下,输出

total 0
drwxr-xr-x 2 root root 180 2008-05-14 08:53 .
drwxr-xr-x 12 root root 4580 2008-05-15 13:01 ..
crw-rw----+ 1 root root 116, 8 2008-05-14 08:53 controlC0
crw-rw----+ 1 root root 116, 7 2008-05-14 08:53 hwC0D2
crw-rw----+ 1 root root 116, 6 2008-05-14 08:54 pcmC0D0c
crw-rw----+ 1 root root 116, 5 2008-05-14 14:04 pcmC0D0p
crw-rw----+ 1 root root 116, 4 2008-05-14 08:53 pcmC0D1p
crw-rw----+ 1 root root 116, 3 2008-05-14 08:53 seq
crw-rw----+ 1 root root 116, 2 2008-05-14 08:53 timer

这代表只有root和audio组的用户可以使用 音频设备。这也就是为什么
在root下Volume Control工作正常,而在其他用户下无法使用。也许是
一些错误操作将用户从audio组中删除而无法使用音频设备。解决办法是

sudo chmod -R a+rwx /dev/snd

这样就会让所有的用户可以访问音频设备。 更加恰当的方法是,

sudo usermod -a -G audio usrname.

上述操作将用户usrname添加到audio组中。

from http://blog.csdn.net/hecssy/archive/2008/08/23/2816887.aspx

2. 先用通过命令

ls -la /dev/snd查看一下声卡有没有权限。
如你在安装系统时你的名字不在列哪就说明这个用户没有权限。开通你用户的权限就可以了。方法如下
在系统管理--用户和组--点你的用户--点击以进行变更--输入你的开机密码--授权--双击你的用户名--点用户权限--把使用音频设备和视频设备都钩选--确定--重启电脑 。OK
希望对出现同样问题的朋友有所帮助。也谢谢楼上的老大给的方法。

Wednesday, June 23, 2010

Enable fold sharing in VirtualBox between Ubuntu(Host) & Windows7(Guest) OS

1.Enter VirtualBox, "Details"--> "Shared Folds", set the fold which u want share with Win7, such as: /home/katter/share

2.Enter virtual machie. "Device"-->"Install Gust Addition"

3.Enter Win7, open Command Prompt (like DOS), run the command: net use z: \\vboxsvr\share
Note: "share" is the fold i have set in Ubuntu, "z:" is not important, u can choose "x: y: i:....." as u like

Tuesday, June 22, 2010

Install an RPM Package on Ubuntu Linux (zz)

http://www.howtogeek.com/howto/ubuntu/install-an-rpm-package-on-ubuntu-linux/

Installing software on Ubuntu usually entails using Synaptic or by using an apt-get command from the terminal. Unfortunately, there are still a number of packages out there that are only distributed in RPM format.

There’s a utility called Alien that converts packages from one format to the other. This doesn’t always mean that an rpm will work on your system, though. You will need to install some prerequisite software packages in order to install alien, however. These packages include gcc and make.

Run this command to install alien and other necessary packages:

sudo apt-get install alien dpkg-dev debhelper build-essential

To convert a package from rpm to debian format, use this command syntax. The sudo may not be necessary, but we’ll include it just in case.

sudo alien packagename.rpm

To install the package, you’ll use the dpkg utility, which is the internal package management tool behind debian and Ubuntu.

sudo dpkg -i packagename.deb

The package should now be installed, providing it’s compatible with your system.

Tuesday, June 15, 2010

Add/build tools of LAMMPS

Go to the tools fold of LAMMPS,
Such as build the tool lmp2arc, do as following:

To build the program
% cd lmp2arc
% cd src
% make
% cp lmp2arc.exe ../bin

The program is only a few files so should compile
quickly.

Installing Software in GNU/Linux (zz)

http://www.linuxforums.org/forum/linux-tutorials-howtos-reference-material/64958-how-install-software-linux.html

Tuesday, June 8, 2010

tips for running .bashrc

Error: bash: export: `-L/usr/local/lib': not a valid identifier
Answer: that error is what you would get if you had a space before and after the '='. No spaces!