DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 1st April 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default clunky copy/paste in OpenBSD+LXQt

I'm on OpenBSD 6.4-stable with LXQt, having difficulty with copy/paste between GUI applications.

Copying text selection from application A (Ctrl+c) to application B (Ctrl+v) works fine if application A is still open when I go to paste in B.

By installing parcellite(1) I can now copy from application A to application B after closing application A, but in order for paste to work I need to first click on parcellite's system tray icon and select the most recent clipboard entry.

I would like to configure my system so that it does the "intuitive" thing: Whenever I press Ctrl+v in a GUI application, I want the most-recently-copied string to be pasted. Any ideas how to achieve this?

(BTW, the expected copy/paste behavior worked fine back when I was using OpenBSD+MATE, even though no clipboard manager was installed.)

Last edited by brudan; 1st April 2019 at 05:16 PM.
Reply With Quote
  #2   (View Single Post)  
Old 1st April 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,707
Default

I use x11/autocutsel. It keeps the different clipboards in sync.

Edited to add: see /usr/local/share/doc/autocutsel/README for configuration advice.
Reply With Quote
  #3   (View Single Post)  
Old 1st April 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

Thanks for the tip, jggimi, but still no joy. I just installed autocutsel and am running it in a terminal in debug mode. When I copy things I can see autocutsel working as below, but if I close the source application I still can't paste anywhere without first clicking the parcellite icon and choosing the last-copied string.

Code:
$ autocutsel -debug
autocutsel v0.10.0
Selection changed: "testing123"
New value saved: "testing123"
Updating buffer
It seems that copy is working fine on my system. It's paste that's broken because even though there are items in the clipboard, items have to be manually selected for pasting.
Reply With Quote
  #4   (View Single Post)  
Old 1st April 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

I just discovered that if xclipboard(1) is running, everything works as expected, without needing parcellite or autocutsel. Only problem is that now I have xclipboard's (unsightly) window floating around. Is there a way for xclipboard to run in the background without a window?
Reply With Quote
  #5   (View Single Post)  
Old 1st April 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,707
Default

My .xsession contains:
Code:
autocutsel -fork &
autocutsel -selection PRIMARY -fork &
The two processes work together to keep things in sync.

(Don't ask me why I used ampersands with -fork. It's been years since I provisioned this, and I have no memory of why.)
Reply With Quote
  #6   (View Single Post)  
Old 1st April 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,707
Default

I just noticed our posts crossed. I've never used xclipboard(1), but to my minimal understanding it only manages the CLIPBOARD selection and doesn't manage the PRIMARY selection.
Reply With Quote
  #7   (View Single Post)  
Old 1st April 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

I tried adding the autocutsel lines to my ~/.xsession (I use xenodm and do have a ~/.xsession) and no luck. Alas, my clipboard seems to be pretty broken.

I don't use PRIMARY or SECONDARY selections in any of my workflows, just the MS-style CLIPBOARD selection. I wish I could fix it.
Reply With Quote
  #8   (View Single Post)  
Old 1st April 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

I don't fully understand the problem, but found a fix.

As I mentioned above, if xclipboard(1) is running, then using CLIPBOARD selection (MS-style Control+c for copy, Control+v for paste) works exactly as expected, even if "source" application is closed. No need for parcellite or autocutsel to be installed.

However, there is no command line option to run xclipboard without its associated window. So the problem then became how to have xclipboard running but somehow make its window "invisible".

I was able to make xclipboard "invisible" by putting it on a desktop I don't use and telling the Task Manager to ignore its window. In LXQt, which uses openbox as window manager, I accomplished this by adding the following to the <applications> section of ~/.config/openbox/lxqt-rc.xml:
<application name="xclipboard"><desktop>2</desktop><skip_taskbar>yes</skip_taskbar></application>

Now I can run xclipboard & at boot (e.g., by adding it to ~/.xsession). This fixes my clipboard issue while the openbox application setting keeps xclipboard's unsightly window totally out of the way.

Last edited by brudan; 2nd April 2019 at 03:05 AM.
Reply With Quote
  #9   (View Single Post)  
Old 2nd April 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

Solved! See my edited post #8.
Reply With Quote
Old 2nd April 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,707
Default

Congrats!
Reply With Quote
Old 2nd April 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

Alas, things are always more difficult than they seem.

My solution using xclipboard breaks the the ability of file manager (pcmanfm-qt) to copy/paste files.

I decided to bite the bullet and compile a clipboard manager other than parcellite. I decided to try qlipper and am happy to report that running it in the background (with 'qlipper &' at boot) solves all problems--I can copy/paste text between applications and pcmanfm-qt can copy/paste files. Phew!
Reply With Quote
Old 3rd April 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,707
Default

This just in on misc@ - xclip might be helpful.

https://marc.info/?l=openbsd-misc&m=155430876201940&w=2
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
*BSD pure terminal mouse copy & paste software dchmelik General software and network 3 25th December 2018 08:05 PM
LXQt in OpenBSD shep OpenBSD Packages and Ports 3 11th July 2018 08:37 AM
a copy-paste bug in opera 12.15 build 1748 pawaan NetBSD General 2 16th October 2013 06:07 PM
X-Window style copy&paste in MS Windows? Carpetsmoker Other OS 11 16th October 2008 10:43 AM
Should be easy.... Keyboard copy n paste WeakSauceIII OpenBSD General 4 11th May 2008 07:32 PM


All times are GMT. The time now is 04:37 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick