Cut/Paste stopped working for me

77

Solution 1

If you want the more general advice, it is that installing the meta-package for more than one desktop environment can have pretty weird effects, and you get to clean up the mess :-P. There are some good reasons why Ubuntu and Fedora have flavours/spins i.e. different OS install disks for different desktop environments.

Of course if you find a nice clean solution, or the weird effect you find is dangerous enough, you can also report a bug and hope that Debian will solve the conflict.

The doc for clipit --daemon (which is autostarted) says it is used "to keep your clipboard and primary contents safe." There's several things you might guess this means. However, I expect at least one of the problems it solves, is the problem that the X clipboard for copy/paste is effectively lost when you close the app you copied from. Perhaps Debian LXDE expects that you would like something to preserve the clipboard contents on LXDE.

The GNOME desktop provides this feature already. I would advise not running clipit --daemon or equivalent in a GNOME session, in case they conflict. Maybe you found such a conflict. (Although, you don't explicitly say if you have the same problem in LXDE as well?)

(At least, I think GNOME provides a clipboard manager which works for X Windows. Some details are mentioned in this old Ubuntu document. There seems to an issue that this does not work when you use native Wayland apps and GNOME with Wayland).

The problem is that clipit is not part of LXDE specifically. It seems plausible you might install it because you want to use it in an environment which is not LXDE, but also supports autostart. (?) This might justify clipit.deb providing /etc/xdg/autostart/clipit.desktop or something like that, to autostart clipit in any desktop environment. Or maybe the packager felt the alternatives were awkward, i.e. creating a stub package lxde-clipit-autostart, or putting an LXDE-specific autostart inside the non-LXDE specific clipit package.

Some autostart .desktop files include a line like NotShowIn=GNOME;Unity;. Or they can use a line OnlyShowIn=. If they don't have a specific line like that, the autostart will be started in all desktop environments which support autostart.

You could test adding NotShowIn=GNOME to clipit.desktop. If it works, you could propose this solution for clipit.deb, in a bug report. I don't think this is a fully general solution. A different lightweight desktop could pull in a different generic clipboard manager autostart. So it might be debatable whether this, or any other solution, could be accepted as a change to clipit.deb.

Solution 2

Clear the clipboard X selections:

xsel -cp && xsel -cs && xsel -cb

I personally have an alias for this:

alias clear-xsel='xsel -cp && xsel -cs && xsel -cb \
        && echo Primary, secondary and clipboard X selections were cleared'
Share:
77

Related videos on Youtube

Sebastian
Author by

Sebastian

Updated on September 18, 2022

Comments

  • Sebastian
    Sebastian almost 2 years

    I'm running a service where users receive an email every day at the same time, to which they reply (to an unmonitored email account).

    I want to capture the following pieces of information from those replies and insert them into a database:

    • the sender's email address
    • the sender's message (minus the rest of the thread or any email signatures)
    • the date (YYYY-MM-DD) of the original email to which they are replying

    I gather email piping is one solution, and I've found some libraries which can do the basics, but nothing as complicated as getting the date of the original message, for example.

    I'm using PHP but am open to whichever language can achieve this the easiest.

    Update:

    I'm using MailChimp to send the emails, so maybe I could include something like <span id="YYYY-MM-DD"> using merge tags that the parser searches for?

  • ZioByte
    ZioByte over 5 years
    Thanks for the lengthy explanation. I still fail to understand why all Display Managers have settings enabling user to chose between several "Desktops". Is all that supposed to work?
  • user2948306
    user2948306 over 5 years
    @ZioByte definitely supposed to work between Gnome Classic, Gnome on Xorg, and Gnome on Wayland :-). I might be exaggerating slightly. .desktop files definitely have hacks like this to make it work better. But when I look at this example, it feels like it's likely for some problems to happen, and need careful thinking about how to solve them when they're noticed. Debian has a reputation for having more possible combinations than it can realistically provide quality assurance on.
  • Nav
    Nav over 2 years
    Didn't work for me