Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to set -noclipboardprimary #142

Open
Yogu opened this issue Apr 1, 2022 · 12 comments
Open

Option to set -noclipboardprimary #142

Yogu opened this issue Apr 1, 2022 · 12 comments

Comments

@Yogu
Copy link

Yogu commented Apr 1, 2022

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.

@Pololot64
Copy link
Member

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.

@archie-lab
Copy link

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...

@Pololot64
Copy link
Member

On my todo :)

@mitsos1os
Copy link

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
Copy link

mitsos1os commented May 11, 2022

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

@Pololot64
Copy link
Member

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

@voycey
Copy link

voycey commented Mar 6, 2023

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.

@Pololot64
Copy link
Member

Pololot64 commented Mar 8, 2023 via email

@voycey
Copy link

voycey commented Mar 8, 2023

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 #142 (comment):

{
 "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"
  ]
 }
}

@Pololot64
Copy link
Member

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

@R-Bower
Copy link

R-Bower commented Nov 16, 2023

@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.

@voycey
Copy link

voycey commented Nov 16, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants