网络通讯类软件
- 1: discord
- 2: 网络会议软件
- 2.1: 腾讯会议
- 3: 远程桌面软件Remmina
- 4: Clash上网软件
- 5: 使用终端做ssh client
- 6: 安装微软Edge浏览器
- 7: Teams
- 8: FileZilla
- 9: 挂载 windows 共享目录
- 10: yt-dlp
- 11: [归档]SSH代理服务器
1 - discord
下载
安装
deb标准安装
正确的启动方式
命令行启动:
$ discord --proxy-server=http://192.168.0.30:7890
也可以进入目录 /usr/share/discord, sudo vi discord.desktop修改 :
Exec=/usr/share/discord/Discord --proxy-server=http://192.168.0.30:7890
在这里增加代理配置。之后点这个图标就能带着代理信息启动discord了。可以将这个图标拖到桌面。
但很遗憾,固定到panel时,无法生效。
参考:
- https://www.nonozero.com/archives/198.html
- https://xcel.me/howto-set-proxy-for-discord-app-on-linux/
附录:代理问题
启动之后卡在 update 界面,估计是网络被墙了。在命令行中启动discord,可以看到日志:
$ discord
Discord 0.0.17
Starting app.
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[Modules] Module install path: /home/sky/.config/discord/0.0.17/modules
[Modules] Module installed file path: /home/sky/.config/discord/0.0.17/modules/installed.json
[Modules] Module download path: /home/sky/.config/discord/0.0.17/modules/pending
[Modules] No updates to install
[Modules] Checking for host updates.
Error downloading with electron net: network timeout: https://discord.com/api/updates/stable?platform=linux&version=0.0.17
Falling back to node net library..
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
Error downloading with electron net: network timeout: https://discord.com/api/modules/stable/versions.json
Falling back to node net library..
......
开启全局翻墙之后,可以顺利通过上面报错的地方,但是又会报错
[WebContents] did-fail-load -200 ERR_CERT_COMMON_NAME_INVALID retry in 1000 ms
(node:60932) electron: Failed to load URL: https://discordapp.com/app?_=1651047018860 with error: ERR_CERT_COMMON_NAME_INVALID
(Use `discord --trace-warnings ...` to show where the warning was created)
[WebContents] retrying load https://discordapp.com/app?_=1651047018860
[WebContents] did-fail-load -200 ERR_CERT_COMMON_NAME_INVALID retry in 2526.0695510375936 ms
(node:60932) electron: Failed to load URL: https://discordapp.com/app?_=1651047018860 with error: ERR_CERT_COMMON_NAME_INVALID
[WebContents] retrying load https://discordapp.com/app?_=1651047018860
[WebContents] did-fail-load -200 ERR_CERT_COMMON_NAME_INVALID retry in 4139.532933476243 ms
(node:60932) electron: Failed to load URL: https://discordapp.com/app?_=1651047018860 with error: ERR_CERT_COMMON_NAME_INVALID
但这个问题似乎不会影响 discord 的启动。全局翻墙之后 discord 可以正常使用。
尝试过,设置 all_proxy, http_proxy 等方式对 discord 无效。
2 - 网络会议软件
2.1 - 腾讯会议
下载
https://meeting.tencent.com/download-center.html
选择 x86_64 版本
安装
deb 标准安装
配置
主要是将声音配置一下。
3 - 远程桌面软件Remmina
安装
可以通过软件管理器直接安装,“开始菜单” -> “系统管理” -> “软件管理器”,搜索 remmina:

需要使用软件管理器安装 remmina 和 插件:
- remmina
- remmina-plugin-rdp: 这个一定要安装,连接windows桌面就是走 RDP 协议
- remmina-plugin-vnc
使用
连接 windows
安装完成之后, 打开 remmina, “connection” -> “new”, Protocol 选 “RDP - Remote Desktop Protocol”, 设置链接参数和账号, 就可以连接到 windows 桌面.
ubuntu18.04
https://www.techrepublic.com/article/how-to-enable-remote-desktop-connections-in-ubuntu-18-04/
5 - 使用终端做ssh client
发现 putty 和 Remmina 做 ssh 客户端都不是太好用, 远不如 windows 平台上的 securyCrt 和 putty.
后来看到很多人都推荐直接用linux的终端做 ssh client, 简单敲个 “ssh server_name” 就连上去了,体验上也和和本地一致。
自动登录
为了减少每次敲击密码的麻烦, 还可以通过authorized_keys的方式来自动登录:
-
上传本机的
.ssh/id_isa.pub文件到服务器端 -
在远程服务器上运行
cat ~/id_rsa.pub >> ~/.ssh/authorized_keys -
在本机终端中输入 “ssh server_address” 即可自动登录
6 - 安装微软Edge浏览器
安装
直接下载安装
https://www.microsoft.com/zh-tw/edge/download
选择 deb 格式下载安装即可。
apt安装
参考:
https://linuxhint.com/install-microsoft-edge-browser-ubuntu/
安装方式:
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main"
sudo apt update
sudo apt install microsoft-edge-stable
7 - Teams
下载安装
Teams 有支持 ubuntu 的preview 版本,直接下载 deb 文件安装即可
https://www.microsoft.com/en-us/microsoft-teams/download-app
Linux DEB (64-bit)
登录微软帐号
比较麻烦的在 ubuntu 上登录微软的帐号。
安装 intune app
参考文档为:
https://learn.microsoft.com/en-us/mem/intune/user-help/microsoft-intune-app-linux
准备完成之后,执行:
$ sudo apt install intune-portal
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
intune-portal : Depends: libssl1.1 (>= 1.1.0) but it is not installable
Depends: msalsdk-dbusclient (>= 1.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
缺少依赖包,libssl1.1 可以从这里下载:
https://packages.ubuntu.com/bionic/amd64/libssl1.1/download
msalsdk-dbusclient 安装时发现还缺少依赖包:
sudo apt install msalsdk-dbusclient
The following packages have unmet dependencies:
msalsdk-dbusclient : Depends: libsdbus-c++0 (>= 0.8.3) but it is not installable
libsdbus-c++0 ,可以从下面的页面下载 64-bit deb package 安装:
https://www.ubuntuupdates.org/package/core/focal/universe/backports/libsdbus-c%2B%2B0
再次安装 msalsdk-dbusclient:
$ sudo apt install msalsdk-dbusclient
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
microsoft-identity-broker microsoft-identity-diagnostics
The following NEW packages will be installed:
microsoft-identity-broker microsoft-identity-diagnostics msalsdk-dbusclient
0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.
......
Setting up msalsdk-dbusclient (1.0.1) ...
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
启动 intune
按照要求:
https://learn.microsoft.com/en-us/mem/intune/user-help/enroll-device-linux
遇到问题: 在 intune 登录时,输入用户名(微软邮箱)后,直接报错:
Terms of User Error
We couldn't sign you in. Please try again, or contact your administrator.
无法解决,只能放弃。
8 - FileZilla
windows 下我现在统一使用 filezilla 进行 ftp/sftp 文件传输, linux 这边也尽量保持一致吧.
下载
下载页面:
https://filezilla-project.org/download.php?platform=linux64
直接下载地址:
安装
解压缩下载下来的 FileZilla_3.69.3_x86_64-linux-gnu.tar.xz 文件, 放到 /home/sky/work/soft 目录.
tar xvf FileZilla_3.69.3_x86_64-linux-gnu.tar.xz -C /home/sky/work/soft
启动
在 /home/sky/work/soft/FileZilla3/bin 目录下打开 filezilla 即可.
后续可以用 Synapse 唤起 filezilla.
使用
使用方式和界面和 windows 下基本一致.
9 - 挂载 windows 共享目录
为了方便使用 windows 共享的目录,最好能直接 mount 进来。
安装
需要安装 cifs-utils:
apt-get install cifs-utils
挂载
使用 mount 命令装载:
sudo mkdir /mnt/nas/d
sudo mount -t cifs -o rw,username=sky,password=***,uid=1000,gid=1000 //192.168.0.30/d/ /mnt/nas/d
- username 和 password 是访问 windows 共享目录需要的账户密码
- rw 表示可以读写
- uid和gid 可以通过 id 命令看到,设置之后mount之后的目录就可以方便当前用户直接读写访问
//192.168.0.30/d/是 smb 的共享路径,可以通过 “smb://192.168.0.30/d/” 访问验证/mnt/nas/d是装载的目标路径,必须事先存在,可以在 mount 之前先创建好
卸载
不需要使用时,可以 umount 卸载:
sudo umount /mnt/nas/d
改进脚本
为了方便使用,避免反复输入上面的 mount 命令,一个比较常见的做法是开机自动装载。但是考虑到我的笔记本是在公司和家里移动,而两边可以 mount 的东西不一样。另外也不是每次开机都需要 mount。
因此选择了自己准备脚本,需要时手工执行。另外不想 mount 到 /mnt/ 下,也不想 mount 为 root 账号。
最后的解决方式是,我在自己的 home 目录下建立了一个 mount 子目录,然后将需要的 mount 和 umount 脚本扔进去。需要时执行对应 mount 脚本,就将 windows 共享目录 mount 到 /home/myid/mount 下,而且当前用户有读写权限,使用非常方便。
以 mount-nas.sh 为例,内容如下:
#!/bin/bash
CURRENT=`pwd`
# 我的 nas 是台普通windows电脑,共享了几个盘符
NAS_FOLDERS=("d" "m" "n" "p")
for nas_folder in ${NAS_FOLDERS[@]};do
target_folder="$CURRENT/nas-$nas_folder"
if [ ! -d "$target_folder" ]; then
mkdir $target_folder
echo "create folder: $target_folder"
fi
sudo mount -t cifs -o rw,username=sky,password=***,uid=1000,gid=1000 "//192.168.0.30/$nas_folder/" $target_folder
done
read -n1 -p "Press any key to exit..."
同时准备了一个 umount-nas.sh 脚本,方便卸载:
#!/bin/bash
CURRENT=`pwd`
NAS_FOLDERS=("d" "m" "n" "p")
for nas_folder in ${NAS_FOLDERS[@]};do
target_folder="$CURRENT/nas-$nas_folder"
if [ -d "$target_folder" ]; then
sudo umount $target_folder
if [ $? -eq 0 ];then
echo "success to umount $target_folder"
else
echo "fail to umount $target_folder"
fi
fi
done
read -n1 -p "Press any key to exit..."
10 - yt-dlp
https://github.com/yt-dlp/yt-dlp
安装
推荐用 python 3.10 和 3.11.
pip install yt-dlp
更新时,重新运行这个命令即可。
使用
下载字幕
以 https://www.youtube.com/watch?v=uwXrtyXXuy8 视频为例,先 list-subs :
yt-dlp --no-check-certificate --list-subs "https://www.youtube.com/watch?v=uwXrtyXXuy8"
输出为:
[youtube] Extracting URL: https://www.youtube.com/watch?v=uwXrtyXXuy8
[youtube] uwXrtyXXuy8: Downloading webpage
[youtube] uwXrtyXXuy8: Downloading tv client config
[youtube] uwXrtyXXuy8: Downloading player c816c7d8-main
[youtube] uwXrtyXXuy8: Downloading tv player API JSON
[youtube] uwXrtyXXuy8: Downloading ios player API JSON
[youtube] uwXrtyXXuy8: Downloading m3u8 information
[info] Available automatic captions for uwXrtyXXuy8:
......
[info] Available subtitles for uwXrtyXXuy8:
Language Name Formats
en-eEY6OEpapPo English - English vtt, ttml, srv3, srv2, srv1, json3
看最后的 Available subtitles,这里只有一个 en-eEY6OEpapPo。
下载这个字幕:
yt-dlp --no-check-certificate --write-sub --sub-lang en-eEY6OEpapPo --skip-download "https://www.youtube.com/watch?v=uwXrtyXXuy8"
11 - [归档]SSH代理服务器
实测: 很不稳定,没有使用价值。可能是服务器端那边做了检查和防范。
代理服务器
-
建立隧道
在本地执行以下命令:
ssh -D 10085 remote_server_address -
设置代理
在浏览器中设置代理服务器连接为 “socket4”,链接到 “127.0.0.1/10085” 端口。
翻墙
如果远程服务器在国外, 那么这个 ssh 代理服务器 就实现了 翻墙 的功能.
工作原理和用 putty 设置 dynamic 是一样的.