配置我的Kubuntu22.04环境,将Ubuntu打造成Windows10

近期将Windows+WSL2环境切换到Kubuntu中,将Kubuntu的操作习惯配置成了类似Windows GUI操作模式(安装KUbuntu的原因也是因为不习惯Ubuntu中Gnome的操作习惯),此处记录配置过程。

修改apt源为清华源

Kubuntu安装后内置的源是cn.archive.ubuntu.com,连接速度不错,但是用了一天之后,出现Connection Reset相关问题,于是将其配置为清华源

修改/etc/apt/sources.list文件如下

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ jammy restricted main universe multiverse

将KDE打造成Windows10

  • 在KDE Store中安装并设置,由于系统自带的KDE Store无法打开,通过访问KDE Store并安装ocs-url可也可实现主题包安装
    • 全局主题(安装但不设置,仍使用Breeze) We10XOS-light-alt
    • 图标 We10X
    • 光标 We10XOS Cursors
  • 编译并安装Breeze10,由于Github上的初始版本存在编译错误,找到了一个Fork出来并修复了问题的Fixed版本Breeze10 Fixed
  • 将Breeze10的标题对齐设置为靠左,按钮设置为大

最后,配置完成的窗口风格如图
窗口风格
全局风格

其他KDE设置

  • 工作区行为-窗口特效:打开惯性晃动和神灯(惯性晃动太好玩了)
  • Fcitx5-配置附加组件-经典用户界面:调大字体,调整为16号
  • 显示设置:按照显示器比例调节高分屏缩放
  • 快捷键-KWin:设置Meta+Tab为所有窗口概览,模仿Win10 Win+Tab效果
    Win+Tab

配置GRUB

Grub每次开机都得在菜单停留10s,编辑/etc/default/grub,将GRUB_TIMEOUT修改为2
最后不要忘记

sudo update-grub

配置终端

  • 安装zsh
  • 配置oh-my-zsh,下载headline主题并配置相关.zshrc
  • 配置Konsole背景透明+模糊
  • 安装Fira Code字体,更换字体

安装常用软件

安装Flameshot并设置快捷键

FlameShot是一个Qt开发的一个截图工具,安装后在快捷键设置中设置为Meta+Shift+S,命令为/usr/bin/flameshot gui,感觉比Windows10自带截图工具好用。

安装Microsoft Edge

由于长期以来一直使用Edge,正好Edge在去年发布了Linux版本,为了同步收藏夹、密码等数据,在微软官网下载deb包后通过apt安装。
Edge

安装鹅厂应用

安装星火应用商店和Deepin Wine

  • 添加源,执行
wget -O- https://deepin-wine.i-m.dev/setup.sh | sh
  • 星火应用商店找到相应应用并安装,也可以通过apt安装,实测在Kubuntu中使用com.qq.tim.sparkcom.qq.weixin.deepin没有很大问题(存在不能截图等小问题)
  • 解决图片显示等问题
sudo apt-get install libjpeg62:i386
  • 设置高分屏
    1. 首先进入相应目录,比如
    cd ~/.deepinwine/Deepin-WeChat/
    
    1. 打开相应配置
    export WINEPREFIX=`pwd`; deepin-wine6-stable winecfg
    
    其中deepin-wine6-stable根据所安装的容器APP是dwine5还是dwine6进行修改
    3. 把显示设置中缩放调整到相应位置
    4. 避免重启应用时重新配置导致高分屏配置失效,可以修改
    kate /opt/deepinwine/tools/run_v4.sh
    
    在UpdateApp函数中修改
    UpdateApp()
    {
    	if [ -f "$WINEPREFIX/PACKAGE_VERSION" ] && [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" = "$APPVER" ]; then
    		return
    	fi
    	if [ -d "${WINEPREFIX}.tmpdir" ]; then
    		rm -rf "${WINEPREFIX}.tmpdir"
    	fi
    
    	# modify for high Dpi
    	case $BOTTLENAME in
            "Deepin-WeChat")
                return
    	esac
        
          ...
     }
    
    

其他应用安装

其他原生Linux应用,例如WPS、VSCode、Docker等,此处不赘述。
值得一提的是,Ubuntu中Texlive的安装仅在apt中安装texlive-full这个软件包即可,最好再安装一下perl-tk,方便texlive一些图形界面配置。
Linux下LaTex的编译速度远超Windows下,编译时间基本上是Windows下三分之一。

此外,可以通过

sudo apt-get install ttf-mscorefonts-installer

安装Windows下一些诸如Times New Roman等常用字体。

解决休眠后没有声音

发现休眠后,没有声音,声卡没有掉,lspci中也可以看到声卡设备,在Ask Ubuntu中找到解决办法:
/usr/lib/systemd/system-sleep中添加一个文件restart-sound,文件内容为

#!/bin/sh

# fixes xiaomi mi pro laptop sound bug https://askubuntu.com/questions/1234807/no-sound-after-sleep-ubuntu-20-04/1294354#1294354
# /usr/lib/systemd/system-sleep/restart-sound

device_id=`lspci | grep "Audio device" | cut -d" " -f1` #lspci | grep 'Audio device' | cut -d" " -f1
device_dir=`ls /sys/bus/pci/devices/ | grep $device_id`

case $1/$2 in
	pre/*)
		;;
	post/*)
		echo 1 > /sys/bus/pci/devices/$device_dir/remove
		echo 1 > /sys/bus/pci/rescan
                ;;
esac

exit 0

再给他加上执行权限即可

sudo chmod a+x restart-sound
posted @ 2022-06-21 19:07  一位诚实的骗子  阅读(1088)  评论(0)    收藏  举报