Ubuntu的优化与设置

前言

  • 窗口颜色设置浅绿色

    1
    2
    cd /usr/share/themes/Ambiance/gtk-3.0
    sudo gedit gtk-main.css

2 常用环境

  • 安装jdk

    1
    2
    3
    4
    5
    # add java path
    export JAVA_HOME=/usr/local/java/jdk1.7
    export JRE_HOME=${JAVA_HOME}/jre
    export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
    export PATH=${JAVA_HOME}/bin:$PATH

3 安装软件

  • 在线软件安装

    1
    2
    3
    4
    # 备份源列表地址
    sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
    # 修改
    sudo vim /etc/apt/sources.list
    • 1
      2
      3
      4
      5
      6
      # 更新源
      apt-get update
      apt-get install xxx

      # 包search
      apt-cache search xxx
  • deb本地软件安装

    1
    2
    3
    4
    5
    # 安装deb包命令
    dpkg -i *.deb

    # 如果缺少依赖执行
    apt-get -f install

4 常用软件

  • mpv播放器

  • 有道字典

  • atom

    1
    2
    3
    4
    5
    6
    atom-pane {
    font-size: 16px;
    }
    .command-palette {
    font-size: 16px;
    }
  • 图标设置

    1
    2
    cd /usr/share/applications
    vim eclipse.desktop
    • 1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      #!/usr/bin/env xdg-open

      [Desktop Entry]
      Version=22.0
      Name=eclipse
      Exec=/home/gtc/Android/adt-bundle-linux/eclipse/eclipse
      Terminal=false
      Icon=/home/gtc/Android/adt-bundle-linux/eclipse/icon.xpm
      Type=Application
      Categories=Development

设备使用率指示

https://github.com/fossfreedom/indicator-sysmonitor

1
2
3
4
5
6
7
import gi
try:
gi.require_version('AyatanaAppIndicator3', '0.1')
from gi.repository import AyatanaAppIndicator3 as appindicator
except ValueError:
gi.require_version('AppIndicator3', '0.1')
from gi.repository import AppIndicator3 as appindicator

apt install gir1.2-ayatanaappindicator3-0.1

5 其他优化

  • 关闭错误报告

    1
    2
    # 关闭烦人的错误报告
    sudo gedit /etc/default/apport
  • CPU 100%占用

    1
    2
    3
    cd /usr/lib/gvfs
    # 将gvfsd-smb-brows权限改成744,取消普通用户的执行权限,
    # 也挺有意思,暂时没引发别的问题

smb

apt-get install samba vim /etc/samba/smb.conf service smbd restart smbpasswd -a xxx

1
2
3
4
5
6
7
8
9
10
vfs objects = catia fruit streams_xattr
fruit:nfs_aces = no

[share]
path = /home/talen/share
valid users = talen
available = yes
browseable = yes
writable = yes
public = no
0%