#!/bin/bash # Copyright (C) 2010-2024 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # Stefan Baur # # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # make sure pulseaudio can be reached via TCP from the X2Go Server side... if ! /usr/bin/pactl list modules | grep -A1 'module-native-protocol-tcp' | grep -q 'auth-ip-acl=127.0.0.1;::1' ; then /usr/bin/pactl 'load-module' 'module-native-protocol-tcp' 'auth-ip-acl=127.0.0.1;::1' fi # make sure we don't start before sessions and settings files exist - avoids race conditions while ! [ -e ~x2gothinclient/.x2goclient/sessions ] ; do sleep 1; done while ! [ -e ~x2gothinclient/.x2goclient/settings ]; do sleep 1 done [ -s /etc/x2go/x2gothinclient_bg.svg ] && X2GO_BG='--background="/etc/x2go/x2gothinclient_bg.svg' [ -s /etc/x2go/x2gothinclient_branding.svg ] && X2GO_BRAND='--branding="/etc/x2go/x2gothinclient_branding.svg' /usr/lib/x2go/x2goclient --no-menu \ $X2GO_BG \ $X2GO_BRAND \ --kbd-type=auto \ --set-kbd=1 \ --tray-icon \ --read-exports-from=~/export \ --no-session-edit \ --add-to-known-hosts \ &