一次实验记录:使用 iwd + iwgtk 作为 Qubes OS sys-net 的无线网络方案
供希望折腾的用户参考。
模板:社区提供的 Devuan 模板,来源:https://forum.qubes-os.org/t/devuan-linux-template-non-official-available-for-testing/40900
实验内容
尝试使用 iwd 和 iwgtk 作为 Qubes OS 中 sys-net 的无线网络管理方案。
模板配置脚本片段
apt install firmware-iwlwifi
apt install firmware-mediatek
apt install firmware-realtek
apt install --no-install-recommends usbutils usb-modeswitch
apt install --no-install-recommends qubes-core-agent-networking
apt install --no-install-recommends bash-completion
#dhcpcd
apt install --no-install-recommends dhcpcd dhcpcd-base
aa-complain dhcpcd
rc-update add dhcpcd default
cat > /etc/dhcpcd.exit-hook << 'EOF'
case "$reason" in
BOUND|RENEW|REBIND|REBOOT|IPV4LL|STATIC|TIMEOUT)
case "$interface" in
vif*) ;;
*) /usr/lib/qubes/qubes-setup-dnat-to-ns ;;
esac
;;
esac
EOF
chmod 644 /etc/dhcpcd.exit-hook
#iwd
apt install --no-install-recommends iwd
apt install --no-install-recommends iwgtk
rc-update add iwd default
实验准备
-
使用上述脚本安装必需的软件包。
-
关闭
sys-net,然后打开:Qubes Manager → sys-net → 右键 → Settings → Devices将无线网卡连接到
sys-net。 -
启动
sys-net,然后打开:Qubes Manager → sys-net → 右键 → Open Console in Qube以
root用户登录。 -
运行
iwgtk,并使用它连接到 Wi-Fi。 -
将其他 Qube 的
NetVM设置为sys-net,测试网络连通性。
实验结果
网络可以正常连通。
这说明,Qubes OS 的网络环境不一定需要同时安装 qubes-core-agent-manager 和 network-manager。
至少需要以下组件:
qubes-core-agent-networking- DHCP 服务软件
- 有线网络相关的软件包
遗憾的是,iwgtk 需要以 root 用户启动,因此可能不太适合希望获得类似 nm-applet 桌面使用体验的用户。
如果使用 systemd,请根据实际情况修改对应的服务配置。
Experiment Report: Using iwd + iwgtk as the Wireless Networking Solution for sys-net in Qubes OS
Provided as a reference for users who enjoy experimenting.
Template: a community-provided Devuan template from the https://forum.qubes-os.org/t/devuan-linux-template-non-official-available-for-testing/40900.
Experiment
I tried using iwd together with iwgtk as the wireless network management solution for sys-net in Qubes OS.
Template Configuration Script Snippet
apt install firmware-iwlwifi
apt install firmware-mediatek
apt install firmware-realtek
apt install --no-install-recommends usbutils usb-modeswitch
apt install --no-install-recommends qubes-core-agent-networking
apt install --no-install-recommends bash-completion
#dhcpcd
apt install --no-install-recommends dhcpcd dhcpcd-base
aa-complain dhcpcd
rc-update add dhcpcd default
cat > /etc/dhcpcd.exit-hook << 'EOF'
case "$reason" in
BOUND|RENEW|REBIND|REBOOT|IPV4LL|STATIC|TIMEOUT)
case "$interface" in
vif*) ;;
*) /usr/lib/qubes/qubes-setup-dnat-to-ns ;;
esac
;;
esac
EOF
chmod 644 /etc/dhcpcd.exit-hook
#iwd
apt install --no-install-recommends iwd
apt install --no-install-recommends iwgtk
rc-update add iwd default
Preparation
-
Use the script above to install the required packages.
-
Shut down
sys-net, then open:Qubes Manager → sys-net → Right-click → Settings → DevicesAttach the Wi-Fi adapter to
sys-net. -
Start
sys-net, then open:Qubes Manager → sys-net → Right-click → Open Console in QubeLog in as
root. -
Run
iwgtkand use it to connect to a Wi-Fi network. -
Set
sys-netas theNetVMfor the other Qubes, then test network connectivity.
Result
The network connection worked successfully.
This indicates that Qubes OS does not necessarily require both qubes-core-agent-manager and network-manager in this setup.
At minimum, the following components are required:
qubes-core-agent-networking- DHCP service software
- Packages required for wired networking
Unfortunately, iwgtk must be started as root, so it may not be suitable for users who want a desktop experience similar to nm-applet.
If you use systemd, modify the corresponding service configuration as needed.
Just for fun![]()