! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
I have to set the directory for screenshots, -s can not be used together with -o
Status:
RESOLVED: FIXED
Product:
Xfce4-screenshooter
Component:
General

Comments

Description Adalbert.Hanssen 2019-03-29 13:30:18 CET
This bug report pertains to xfce4-screenshooter 1.8.2 run under Xubuntu 16.0.6 LTS, currently under a linux kernel 4.4.0-143-generic x86_64.

I have snap-installed the of the latest version of Gimp. I already had two starters on the panel to initate a screenshot:

1. an immediate screenshot to manually select the rectangle of interest and 
2. another one to initiate a delayed screenshot which is subsequently fed into Gimp (in order to have the cursor and other things on it and to be able to select the region of interest).

The command in the second starter is

xfce4-screenshooter -fmd 7 -o gimp

Both starters worked with previous versions of Gimp but they do no longer work with the snap-installed new Gimp.
I filed a bug report against Gimp: https://gitlab.gnome.org/GNOME/gimp/issues/3156 

They found out that the unability of Gimp to open a file in /tmp is caused by the Snap install mechanism. 

I was suggested to create a bug report for the Snap-team and so I did: https://forum.snapcraft.io/t/snap-installed-gimp-can-not-process-screenshots-which-are-made-in-tmp/10628

I got the hint to try to influence the place where xfce4-screenshooter places the screenshots. I looked up help of xfce4-screenshooter. There is an option -s to determine the directory of the screenshot:

$ **xfce4-screenshooter --help**
Aufruf:
  xfce4-screenshooter [OPTION …]

Hilfeoptionen:
  -h, --help              Hilfeoptionen anzeigen
  --help-all              Alle Hilfeoptionen anzeigen
  --help-gtk              GTK+-Optionen anzeigen

Anwendungsoptionen:
  -c, --clipboard         Bildschirmfoto in die Zwischenablage kopieren
  -d, --delay             Verzögerung in Sekunden vor Erstellung des Bildschirmfotos
  -f, --fullscreen        Bildschirmfoto des ganzen Bildschirms erstellen
  -m, --mouse             Den Mauszeiger auf dem Bildschirmfoto anzeigen
  -o, --open              Anwendung zum Öffnen des Bildschirmfotos
  -r, --region            Den aufzunehmenden Bereich auswählen, indem Sie auf einen Punkt auf dem Bildschirm klicken, ohne die Maustaste loszulassen, den Mauszeiger dann an das entgegengesetzte Ende des Bereichs ziehen und dann die Taste loslassen.
  -s, --save              Der Ordner, in dem das Bildschirmfoto gespeichert werden soll
  -u, --upload            Auf ZimageZ hochladen, einem kostenlosen Bilderdienst
  -i, --imgur             Auf Imgur hochladen, einem kostenlosen Bilderdienst
  -V, --version           Versionsinformation
  -w, --window            Bildschirmfoto des aktuellen Fensters erstellen
  --display=ANZEIGE       X-Anzeige, die verwendet werden soll

However

~$** xfce4-screenshooter -fmd 4 -s ~/temp -o gimp**
Conflicting options: --open and --save cannot be used at the same time.

gave me the shown error message.

Is there a way to circumvent this pitfall? **How can I let xfce4-screenshooter place its screenshots to ~/tmp?**
Comment 1 Andre Miranda editbugs 2019-03-30 19:42:36 CET
Perhaps:
xfce4-screenshooter -fmd 4 -s ~/temp && gimp $(ls -1t ~/temp/*.png | head -n1)
Comment 2 Adalbert.Hanssen 2019-03-30 21:28:02 CET
(In reply to Andre Miranda from comment #1)
> Perhaps:
> xfce4-screenshooter -fmd 4 -s ~/temp && gimp $(ls -1t ~/temp/*.png | head
> -n1)

Andre,
your workaround almost solves my problem. 
My earlier solution

   xfce4-screenshooter -fmd 7 -o gimp

made the screenshot after the delay and opened gimp with the full screen image without further user intervention.

With your workaround, xfce4-screenshooter  presents me a dialog to store the image. The directory is already preset and the name is Bildschirmfoto_yyyy-mm-dd_hh-nn-ss.png. I just have to click on the store button in it. Then Gimp starts up with the screenshot.

If I understand your command line right, the part after && is invoked if xfce4-screenshooter terminates without error. The ls command in it creates a listing of the directory sorted by time. Then head -n1 selects just the newest file name and this is fed to gimp.

Unfortunately -s just lets one select the directory, giving a complete file name is not allowed there. So I tried to vary your example to something which makes a delayed screenshot on the clipboard in order to find a way to start Gimp similar to you with its Shift+Ctl+V operation (insert the content to the clipboard to a new image). I have not solved the second part of it, I just failed on the first one because after issuing

   xfce4-screenshooter -cd 4 -fm

it just takes ca 4 seconds for the prompt to reappear, however there is no screenshot on the clipboard (according to Gimp). Option -c seems to be incompatible with -f, but the manpage does not tell about such a limitation.
Comment 3 Andre Miranda editbugs 2019-03-30 23:01:34 CET
(In reply to Adalbert.Hanssen from comment #2)
> Unfortunately -s just lets one select the directory, giving a complete file
> name is not allowed there.
Since 1.9.4 it's possible to pass the file name.
Comment 4 Adalbert.Hanssen 2019-03-30 23:28:01 CET
(In reply to Andre Miranda from comment #3)
> (In reply to Adalbert.Hanssen from comment #2)
> > Unfortunately -s just lets one select the directory, giving a complete file
> > name is not allowed there.
> Since 1.9.4 it's possible to pass the file name.

I found https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/xfce4-screenshooter/1.9.4-0ubuntu1/xfce4-screenshooter_1.9.4-0ubuntu1.debian.tar.xz. Does this run in Xubuntu 16.04.6? (There was a typo in the first line of my bug report in the version of Xubuntu. 16.04.6 is the one which I have).
Comment 5 Andre Miranda editbugs 2019-03-30 23:32:57 CET
No idea, I don't know Ubuntu very well.
You can try this PPA: https://launchpad.net/ubuntu/+source/xfce4-screenshooter
Comment 6 Andre Miranda editbugs 2019-08-26 01:46:38 CEST
Closing because since 1.9.4 this user case is supported, reopen if not.

Bug #15237

Reported by:
Adalbert.Hanssen
Reported on: 2019-03-29
Last modified on: 2019-08-26

People

Assignee:
Jérôme Guelfucci
CC List:
1 user

Version

Attachments

Additional information