neues logo drucker fixed
This commit is contained in:
parent
4471d845d3
commit
96f523b4df
|
|
@ -1,8 +1,9 @@
|
||||||
[rdp_clients]
|
[rdp_clients]
|
||||||
thin-client-01 ansible_host=192.168.178.241
|
#thin-client-01 ansible_host=192.168.178.241
|
||||||
#thin-client-02 ansible_host=192.168.0.29
|
#thin-client-02 ansible_host=192.168.0.29
|
||||||
#thin-client-03 ansible_host=192.168.0.23
|
#thin-client-03 ansible_host=192.168.0.23
|
||||||
#thin-client-04 ansible host=192.168.0.
|
#thin-client-04 ansible_host=192.168.0.32
|
||||||
|
thin-client-05 ansible_host=192.168.0.37
|
||||||
[rdp_clients:vars]
|
[rdp_clients:vars]
|
||||||
ansible_user=root
|
ansible_user=root
|
||||||
#ansible_ssh_private_key_file=~/.ssh/id_rsa
|
#ansible_ssh_private_key_file=~/.ssh/id_rsa
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@
|
||||||
name: "{{ thin_client_user }}"
|
name: "{{ thin_client_user }}"
|
||||||
password: "{{ thin_client_password }}"
|
password: "{{ thin_client_password }}"
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
groups: audio,video,bluetooth,plugdev,netdev,sudo
|
groups: audio,video,bluetooth,plugdev,netdev,sudo,lpadmin
|
||||||
append: yes
|
append: yes
|
||||||
|
|
||||||
- name: Allow rdpuser to use sudo for package installation
|
- name: Allow rdpuser to use sudo for package installation
|
||||||
|
|
@ -564,6 +564,54 @@
|
||||||
autoremove: yes
|
autoremove: yes
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
|
# === PRINTER SUPPORT (CUPS) ===
|
||||||
|
- name: Enable and start CUPS service
|
||||||
|
systemd:
|
||||||
|
name: cups
|
||||||
|
enabled: yes
|
||||||
|
state: started
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- name: Create PolicyKit rules directory
|
||||||
|
file:
|
||||||
|
path: /etc/polkit-1/rules.d
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: Create PolicyKit rule for CUPS (lpadmin group)
|
||||||
|
copy:
|
||||||
|
dest: /etc/polkit-1/rules.d/49-allow-lpadmin.rules
|
||||||
|
mode: '0644'
|
||||||
|
content: |
|
||||||
|
// Allow lpadmin group to manage printers without authentication
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if ((action.id == "org.opensuse.cupspkhelper.mechanism.all-edit" ||
|
||||||
|
action.id.indexOf("org.opensuse.cupspkhelper.mechanism.") == 0) &&
|
||||||
|
subject.isInGroup("lpadmin")) {
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
- name: Create directory for legacy PolicyKit configuration
|
||||||
|
file:
|
||||||
|
path: /etc/polkit-1/localauthority/50-local.d
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- name: Create legacy PolicyKit configuration for CUPS
|
||||||
|
copy:
|
||||||
|
dest: /etc/polkit-1/localauthority/50-local.d/49-allow-lpadmin-cups.pkla
|
||||||
|
mode: '0644'
|
||||||
|
content: |
|
||||||
|
[Allow lpadmin group to manage printers]
|
||||||
|
Identity=unix-group:lpadmin
|
||||||
|
Action=org.opensuse.cupspkhelper.mechanism.*
|
||||||
|
ResultAny=yes
|
||||||
|
ResultInactive=yes
|
||||||
|
ResultActive=yes
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Disable unnecessary services
|
- name: Disable unnecessary services
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
|
|
@ -571,7 +619,6 @@
|
||||||
state: stopped
|
state: stopped
|
||||||
loop:
|
loop:
|
||||||
- ModemManager
|
- ModemManager
|
||||||
- cups
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Final message
|
- name: Final message
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 20 KiB |
|
|
@ -0,0 +1,70 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
GRUB Background Generator
|
||||||
|
Einfaches Hintergrundbild für GRUB Bootloader
|
||||||
|
"""
|
||||||
|
|
||||||
|
from PIL import Image, ImageDraw, ImageFont
|
||||||
|
import os
|
||||||
|
|
||||||
|
# Farben
|
||||||
|
BG_BLACK = (12, 12, 15)
|
||||||
|
TEXT_WHITE = (230, 230, 230)
|
||||||
|
TEXT_GRAY = (120, 120, 120)
|
||||||
|
ACCENT_CYAN = (100, 200, 255)
|
||||||
|
|
||||||
|
# Bildgröße (GRUB Standard)
|
||||||
|
WIDTH = 1920
|
||||||
|
HEIGHT = 1080
|
||||||
|
|
||||||
|
# Erstelle Bild
|
||||||
|
img = Image.new('RGB', (WIDTH, HEIGHT), BG_BLACK)
|
||||||
|
draw = ImageDraw.Draw(img)
|
||||||
|
|
||||||
|
# Versuche Font zu laden
|
||||||
|
try:
|
||||||
|
font_paths = [
|
||||||
|
'/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf',
|
||||||
|
'/usr/share/fonts/truetype/liberation/LiberationMono-Bold.ttf',
|
||||||
|
]
|
||||||
|
|
||||||
|
font_large = None
|
||||||
|
font_small = None
|
||||||
|
|
||||||
|
for font_path in font_paths:
|
||||||
|
if os.path.exists(font_path):
|
||||||
|
font_large = ImageFont.truetype(font_path, 72)
|
||||||
|
font_small = ImageFont.truetype(font_path, 36)
|
||||||
|
break
|
||||||
|
|
||||||
|
if not font_large:
|
||||||
|
raise Exception("No font found")
|
||||||
|
|
||||||
|
except:
|
||||||
|
print("Font nicht gefunden, nutze Default")
|
||||||
|
font_large = ImageFont.load_default()
|
||||||
|
font_small = ImageFont.load_default()
|
||||||
|
|
||||||
|
# Zentrierter Text
|
||||||
|
main_text = "RDP THIN CLIENT"
|
||||||
|
bbox = draw.textbbox((0, 0), main_text, font=font_large)
|
||||||
|
text_width = bbox[2] - bbox[0]
|
||||||
|
text_x = (WIDTH - text_width) // 2
|
||||||
|
text_y = (HEIGHT // 2) - 100
|
||||||
|
|
||||||
|
draw.text((text_x, text_y), main_text, font=font_large, fill=TEXT_WHITE)
|
||||||
|
|
||||||
|
# Subtext
|
||||||
|
sub_text = "HackerSoft · Hacker-Net Telekommunikation"
|
||||||
|
bbox = draw.textbbox((0, 0), sub_text, font=font_small)
|
||||||
|
text_width = bbox[2] - bbox[0]
|
||||||
|
sub_x = (WIDTH - text_width) // 2
|
||||||
|
sub_y = text_y + 120
|
||||||
|
|
||||||
|
draw.text((sub_x, sub_y), sub_text, font=font_small, fill=ACCENT_CYAN)
|
||||||
|
|
||||||
|
# Speichern
|
||||||
|
output_path = os.path.join(os.path.dirname(__file__), 'grub-background.png')
|
||||||
|
img.save(output_path, 'PNG')
|
||||||
|
print(f"GRUB Background erstellt: {output_path}")
|
||||||
|
print(f"Größe: {WIDTH}x{HEIGHT}")
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 20 KiB |
Loading…
Reference in New Issue