The branch, release/4.0.1.x has been updated via 636c5395686aae0a28dfac0edc551846c0121ed0 (commit) from 4dae021e8cd56db4d194c912e1851b5e5b0b43d2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: x2goprint | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 x2goprint The diff of changes is: diff --git a/x2goprint b/x2goprint new file mode 100755 index 0000000..e808d46 --- /dev/null +++ b/x2goprint @@ -0,0 +1,53 @@ +#!/usr/bin/perl + +use File::Basename; +use File::Copy; +use strict; + +if (scalar(@ARGV) ==1) +{ + system ("su @ARGV[0] -c \"x2golistsessions --all-servers\" "); +} +elsif (scalar(@ARGV) != 4) +{ + print STDERR "ERROR: Usage:\nx2goprint user session file titleFile\nx2goprint user\n"; + exit 1; +} + +my ($user, $session, $file, $titleFile)=@ARGV; + +my ($tm,$tm,$uid,$gid,$tm,$tm,$tm,$homedir)=getpwnam("x2goprint"); +my $printdir=$homedir; + +my $title; +if( -e "$printdir/$titleFile") +{ + open (TITLE,"<$printdir/$titleFile"); + $title=<TITLE>; + close (TITLE); + unlink("$printdir/$titleFile"); +} + + +($tm,$tm,$uid,$gid,$tm,$tm,$tm,$homedir)=getpwnam($user); + +my $spooldir="/tmp/spool_$user/$session"; + +my $mounts=`sudo x2gopgwrapper getmounts $session`; +if( $mounts=~m/$spooldir/) +{ + move ("$printdir/$file", "$homedir/.x2go/C-$session/$file") or die "$!: Can't rename $file to $homedir/.x2go/C-$session/$file"; + chown $uid, $gid, "$homedir/.x2go/C-$session/$file"; + system ("su $user -c \"mv $homedir/.x2go/C-$session/$file $spooldir\""); + + open (RFILE,">$homedir/.x2go/C-$session/$file.ready"); + print RFILE "$file\n$title"; + close (RFILE); + + chown $uid, $gid, "$homedir/.x2go/C-$session/$file.ready"; + system ("su $user -c \"mv $homedir/.x2go/C-$session/$file.ready $spooldir\""); +} +else +{ + unlink("$printdir/$file"); +} hooks/post-receive -- x2goserver.git (X2Go Server) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "x2goserver.git" (X2Go Server).