You are not logged in.

#26 2024-03-31 17:23:56

seth
Member
Registered: 2012-09-03
Posts: 51,731

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

w/ -o "--selection" gets silently ignored., just to be clear:
1) scrot into xclip can be pasted from xclip but doesn't show up in clipman?
2) screenshooter -c neither shows up in clipman nor can be pasted by xclip?
3) does "scrot -a 0,0,128,128 …" behave differently (it'll take the upper left 128² px)?

Offline

#27 2024-03-31 17:36:30

pm3840
Member
Registered: 2013-12-16
Posts: 61

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

1. correct. as if clipboard is not touched.
2. same. no picture data at all. clipboard is not touched.

$ xfce4-screenshooter -f -c
$ xclip -o > /tmp/test.png
$ xclip -o -selection clipboard > /tmp/test1.png
$ file /tmp/test*
/tmp/test1.png: ASCII text, with no line terminators
/tmp/test.png:  ASCII text, with no line terminators
$

3. small size doesn't help either.

$ scrot -a 0,0,128,128 - | xclip -i -selection clipboard
$ xclip -o -selection clipboard > /tmp/c.png
$ xclip -o > /tmp/c1.png
$ file /tmp/c*.png
/tmp/c1.png: ASCII text, with no line terminators
/tmp/c.png:  PNG image data, 128 x 128, 8-bit/color RGB, non-interlaced
seth wrote:

w/ -o "--selection" gets silently ignored., just to be clear:
1) scrot into xclip can be pasted from xclip but doesn't show up in clipman?
2) screenshooter -c neither shows up in clipman nor can be pasted by xclip?
3) does "scrot -a 0,0,128,128 …" behave differently (it'll take the upper left 128² px)?

Offline

#28 2024-03-31 17:43:24

seth
Member
Registered: 2012-09-03
Posts: 51,731

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

3. small size doesn't help either.

This acts exactly as you'd expect it to?
Relevant lines

$ scrot -a 0,0,128,128 - | xclip -i -selection clipboard
$ xclip -o -selection clipboard > /tmp/c.png
/tmp/c.png:  PNG image data, 128 x 128, 8-bit/color RGB, non-interlaced

Offline

#29 2024-03-31 18:08:47

pm3840
Member
Registered: 2013-12-16
Posts: 61

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

I'd expect that clipman picks up any change to clipboard and it's not happening for xclip or screenshooter. So far Chromium/FireFox works.

seth wrote:

3. small size doesn't help either.

This acts exactly as you'd expect it to?
Relevant lines

$ scrot -a 0,0,128,128 - | xclip -i -selection clipboard
$ xclip -o -selection clipboard > /tmp/c.png
/tmp/c.png:  PNG image data, 128 x 128, 8-bit/color RGB, non-interlaced

Offline

#30 2024-03-31 19:05:40

lambdarch
Member
Registered: 2021-01-10
Posts: 75

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

pm3840 wrote:
$ scrot -a 0,0,128,128 - | xclip -i -selection clipboard

FWIW clipman doesn't see that for me either.

Offline

#31 2024-03-31 19:33:18

lambdarch
Member
Registered: 2021-01-10
Posts: 75

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

Ah, with '-target image/png' as suggested in https://unix.stackexchange.com/question … k-properly it works smile

Offline

#32 2024-03-31 19:44:20

pm3840
Member
Registered: 2013-12-16
Posts: 61

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

Oh man this is it....

scrot -a 0,0,256,128 --format jpg - | xclip -i -se c -t image/jpeg

this is also picked up by clipman.

Safe to say screenshooter does not fit clipman then?

Offline

#33 2024-03-31 19:46:23

pm3840
Member
Registered: 2013-12-16
Posts: 61

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

Err.....

Only my screenshooter doesn't work. I get it.

Offline

#34 2024-03-31 21:37:15

seth
Member
Registered: 2012-09-03
Posts: 51,731

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

pacman -Qikk xfce4-screenshooter gtk3 glib2

Offline

#35 2024-03-31 21:46:37

pm3840
Member
Registered: 2013-12-16
Posts: 61

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

$ pacman -Qikk xfce4-screenshooter gtk3 glib2
Name            : xfce4-screenshooter
Version         : 1.10.5-1
Description     : An application to take screenshots
Architecture    : x86_64
URL             : https://docs.xfce.org/apps/xfce4-screenshooter/start
Licenses        : GPL2
Groups          : xfce4-goodies
Provides        : None
Depends On      : xfce4-panel  libsoup3  curl  jq  zenity  xclip  hicolor-icon-theme
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 930.49 KiB
Packager        : Evangelos Foutras <foutrelis@archlinux.org>
Build Date      : Mon 05 Feb 2024 12:52:37 PM EST
Install Date    : Sun 31 Mar 2024 12:16:06 PM EDT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

xfce4-screenshooter: 224 total files, 0 altered files
Name            : gtk3
Version         : 1:3.24.41-1
Description     : GObject-based multi-platform GUI toolkit
Architecture    : x86_64
URL             : https://www.gtk.org/
Licenses        : LGPL-2.0-only
Groups          : None
Provides        : gtk3-print-backends  libgailutil-3.so=0-64  libgdk-3.so=0-64  libgtk-3.so=0-64
Depends On      : adwaita-icon-theme  atk  cairo  cantarell-fonts  dconf  desktop-file-utils  fontconfig  fribidi  gdk-pixbuf2  glib2  harfbuzz  iso-codes
                  libcloudproviders  libcolord  libcups  libegl  libepoxy  libgl  librsvg  libxcomposite  libx11  libxcursor  libxdamage  libxext
                  libxfixes  libxi  libxinerama  libxkbcommon  libxrandr  libxrender  pango  shared-mime-info  tracker3  wayland  gtk-update-icon-cache
Optional Deps   : evince: Default print preview command
Required By     : blueman  chromium  emacs  firefox  freerdp  galculator  gcr  gspell  gtk-layer-shell  gtkmm3  gtksourceview3  gtksourceview4
                  libdbusmenu-gtk3  libgnomekbd  libkeybinder3  libnma  libportal-gtk3  libwnck3  libxfce4ui  lightdm-slick-greeter  polkit-gnome
                  system-config-printer  vte3  webkit2gtk-4.1  xdg-user-dirs-gtk  xfburn  xfce4-whiskermenu-plugin  yad
Optional For    : avahi  firewalld  ghostscript  gvfs  jdk-openjdk  libcanberra  libdecor  libreoffice-fresh  qt5-base  qt6-base  stoken  zbar
Conflicts With  : gtk3-print-backends
Replaces        : gtk3-print-backends<=3.22.26-1
Installed Size  : 51.99 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Tue 23 Jan 2024 11:47:49 PM EST
Install Date    : Fri 22 Mar 2024 04:01:49 PM EDT
Install Reason  : Installed as a dependency for another package
Install Script  : Yes
Validated By    : Signature

gtk3: 1016 total files, 0 altered files
Name            : glib2
Version         : 2.80.0-2
Description     : Low level core library
Architecture    : x86_64
URL             : https://gitlab.gnome.org/GNOME/glib
Licenses        : LGPL-2.1-or-later
Groups          : None
Provides        : libglib-2.0.so=0-64  libgio-2.0.so=0-64  libgirepository-2.0.so=0-64  libgmodule-2.0.so=0-64  libgobject-2.0.so=0-64
                  libgthread-2.0.so=0-64
Depends On      : libffi  libsysprof-capture  pcre2  util-linux-libs  zlib  libffi.so=8-64  libmount.so=1-64
Optional Deps   : gvfs: most gio functionality [installed]
                  libelf: gresource inspection tool [installed]
                  python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report [installed]
                  python-packaging: gdbus-codegen [installed]
Required By     : accountsservice  appstream  at-spi2-core  avahi  bluez  bluez-utils  cairo  cups-browsed  dbus-glib  dbus-python  dconf
                  desktop-file-utils  emacs  enchant  ffmpeg  file-roller  firewalld  fluidsynth  freerdp  gcr-4  gdk-pixbuf2  ghostscript  glib-networking
                  glibmm  graphene  gsettings-desktop-schemas  gspell  gssdp  gst-plugin-pipewire  gstreamer  gtk-update-icon-cache  gtk3  gtk4  gupnp
                  gupnp-igd  gutenprint  harfbuzz  imagemagick  json-glib  libadwaita  libblockdev  libblockdev-crypto  libblockdev-fs  libblockdev-loop
                  libblockdev-mdraid  libblockdev-nvme  libblockdev-part  libblockdev-swap  libcloudproviders  libcolord  libdbusmenu-glib  libgirepository
                  libgtop  libgudev  libgusb  libinstpatch  liblangtag  liblqr  libmanette  libmbim  libmm-glib  libmpd  libnautilus-extension  libnice
                  libnm  libnotify  libportal  libproxy  libqrtr-glib  libreoffice-fresh  librsvg  libsecret  libsoup  libsoup3  libwacom  libwireplumber
                  libxfce4util  libxklavier  libxmlb  lightdm  modemmanager  pinentry  pipewire  pipewire-audio  pipewire-pulse  polkit  poppler-glib
                  power-profiles-daemon  qt6-base  shared-mime-info  tracker3  udisks2  upower  volume_key  vte3  webkit2gtk-4.1  wireplumber
                  wireshark-cli  wpebackend-fdo  xdg-dbus-proxy  xdg-desktop-portal
Optional For    : libpulse
Conflicts With  : None
Replaces        : None
Installed Size  : 37.69 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Wed 20 Mar 2024 07:04:09 PM EDT
Install Date    : Thu 28 Mar 2024 02:09:03 PM EDT
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

glib2: 785 total files, 0 altered files

Offline

#36 2024-03-31 21:56:24

seth
Member
Registered: 2012-09-03
Posts: 51,731

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

No dated AUR surprises there - have you tried the behavior w/ a fresh user account (to rule out some weird local config issue, broken syntax in a config file that doesn't flare up in teh GUI or whatever)?

Offline

#37 2024-03-31 22:02:12

lambdarch
Member
Registered: 2021-01-10
Posts: 75

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

pm3840 wrote:
$ xfconf-query -c xfce4-panel -lv | grep clipman
/plugins/clipman/tweaks/inhibit                     false
/plugins/plugin-20                                  xfce4-clipman-plugin

According to this clipman history is disabled and it doesn't remember last image, please enable these options:

xfconf-query -c xfce4-panel -p /plugins/clipman/settings/max-images-in-history -s 1 --create --type int
xfconf-query -c xfce4-panel -p /plugins/clipman/settings/save-on-quit -s true --create --type bool

Offline

#38 2024-03-31 22:47:48

pm3840
Member
Registered: 2013-12-16
Posts: 61

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

seth wrote:

have you tried the behavior w/ a fresh user account (to rule out some weird local config issue, broken syntax in a config file that doesn't flare up in teh GUI or whatever)?

screenshooter works in a new user's xfce4 session.
So 'sudo diff -rw ~user1/.config/xfce4 ~user2/.config/xfce4' is done and the only outstanding difference in xfce4-panel.xml is

    <property name="plugin-17" type="string" value="xfce4-timer-plugin"/>
    <property name="clipman" type="empty">
      <property name="tweaks" type="empty">
        <property name="inhibit" type="bool" value="false"/>
      </property>
      <property name="settings" type="empty">
        <property name="max-images-in-history" type="uint" value="1"/>
      </property>
    </property>

I then proceed to make a backup of xfce4-panel.xml, remove the difference from xfce4-panel.xml, logout and login.
Upon login there's a prompt saying clipman is already running. Then I go to "Settings / Session and Startup / Application Autostart" and uncheck "Clipman". Logout and login.
No more warning this time and testing is successful.
Trying with a different local user with fresh config is a great idea.

lambdarch wrote:
pm3840 wrote:
$ xfconf-query -c xfce4-panel -lv | grep clipman
/plugins/clipman/tweaks/inhibit                     false
/plugins/plugin-20                                  xfce4-clipman-plugin

According to this clipman history is disabled and it doesn't remember last image, please enable these options:

xfconf-query -c xfce4-panel -p /plugins/clipman/settings/max-images-in-history -s 1 --create --type int
xfconf-query -c xfce4-panel -p /plugins/clipman/settings/save-on-quit -s true --create --type bool

I have no idea when the max history disappeared and reappears. It's this the same as "Remember last copied image" and it has always been checked as it's the default. Also, Chromium/Firefox always worked.

$ xfconf-query -c xfce4-panel -lv | grep clipman
/plugins/clipman/settings/max-images-in-history     1
/plugins/clipman/tweaks/inhibit                     false
/plugins/plugin-21                                  xfce4-clipman-plugin

Thank you all very much.

Last edited by pm3840 (2024-03-31 22:49:42)

Offline

#39 2024-04-01 04:33:10

lambdarch
Member
Registered: 2021-01-10
Posts: 75

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

pm3840 wrote:

I have no idea when the max history disappeared and reappears. It's this the same as "Remember last copied image" and it has always been checked as it's the default.

Oh yes, they're actually enabled by default, sorry. I was fooled by the fact that if you reset them in xfconf with the clipman settings dialog open, the checkboxes are unchecked (because of the binding with GObject, which is confusing in this case).

Anyway, I don't really understand why it now works for you when it didn't before. Also, there's a bug in this story, as I said in #23, either on our side (Xfce) or on GTK's side.

Offline

#40 2024-04-01 21:53:49

lambdarch
Member
Registered: 2021-01-10
Posts: 75

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

I think I've managed to cobble together a solution for 4.20, my tests are conclusive. Until then, you might prefer to use clipman's underlying clipboard manager instead of xfsettingsd's (they'll be identical in 4.20, now shared in libxfce4ui). The easiest way to do this may be to export XFSETTINGSD_NO_CLIPBOARD=1 in ~/.profile.

Last edited by lambdarch (2024-04-01 21:56:18)

Offline

#41 2024-04-01 22:27:27

pm3840
Member
Registered: 2013-12-16
Posts: 61

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

I'm a new user to xfce. As I got used to the environment I started using more apps.

At the beginning I added the clipman widget to panel, and clipman worked as chrome/ff copy/paste texts are logged(I didn't pay attention to picture).

Some time later I started to use screenshooter and noticed that cilpman can be automatically started in "settings/session and startup". This is probably when I noticed that the picture copy/paste didn't work for screenshooter but chrome/ff still worked.

Are you implying that these two(widget/xfsettings) are not the same and perhaps I was running two instances of clipman? I thought I did check running processes and only saw one clipman running.

Offline

#42 2024-04-02 09:07:16

lambdarch
Member
Registered: 2021-01-10
Posts: 75

Re: [SOLVED] xfce4 screenshot cannot be saved to clipboard

pm3840 wrote:

Are you implying that these two(widget/xfsettings) are not the same

Yes.

pm3840 wrote:

and perhaps I was running two instances of clipman?

No.

It's true that all this is quite confusing, so I'll try to clarify a little.

First of all, there are two different things:
* the X11 clipboard manager, which runs as a daemon and does not appear to the user;
* the user interface with menu, history, etc.

Only one process can act as X11 clipboard manager. On a normal Xfce session, it's xfsettingsd that takes care of this, but if it's not running when clipman starts, then clipman takes care of that too. And until recently, xfsettingsd and clipman had different X11 clipboard managers, each with their own bugs... They now share the same code hosted in libxfce4ui (in dev version, so it won't be the case for the end user until Xfce 4.20).

As for clipman, it can be launched as a panel plugin or as a systray icon, the two possibilities being mutually exclusive. Autostarting with the Xfce session starts it as a systray icon, so you need to disable it if you're using clipman as a panel plugin (which you did).

Offline

Board footer

Powered by FluxBB