我用的ubuntu设置
search.fs_uuid 2490e456-7285-4e1f-923d-f2dbca786508 root hd1,msdos10
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
sudo apt-get install fcitx-table-wbpy
cd ~/
mkdir Desktop Download Template Public Document Music Picture Video
vim ~/.config/user-dirs.dirs
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Download"
XDG_TEMPLATES_DIR="$HOME/Template"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Document"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Picture"
XDG_VIDEOS_DIR="$HOME/Video"
synclient touchpadoff=1 //--关闭触摸板(16.04目前无效)
synclient touchpadoff=0 //--开启触摸板(16.04目前无效)
或:
gconftool-2 --toggle /desktop/gnome/peripherals/touchpad/touchpad_enabled
// 开关触控板(16.04目前无效)
#!/usr/bin/env python
import os
def check_touchpad_state(dev_num):
dev_state = os.popen('xinput list-props %s' % str(dev_num))
for lines in dev_state.readlines():
if 'Device Enabled' in lines:
sig = lines[-3:-1].strip()
signal = int(sig)
print ('signal now :%d' % signal)
return signal
def get_dev_num(dev_name = 'SynPS/2 Synaptics TouchPad'):
dev_state = os.popen('xinput list')
for lines in dev_state.readlines():
if dev_name in lines:
print (lines)
station = lines.find('id=')
dev_num = lines[station + 3: station+5]
dev_num = int(dev_num)
print ('dev_num: %d' % dev_num)
return dev_num
dev_state.close()
def change_state(state_value, dev_num):
print ('state_value = ', state_value)
state = not state_value
if state == True:
state = 1
#else:
#state = 0
#print ('state = ', state, str(state))
tem = os.popen("xinput set-prop %s 'Device Enabled' %s" % (str(dev_num), str(state)))
tem.close()
def main():
dev_num = get_dev_num()
state = check_touchpad_state(dev_num)
change_state(state, dev_num)
if __name__ == '__main__':
main()
保存成py文件,增加x权限,链到/usr/local/bin中,再增加快捷键。
Meta //win键,长按,显示快捷键信息
ctrl + h //显示隐藏文件(.开头的文件)
shift + delete //永久删除
Meta + D //显示桌面
Meta + S //打开工作区切换器
alt + print //对窗口截图
shift + print //对选区截图
Dash搜索:fcitx五笔输入时,输入法看不清,可能直接输入中文拼音字母
sudo gedit /etc/default/rcS
sudo hwclock --systohc --localtime
sudo apt-get install nvidia-331 nvidia-settings nvidia-prime
//331是版本,可以先用aptitude search查看有什么版本,然后确定用什么版本,或到上述官网看支不支持自己的显示
sudo apt-get remove --purge nvidia-331
// 用于卸载显示驱动的,版本要对应
sh ./nvidia.run --uninstall
// 网管下载的驱动用此命令
lspci|grep -i vga
//列出双显示卡工作情况, “rev ff”表示关闭 , “rev+数字” 表示打开
sudo blkid
//查看分区正确的UUID
sudo vim /etc/fstab
//将分区错误的UUID修改成正确的
//也可用gedit修改
sudo gedit /etc/fstab
sudo apt-get remove vim-common
//卸载旧版本
sudo apt-get install vim
//安装full版vim
sudo gedit /etc/environment
//添加下面两行
UNZIP="-O CP936"
ZIPINFO="-O CP936"
//上述方法不行,用下面命令解压
unzip -o gbk xxx.zip
vim ~/.profile
//添加下面两行,可以解决 Rhythmbox、Totem 等以 GStreamer 为后端的播放器的乱码问题
export GST_ID3_TAG_ENCODING=GBK:UTF-8:GB18030
export GST_ID3V2_TAG_ENCODING=GBK:UTF-8:GB18030
sudo gedit /etc/NetworkManager/system-connections/ubuntu
//ubuntu 为设我们设置的wifi名称
//mode = infrastructure 改成 mode = ap
sudo apt-get install build-essential
sudo apt-get remove vim-common
sudo apt-get install vim-full
打开终端:
gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-minimize-window true
将 Ubuntu 16.04 LTS 的 Unity 启动器移动到桌面底部命令:
gsettings set com.canonical.Unity.Launcher launcher-position Bottom
恢复到原来的左侧命令:
gsettings set com.canonical.Unity.Launcher launcher-position Left
gsettings set com.canonical.indicator.datetime time-format 'custom' gsettings set com.canonical.indicator.datetime custom-time-format '%m月%d日 %A%H:%M:%S'
sudo apt-get -f install
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install libc6 libchm1 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk2.0-0 libpango1.0-0 libwebkitgtk-1.0-0 libxml2
sudo dpkg -i libgcrypt11_1.5.3-2ubuntu4.3_amd64.deb
sudo dpkg -i chmsee_1.3.0-2ubuntu2_amd64.deb
sudo apt-get install ttf-mscorefonts-installer
它的本质是安装 Courier New字体;
安装的时候会出现一个协议 ,按TAB键 ,可以选中<确定>按钮,按Enter 。
方法一:终端输入 ps -aux ,列出进程。找到含有apt-get的进程,直接sudo kill PID。
方法二:强制解锁,命令
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
./configure --prefix=/usr/local/zhman --disable-zhtw
// 安装到/usr/local/zhman下
make
make install
alias cman='man -M /usr/local/zhman/share/man/zh_CN'
source .bashrc