type
status
date
slug
summary
tags
category
titleIcon
password
icon
insider
🤠
在旧设备上以dual boot实际安装体验完整的linux桌面端

写在前面:Win or Linux

发行版/Distro选取考量

结论:Linux Mint(cinnamon,x11,u24)
基本考量要素:
  • N卡驱动支持+使用支持+社区热度+稳定性+开箱即用
    • Ubuntu与其下游发行版(Mint等)有发行版里最为良好的N卡支持,如果希望N卡驱动不要出问题,导致诸如:1.视频解码卡顿2.显示刷新率受限3.系统桌面无反应等问题,首选Ubuntu与其下游。
    • Ubuntu社区使用人数较多,在国内更是如此,解决方案多,作为下游的Mint可以复用几乎全部的解决方案
    • Mint提供了比Ubuntu更优的稳定性与开箱即用(N卡驱动+蓝牙驱动+Timeshift快照+应用商店(flathub))
    • 常见误区:xx发行版包更新一些,如下图的包版本,(番外:win的scoop包管理几乎全都是最新的
      • notion image
      • 实际上完全可以通过release下的deb直接安装
      • notion image
      • 或者使用brew等第三方管理工具
      • 如果是mint,可以从软件商店(flathub源)下载

什么样的适合跳车Linux

  • 对于旧设备而言,从win10转到linux的流畅感提升是较为显著的。对于现在的Linux桌面日用,很多Win上的东西都具有对应的替代品。但1.存在替代品,但很可能是下位替补2.部分(尤其国产)的应用对发行版,甚至发行版版本强耦合3.实现部分的win上效果需要一些时间配置与调整,相比win上生态支持的诸多第三方软件等数不胜数方案更费事些,不过好在是一次性的4.但凡涉及GUI的东西,linux上的稳定性是不高于windows的,你能从win上期待更高的稳定性
回到问题上,什么样的适合跳车linux?
  • 几乎不使用win生态,电脑上就不怎么装其他软件的
  • 低配置电脑,win运行有明显系统卡顿,特别适合配置甚至不达到升级win11要求的
  • 使用AMD显卡
  • 开发在日常时间占比持续达到九成以上(Linux开发体验极佳,通过go的hello world以小见大,在win上go run可能需要1-2s,wsl 1s内,linux秒出)
  • 刚需Linux实体机(比如蓝牙LDAC,驱动相关开发)
跳车前的基本原则:先学会使用更好的win

USB LiveCD与Timeshift快照

  • 不同于Windows中自动管理的快照与恢复,Linux中需要自行进行快照管理,Mint中已经安装上Timeshift快照,可以设置为每次启动快照,会在每次启动10min后打一次快照
  • 在系统无法进入时,可以通过USB LiveCD进入系统进行快照恢复

dual boot预备工作

  • rufus制作LiveCD USB
  • win上创建磁盘xxx功能/分区助手软件清出一段空闲空间
  • 插入LiveCD重启安装即可(Mint自动安装在空闲空间上,不会格式化)
如果后续需要进一步调整空间:
使用分区助手:
  • 调整分区:对windows分区缩减得到新的空闲空间
  • 移动分区:将缩减的部分移动到linux分区后(对linux分区的拓展只能合并其之后的空闲空间)
  • 启动Linux:在Mint上鼠标操作扩展分区

安装

  • 插入LiveCD USB,选中对应boot device(Linpus…)
notion image
  • 启动进入LiveCD Mint
notion image
  • 点击安装,选择共存,Mint自动安装在空闲空间上
notion image
notion image
  • 安装后关机,移除USB
notion image

N卡驱动

检查安装驱动

  • win键左下角菜单搜索driver
  • 修改驱动为最新官方驱动
notion image

检查驱动运行

  • 不正常时报错为:
notion image
  • 在chrome里检查chrome://gpu
notion image
  • 正常应为:
notion image
  • 检查display 显示选项选项,正常应为屏幕刷新率(不正常锁60)
notion image

修复1 - bios关闭安全启动

notion image
notion image

修复2 - 自签名

  • follow以下流程
notion image
notion image
notion image
notion image
  • 重启跳出UEFI
notion image
notion image
notion image
notion image
notion image
notion image
notion image
 

软件安装与卸载

应用商店方法(推荐,优选)

  • 可以安装一些github上的应用,源为flathub
notion image
notion image
notion image

Deb(类msi)方法

安装

  • 双击deb跳出窗口点击安装
notion image

卸载

GUI直接卸

  • 有一些带uninstall,可以直接卸载
notion image

命令

  • sudo dpkg -r 对应应用名,tab可以补全
notion image
  • 卸载新版以安装旧版效果:
notion image
notion image

apt与brew

  • 命令行接install

AppImage

  • AppImage格式直接chmod +x 添加执行权限运行即可
notion image

远程连接

桌面连接方案(X)

  • 如果是Win可以通过parsec进行远程桌面操控,体验不错
  • 遗憾的是linux端的parsec不能作为host使用,只能作为client远程连win
  • 其他方案的sunshine + moonlight连接质量不佳

SSH连接方案

.ssh文件夹

  • 确定对应用户名下有此文件夹
notion image

ip addr查询ip地址

notion image

scp命令

  • 写入pub公钥到对应用户的.ssh文件夹下authorized_keys文件中

处理拒绝连接

  • 如果拒绝连接,如下图:
notion image
  • 1.使用ufw工具开放22端口 2.安装openssh-server
notion image
  • 之后重新执行,连接填入对应用户密码
notion image
notion image

配置vscode中.ssh下config

  • 参考第一项写法
notion image
  • 之后可以在remote explorer中选择打开
notion image
  • 连接成功应有(下载完server后):
notion image
  • ctrl+k接ctrl+o选中文件夹打开
notion image
notion image

个性化配置

桌面美化

  • 调整文件管理器,任务栏,指针等的样式
  • 更换桌面时注意Mint支持X11,对wayland实验性(事实不支持)支持
  • 可在extension & applet找到其他的修改如cinnamonmenu(应用,文件夹,书签等以网格而不是列表显示,blurcinnamon高斯模糊的窗口美化)

Keyring

  • 如果不希望每次进入桌面被自启应用弹keyring,可以尝试keyring设置为空白密码
  • 或者更直接,在软件商店里删除gnome-keyring
keyring相关目录:
notion image

跳过Grub

  • 开机时的grub界面
notion image
  • grub主要用作两方面:1.切换到windows启动2.快照恢复
  • 在1.可在bios里调整boot顺序(win与linux启动)2.保留LiveCD USB(可进LiveCD版系统进行快照恢复)的情况下可以设置跳过grub界面,保留会需要每次启动手动确认一次(Mint设置停留grub 10s,这一条为覆盖配置,不在grub本身配置里)
  • 参考内容
Linux Mint re-enables os-prober in /etc/default/grub.d/50_linuxmint.cfg. The os-prober script in /etc/grub.d/30_os-prober then resets the timeout to 10 if the value is zero. Changing the Linux Mint script, or running chmod -x /etc/grub.d/30_os-prober should resolve your issue.
  • 更改grub中的超时时间为0
  • 更改mint的grub配置,禁用os prober
notion image
  • update grub
notion image
  • 重启会跳过grub

中文输入法

  • 一般有两种输入法前端,ibus与fcitx,mint上自带的fcitx为fcitx4,以下使用fcitx

搜狗

  • 新版本会不显示中文输入框,需要修改配置文件,可以直接下旧版
  • 下载安装
  • 安装后弹出
notion image
  • 效果
notion image

Rime与搜狗皮肤

  • rime自动配置,带全拼与双拼
  • 搜狗皮肤转换为fcitx皮肤
  • 需要通过AI代码修改一下(源代码存在溢出错误)
皮肤效果:
notion image
win上原版效果:
notion image

日语输入法

  • 参考二语习得文章

触摸板手势

  • win上的手势是自带+设置中可配置的,gnome里似乎也支持,但Cinnamon不支持,需要额外的软件
  • 使用touche(前端) + touchegg(后端)自行配置,两者都可以在软件商店安装,可对touchegg设置自启
notion image
  • 如果自启不成功,删除此目录下.desktop文件,然后在mint的startup里加custom command
notion image

软件与服务自启动(sudo)

  • 在自启动(关键字startup)界面添加应用,搜索对应应用名
  • 也可以自启动命令(如touchegg)
notion image

Ditto粘贴板替代 - CopyQ

下载

  • Github下载/软件商店

参考设置

  • 可以考虑勾选不聚集时关闭,这样取出一个复制项后会自行关闭窗口
  • 如果需要保持复制后窗口打开,就勾掉
notion image
  • 快捷键ctrl + `设置
notion image
 

更换主机host名

  • 修改/etc/hostname
notion image
  • 修改/etc/hosts
notion image
notion image
  • 修改后如果不能启动chrome
notion image
  • 执行以下命令,删除锁
notion image

Peace+APO替换 - JamesDSP

  • ldac自带,不用像win依赖第三方驱动
notion image

夜间模式替代

notion image

修改swap大小

  • 参考:
  • swap前的大小
notion image
  • 卸载当前swap文件
notion image
  • 为swap文件分配新空间,此时还没启用,但从磁盘空间的变动上可以看出已经分配
notion image
  • 在分配空间上制作swap并启用
notion image
  • 重新检查,swap已设置成功
notion image
 

语言注意事项

  • 如果使用与安装时不同的语言,会弹出以下的选项,如果原本的如下载的文件夹里有文件,会同时有下载与Downloads两个文件夹(不同于Windows上实际上是Downloads,下载只是别名链接),且部分界面只使用安装时的语言
notion image

其他问题

Parsec连接无法操作与管理员权限界面无法显示

  • windows做client还没见过这个问题(
  • 参考文档

检查windows parsec相关的权限与服务

linux → windows parsec
windows → linux vscode ssh
notion image
notion image
notion image
notion image
 
notion image

时间不同步

  • 检查
notion image
  • 安装ntp
notion image
  • 同步成功
notion image

切换root用户

  • 使用sudo -i(启动root权限环境)而不是su -(切换用户为root)
  • 前者需要当前执行命令的用户密码,后者需要目标用户的密码
  • root用户默认没有密码,过不了su - 的校验

解决显示有卡顿感

检查display设置

  • 确定选择与屏幕一致的刷新率设置,多见于浏览网页时出现钝感
notion image

检查N卡驱动是否正常运行

  • 确定N卡驱动正常,执行nvidia-smi可以正常显示,多见于观看视频出现明显卡顿

挂载Win分区位置

notion image

TODO

everything、win+tab替换
win11休眠后卡顿与系统不正常(掉wifi)
windows taskbar won't hide 关闭explorer
相当部分系统窗口不能截图
 
sudo bash -c "echo '$USER ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/$USER"
notion image
notion image
  • windows上一般自启可以软件内设置
  • 任务
notion image
notion image
notion image
notion image
notion image
chrome://gpu/
notion image
notion image
notion image
notion image
sudo bash -c "echo '$USER ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/$USER";
 
 
notion image
openssh 两边通过vscode ssh界面便捷互联
笔记本键盘灯熄灭
notion image
notion image
 
 
体验Antigravity使用更好的Windows
Loading...
CamelliaV
CamelliaV
Java;前端;AI;ACGN;
公告
计划:
  • LLM相关
  • 支付业务 & 双token无感刷新
  • (线程池计算优惠方案)天机学堂Day09-Day12复盘-优惠劵业务
  • (业务复盘,技术汇总)天机学堂完结复盘
  • hot 100
 
2024-2025CamelliaV.

CamelliaV | Java;前端;AI;ACGN;