Linux Desktop

Linux Desktop

Linux Desktop

这里主要介绍我遇到的关于使用linux桌面遇到的问题,希望能对你有所帮助!

我的电脑配置

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
➜  ~ neofetch
       _,met$$$$$gg.          liuliancao@liuliancao 
    ,g$$$$$$$$$$$$$$$P.       --------------------- 
  ,g$$P"     """Y$$.".        OS: Debian GNU/Linux bookworm/sid x86_64 
 ,$$P'              `$$$.     Host: ROG Zephyrus M16 GU603HM_GU603HM 1.0 
',$$P       ,ggs.     `$$b:   Kernel: 5.19.0-2-amd64 
`d$$'     ,$P"'   .    $$$    Uptime: 13 mins 
 $$P      d$'     ,    $$P    Packages: 4290 (dpkg), 13 (flatpak) 
 $$:      $$.   -    ,d$$'    Shell: zsh 5.9 
 $$;      Y$b._   _,d$P'      Resolution: 2560x1600 
 Y$$.    `.`"Y$$$$P"'         DE: GNOME 43.0 
 `$$b      "-.__              WM: Mutter 
  `Y$$                        WM Theme: Adwaita 
   `Y$$.                      Theme: Adwaita [GTK2/3] 
     `$$b.                    Icons: Adwaita [GTK2/3] 
       `Y$$b.                 Terminal: gnome-terminal 
          `"Y$b._             CPU: 11th Gen Intel i7-11800H (16) @ 4.600GHz 
              `"""            GPU: NVIDIA GeForce RTX 3060 Mobile / Max-Q 
                              GPU: Intel TigerLake-H GT1 [UHD Graphics] 
                              Memory: 4631MiB / 15555MiB 

➜  ~ ➜  ~ sudo inxi -b
System:
  Host: liuliancao Kernel: 6.0.0-5-amd64 arch: x86_64 bits: 64 Desktop: GNOME
    v: 43.1 Distro: Debian GNU/Linux bookworm/sid
Machine:
  Type: Laptop System: ASUSTeK product: ROG Zephyrus M16 GU603HM_GU603HM
    v: 1.0 serial: xxx
  Mobo: ASUSTeK model: GU603HM v: 1.0 serial: xxx UEFI: American
    Megatrends LLC. v: GU603HM.309 date: 06/24/2021
Battery:
  ID-1: BAT0 charge: 61.3 Wh (76.8%) condition: 79.8/90.0 Wh (88.7%)
    volts: 15.9 min: 15.9
CPU:
  Info: 8-core 11th Gen Intel Core i7-11800H [MT MCP] speed (MHz): avg: 1908
    min/max: 800/4600
Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] driver: i915 v: kernel
  Device-2: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] driver: nvidia
    v: 510.85.02
  Device-3: IMC Networks USB2.0 HD UVC WebCam type: USB driver: uvcvideo
  Display: server: X.Org v: 1.21.1.4 with: Xwayland v: 22.1.5 driver: X:
    loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa dri: iris gpu: i915
    resolution: 2560x1600
  API: OpenGL v: 4.6 Mesa 22.2.4 renderer: Mesa Intel UHD Graphics (TGL GT1)
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    driver: r8169
  Device-2: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
    driver: mt7921e
Drives:
  Local Storage: total: 2.29 TiB used: 403.44 GiB (17.2%)
Info:
  Processes: 404 Uptime: 1h 42m Memory: 38.75 GiB used: 8.45 GiB (21.8%)
  Shell: Zsh inxi: 3.3.23

** gnome
*** gnome-shell使用
具体可以参考文末的[[https://itsfoss.com/gnome-shell-extensions/][gnome extension使用]]

#+begin_src sh
sudo apt-get install gnome-tweaks
sudo apt-get install gnome-shell-extensions
浏览器插件

我使用的chrome 对应chrome插件 现在是firefox 对应会自己下载 使用firefox的好处是不用考虑gfw的问题

top-icons plus安装

https://extensions.gnome.org/extension/1031/topicons/ 用于托盘显示所有程序的

clippboard indicator

剪切板工具 注意gnome42无法使用,请使用这个新的剪切板工具

gnome online account

没有显示登录页面的 请确认自己能够访问google

显示登录页面的,提示认证出了问题

多试几次就好了,可能会失败,改天再尝试下

wallpaper engine

1
sudo apt-get install variety

Alt-Tab切换窗口的时候不要切到其他workspace

1
sudo gsettings set org.gnome.shell.app-switcher current-workspace-only true

top bar显示cpu内存使用率

1
git clone https://github.com/corecoding/Vitals.git ~/.local/share/gnome-shell/extensions/Vitals@CoreCoding.com -b develop

重新登录,extensions启用即可

调整鼠标mouse大小

1
2
3
4
gsettings set org.gnome.desktop.interface cursor-size
24

gsettings set org.gnome.desktop.interface cursor-size 48

microsoft fonts

1
2
liuliancao@liuliancao:~$ sudo apt-get install ttf-mscorefonts-installer -y
liuliancao@liuliancao:~$ sudo apt-get install fonts-crosextra-carlito fonts-crosextra-caladea -y

wine

wine以前装过,使用体验并不是很好,而安卓我觉得而可能支持会更好,所以这里我并没有用wine

android虚拟waydroid

具体可以看一下wadroid官文 安装文章waydroid安装教程

in debian 11

1
2
3
4
5
6
7
8
9
export DISTRO="bullseye" && \
sudo curl -# --proto '=https' --tlsv1.2 -Sf https://repo.waydro.id/waydroid.gpg --output /usr/share/keyrings/waydroid.gpg && \
echo "deb [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ $DISTRO main" > ~/waydroid.list && \
sudo mv ~/waydroid.list /etc/apt/sources.list.d/waydroid.list && \
sudo apt update
sudo apt install waydroid -y
sudo waydroid init
liuliancao@liuliancao:~$ sudo systemctl enable waydroid-container
liuliancao@liuliancao:~$ sudo systemctl start waydroid-container

install apps

1
waydroid app install xxx.apk

但是我没有成功哈,具体原因没有查到

整体感觉waydroid并不是很重视他们的用户,很多问题都没解决,而且一部分来源于anbox

anbox

安装也失败了,囧,感觉是binder那里有问题,同时由于debian11刚出来

最后一次发现还是成功了,具体原因未知,总结下首先使用的是debian自己的

1
2
3
4
5
6
7
8
liuliancao@liuliancao:~$ sudo apt-cache policy anbox
anbox:
  Installed: 0.0~git20210106-1
  Candidate: 0.0~git20210106-1
  Version table:
 *** 0.0~git20210106-1 500
        500 http://ftp.cn.debian.org/debian bullseye/contrib amd64 Packages
        100 /var/lib/dpkg/status

其次目录结构如下

1
2
liuliancao@liuliancao:~$ ls /var/lib/anbox/
android.img  cache/       containers/  data/        devices/     logs/        rootfs/      state/

android.img是从snap版本里面copy的,当然也可以从anbox的build里面找

安装完以后是../images/anbox01.png◎ ../images/anbox01.png

anbox微信

使用adb install weixin.apk的时候报错了

Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]

google了下说是架构不支持可能,所以重新下载下,确认是否是x86,发现是arm的

change home dir to english

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
liuliancao@liuliancao:~$ export LANG=en_US
liuliancao@liuliancao:~$ xdg-user-dirs-gtk-update

(process:26309): Gtk-WARNING **: 17:49:44.280: Locale not supported by C library.
    Using the fallback 'C' locale.
Moving DESKTOP directory from 桌面 to Desktop
Moving DOWNLOAD directory from 下载 to Downloads
Moving TEMPLATES directory from 模板 to Templates
Moving PUBLICSHARE directory from 公共 to Public
Moving DOCUMENTS directory from 文档 to Documents
Moving MUSIC directory from 音乐 to Music
Moving PICTURES directory from 图片 to Pictures
Moving VIDEOS directory from 视频 to Videos
liuliancao@liuliancao:~$ export LANG=zh_CN.UTF-8

remote desktop

sudo apt-get install remmina 这个挺好用的,自带的远程太难用

mysql workbench mysql gui

1
sudo snap install mysql-workbench-community

openvpn

sudo apt-get install network-manager-openvpn-gnome

显卡驱动nvidia

网上有很多教程,如果大家是和我一样,linux kernel 5.14 + nvidia-460这样

那请参考我的步骤哈

add non-free add install nvidia-460 from repo in kernel 5.10
1
2
3
4
5
6
7
8
9
liuliancao@liuliancao:~$ sudo apt-cache policy nvidia-driver
nvidia-driver:
  已安装:460.91.03-1
  候选: 460.91.03-1
  版本列表:
 *** 460.91.03-1 500
        500 http://mirrors.163.com/debian bullseye/non-free amd64 Packages
        500 http://deb.debian.org/debian bullseye/non-free amd64 Packages
        100 /var/lib/dpkg/status
download patch for 5.14 with nvidia-460
1
2
3
4
5
6
7
8
wget -O nvidia-patch.zip "https://gist.github.com/joanbm/144a965c36fc1dc0d1f1b9be3438a368/archive/73c41bc2910e1df24fcc34c6ebb9945ba7677fee.zip"
unzip nvidia-patch.zip -d /usr/src/nvidia-current-460.91.03/patches/
liuliancao@liuliancao:~$ ls /usr/src/nvidia-current-460.91.03/patches/nvidia-fix-linux-5.14.patch
/usr/src/nvidia-current-460.91.03/patches/nvidia-fix-linux-5.14.patch
liuliancao@liuliancao:~$ cd /usr/src/nvidia-current-460.91.03/
liuliancao@liuliancao:~$ patch -Np1 -i patches/nvidia-fix-linux-5.14.patch
liuliancao@liuliancao:/usr/src/nvidia-current-460.91.03$ sudo apt-get install linux-headers-5.14.0-0.bpo.2-amd64  linux-image-5.14.0-0.bpo.2-amd64 -y
**** reboot

使用dingding

下载https://dtapp-pub.dingtalk.com/dingtalk-desktop/xc_dingtalk_update/linux_deb/Release/com.alibabainc.dingtalk_1.0.0.285_amd64.deb

据说是官方的,我安装了,提示升级,点击更新找到新的deb,重新安装下就好了,

文字可能有点小,这个应用贴心解决了,点击左上角头像,选择设置,里面有缩放相关设置,我这边选择200% 非常好用

个别情况可能有多开的需求,目标比较简单的方案是安装另一个版本的dingding https://github.com/nashaofu/dingtalk

另外修改一下官方版本的logo.ico和tray.ico文件,具体可以用gimp着色下,具体不再演示

最近重装 dingding无法切换中文,后来发现是一个很坑的问题

通过运行fcitx5-diagnose, 发现fcitx的环境变量问题,原来我设置的fcitx5

1
2
3
4
5
  ➜  ~ cat .xprofile 
  export INPUT_METHOD=fcitx
  export GTK_IM_MODULE=fcitx
  export QT_IM_MODULE=fcitx
  export XMODIFIERS=@im=fcitx

鼠标过一会就卡一下mouse freeze or hang

刚开始以为是鼠标问题,后来google了下发现和usb的自动挂起有关系

1
2
3
# change /etc/default/grub  change cmd line add usbcore.autosuspend=-1
GRUB_CMDLINE_LINUX_DEFAULT="quiet rd.driver.blacklist=nouveau usbcore.autosuspend=-1"
sudo update-grub

蓝牙问题bluetooth

升级到5.15内核及以上,蓝牙问题优先升级到最新内核,我用的是testing的源,

建议大家用最新内核

目前bpo里面还是5.14,所以我这边是添加了testing的源

如果发现之前的键盘一直suspend挂起,简易把键盘删掉,重新配对一下

联发科mediatek mt7961无线网卡无法使用

mt7961需要内核5.13以上好像,所以需要升级内核,debian很简单,直接加上backports源就可以

1
2
3
4
5
6
7
cat /etc/apt/sources.list|grep -i back
deb http://deb.debian.org/debian bullseye-backports main non-free
deb http://mirrors.163.com/debian bullseye-backports main contrib non-free
sudo apt-get update
sudo apt-cache search linux-image
# then you will see linux-image-5.14.0.0.bpo.2-amd64 or newer and firmware-misc-nonfree
sudo apt-get install linux-image-5.14.0.0.bpo.2-amd64 firmware-misc-nonfree

这里注意可能会失败,为什么呢,因为很多包如果要在5.14内核运行可能需要patch,比如

nvidia driver等等,所以要注意patch问题,哪个有问题fix一下,所以建议尽早升内核

然后开机以后就会看到mt7961驱动了, 7961会加载7921e的驱动

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# then you will see mt7921e firmware
liuliancao@liuliancao:~$ sudo modinfo mt7921e
filename:       /lib/modules/5.14.0-0.bpo.2-amd64/kernel/drivers/net/wireless/mediatek/mt76/mt7921/mt7921e.ko
license:        Dual BSD/GPL
author:         Lorenzo Bianconi <lorenzo@kernel.org>
author:         Sean Wang <sean.wang@mediatek.com>
firmware:       mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin
firmware:       mediatek/WIFI_RAM_CODE_MT7961_1.bin
alias:          pci:v000014C3d00007961sv*sd*bc*sc*i*
depends:        mac80211,mt76,mt76-connac-lib,cfg80211
retpoline:      Y
intree:         Y
name:           mt7921e
vermagic:       5.14.0-0.bpo.2-amd64 SMP mod_unload modversions
sig_id:         PKCS#7
signer:         Debian Secure Boot CA
sig_key:        4B:6E:F5:AB:CA:66:98:25:17:8E:05:2C:84:66:7C:CB:C0:53:1F:8C
sig_hashalgo:   sha256
signature:      AB:D6:04:A5:54:88:19:44:EB:E8:9E:0E:49:4F:0E:41:70:9B:B8:30:
                AD:7D:D5:2D:FA:AB:C0:62:84:2F:8E:64:75:A3:80:D2:24:BE:03:28:
                C2:6D:09:3B:15:56:E4:5B:3F:66:E2:9B:11:A7:B9:E4:08:7E:19:9E:
                74:4D:27:9D:26:CC:CB:22:19:BB:A4:E6:37:A5:30:92:97:F7:95:F5:
                F1:A8:5B:7A:CE:80:5F:76:5C:16:EC:B0:B4:39:D2:2D:AD:82:63:7D:
                4F:D9:58:8D:02:ED:4D:86:57:AE:38:49:E5:BB:9E:14:CA:EC:BF:43:
                22:C6:C4:53:54:2C:28:A5:54:06:69:22:5E:F5:4E:87:6E:FC:5D:D4:
                B7:08:16:F7:98:3C:95:57:BA:3E:FE:A6:E9:C9:D7:50:00:E8:87:47:
                F6:F2:26:5C:D3:EC:A5:A7:CE:55:D5:75:BC:6F:39:1E:3E:53:0C:EC:
                79:37:90:04:C3:CB:A6:CA:2D:C1:C8:7E:67:2D:AE:6B:EB:09:91:1D:
                FA:6F:7F:FC:32:B7:E6:A1:F4:92:60:D9:D1:1A:A9:94:3D:2E:7E:8D:
                EE:92:BD:EC:52:43:5E:25:25:DA:65:65:76:96:76:EB:4B:11:70:07:
                6B:1C:F4:57:CA:6B:F9:50:03:2E:9D:9A:39:DE:6D:86

# dmsg -T|grep -i mt7921
[四 11月 25 09:21:13 2021] mt7921e 0000:2f:00.0: enabling device (0000 -> 0002)
[四 11月 25 09:21:13 2021] mt7921e 0000:2f:00.0: disabling ASPM L0s L1
[四 11月 25 09:21:13 2021] mt7921e 0000:2f:00.0: ASIC revision: 79610010
[四 11月 25 09:21:13 2021] mt7921e 0000:2f:00.0: firmware: direct-loading firmware mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin
[四 11月 25 09:21:13 2021] mt7921e 0000:2f:00.0: HW/SW Version: 0x8a108a10, Build Time: 20210122002654a
[四 11月 25 09:21:13 2021] mt7921e 0000:2f:00.0: firmware: direct-loading firmware mediatek/WIFI_RAM_CODE_MT7961_1.bin
[四 11月 25 09:21:13 2021] mt7921e 0000:2f:00.0: WM Firmware Version: ____000000, Build Time: 20210122002730
[四 11月 25 09:21:13 2021] mt7921e 0000:2f:00.0: Firmware init done
[四 11月 25 09:21:15 2021] mt7921e 0000:2f:00.0 wlo1: renamed from wlan0

如果发现无线突然又不能用了,别慌,关机,过几分钟再打开看看

chinese输入法

这里可以注意im-config的时候选择auto也是可以的,我这边使用的是ibus-libpinyin我觉得还行,一般会自动选择的,如果没有就没有重启, 还有region&language(中文是地区和语言)的设置可能没有添加Intelligent Pinyin

這裏也可以使用rime輸入法,不過要稍微折騰下

rime輸入法

官方wiki 输入法觉得不能忍受,可以先在输入的地方,输入C-` 然后选择简拼

设置默认英文
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
liuliancao@liuliancao:~/.local/share/fcitx5/rime$ cat default.custom.yaml
patch:
  "switches/@0/reset": 1 # default english
  "menu/page_size": 9

  “switches”:
    - name: simplification
      reset: 1
      states: [漢字, 汉字]
  “speller/algebra”:
    # 模糊音定義先於簡拼定義,方可令簡拼支持以上模糊音
    - abbrev/^([a-z]).+$/$1/           # 簡拼(首字母)
    - abbrev/^([zcs]h).+$/$1/          # 簡拼(zh, ch, sh)

    # 以下是一組容錯拼寫,《漢語拼音》方案以前者爲正
    - derive/^([nl])ve$/$1ue/          # nve = nue, lve = lue
    - derive/^([jqxy])u/$1v/           # ju = jv,
    - derive/un$/uen/                  # gun = guen,
    - derive/ui$/uei/                  # gui = guei,
    - derive/iu$/iou/                  # jiu = jiou,

    # 自動糾正一些常見的按鍵錯誤
    - derive/([aeiou])ng$/$1gn/        # dagn =&gt; dang
    - derive/([dtngkhrzcs])o(u|ng)$/$1o/  # zho =&gt; zhong|zhou
    - derive/ong$/on/                  # zhonguo =&gt; zhong guo
    - derive/ao$/oa/                   # hoa =&gt; hao
    - derive/([iu])a(o|ng?)$/a$1$2/    # tain =&gt; tian

怎么生效呢, 直接logout再登录就好了,或者systemctl restart fcitx5目测也可以

我这里默认英文并没有成功,参考网上建议加了一个english/uk的输入法了,然后使用C-space切换,晚点再看看

网易云音乐

目前有几个方式: repo: netease-cloud-music-gtk UI比较简洁 但是没有歌词 喜欢原生不卡的 waydroid虚拟机:用安卓虚拟机,可以获得几乎原生效果,需要debian打开 wayland,wayland桌面目前支持一般,有些使用可能会有问题

目前我 最建议使用浏览器 或者 自己搞播放器我的是ZX-300A 或者用手机等等 我用的是网页版https://music.163.com

我的debian暂时用不了了 囧, 推荐去app store或者flatpak Netease Cloud Music com.netease.CloudMusic 1.1.0 stable system

或者如果你使用emacs,推荐https://github.com/SpringHan/netease-cloud-music.el ,elpa有,直接use-package即可

目前最建议flatpak的,直接在app store搜索就可以下载


可以通过emacs听或者下载官方的,注意网页中的其他客户端点下就有了,目前功能还是比较ok的

懒得点的 这是链接,https://d1.music.126.net/dmusic/netease-cloud-music_1.2.1_amd64_ubuntu_20190428.deb

有一个问题如果是高分辨率的屏幕,会存在文字太小的问题,这个网上也有,

改下这里就好了1.8可以改成你合适的东西

1
2
liuliancao@liuliancao:~/soft$ sudo cat /usr/share/applications/netease-cloud-music.desktop|grep -i Exec
Exec=netease-cloud-music --force-device-scale-factor=1.8 %U

目前有个listen1也挺好用的,但是无版权无法自动切歌 https://github.com/listen1/listen1_desktop

baidu disk百度云网盘

官方自己支持的,下载deb安装即可 https://pan.baidu.com/download

wechat微信

现在建议使用国产https://www.ubuntukylin.com/applications/119-cn.html

这个比deepin的还好用,至少没有窗口问题,也能使用表情等,给国产系统点个赞!

原因是升级以后,很难解决依赖

1
2
下列软件包有未满足的依赖关系:
 libasound2-plugins:i386 : 依赖: libavcodec58:i386 (>= 7:4.4)

以前建议: 使用https://github.com/zq1997/deepin-wine

中文进去可能出现[]方块这种

建议参考里面的内容解决 https://github.com/zq1997/deepin-wine/issues/15

安装以后有可能出现文字和图标都比较小,

1
2
liuliancao@liuliancao:~$ env WINEPREFIX="$HOME/.deepinwine/Deepin-WeChat/" /usr/bin/deepin-wine6-stable  winecfg
# 弹出来的窗口把dpi调整到144以上, 并且注意wechat里面设置适配系统

telegram

telga[emacs用户推荐] https://github.com/zevlg/telega.el/

安装的时候注意一下

官方文档关于TDLib没有说明版本,TDLib目前只支持>=1.8.4同时不支持1.8.6,所以

git clone编译的时候要加一个git checkout 7eabd8ca60de025e45e99d4e5edd39f4ebd9467e

这个数字来源于git log搜索1.8.4

然后正常操作即可,如果已经编译最新版,可能会报错提示api_id没有等,总之正常M-x telega

会出现一个二维码,否则就是编译TDLib或者telega-server的问题

常见快捷键

1
2
3
4
5
v: 常见的视图选择
r: 回复某个消息
C-c C-v: 截图
C-c C-a: 发送不同格式的比如表情包等
C-n f: forward到群聊

其他客户端参考https://telegram.org/apps

我用过得 telegram-desktop(直接apt-get install)安装,可以使用,

功能不错,但是发热严重

skype

1
sudo apt-get install skypeforlinux

dictionary词典

在linux世界中,会经常接触到英文,需要一个好用的划词软件才是比较好的体验

youdao有道词典

网易支持开源方面有一手,下载链接

高分辨率屏幕仍然有字体偏小问题, 部分词没有

使用方面感觉没啥大问题,但是又总感觉缺点什么

startdict
goldendict

不知道为啥,gnome商店搜提示我装了,发现其实很好用

编辑-首选项目-显示风格-灵格斯蓝调 挺好看的

几个字典链接

shell命令行词典

关于高分辨率屏幕怎么舒服的问题

具体建议参考arch wiki关于hidpi 这篇文章介绍的不错

/etc/profile增加GDK scale

注意确实是GDK

1
2
3
liuliancao@liuliancao:~$ env|grep -i scale
QT_AUTO_SCREEN_SCALE_FACTOR=1
GDK_SCALE=2

tweak设置

我的设置 文本大小6 12 12 6 缩放比例1.0

firefox设置

浏览器输入about:config 修改layout.css.devPixelsPerPx为2

heroic epic启动器缩放问题

和很多软件一样,找到applications,设置factor为2

1
2
➜  ~ sudo cat /usr/share/applications/heroic.desktop|grep -i factor
Exec=/opt/Heroic/heroic --force-device-scale-factor=2 %U

我这边是点了几次才会生效,中间我还在terminal里面直接启动了一下,具体原因未知

top icon plus可能不能使用

使用Unbuntu appindicators在gnome extensions里面有设置

evolution图片没加载出来

可以看下这篇链接,这是一种安全措施

单独打开可以通过Ctrl-i,

默认打开Evolution => Edit Menu => Preferences => Mail Preferences => HTML Mail tab => Loading Images

linux下的邮件软件-thundermail中文

1
sudo apt-get -y install thunderbird thunderbird-l10n-zh-cn

目前linux的邮件管理 只推荐thundermail

Alt-Tab的时候子标签如何切换

比如浏览器,我们可能打开好几个窗口,配合滚轮上下,而不是多次TAB可以依次切换

使用打印机

注意cups和printer-driver-all这两个包

录屏幕

1
sudo apt-get install obs-studio

debian install kali linux tools

1
2
3
4
5
6
7
8
echo deb http://http.kali.org/kali kali-rolling main contrib non-free | sudo tee  /etc/apt/sources.list.d/kali.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ED444FF07D8D0BF6
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.IVdE9b46Md/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ED444FF07D8D0BF6
gpg: 密钥 ED444FF07D8D0BF6:公钥 “Kali Linux Repository <devel@kali.org>” 已导入
gpg: 处理的总数:1
gpg:               已导入:1
sudo apt-get install kali-tools-top10

装完会发现gnome里面没有

1
sudo apt-get install kali-desktop-gnome

执行上面命令就有了

关于crash奔溃和分析问题

最近系统不知道是testing repo还是啥问题,存在系统奔溃问题,所以计划使用kdump,debian设置很简单

安装kdump-tools和重启即可

1
2
3
4
sudo apt-get install kdump-tools
# reboot
➜  ~ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.15.0-2-amd64 root=UUID=21eb6963-ec88-4434-8f0e-596d1f5f017f ro quiet rd.driver.blacklist=nouveau usbcore.autosuspend=-1 crashkernel=384M-:128M

ocr文字识别

本部分参考jasonkayzk的博客

cli ocr

1
2
3
4
5
6
7
8
9
sudo apt-get install tesseract-ocr
sudo apt-get install tesseract-ocr-chi-sim
sudo apt-get install tesseract-ocr-chi-sim-vert
# testing
# tesseract ~/Pictures/hello-liuliancao.png test -l eng+chi_sim
# see test.txt
➜  ~ cat test.txt
#!/usr/bin/env bash
echo hello liuliancao!

gui ocr

1
sudo apt-get install gimagereader

ppt转markdown

1
2
pip3 install pptx2md
pptx2md  -o xxx.md --mdk -i ~/images/ xxx.pptx

firefox相关

翻译

firefox本身没有翻译功能,我用的是这个插件,目前看还挺好用 https://addons.mozilla.org/zh-CN/firefox/addon/edge_translate/

目前已更换成 https://immersivetranslate.com/

查询超过1000个不再显示具体数字,exceed 1000 item

about:config find accessibility.typeaheadfind.matchesCountLimit and change it

截图

目前使用感觉还好的是flameshot,每次都选择比较麻烦,可以进入设置,选择自定义快捷键,添加

命令填flameshot gui,我选择的快捷键是Alt+A

系统备份

使用mac都知道有时间机器一说,linux也有timeshift这个软件,可以自己使用移动硬盘进行备份

1
sudo apt-get install timeshift

latex相关

除了org-mode,其实latex也是非常丰富功能的标记语言,通过latex,可以写出非常好看的文档,

可以用它写文档,写简历,写书。

1
sudo apt-get install texlive-full # 推荐全下载全部部分,如果提示latex相关错误,可以google

gui相关, texstudio,挺好用的

1
sudo apt-get install texstudio

白板

你可以从linux开源网站查看常见的白板应用

下载

1
sudo apt-get install openboard

界面比较简单… 但是基本功能都有,有点老师上课的感觉了

目前比较喜欢xournal++,在debian下叫xournalpp,这款也支持一些常见的压敏平板 xournal++官网

1
sudo apt-get install xournalpp

查看文件colorful cat

1
2
3
4
5
sudo apt-get install bat
➜  ~ grep alias .zshrc|grep -v '^#'
alias bat='batcat'
➜  ~ grep BAT .zshrc
export BAT_THEME="OneHalfLight"

如何管理我的密码

首先需要生成gpg key,如果没有请gpg –generate-full-key生成

1
2
3
4
5
# gpg --list-keys --keyid-format short
# pass init GPG_ID
➜  ~ pass init 90F6D8EF
mkdir: 已创建目录 '/home/liuliancao/.password-store/'
Password store initialized for 90F6D8EF

生成密码

1
2
3
4
5
6
7
# pass generate password-name length
➜  ~ pass generate liuliancao-company 6
[master 469c2b0] Add generated password for liuliancao-company.
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 liuliancao-company.gpg
The generated password for liuliancao-company is:
y*F#{"

插入密码

注意我们是可以多个层次管理的

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
➜  ~ pass insert liuliancao-company
An entry already exists for liuliancao-company. Overwrite it? [y/N] y
Enter password for liuliancao-company:
Retype password for liuliancao-company:
[master d8ed2d6] Add given password for liuliancao-company to store.
 1 file changed, 0 insertions(+), 0 deletions(-)
 rewrite liuliancao-company.gpg (100%)

➜  ~ pass insert company/liuliancao
mkdir: 已创建目录 '/home/liuliancao/.password-store/company'
Enter password for company/liuliancao:
Retype password for company/liuliancao:
[master 477a31a] Add given password for company/liuliancao to store.
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 company/liuliancao.gpg

zsh

zsh添加环境变量

把变量放到这里面即可.zshenv

screenshot 录屏with gif

目前感觉还是peek更好用一点

1
sudo apt-get install byzanz

记录屏幕按键

1
sudo apt-get install screenshot

注意关闭的方法是ctrl两个一起或者shift两个一起按或者alt两个一起按

wm

dwm

安装

in debian11:

1
sudo apt-get install dwm -y
emacs全屏
1
static const int resizehints = 0;
常用快捷键
打开应用

Windows+p

增加终端窗口

Shift+Enter+Alt

关闭窗口

Shift+Enter+C

调整窗口布局为单窗口(全屏)

Alt+M

调整窗口为平铺模式tiled

Alt+T

窗口为浮动模式float

Alt+F

窗口为横向排列

Alt+D

窗口竖向排列

Alt+I

窗口切换

Alt+J, Alt+K

调整窗口宽度

Alt+H, Alt+L

窗口位置互换

Alt+Enter

窗口模式切换

Alt+Space

pdf add watermark加水印

制作watermark.pdf

打开libreoffice,选择格式,水印,输入水印的内容,倾斜角度等

导出为pdf即可

使用pdfk

sudo apt-get install pdftk -y

before ../images/desktop/pdf-test.png◎ ../images/desktop/pdf-test.png

制作的pdf water mark

1
pdftk test.pdf stamp watermark.pdf output final.pdf

after ../images/desktop/pdf-watermark.png◎ ../images/desktop/pdf-watermark.png

pdf加密

1
pdftk test.pdf output test-encrypt.pdf owner_pw liuliancao user_pw 123

效果 ../images/desktop/pdf-encrypted.png◎ ../images/desktop/pdf-encrypted.png

pdf截取某页

1
pdftk xxx.pdf cat PAGE output yyy.pdf

类似dash的文档速查工具

zeal(apt install zeal -y)

docsets我这边无法下载,只能走离线 https://zealusercontributions.vercel.app

https://lucasg.github.io/2017/02/05/Downloading-Dash-docsets/

下载下来解压到对应的docsets文件夹即可

连苹果Iphone手机

1
2
3
4
sudo apt install usbmuxd libimobiledevice6 libimobiledevice-utils fuse
mkdir ~/iPhone
fuse ~/iPhone
ls ~/iPhone

具体请参考此链接

davinci resolve安装

可能会报错不支持的gpu模式 需要安装如下包,具体参考https://www.techhut.tv/how-to-install-davinci-resolve-in-linux-ubuntu-arch-and-fedora/

1
2
sudo apt-get install nvidia-driver nvidia-opencl-icd libcuda1 libglu1-mesa
sudo apt-get install libnvidia-encode1

电源管理相关

redhat电源指南

可以生成对应的powertop html报告

1
  powertop --html=/tmp/test.html

unrar with crc error

1
unrar x your_rar

linux no sound

1
sudo apt-get install firmware-realtek

白板工具figjam

这个是在线白板,我感觉是我目前见到功能最全面的白板了。

wayland

firefox cannot input chinese

1
2
➜  ~ cat /usr/share/applications/firefox-esr.desktop|grep Exec
Exec=env MOZ_ENABLE_WAYLAND=1 /usr/lib/firefox-esr/firefox-esr %u

emacs中文

我用了emacs-rime了

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  (use-package rime
      :ensure t
      :config
      (setq default-input-method "rime")
      (setq rime-show-candidate 'popup)
      (setq rime-posframe-properties
	    (list :background-color "#333333"
		  :foreground-color "#dcdccc"
		  :font "WenQuanYi Micro Hei Mono-14"
		  :internal-border-width 10))
  )

设置

debian文档看的不是很清楚,目前debian12默认没有开启waydroid,也是因为本 身就没那么稳定吧,不过你可以打开,在登陆的地方也还可以选择xorg的。

建议参考https://www.bilibili.com/read/cv25750815/ 开启wayland /usr/lib/udev/rules.d/61-gdm.rules # 去掉 options nvidia-drm modeset=1 options nvidia NVreg_PreserveVideoMemoryAllocations=1

cat /etc/gdm3/daemon.conf |grep -i waylan WaylandEnable=true

waydroid安卓虚拟机

目前使用体验下来还可以,主要anbox已经停止维护了

安装本身
1
2
3
apt-get install waydroid
把下载好的system.img和vendor.img放到/usr/share/waydroid-extra/images 注意放到/var/lib/waydroid/images不行
sudo waydroid init -f -i /usr/share/waydroid-extra/images 初始化安装

剩下的 具体建议你查看下官网文档 https://docs.waydro.id/usage/install-on-desktops

正常就可以用了 新版本我没有google id之说,我也没有用google play商店, 获取不到id。

arm支持

根据不同的cpu决定你安装什么arm转译软件 具体看https://github.com/casualsnek/waydroid_script 这个项目吧

debian安装依赖的时候注意下,新版debian12不支持pip了,需要通过指定一些 加上参数–break-system-packages或者sudo rm /usr/lib/python3.11/EXTERNALLY-MANAGED

当然更建议你用虚拟环境搞

把script里面的内容搞好以后进行安装apk

装apk

https://apkcombo.com/zh/ 我是用的这个,你也可以找下看看

下载好以后

1
2
3
waydroid app install xxx.apk
# 晚点看看
waydroid app list

最终使用下来效果不错,占用比windows小

阅读器pdf reader

觉得calibre太复古的话,建议https://www.koodoreader.com/zh