修改 apt 源vi /etc/apt/source.list
注释第五行
#deb cdrom:[Debian GNU/Linux 10.2.0 _Buster_ - Official amd64 DVD Binary-1 20191116-09:57]/ buster contrib main
在末尾添加清华源
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
apt update
之后进行apt install vim
sudo 管理文件是/etc/sudoers
,并在第20行后添加
# User privilege specification
root ALL=(ALL:ALL) ALL
username ALL=(ALL:ALL) ALL
sudo apt install fcitx libqt4-declarative
# 到官网下载搜狗输入法 linux 版本
dpkg -i sougou**.deb
sudo apt install -f
dpkg -i sougou**.deb
复制/usr/share/X11/xorg.conf.d
到/etc/X11
后修改/usr/share/X11/xorg.conf.d
sudo cp -R /usr/share/X11/xorg.conf.d /etc/X11/
sudo vim /usr/share/X11/xorg.conf.d/40-libinput.conf
在37行后添加设置
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
# 启动轻触即点击
Option "Tapping" "on"
# 启动自然滚动
Option "NaturalScrolling" "true"
# 点击方式为手指,单指左键,双指右键,三指中键
Option "ClickMethod" "clickfinger"
# 键入是禁用触摸板
Option "DisableWhileTying" "true"
EndSection
首先需要正常 启动/关闭 计算机,然后安装 NVIDIA 显卡驱动,再设置显卡配置,最后设置双屏.
nouveau.modeset=0
禁用 nouveau 驱动即可.sudo apt install nvidia-settings
lspci |grep VGA
查看显卡硬件信息00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)
cp /etc/X11/xorg.conf /etc/ X11/xorg.conf.bak
,而我使用 Debian10 却没有 xorg.conf需要创建.添加/修改的内容如下:Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
BusID "1:0:0" ##这里根据自己的BusID更改,我的 N 卡是 01:00.0 所以是 1:0:0
VendorName "NVIDIA Corporation"
EndSection
sudo vim /usr/local/bin/nvidia_switch.sh
后赋予运行的权限sudo chmod +x /usr/local/bin/nvidia_switch.sh
#添加内容,其中96为dpi,普通屏幕无需修改,高分辨率的请自行参考资料
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
xrandr --dpi 96
/etc/lightdm/lightdm.conf
并去掉#displaysetupscript=
前面的‘#‘修改为:display-setup-script=/usr/local/bin/nvidia_switch.sh
,保存之后重启 lightdm.systemctl restart lightdm.service
xrandr --output eDP-1-1 --auto --primary
xrandr --output HDMI-0 --right-of eDP-1-1 --auto
PS:双屏显示太坑,子上次重装系统之后发现必须连接双屏才能使用,否则 lightdm 报错无法进入登录界面,一整天没有找到合适的资料之后不了了之,转投 Ubuntu 了
原文:https://www.cnblogs.com/ha0zi/p/12202978.html