Skip to content

Commit 95e9d5c

Browse files
fix(qemu): update qemu clipboard setup instructions
1 parent 26f81c2 commit 95e9d5c

1 file changed

Lines changed: 58 additions & 41 deletions

File tree

src/content/docs/linux/qemu-setup-antix-linux.mdx

Lines changed: 58 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ import { Tabs, TabItem } from '@astrojs/starlight/components';
88

99
this guide will walk you though setting up QEMU, Virt Manager on Antix Linux runit v23.2, the instructions are inspired by [ this antix linux forum ](https://www.antixforum.com/forums/topic/how-to-setup-qemu-virt-manager-virt-viewer-on-antix-linux/)
1010

11+
## Steps
12+
1113
<Steps>
12-
1. ## Install Dependecies
14+
1. ### Install Dependecies
1315

1416
according to official [ QEMU guide ](https://www.qemu.org/download/#linux), run install these Dependecies
1517
```sh
1618
sudo apt install qemu-system qemu-utils dnsmasq-base qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager gir1.2-spiceclientgtk-3.0 spice-vdagent
1719

1820
```
19-
2. ## Setup Deamons and Services
21+
2. ### Setup Deamons and Services
2022

2123
to setup the `libvirtd`, `virtlockd`, `virtlogd` services, clone this [ gitlab repo ](https://gitlab.com/techore/libvirt-runit)
2224
```sh
@@ -51,52 +53,67 @@ this guide will walk you though setting up QEMU, Virt Manager on Antix Linux run
5153
sudo virsh net-autostart default
5254
```
5355

54-
3. ## Add User to `libvirt` group
56+
3. ### Add User to `libvirt` group
5557

5658
this step is a common miss, not doing this causes `authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'`
5759

5860
```sh
5961
sudo usermod -aG libvirt $(whoami)
6062
```
6163

62-
4. ## Setup shared clipboard (Optional)
63-
if you're running a linux OS in the Virtual Machine and want to have a shared clipboard amoung host and guest OS, then :
64-
on the **Guest System** (the Virtual Machine),
65-
you need to install the `spice-vdagent` package \
66-
choose your **Guest OS** and run the given command :
67-
68-
<Tabs>
69-
<TabItem label="Debian Based">
70-
```shell
71-
sudo apt install spice-vdagent
72-
```
73-
</TabItem>
74-
<TabItem label="Fedora Based">
75-
```shell
76-
sudo dnf install spice-vdagent
77-
```
78-
</TabItem>
79-
<TabItem label="Arch Based">
80-
```shell
81-
sudo pacman -S spice-vdagent
82-
```
83-
</TabItem>
84-
</Tabs>
85-
86-
after that, you need to start the `spice-vdagent` on startup on your **Guest OS**\
87-
choose the **Guest OS** to see instruction
88-
89-
<Tabs>
90-
<TabItem label="Antix Linux">
91-
add this line at the end to the `~/.desktop-session/startup` file
92-
```sh
93-
spice-vdagent &
94-
```
95-
</TabItem>
96-
<TabItem label="Other Os">
97-
you would need to google for "how to setup a service to run on startup on \<your os\>"
98-
</TabItem>
99-
</Tabs>
10064
</Steps>
10165

66+
## Setup shared clipboard (Optional)
67+
if you're running a linux OS in the Virtual Machine and want to have a shared clipboard amoung host and guest OS, then :
68+
on the **Guest System** (the Virtual Machine),
69+
you need to install the `spice-vdagent` package \
70+
choose your **Guest OS** and run the given command :
71+
72+
<Tabs>
73+
<TabItem label="Debian Based">
74+
```shell
75+
sudo apt install spice-vdagent
76+
```
77+
</TabItem>
78+
<TabItem label="Fedora Based">
79+
```shell
80+
sudo dnf install spice-vdagent
81+
```
82+
</TabItem>
83+
<TabItem label="Arch Based">
84+
```shell
85+
sudo pacman -S spice-vdagent
86+
```
87+
</TabItem>
88+
</Tabs>
89+
90+
after that, you need to start the `spice-vdagent` on startup on your **Guest OS**\
91+
choose the **Guest OS** to see instruction
92+
93+
<Tabs>
94+
<TabItem label="Antix Linux">
95+
create a file at `/etc/sv/spice-vdagent/run`
96+
```sh
97+
sudo vim /etc/sv/spice-vdagent/run
98+
```
99+
and add this exact content to it
100+
```sh
101+
#!/bin/sh
102+
mkdir -p /run/spice-vdagentd
103+
exec /usr/sbin/spice-vdagentd -x
104+
```
105+
then create a symlink of `/etc/sv/spice-vdagent` to `/etc/service/` directory
106+
```sh
107+
sudo ln -s /etc/sv/spice-vdagentd /etc/service/
108+
```
109+
110+
finally add this line at the end to the `~/.desktop-session/startup` file using vim, nano, anything you like
111+
```sh
112+
spice-vdagent &
113+
```
114+
</TabItem>
115+
<TabItem label="Other Os">
116+
you would need to google for "how to setup a service to run on startup on \<your os\>"
117+
</TabItem>
118+
</Tabs>
102119

0 commit comments

Comments
 (0)