ubuntu18.04优化与使用

ubuntu 18.04优化与使用

开机自启动

ln -fs /lib/systemd/system/rc-local.service /etc/systemd/system/rc-local.service
touch /etc/rc.local
chmod 755 /etc/rc.local
vim /etc/rc.local

我想将自己写的http代理加入开机自启动,所以rc.local内容如下

#!/bin/bash
cd /home/x1/bin/proxy
(./proxy &>> proxy.log &)
lsof -i:8081||echo

方便地设置http代理

要设置浏览器(chrome)使用代理,使用ubuntu的设置即可。而要在shell中使用代理,每次都需要输两行export。为了方便地设置shell使用的代理

/home/x1/bin文件夹加入path;在此文件中新建passunpass两个文件,修改权限为755。然后各自输入以下:

#! /bin/bash
# 设置http代理,使用方法:
# 在terminal中输入 ". pass" (前提是将此路径加入path)
# 效果:该terminal将使用如下的代理
export http_proxy=http://127.0.0.1:8081
export https_proxy=http://127.0.0.1:8081pass

#! /bin/bash
# 清除http代理,使用方法:
# 在terminal中输入 ". unpass" (前提是将此路径加入path)
# 效果:该terminal将不使用代理
export http_proxy=""
export https_proxy=""

这样,在任一shell中执行. pass就设置了当前shell的代理。

界面优化相关

安装dconf-editorgnome-tweak-toolgnome-shell-extension

这三个工具就是优化界面的主要工具

sudo apt install dconf-editor
sudo apt install gnome-tweak-tool
sudo apt install gnome-shell-extensions

我所做的优化

安装Hide top panel(隐藏顶部的横栏)、dash to pannel(形成类似windows的文任务栏),gnome拓展。详细不说了,我也是搜来的。

安装windows字体,并设置字体放大1.25

安装windows字体其实就是把双系统下windows中C:\Windows\Fonts下的所有字体,复制到/usr/share/fonts/windows中。注意坑:ubuntu下打不开windows存放字体的那个文件夹,所以需要提前在windows中讲fonts压缩好。

字体放大1.25,使用之前安装的tweak(优化),修改字体为微软雅黑,缩放比例为1.25。
ubuntu18.04优化与使用

为什么要安装windows字体呢?主要因为ubuntu自带的字体放大之后模糊。使用微软雅黑之后就没有这个问题。另外,很多网页都设置font-family为雅黑,安装个雅黑总是好的。