x11.toml
· 1.7 KiB · TOML
Raw
name: x11
description: GUI LXD profile
config:
environment.DISPLAY: :0
environment.PULSE_SERVER: unix:/home/.pulse-native
user.user-data: |
#cloud-config
packages:
- x11-apps
- mesa-utils
- pulseaudio
- acl
users:
- name: hd
groups: adm, dialout, cdrom, floppy, sudo, audio, dip, video, plugdev, netdev, lxd
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ssh-ed25519 REDACTED
write_files:
- content: |
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
path: /etc/systemd/system/rc-local.service
owner: root:root
permissions: '0644'
- content: |
#!/bin/bash
setfacl -m "u:hd:rw-" /dev/dri/*
path: /etc/rc.local
owner: root:root
permissions: '0744'
runcmd:
- 'sed -i "s/; enable-shm = yes/enable-shm = no/g" /etc/pulse/client.conf'
- 'systemctl enable rc-local'
devices:
PASocket1:
bind: container
connect: unix:/run/user/1000/pulse/native
gid: "1000"
listen: unix:/home/.pulse-native
mode: "0777"
security.gid: "1000"
security.uid: "1000"
type: proxy
uid: "1000"
X0:
bind: container
connect: unix:@/tmp/.X11-unix/X0
listen: unix:@/tmp/.X11-unix/X0
security.gid: "1000"
security.uid: "1000"
type: proxy
mygpu:
type: gpu
| 1 | name: x11 |
| 2 | description: GUI LXD profile |
| 3 | config: |
| 4 | environment.DISPLAY: :0 |
| 5 | environment.PULSE_SERVER: unix:/home/.pulse-native |
| 6 | user.user-data: | |
| 7 | #cloud-config |
| 8 | packages: |
| 9 | - x11-apps |
| 10 | - mesa-utils |
| 11 | - pulseaudio |
| 12 | - acl |
| 13 | users: |
| 14 | - name: hd |
| 15 | groups: adm, dialout, cdrom, floppy, sudo, audio, dip, video, plugdev, netdev, lxd |
| 16 | sudo: ALL=(ALL) NOPASSWD:ALL |
| 17 | ssh_authorized_keys: |
| 18 | - ssh-ed25519 REDACTED |
| 19 | write_files: |
| 20 | - content: | |
| 21 | [Unit] |
| 22 | Description=/etc/rc.local Compatibility |
| 23 | ConditionPathExists=/etc/rc.local |
| 24 | |
| 25 | [Service] |
| 26 | Type=forking |
| 27 | ExecStart=/etc/rc.local start |
| 28 | TimeoutSec=0 |
| 29 | StandardOutput=tty |
| 30 | RemainAfterExit=yes |
| 31 | SysVStartPriority=99 |
| 32 | |
| 33 | [Install] |
| 34 | WantedBy=multi-user.target |
| 35 | path: /etc/systemd/system/rc-local.service |
| 36 | owner: root:root |
| 37 | permissions: '0644' |
| 38 | - content: | |
| 39 | #!/bin/bash |
| 40 | setfacl -m "u:hd:rw-" /dev/dri/* |
| 41 | path: /etc/rc.local |
| 42 | owner: root:root |
| 43 | permissions: '0744' |
| 44 | |
| 45 | runcmd: |
| 46 | - 'sed -i "s/; enable-shm = yes/enable-shm = no/g" /etc/pulse/client.conf' |
| 47 | - 'systemctl enable rc-local' |
| 48 | devices: |
| 49 | PASocket1: |
| 50 | bind: container |
| 51 | connect: unix:/run/user/1000/pulse/native |
| 52 | gid: "1000" |
| 53 | listen: unix:/home/.pulse-native |
| 54 | mode: "0777" |
| 55 | security.gid: "1000" |
| 56 | security.uid: "1000" |
| 57 | type: proxy |
| 58 | uid: "1000" |
| 59 | X0: |
| 60 | bind: container |
| 61 | connect: unix:@/tmp/.X11-unix/X0 |
| 62 | listen: unix:@/tmp/.X11-unix/X0 |
| 63 | security.gid: "1000" |
| 64 | security.uid: "1000" |
| 65 | type: proxy |
| 66 | mygpu: |
| 67 | type: gpu |