Ubuntu
Ubuntu
Ubuntu 使用
必备软件
办公
WPS Office
https://zh-hant.wps.com/office/linux/
滴答清单
科学上网
Clash
- 一键安装 clash-for-linux-install GitHub - nelvko/clash-for-linux-install: 😼 优雅地使用基于 clash/mihomo 的代理环境
1
2
3
git clone --branch master --depth 1 https://gh-proxy.com/https://github.com/nelvko/clash-for-linux-install.git \
&& cd clash-for-linux-install \
&& sudo bash install.sh
- 默认的内核是:mihomo-linux-amd 64-v 1-v 1.19.12. gz
- 下载 clash 内核:clashpremium-release-linux-amd 64-v 3. tar. gz 下载 clash 内核:https://downloads.clash.wiki/ClashPremium/
- 删除 mihomo-linux-amd 64-v 1-v 1.19.12. gz,将下载好的 clash 内核放到:/home/hacket/clash/clash-for-linux-install/resources/zip/
- 重新运行
install.sh
,会自动安装 calsh 内核 - 根据要求一步步操作,输入订阅地址
- 开启代理:
clashctl on
; 其他设置见文档 - web 控制台:http://127.0.0.1:9090/ui 或三方:https://clash.razord.top/#/proxies / https://yacd.haishan.me/
- 在网络→代理,配置 http (端口 7890) 和 socks 5 的代理(端口 7891)
中文输入法
- Ubuntu 22.04 安装 Fcitx 5 中文输入法(详细)
https://zhuanlan.zhihu.com/p/508797663d
输入法配置快捷键 (fcitx):
笔记
Obsidian
Picgo
下载、安装: https://github.com/molunerfinn/picgo/releases
安装 Picgo 报错:
1
QSocketNotifier: Can only be used with threads started with QThread dlopen(): error loading libfuse.so.2 AppImages require FUSE to run. You might still be able to extract the contents of this AppImage if you run it with the --appimage-extract option. See https://github.com/AppImage/AppImageKit/wiki/FUSE for more information
配置:
- 图床配置名:ObsidianOSS
- 设定仓库名: hacket/ObsidianOSS
- 设定分支名: master
- 设置 Token: 去 token - GitHub,选 classic ,只给 repo 权限,
- 设定存储路径:obsidian-ubuntu/
报错:
1
2
3
4
5
6
7
8
9
10
------Error Stack Begin------
Error: ENOENT: no such file or directory, open '/home/hacket/.config/picgo/picgo-clipboard-images/20250819004848800.png.3982419688'
-------Error Stack End-------
2025-08-19 00:48:48 [PicGo INFO] [PicGo Server] upload result:
2025-08-19 00:48:48 [PicGo WARN] [PicGo Server] upload failed, see picgo.log for more detail ↑
2025-08-19 00:48:56 [PicGo INFO] detect second instance
2025-08-19 00:51:04 [PicGo INFO] [PicGo Server] get the request
2025-08-19 00:51:04 [PicGo INFO] [PicGo Server] upload clipboard file
2025-08-19 00:51:04 [PicGo INFO] upload clipboard file
2025-08-19 00:51:04 [PicGo ERROR]
解决: 在/home/hacket/. config/picgo/手动创建 picgo-clipboard-images
目录即可。参考:[Bug]: 图片无法上传 · Issue #1039 · Molunerfinn/PicGo
截图
自带截图
进入设置页,然后点击 Shortcuts
,再点击 Screenshots
flameshot
设置快捷键:
问题 1: Unable to capture screen error
1
flatpak permission-set screenshot screenshot org.flameshot.Flameshot yes
问题 2 : Can’t screen anything on Wayland Gnome You install xdg-desktop-portal
and xdg-desktop-portal-gnome
. 用 Claude Code 安装。
问题 3: 快捷键不生效 在设置快捷键的 command 填入下面的:
1
2
3
4
5
script --command "QT_QPA_PLATFORM=wayland flameshot gui" /dev/null
# or
bash -c -- "QT_QPA_PLATFORM=wayland flameshot gui"
# or
sh -c -- "QT_QPA_PLATFORM=wayland flameshot gui"
问题 4: 拷贝到剪切板未生效
参考:Gnome Wayland
https://flameshot.org/docs/guide/wayland-help/
剪贴板历史
CopyQ
- 下载
CopyQ
CopyQ
问题: 在 wayland
下,CopyQ
不工作
1
2
3
4
5
6
7
8
9
10
11
# 检查是否开启了wayland
echo $XDG_SESSION_TYPE
wayland
# 解决
env QT_QPA_PLATFORM=xcb copyq
# 快捷键
script --command "QT_QPA_PLATFORM=wayland copyq" /dev/null
sh -c -- "QT_QPA_PLATFORM=wayland copyq"
由于 CopyQ
在设置了 “QT_QPA_PLATFORM
” 环境变量的情况下运行时才起作用,因此您应该使更改永久生效,以便在 Copy 自动启动时,它会设置所需的变量。
1
2
3
4
5
6
7
8
9
10
11
12
13
# 备份
cp ~/.config/autostart/copyq.desktop /.config/autostart/copyq.desktop-backup
# 编辑 在此文件的底部,您将看到一行以 Exec 开头的行。
code ~/.config/autostart/copyq.desktop
## 默认
Exec="/usr/bin/copyq"
# 在此文件的底部,您将看到一行以 Exec 开头的行。将此行更改为:
Exec=env QT_QPA_PLATFORM=xcb "/usr/bin/copyq"
## 还是
Exec="env QT_QPA_PLATFORM=xcb /usr/bin/copyq"
## 重启电脑?
Pano
https://github.com/oae/gnome-shell-pano
开发必备
见:[[Ubuntu开发环境]]
遇到的问题
蓝牙打不开了
https://blog.51cto.com/u_14193285/5985919
https://www.cnblogs.com/odesey/p/18651563
Chrome
Chrome 安装后打不开
用命令行
1
google-chrome
报错:
1
2
3
[5901:5901:0610/183033:ERROR:process_singleton_linux.cc(309)] 其他计算机 (money-Latitude-E5430-non-vPro) 的另一个 Google Chrome 进程 (7578) 好像正在使用此个人资料。Chrome 已锁定此个人资料以防止其受损。如果您确定其他进程目前未使用此个人资料,请为其解锁并重新启动 Chrome。
[5901:5901:0610/183033:ERROR:simple_message_box_views.cc(208)] Unable to show a dialog outside the UI thread message loop: Google Chrome - 其他计算机 (money-Latitude-E5430-non-vPro) 的另一个 Google Chrome 进程 (7578) 好像正在使用此个人资料。Chrome 已锁定此个人资料以防止其受损。如果您确定其他进程目前未使用此个人资料,请为其解锁并重新启动 Chrome
显然,上面的错误信息告诉我们,chrome 会记录我们在计算机上的操作数据在本地,然后我们修改主机名后,导致老数据被锁住了,这样新的主机名下 chrome 无法获取用户对应的浏览器数据,因此 chrome 无法正常启动,并且在 UI 上还无法看到相关错误,导致假死现象出现。
解决:
1
2
cd ~/.config
sudo rm -rf ./google-chrome
Ubuntu自安装的Chrome启动失败解决方法 - moneyslow.com