Simple script in cups-pdf.conf post prossenig

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
madlinuxman

Simple script in cups-pdf.conf post prossenig

Post by madlinuxman »

Does any one have a simple script that I can use in the cups-pdf.conf post PostProcessing line, for the purpose of testing/learning please.

Regards
John
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
madlinuxman

Re: Simple script in cups-pdf.conf post prossenig

Post by madlinuxman »

The reason I asked the original question is that the following script fails to run in version 15 or 16, and I am stumped as to what has changed or stoped working, and there is no clue in the logs.

#!/bin/bash

export DISPLAY=:0.0
export XAUTHORITY=/home/$2/.Xauthority

FILENAME=`basename $1`
cd ~
SAVE_TO=$(zenity --file-selection --save --filename="$FILENAME")
mv "$1" "$SAVE_TO"

Regards
John
Habitual

Re: Simple script in cups-pdf.conf post prossenig

Post by Habitual »

madlinuxman wrote:The reason I asked the original question is that the following script fails to run in version 15 or 16, and I am stumped as to what has changed or stoped working, and there is no clue in the logs.

#!/bin/bash

export DISPLAY=:0.0
export XAUTHORITY=/home/$2/.Xauthority

FILENAME=`basename $1`
cd ~
SAVE_TO=$(zenity --file-selection --save --filename="$FILENAME")
mv "$1" "$SAVE_TO"

Regards
John
Try cd "$HOME" instead.
Locked

Return to “Scripts & Bash”