Merge pull request #10959 from Security-Onion-Solutions/desktopyummv

Desktopyummv
This commit is contained in:
Josh Patterson
2023-08-04 16:03:20 -04:00
committed by GitHub
4 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
# This file is managed by Salt in the desktop.xwindows state
# It will not be overwritten if it already exists
[User]
Session=gnome-classic
Icon=/home/{{USERNAME}}/.face
SystemAccount=false

View File

@@ -349,6 +349,7 @@ desktop_packages:
- snappy
- sound-theme-freedesktop
- soundtouch
- securityonion-networkminer
- speech-dispatcher
- speech-dispatcher-espeak-ng
- speex

View File

@@ -0,0 +1,4 @@
#!/bin/bash
echo "Setting default session to gnome-classic"
cp /usr/share/accountsservice/user-templates/standard /etc/accountsservice/user-templates/
sed -i 's|Session=gnome|Session=gnome-classic|g' /etc/accountsservice/user-templates/standard

View File

@@ -14,6 +14,27 @@ graphical_target:
- require:
- desktop_packages
convert_gnome_classic:
cmd.script:
- name: salt://desktop/scripts/convert-gnome-classic.sh
{% for username in salt['file.find'](path='/home/',mindepth=1,maxdepth=1,type='d') %}
{% set username = username.split('/')[2] %}
{% if username != 'zeek' %}
{% if not salt['file.file_exists']('/var/lib/AccountsService/users/' ~ username) %}
{{username}}_session:
file.managed:
- name: /var/lib/AccountsService/users/{{username}}
- source: salt://desktop/files/session.jinja
- template: jinja
- defaults:
USERNAME: {{username}}
{% endif %}
{% endif %}
{% endfor %}
{% else %}
desktop_xwindows_os_fail: