Hello again Mike.

Às 20:03 de 23/09/23, Mike Gabriel escreveu:
Hi Rui,

[...]

Thanks for the follow-up. To be 100% sure, your changes land in cups-x2go appropriately, please do the following:

<install package git>
git clone https://code.x2go.org/git/cups-x2go.git

Now copy your version of the cups-x2go script into the newly cloned cups-x2go/ folder.

Change dir into that folder and check output of "git diff".

Commit that change, e.g. via "git commit --patch -m "cups-x2go: Fix <this and that>." Find a good commit message one-liner.

The run "git format-patch HEAD~..HEAD". This will create a patch file.

Please send this patch file attached to a reply to this mail.


I divided the changes into 2 patches. Hope I did it right.

One concerns the change in Ghostscript.
The other one is the correction to the parsing of the conf file.


Regards,
Rui Ferreira
From dd01caddfa6843e27d8d26907efab2e3b01d94e0 Mon Sep 17 00:00:00 2001
From: Rui Ferreira <ruifmferre...@hotmail.com>
Date: Sun, 24 Sep 2023 15:07:48 +0100
Subject: [PATCH] cups-x2go: Fix parsing of ps2pdf command from cups-x2go.conf
 file

---
 cups-x2go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cups-x2go b/cups-x2go
index 736088c..d78f368 100755
--- a/cups-x2go
+++ b/cups-x2go
@@ -83,6 +83,7 @@ sub readconfig
 				if($option eq "ps2pdf")
 				{
 					$ps2pdf=$value;
+					$ps2pdf=~s/^\s+//;
 				}
 				if($option eq "loglevel")
 				{
-- 
2.34.1

From e6b5ce26142f43e61d60dbf7916e2639068bc3f0 Mon Sep 17 00:00:00 2001
From: Rui Ferreira <ruifmferre...@hotmail.com>
Date: Sun, 24 Sep 2023 15:04:46 +0100
Subject: [PATCH] cups-x2go: Remove offending argument '-c .setpdfwrite' in
 Ghostscript >= 9.54

---
 cups-x2go      | 3 +--
 cups-x2go.conf | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/cups-x2go b/cups-x2go
index d06599d..736088c 100755
--- a/cups-x2go
+++ b/cups-x2go
@@ -43,8 +43,7 @@ my $x2goserver = "local";
 my $printdsa = "/root/.ssh/id_dsa-x2goprint";
 
 # PS2PDF command
-my $ps2pdf = "/usr/bin/gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=- -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -dDoNumCopies -c .setpdfwrite -f \"%s\"";
-#my $ps2pdf = "/usr/bin/gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=- -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -dDoNumCopies -c .setpdfwrite -f /usr/bin/margin-offset.ps \"%s\"";
+my $ps2pdf = "/usr/bin/gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=- -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -dDoNumCopies -f \"%s\"";
 
 ## loglevel for cups-x2go, possible values: emerg, alert, crit, err, warning, notice, info, debug
 my $strloglevel = "notice";
diff --git a/cups-x2go.conf b/cups-x2go.conf
index 7a06843..7dad572 100644
--- a/cups-x2go.conf
+++ b/cups-x2go.conf
@@ -15,7 +15,7 @@
 
 ## command to generate PDF file
 ## CAUTION: this command MUST output the resulting PDF File to standard output.
-#ps2pdf = /usr/bin/gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=- -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -dDoNumCopies -c .setpdfwrite -f \"%s\"
+#ps2pdf = /usr/bin/gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=- -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -dDoNumCopies -f \"%s\"
 
 ## loglevel for cups-x2go, possible values: emerg, alert, crit, err, warning, notice, info, debug
 #loglevel = notice
-- 
2.34.1

_______________________________________________
x2go-user mailing list
x2go-user@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-user

Reply via email to