办公主力机迁移到 Debian

  • 前段时间电脑好像中病毒了,好多软件被自动卸载,全盘杀毒也没扫出来,不知道是什么导致的,个人感觉是自建的 RustDesk 被攻击了
  • 决定把自己的办公主力机换成 Linux,选择了 Debian 12,记录下自己的安装历程

1. 基础

2. 企业微信

1
2
$ wget -O- https://deepin-wine.i-m.dev/setup.sh | sh
$ sudo apt install com.qq.weixin.work.deepin

3. 向日葵

  • 向日葵使用 lightdm 来进行界面渲染,但是 Debian 是通过 gdm3 进行图像处理
1
2
3
$ sudo apt install lightdm
# 配置默认视频管理插件
# $ sudo dpkg-reconfigure lightdm

4. FlameShot

1
$ sudo apt install flameshot
  • 设置全局快捷键:flameshot gui

5. OneDrive

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
# 安装
$ sudo apt remove onedrive
$ sudo add-apt-repository --remove ppa:yann1ck/onedrive
$ sudo rm /etc/systemd/user/default.target.wants/onedrive.service
$ sudo rm -rf /var/lib/dpkg/lock-frontend
$ sudo rm -rf /var/lib/dpkg/lock
$ sudo apt-get update
$ sudo apt-get upgrade -y
$ sudo apt-get dist-upgrade -y
$ sudo apt-get autoremove -y
$ sudo apt-get autoclean -y
$ wget -qO - https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/Debian_12/Release.key | gpg --dearmor | sudo tee /usr/share/keyrings/obs-onedrive.gpg > /dev/null
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/obs-onedrive.gpg] https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/Debian_12/ ./" | sudo tee /etc/apt/sources.list.d/onedrive.list
$ sudo apt-get update
$ sudo apt install --no-install-recommends --no-install-suggests onedrive

# 认证
$ onedrive
Authorise this app by visiting: ......
Enter the response URI from your browser: ......
The application has been successfully authorised, but no additional command switches were provided.
# 配置同步文件夹
$ sudo cp /usr/share/doc/onedrive/config ~/.config/onedrive/
$ sudo chown $USER:$USER ~/.config/onedrive/config
$ vim ~/.config/onedrive/sync_list
/Document/
/MD/
# 手动同步
$ onedrive --sync
# 自动同步
$ systemctl start --user onedrive
$ systemctl enable --user onedrive

# 其他命令
$ onedrive --display-config
$ onedrive --sync --verbose --dry-run
$ onedrive --sync --local-first
$ onedrive --sync --single-directory '<dir_name>'
$ onedrive --sync --download-only --cleanup-local-files
$ onedrive --sync --upload-only --no-remote-delete
$ onedrive --create-share-link <path/to/file>

6. VMWare Workstation Pro

  1. Go to broadcom.com
  2. In the upper right corner, select ‘Support Portal’
  3. Either log in by clicking ‘Go To Portal’ or ‘Register’ for a basic Broadcom account Quick link to the registration form
  4. Once logged in, go to support.broadcom.com if you’re not redirected there
  5. Click the dropdown to choose the VMware Cloud Foundation division
  6. On the left, click ‘My Downloads’
  7. Search for either Fusion or Workstation
  8. Click the product name (VMware Fusion or VMware Workstation Pro)
  9. Notice the dropdown for the Personal Use edition (it is the exact same binaries as the Commercial one)
  10. Select 17.5.2 or 13.5.2
  11. Download and install

7. Navicat 16

1
2
3
4
5
6
7
$ sudo apt install dconf-cli
$ cat navicat.sh
#!/bin/bash
cp ~/.config/dconf/user ~/.config/dconf/user.bak
cp ~/.config/navicat/Premium/preferences.json ~/.config/navicat/Premium/preferences.json.bak
dconf reset -f /com/premiumsoft/navicat-premium/
sed -i -E 's/,?"([A-F0-9]+)":\{([^\}]+)},?//g' ~/.config/navicat/Premium/preferences.json