GWSL-Source icon indicating copy to clipboard operation
GWSL-Source copied to clipboard

Option to set -noclipboardprimary

Open Yogu opened this issue 3 years ago • 12 comments

Enabling clipboard sharing seems to not only share the CLIPBOARD clipboard, but also the PRIMARY clipboard. So if you something, it instantly overrides the (shared) clipboard. VcXsrv offers the option -noclipboardprimary to disable this and only share the CLIPBOARD. It would be goot do to be able to configure this without a custom profile. I would even argue that it is the better default, especially if you're a Windows user and have never heard of the copy-on-select feature.

Yogu avatar Apr 01 '22 09:04 Yogu

Hmm. I'll look into it. Maybe I'll make it another builtin profile. We'll see what I can do while maintaining simplicity in the backend.

Pololot64 avatar Apr 01 '22 15:04 Pololot64

Also have this issue using GWSL on my Win11. I use IDE installed on WSL, and it is very annoying when I select and copy something in Win, then in my IDE copy what I want to replace and because of this "primary selection" it overrides clipboard with what I first selected in IDE. Need to delete what I want to replace without the selection and paste copied stuff from Win...

archie-lab avatar Apr 03 '22 05:04 archie-lab

On my todo :)

Pololot64 avatar Apr 03 '22 18:04 Pololot64

Exactly the same reason I came here to post an issue about! Thanks for the work @Pololot64 Also @Yogu can you post how did you manage to run it even with the flag? I tried creating a new custom profile, however the GWSL Service crashes continuously when I use it. Here is my settings.json

{
 "conf_ver": 6,
 "gwsl_ver": "1.4.0",
 "general": {
  "pulseaudio": true,
  "clipboard": true,
  "start_menu_mode": false,
  "shell_gui": "cmd",
  "acrylic_enabled": true
 },
 "graphics": {
  "window_mode": "NoCopyOnSelect",
  "hidpi": false
 },
 "putty": {
  "ip": null,
  "ssh_key": null
 },
 "distro_blacklist": [
  "docker"
 ],
 "app_blacklist": [
  "exampleblock"
 ],
 "xserver_profiles": {
  "Plain VcXsrv": [],
  "NoCopyOnSelect": [
   "-noclipboardprimary"
  ]
 }
}

mitsos1os avatar May 11 '22 13:05 mitsos1os

Ok, so solution is also mentioned in previous issues: #127 #99 #16 😄 So custom profile should be with flags: -wgl -compositewm -multiwindow -clipboard -noprimary -dpi -auto Also posting proper configuration:

{
 "conf_ver": 6,
 "gwsl_ver": "1.4.0",
 "general": {
  "pulseaudio": true,
  "clipboard": true,
  "start_menu_mode": false,
  "shell_gui": "cmd",
  "acrylic_enabled": true
 },
 "graphics": {
  "window_mode": "NoCopyOnSelect",
  "hidpi": false
 },
 "putty": {
  "ip": null,
  "ssh_key": null
 },
 "distro_blacklist": [
  "docker"
 ],
 "app_blacklist": [
  "exampleblock"
 ],
 "xserver_profiles": {
  "Plain VcXsrv": [],
  "NoCopyOnSelect": [
   "-wgl",
   "-compositewm",
   "-multiwindow",
   "-clipboard",
   "-noprimary",
   "-notrayicon",
   "-dpi",
   "-auto"
  ]
 }
}

UPDATE Updated the flags and configuration to directly match default MultiWindow without the primary clibboard

mitsos1os avatar May 11 '22 13:05 mitsos1os

Ok, I will do this by adding an unexposed configuration entry called block_primary. That will not get in the way of existing functionality.

Pololot64 avatar Dec 04 '22 01:12 Pololot64

I am still struggling with this, I am using an IDE directly in WSL via GSWL and it is now copying everything I am trying to paste on select. I tried @mitsos1os config above and its not changing any behaviour unfortunately.

voycey avatar Mar 06 '23 04:03 voycey

Hello. With gwsl 1.4.5, you have the ability to f Disable primary using the configuration file. It should work. Let me know if something doesn't work

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Dan Voyce @.> Sent: Sunday, March 5, 2023 11:14:06 PM To: Opticos/GWSL-Source @.> Cc: Pololot64 @.>; Mention @.> Subject: Re: [Opticos/GWSL-Source] Option to set -noclipboardprimary (Issue #142)

I am still struggling with this, I am using an IDE directly in WSL via GSWL and it is now copying everything I am trying to paste on select. I tried @mitsos1oshttps://github.com/mitsos1os config above and its not changing any behaviour unfortunately.

— Reply to this email directly, view it on GitHubhttps://github.com/Opticos/GWSL-Source/issues/142#issuecomment-1455417900, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHPPNR6CKOM6MLOM7CWY3A3W2VQA5ANCNFSM5SIE3MRQ. You are receiving this because you were mentioned.Message ID: @.***>

Pololot64 avatar Mar 08 '23 03:03 Pololot64

image

I am on 1.4.5 - but in IntelliJ (Pycharm for example) it still overrides the clipboard when I select something in PyCharm. I added the configuration from https://github.com/Opticos/GWSL-Source/issues/142#issuecomment-1123760551:

{
 "conf_ver": 7,
 "gwsl_ver": "1.4.5",
 "general": {
  "pulseaudio": true,
  "hide_donation_reminder": false,
  "force_disable_primary": false,
  "clipboard": true,
  "start_menu_mode": false,
  "shell_gui": "cmd",
  "acrylic_enabled": true
 },
 "graphics": {
  "window_mode": "multi",
  "hidpi": false
 },
 "putty": {
  "ip": null,
  "ssh_key": null
 },
 "distro_blacklist": [
  "docker"
 ],
 "app_blacklist": [
  "exampleblock"
 ],
 "xserver_profiles": {
  "Plain VcXsrv": [],
  "NoCopyOnSelect": [
   "-wgl",
   "-compositewm",
   "-multiwindow",
   "-clipboard",
   "-noprimary",
   "-notrayicon",
   "-dpi",
   "-auto"
  ]
 }
}

voycey avatar Mar 08 '23 05:03 voycey

Make "force_disable_primary" true. That may work. Also use it with the default profile.

Pololot64 avatar Mar 12 '23 00:03 Pololot64

@voycey Did you enable the profile in the right click context menu? image

I also enabled force_disable_primary in the general section of the settings. This is working for me.

R-Bower avatar Nov 16 '23 20:11 R-Bower

Ive actually moved to Jetbrains Gateway now so this is no longer relevant but good to know - ill try this one too!

voycey avatar Nov 16 '23 22:11 voycey