Replace MetalCut with LightBurn
As we replaced the Ruida controller with a Duet 3 Mini 5+
This commit is contained in:
parent
35232ca3c0
commit
7c96f8ce13
11 changed files with 114 additions and 1287 deletions
|
|
@ -42,9 +42,8 @@
|
||||||
url: "https://github.com/t-oster/VisiCut/releases/download/1.7_310/visicut_1.7-310-gcf8c087-1_all.deb"
|
url: "https://github.com/t-oster/VisiCut/releases/download/1.7_310/visicut_1.7-310-gcf8c087-1_all.deb"
|
||||||
cura:
|
cura:
|
||||||
version: 3.3.1
|
version: 3.3.1
|
||||||
metalcut:
|
lightburn:
|
||||||
socket: laser.lab.fablab-nea.de:9000
|
dockerimage: r.jalr.de/fablab/lightburn
|
||||||
dockerimage: r.jalr.de/fablab/metalcut
|
|
||||||
firefox:
|
firefox:
|
||||||
language_packs:
|
language_packs:
|
||||||
- de
|
- de
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=LightBurn
|
||||||
|
GenericName=LightBurn
|
||||||
|
Comment=Laser Cutter Job Control Application
|
||||||
|
Exec=x-terminal-emulator -e 'sudo /usr/local/bin/lightburn'
|
||||||
|
Icon=/usr/local/share/lightburn/lightburn.png
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=Graphics
|
||||||
BIN
packer/ansible/roles/fablab/files/lightburn/lightburn.png
Normal file
BIN
packer/ansible/roles/fablab/files/lightburn/lightburn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 137 KiB |
34
packer/ansible/roles/fablab/files/lightburn/lightburn.sh
Executable file
34
packer/ansible/roles/fablab/files/lightburn/lightburn.sh
Executable file
|
|
@ -0,0 +1,34 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
. /etc/default/lightburn
|
||||||
|
|
||||||
|
if [ ! -z "$SUDO_COMMAND" ] && [ "$SUDO_COMMAND" = "$0" ]; then
|
||||||
|
home="$(getent passwd "$SUDO_UID" | cut -d: -f6)"
|
||||||
|
export PUID="$SUDO_UID"
|
||||||
|
export PGID="$SUDO_GID"
|
||||||
|
else
|
||||||
|
home="$HOME"
|
||||||
|
export PUID=$(id -u)
|
||||||
|
export PGID=$(id -g)
|
||||||
|
fi
|
||||||
|
|
||||||
|
config_dir="$home/.config/lightburn"
|
||||||
|
|
||||||
|
mkdir -p "$config_dir"
|
||||||
|
|
||||||
|
media="/media/$(id -un $PUID)"
|
||||||
|
if [ -e "$media" ]; then
|
||||||
|
media_volume="-v $media:/media"
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker run \
|
||||||
|
--rm \
|
||||||
|
-e PUID \
|
||||||
|
-e PGID \
|
||||||
|
-e DISPLAY \
|
||||||
|
-v /tmp/.X11-unix/:/tmp/.X11-unix/ \
|
||||||
|
-v $config_dir:/config/ \
|
||||||
|
-v $home:/workdir/ \
|
||||||
|
$media_volume \
|
||||||
|
--network=none \
|
||||||
|
"$LIGHTBURN_DOCKER_IMAGE"
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Name=MetalCut
|
|
||||||
GenericName=MetalCut
|
|
||||||
Comment=Laser Cutter Job Control Application
|
|
||||||
Exec=x-terminal-emulator -e 'sudo /usr/local/bin/metalcut'
|
|
||||||
Icon=/usr/share/metalcut/metalcut.svg
|
|
||||||
Terminal=false
|
|
||||||
Type=Application
|
|
||||||
Categories=Graphics
|
|
||||||
File diff suppressed because it is too large
Load diff
|
Before Width: | Height: | Size: 94 KiB |
66
packer/ansible/roles/fablab/tasks/lightburn.yml
Normal file
66
packer/ansible/roles/fablab/tasks/lightburn.yml
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
---
|
||||||
|
- file:
|
||||||
|
path: /usr/local/share/lightburn
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
|
- name: copy icon
|
||||||
|
copy:
|
||||||
|
src: lightburn/lightburn.png
|
||||||
|
dest: /usr/local/share/lightburn/lightburn.png
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: copy script
|
||||||
|
copy:
|
||||||
|
src: lightburn/lightburn.sh
|
||||||
|
dest: /usr/local/bin/lightburn
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: add lightburn configuration
|
||||||
|
template:
|
||||||
|
src: lightburn/lightburn.j2
|
||||||
|
dest: /etc/default/lightburn
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: add lightburn to applications menu
|
||||||
|
copy:
|
||||||
|
src: lightburn/lightburn.desktop
|
||||||
|
dest: /usr/share/applications/lightburn.desktop
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: add group
|
||||||
|
group:
|
||||||
|
name: lightburn
|
||||||
|
system: yes
|
||||||
|
|
||||||
|
- name: add sudoers config
|
||||||
|
copy:
|
||||||
|
content: "%lightburn ALL=/usr/local/bin/lightburn, NOPASSWD:/usr/local/bin/lightburn\n"
|
||||||
|
dest: /etc/sudoers.d/lightburn
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: ensure guest-account settings directory exists
|
||||||
|
file:
|
||||||
|
path: /etc/guest-account
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
|
- name: add lightburn group to guest account
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/guest-account/groups
|
||||||
|
line: lightburn
|
||||||
|
create: yes
|
||||||
|
|
@ -18,9 +18,9 @@
|
||||||
- import_tasks: visicut.yml
|
- import_tasks: visicut.yml
|
||||||
tags:
|
tags:
|
||||||
- fablab:visicut
|
- fablab:visicut
|
||||||
- import_tasks: metalcut.yml
|
- import_tasks: lightburn.yml
|
||||||
tags:
|
tags:
|
||||||
- fablab:metalcut
|
- fablab:lightburn
|
||||||
- import_tasks: prusa.yml
|
- import_tasks: prusa.yml
|
||||||
tags:
|
tags:
|
||||||
- fablab:prusa
|
- fablab:prusa
|
||||||
|
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
---
|
|
||||||
- file:
|
|
||||||
path: /usr/share/metalcut
|
|
||||||
state: directory
|
|
||||||
mode: "0755"
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
|
|
||||||
- name: copy icon
|
|
||||||
copy:
|
|
||||||
src: metalcut/metalcut.svg
|
|
||||||
dest: /usr/share/metalcut/metalcut.svg
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: "0644"
|
|
||||||
|
|
||||||
- name: add metalcut script
|
|
||||||
template:
|
|
||||||
src: metalcut/metalcut.sh.j2
|
|
||||||
dest: /usr/local/bin/metalcut
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: "0755"
|
|
||||||
|
|
||||||
- name: add metalcut to applications menu
|
|
||||||
copy:
|
|
||||||
src: metalcut/metalcut.desktop
|
|
||||||
dest: /usr/share/applications/metalcut.desktop
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: "0644"
|
|
||||||
|
|
||||||
- name: add group
|
|
||||||
group:
|
|
||||||
name: metalcut
|
|
||||||
system: yes
|
|
||||||
|
|
||||||
- name: add sudoers config
|
|
||||||
copy:
|
|
||||||
content: "%metalcut ALL=/usr/local/bin/metalcut, NOPASSWD:/usr/local/bin/metalcut\n"
|
|
||||||
dest: /etc/sudoers.d/metalcut
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: "0644"
|
|
||||||
|
|
||||||
- name: ensure guest-account settings directory exists
|
|
||||||
file:
|
|
||||||
path: /etc/guest-account
|
|
||||||
state: directory
|
|
||||||
mode: "0755"
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
|
|
||||||
- name: add metalcut group to guest account
|
|
||||||
lineinfile:
|
|
||||||
path: /etc/guest-account/groups
|
|
||||||
line: metalcut
|
|
||||||
create: yes
|
|
||||||
1
packer/ansible/roles/fablab/templates/lightburn/lightburn.j2
Executable file
1
packer/ansible/roles/fablab/templates/lightburn/lightburn.j2
Executable file
|
|
@ -0,0 +1 @@
|
||||||
|
LIGHTBURN_DOCKER_IMAGE='{{ fablab.lightburn.dockerimage }}'
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
remote='{{ fablab.metalcut.socket }}'
|
|
||||||
image='{{ fablab.metalcut.dockerimage }}'
|
|
||||||
|
|
||||||
if [ ! -z "$SUDO_COMMAND" ] && [ "$SUDO_COMMAND" = "$0" ]; then
|
|
||||||
home="$(getent passwd "$SUDO_UID" | cut -d: -f6)"
|
|
||||||
uid="$SUDO_UID"
|
|
||||||
gid="$SUDO_GID"
|
|
||||||
else
|
|
||||||
home="$HOME"
|
|
||||||
uid=$(id -u)
|
|
||||||
gid=$(id -g)
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker run \
|
|
||||||
--rm \
|
|
||||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
|
||||||
-e DISPLAY \
|
|
||||||
-e uid="$uid" \
|
|
||||||
-e gid="$gid" \
|
|
||||||
-v "$home:/home/metalcut/work" \
|
|
||||||
-v '/media:/media' \
|
|
||||||
-e remote="$remote" \
|
|
||||||
$image
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue