Ubuntu

Ubuntu用户和开发人员的问答


2
如何禁用触摸板上的右键
我想知道是否有一种方法可以禁用右键单击按钮,同时仍然可以使用两指单击选项...我的触控板是完全可单击的,并且我经常单击某些东西,当我不小心打开菜单时我不打算 任何帮助是极大的赞赏!
13 mouse  trackpad 

2
pyvenv vs venv vs python-virtualenv vs virtualenv和python 3
malikarumi@Tetouan2:~$ pip install virtualenv Collecting virtualenv Downloading virtualenv-12.0.7-py2.py3-none-any.whl (1.8MB) 100% |################################| 1.8MB 330kB/s malikarumi@Tetouan2:~$ pip freeze (a lot of stuff, but not virtualenv) malikarumi@Tetouan2:~$ virtualenv testvenv1 The program 'virtualenv' is currently not installed. You can install it by typing: sudo apt-get install python-virtualenv 这里发生了什么?是python-virtualenv == pyvenv吗?还不是很坏吗?原始的virtualenv仍然可以与python一起使用吗?如果venv(名称变体太多!!)是标准库https://docs.python.org/3/library/venv.html的一部分,为什么要告诉我安装它? 当我确实尝试安装它时,我得到了: malikarumi@Tetouan2:~$ sudo apt-get …
13 apt  python  pip  virtualenv 


2
在不使用sudo的情况下运行Composer(尝试更改所有者和权限)
每次我运行作曲家(例如,sudo composer install, sudo composer self-update等等)时,我都需要使用sudo来运行它,因为文件的所有者是root。 但是,每次我在sudo上使用composer时,root拥有vendor文件夹,然后我必须将该文件夹/特权的所有者从root更改为www-data。 解决此问题的最佳方法是什么,这样我就不必每次都运行sudo了? 将所有者/usr/local/bin/composer从根更改为www-data? 这是处理此问题的理想方法,以避免每次我使用sudo时都不必更改所有权和分配权限composer install吗? 编辑: 作曲者的权限当前为-rwxr-xr-x。我已经试过的所有者切换/usr/local/bin/composer到www-data:www-data设置为775权限,我仍然无法不运行运行作曲家sudo。
13 14.04  sudo  root 

3
为什么非root用户不能超过4096个最大打开文件?
nofile尽管遵循与该问题相关的每个StackExchange回答,但我似乎都无法提高Ubuntu 14.04上非root用户的限制。到目前为止,我有: $ cat /etc/security/limits.d/custom.conf @www-data hard nofile 50000 @www-data soft nofile 50000 # even tried specifying the username directly: myuser hard nofile 50000 myuser soft nofile 50000 $ grep 'limits' /etc/pam.d/common-session* /etc/pam.d/common-session:session required pam_limits.so /etc/pam.d/common-session-noninteractive:session required pam_limits.so $ cat /proc/sys/fs/file-max 101232 重新启动,登录并: $ ulimit -n 4097 -bash: ulimit: open …
13 14.04  ulimit 

3
如何为Python 3.4安装sympy
我使用从这里获取的以下命令安装了python scipy堆栈 sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose 不过,我可以导入sympy只有在Python 2.7.6这时候我输入默认的Python版本python的终端。当我Python 3.4.0输入时python3,该import sympy语句将引发错误 >>> import sympy Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'sympy' 我该如何解决这个问题?
13 python  python3 

1
在VM上进行更新后,如何为“ GRUB安装设备”选择什么?
这与更新后为“ GRUB安装设备”选择什么完全相同?-也许不是,因此提出了要求,因为我正在通过Vagrant在Virtualbox计算机上运行Ubuntu。 我无法更新包,所以我跑了sudo apt-get update那么sudo apt-get dist-upgrade。它显示以下消息: The GRUB boot loader was previously installed to a disk that is no longer present, or whose unique identifier has changed for some reason. It is │ │ important to make sure that the installed GRUB core image stays in sync with GRUB …


3
如何使用vim-youcompleteme
我是vim-youcompleteme从Ubuntu的软件中心下载的。但是我不知道如何使它工作。重新启动vim并进行测试时,没有发生任何特殊情况。而且vim-syntastic是一样的。有人可以告诉我如何使它们工作吗?我应该对自己做些什么~/.vimrc吗?提前致谢!
13 vim-plugin 

4
如何找出我拥有的NVIDIA GPU
我正在尝试使用此页面中的信息来优化我的GPU性能。为此,我需要知道我拥有哪个NVIDIA GPU。 我尝试了该命令sudo lshw -C display,但得到的输出不是很有帮助: *-display:0 UNCLAIMED description: VGA compatible controller product: GD 5446 vendor: Cirrus Logic physical id: 2 bus info: pci@0000:00:02.0 version: 00 width: 32 bits clock: 33MHz capabilities: vga_controller bus_master configuration: latency=0 resources: memory:e8000000-e9ffffff memory:ee080000-ee080fff *-display:1 description: VGA compatible controller product: NVIDIA Corporation vendor: NVIDIA Corporation …
13 nvidia  gpu 

1
开启SSH连接时防止机器进入休眠状态
我试图通过在桌面不活动时将其切换到挂起模式来节省电量。但是,许多桌面也可以由其所有者通过SSH访问。已部署了一个waokelan解决方案,以使所有者能够打开计算机,但是问题是,即使SSH连接已打开,计算机也将在10分钟内再次自动挂起。 我想要做的是在“活动”定义中包括活动的SSH会话。 问题是可以通过设置polkit规则来完成吗?是否可以通过放置一个在实际挂起之前运行的脚本来完成,如果找到SSH会话,则将其中止?我需要一个干净的合法方法。如果不是那样,那么也欢迎采用骇人听闻的方式。 当前的朴素hacky解决方案:编辑/usr/sbin/pm-suspend: #check for SSH sessions, and prevent suspending: if [ "$(who | grep -cv "(:")" -gt 0 ]; then echo "SSH session(s) are on. Not suspending." exit 1 fi 这达到了目的。但是我不知道更新什么时候会覆盖文件/usr/sbin/pm-suspend。我也不知道这如何与tuxonice之类的其他挂起实现一起工作。


1
如何在Ubuntu上手动安装ntfs-3g(ntfsprogs)?
最近,我想修复NTFS文件系统损坏的SATA硬盘之一。为此,我提到了一个问题:Ubuntu 13.04无法从Windows之前的系统中挂载磁盘驱动器,在Windows中已在其中ntfsprogs安装了一个名为的工具。 由于ntfsprogs即使在运行后我也没有在Ubuntu Software Center上遇到该软件包sudo apt-get update,如何获得它?

5
“ / usr / bin / ld:找不到-lcudart”
我是Ubuntu的新手,并且使用Ubuntu 14.04 64位。我想make一个项目,用途cuda和opencv运行时,我得到了以下错误cmake . && make Linking CXX executable ground_estimation /usr/bin/ld: cannot find -lcudart collect2: error: ld returned 1 exit status make[2]: *** [ground_estimation] Error 1 make[1]: *** [CMakeFiles/ground_estimation.dir/all] Error 2 make: *** [all] Error 2 这是输出 ld -lcudart --verbose attempt to open /usr/x86_64-linux-gnu/lib64/libcudart.so failed attempt to open /usr/x86_64-linux-gnu/lib64/libcudart.a failed …
13 compiling  make  cuda  opencv 

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.