summaryrefslogtreecommitdiff
path: root/examples/disklserver/settings_x2go-minidesktop+amd64+bullseye/x2gothinclient_init.d/010_x2gothinclient-fresh-home
blob: 2417a24509be52d46d5a6576d4d039d97233b71f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash

# Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org
#       Oleksandr Shneyder <o.shneyder@phoca-gmbh.de>
#       Moritz 'Morty' Struebe <Moritz.Struebe@informatik.uni-erlangen.de>
#       Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

# 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.

if [ -z "$X2GO_HANDLE_DAEMON" ]; then
	mkdir -p ~x2gothinclient
	mkdir -p ~x2gothinclient/.x2goclient
	if [ -e /etc/x2go/x2gothinclient_sessions ]; then
		 cp /etc/x2go/x2gothinclient_sessions ~x2gothinclient/.x2goclient/sessions
	fi
	if [ -e /etc/x2go/freerdp/known_hosts ]; then
		mkdir -p ~x2gothinclient/.freerdp
		cp /etc/x2go/freerdp/known_hosts ~x2gothinclient/.freerdp/known_hosts
	fi
	if [ -e /etc/x2go/freerdp/known_hosts2 ]; then
		mkdir -p ~x2gothinclient/.config/freerdp
		cp /etc/x2go/freerdp/known_hosts2 ~x2gothinclient/.config/freerdp/known_hosts2
	fi
	if [ -e /etc/xdg/autostart/x2gothinclient-minidesktop.desktop ]; then
		mkdir -p ~x2gothinclient/Desktop
		cp /etc/xdg/autostart/x2gothinclient-minidesktop.desktop ~x2gothinclient/Desktop/
		chmod 0700 ~x2gothinclient/Desktop/x2gothinclient-minidesktop.desktop
	fi
	mkdir -p ~x2gothinclient/.kde
	mkdir -p ~x2gothinclient/.kde/socket-`hostname`
	mkdir -p ~x2gothinclient/mounts
	mkdir -p ~x2gothinclient/.gnupg
	echo -e "pinentry-program /usr/bin/pinentry-x2go\nenable-ssh-support">~x2gothinclient/.gnupg/gpg-agent.conf
	mkdir -p ~x2gothinclient/export
	mkdir -p ~x2gothinclient/logins
	mkdir -p ~x2gothinclient/.ssh
	mkdir -p ~x2gothinclient/.x2go
	chown x2gothinclient:x2gothinclient ~x2gothinclient -Rf
	chmod go-rwx ~x2gothinclient -Rf
fi