Hi,
I would like to do a simple thing, but x2goserver (apparently propose
no option/configuration).
Is this :
[limit users] #beispielb=1 [limit groups] #x2gousers=1
The only options available ?
I would like to do two things :
The reason why is that I would propose Firefox session for my users,
each with a different profile (managed by my webapp), but all on one
account on the computer. Right now, if an user starts the session, he
can see all the sessions (other users, and other kind of session).
Is there a way to prevent this ? Or use some kind of "filter" command
automatically ?
Note : I really can't use multiple accounts on the computer.
Regards, gml
Hi,
Am 09.08.2010 17:12 schrieb contact@gmli.fr:
- prevent users from resuming their session Is there a way to prevent this ? Or use some kind of "filter" command
automatically ?
I use a sshCommand overwriting for this, but it requires that you logon using a ssh-key.
Maybe you can adopt it for your needs:
.ssh/authorized_keys: command="/home/username/safe.pl",from="anzeiger??.domain" ssh-rsa KEY
/home/username/safe.pl: #!/usr/bin/perl
$cmd = $ENV{'SSH_ORIGINAL_COMMAND'};
#open(LOG,">>/home/username/x2gologs"); #print LOG "$cmd\n"; #close(LOG);
if ($cmd eq "export HOSTNAME && x2golistsessions") { # no resume of sessions exit; } elsif ($cmd =~ /^x2gocmdexitmessage username-[0-9]+-[a-z0-9A-Z_.]$/) { system($cmd); } elsif ($cmd =~ /^x2gostartagent (\d+x\d+|fullscreen) [a-z]+ [a-z0-9-]+ [a-z0-9_-]+ [a-z]{2,3} pc105\/[a-z]{2,3} [01]( R [a-z0-9-]+)?$/) { system($cmd); } elsif ($cmd =~ /^(setsid x2goruncommand \d+ \d+ username-\d+-\d+(?:_[a-zA-Z0-9_.-]+)? \d+) start-anzeiger-(NONE|[a-z0-9]{32}) ((?:nosnd R)?\s*>& \/dev\/null & exit)\s*$/) { system("$1 \"/home/username/startanzeiger.sh\" $3"); } elsif ($cmd =~ /^(x2goterminate-session|x2gocmdexitmessage) username-\d+-\d+_[a-zA-Z0-9_.-]+$/) { system($cmd); } else { if ($cmd =~ /^mkdir/) { exit; } open(LOG,">>/home/username/x2gologs"); print LOG "NO: $cmd\n"; close(LOG); # system($cmd); }
startanzeiger.sh: #!/bin/bash PROFILEDIR="/home/username/.mozilla/firefox/" TMPDIR=$(mktemp -d -p $PROFILEDIR) PROFILE=${TMPDIR:${#PROFILEDIR}} cp -a $PROFILEDIR/5jklba54.default/* $TMPDIR lockfile -5 -r-1 -L 20 $PROFILEDIR/lock.trg cat $PROFILEDIR/profiles-def.ini > $PROFILEDIR/profiles.ini echo "[Profile1]" >> $PROFILEDIR/profiles.ini echo "Name=$PROFILE" >> $PROFILEDIR/profiles.ini echo "IsRelative=1" >> $PROFILEDIR/profiles.ini echo "Path=$PROFILE" >> $PROFILEDIR/profiles.ini echo "Default=0" >> $PROFILEDIR/profiles.ini iceweasel -P $PROFILE rm -rf $TMPDIR
And I set up a cronjob for that user: # m h dom mon dow command 3 6 * * 6 find /home/username/.nx /home/username/.x2go/ -mindepth 1 -maxdepth 1 -mtime +5 -print0 | xargs -0 rm -rf
-- Best regards, Sven Strickroth ClamAV, a GPL anti-virus toolkit http://www.clamav.net PGP key id F5A9D4C4 @ any key-server
Hello,
Am 09.08.2010 17:12, schrieb contact@gmli.fr:
Hi,
I would like to do two things :
- prevent users from suspending their session
- prevent users from resuming their session
You should take care about the *bindings packages - if you are using kde, you should not execute the command "updatelockbutton". The postgresdb/sqlitedb is used for sessionresuming. If you make sure, that "x2golistsessions" won't return any running sessions, no session will be returned.
Best regards,
Heinz
Hello,
Am 09.08.2010 17:12, schrieb contact@gmli.fr:
Hi,
I would like to do two things :
- prevent users from suspending their session
- prevent users from resuming their session
You should take care about the *bindings packages - if you are using kde, you should not execute the command "updatelockbutton". The postgresdb/sqlitedb is used for sessionresuming. If you make sure, that "x2golistsessions" won't return any running sessions, no session will be returned. <snip> Out of curiosity, if one returns no sessions from x2golistsessions, will
On Sun, 2010-08-22 at 15:28 +0200, Heinz-M. Graesing wrote: that break any of the other scripts like the clean up script or unmounting mounted directories? - John