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

Broken clipboard commands on WSL (using Guix) #3399

Closed
pierceglenn12345 opened this issue May 13, 2024 · 6 comments
Closed

Broken clipboard commands on WSL (using Guix) #3399

pierceglenn12345 opened this issue May 13, 2024 · 6 comments

Comments

@pierceglenn12345
Copy link

pierceglenn12345 commented May 13, 2024

If I am using any of the regular emacs keybindings, like C-y to yank text from the kill ring I am getting the error:

Warning: Error on separate thread: None of the commands are installed: (.....)

Note this also occurs if I simply run the function paste or paste-from-clipboard with the meta-x menu. Another note; copy-username works in copying to the clipboard and only right click paste seems to work.

Installed wsl2 + Ubuntu-22.04 on windows 10 pro. Installed the guix package manager using the systemcrafters installation video guide(would paste here, but I cant use C-y). then guix install nyxt. many ketbindings do not work from here. I have followed the steps outside the first sentence on linux machines with out this problem. This also might be related to #2186, though there were was not any further guidance there other than install the dependencies for the commands separately? I don't know how to go about doing this if that is the case.

Information

  • OS name+version: Windows 10 pro
  • Graphics card and driver: AMD Radeon(TM) Graphics
  • Desktop environment / Window manager name+version: WSL2 Ubuntu-22.04 and I believe X-wayland?
  • How you installed Nyxt (Guix pack, package manager, build from source): guix package manager
  • If you can't run show-system-information, try nyxt --system-information

(process:1537): Gtk-WARNING **: 10:10:20.856: Locale not supported by C library.
Using the fallback 'C' locale.
Nyxt version 3.11.6
[10:10:21] Source location: #P"/gnu/store/s1m9pz5hns9p42qkv20iy794qlx5x8i3-nyxt-3.11.6/share/nyxt/"
[10:10:21] Loading Lisp file #P"/home/me/.config/nyxt/config.lisp".
[10:10:21] Listening to socket: #P"/run/user/1000/nyxt/nyxt.socket"
MESA: error: ZINK: vkEnumeratePhysicalDevices failed (VK_ERROR_INITIALIZATION_FAILED)
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen

(process:2): Gtk-WARNING **: 10:10:22.913: Locale not supported by C library.
Using the fallback 'C' locale.

(process:2): Gtk-WARNING **: 10:10:22.930: Locale not supported by C library.
Using the fallback 'C' locale.
[10:10:22] Loading #P"/home/me/.local/share/nyxt/history/default.lisp".
[10:10:22] Restoring 4 buffers from history.
libEGL warning: failed to open /dev/dri/renderD128: Permission denied

libEGL warning: failed to open /dev/dri/renderD128: Permission denied

libEGL warning: failed to open /dev/dri/renderD128: Permission denied

libEGL warning: failed to open /dev/dri/renderD128: Permission denied

[10:10:23] Loading #P"/home/me/.local/share/nyxt/auto-rules.lisp".

(process:2): Gtk-WARNING **: 10:10:24.153: Locale not supported by C library.
Using the fallback 'C' locale.
libEGL warning: failed to open /dev/dri/renderD128: Permission denied

libEGL warning: failed to open /dev/dri/renderD128: Permission denied

Output when started from a shell
(process:20841): Gtk-WARNING **: 10:36:11.217: Locale not supported by C library.
Using the fallback 'C' locale.
Nyxt version: 3.11.6
Renderer: GI-GTK
Operating system kernel: Linux 5.15.146.1-microsoft-standard-WSL2
Lisp implementation: SBCL 2.4.0 (Dynamic space size: 3221225472)
Features: (:NYXT-GI-GTK :NYXT-GTK :NYXT-3.11 :NYXT-3 :NYXT-3.11.6
:CLIPBOARD-CONTENT-METHOD :SWANK :SLYNK :PLUMP-UTF-32 :PARENSCRIPT :NSYMBOLS
:FSET-EXT-STRINGS :NAMED-READTABLES :CL-FAD :LPARALLEL :21BIT-CHARS
:CUSTOM-HASH-TABLE-NATIVE :CL-PPCRE-UNICODE :CL-UNICODE :CHUNGA :FLEXI-STREAMS
:CL-PPCRE :WEBKIT2 :WEBKIT-2.42.5 :WEBKIT-2.42 :WEBKIT-2
:WEBKIT2-CORS-ALLOWLIST :WEBKIT2-PASTE-PLAINTEXT :WEBKIT2-TRACKING
:WEBKIT2-MUTE :WEBKIT2-EMOJI :WEBKIT2-MEDIA :WEBKIT2-SANDBOXING :GTK-3-22
:GTK-3-20 :GTK-3-18 :GTK-3-16 :GTK-3-14 :GTK-3-12 :GTK-3-10 :GTK-3-8 :GTK-3-6
:GTK-3-4 :GTK :GDK-3-22 :GDK-3-20 :GDK-3-18 :GDK-3-16 :GDK-3-14 :GDK-3-12
:GDK-3-10 :GDK-3-8 :GDK-3-6 :GDK-3-4 :CAIRO-1-10 :CAIRO-1-12 :GDK-PIXBUF
:CLOSER-MOP :GLIB-2-30 :GLIB-2-32 :GLIB-2-34 :GLIB-2-36 :GLIB-2-38 :GLIB-2-40
:GLIB-2-42 :GLIB-2-44 :GLIB-2-46 :GLIB-2-48 :GLIB-2-50 :GLIB-2-52 :GLIB-2-54
:GLIB-2-56 :GLIB-2-58 :GLIB :BORDEAUX-THREADS :GLOBAL-VARS
:ASDF-SYSTEM-CONNECTIONS :LPARALLEL.WITH-CLTL2 :LPARALLEL.WITH-CAS
:LPARALLEL.WITH-STEALING-SCHEDULER :SPLIT-SEQUENCE
CFFI-FEATURES:FLAT-NAMESPACE CFFI-FEATURES:X86-64 CFFI-FEATURES:UNIX :CFFI
CFFI-SYS::FLAT-NAMESPACE ALEXANDRIA::SEQUENCE-EMPTYP :FAST-IO-SV :FAST-IO
:CL-JSON-CLOS :CL-JSON :SBCL-USES-SB-ROTATE-BYTE CHIPZ-SYSTEM:GRAY-STREAMS
:THREAD-SUPPORT :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX
:NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ARENA-ALLOCATOR :X86-64 :GENCGC :64-BIT
:ANSI-CL :COMMON-LISP :ELF :IEEE-FLOATING-POINT :LINUX :LITTLE-ENDIAN
:PACKAGE-LOCAL-NICKNAMES :SB-CORE-COMPRESSION :SB-LDB :SB-PACKAGE-LOCKS
:SB-THREAD :SB-UNICODE :SBCL :UNIX)

ASDF version: 3.3.5
ASDF registries: (NYXT-SOURCE-REGISTRY ENVIRONMENT-SOURCE-REGISTRY USER-SOURCE-REGISTRY
USER-SOURCE-REGISTRY-DIRECTORY
DEFAULT-USER-SOURCE-REGISTRY SYSTEM-SOURCE-REGISTRY
SYSTEM-SOURCE-REGISTRY-DIRECTORY
DEFAULT-SYSTEM-SOURCE-REGISTRY)
Critical dependencies: (/gnu/store/dsa6d25bpxrb5z76g6b694bzc8dam1r4-sbcl-cl-cffi-gtk-3.8.8-3.1700fe6/share/common-lisp/sbcl/cl-cffi-gtk/gtk/cl-cffi-gtk.asd
/gnu/store/5953s2h5cpb7llq2ip3zmv4yk6yxm6zn-cl-gobject-introspection-0.3-3.83beec4/share/common-lisp/source/cl-gobject-introspection/cl-gobject-introspection.asd
/gnu/store/mw48f3sd9fkh7yc42mdrycq39m3f7d9v-sbcl-cl-webkit-3.5.10/share/common-lisp/sbcl/cl-webkit/webkit2/cl-webkit2.asd)

@aadcg
Copy link
Member

aadcg commented May 14, 2024

If I am using any of the regular emacs keybindings, like C-y to yank text from the kill ring I am getting the error:

Warning: Error on separate thread: None of the commands are installed: (.....)

That is because trivial-clipboard can't find the needed executable. I don't know how WSL works - does it run X, wayland or native Windows facilities?

@pierceglenn12345
Copy link
Author

pierceglenn12345 commented May 14, 2024

Well I have tried a number of commands to see whether I am in X11 or wayland, and all of them returned without output. I did run xdpyinfo and got a large set of data back, which I understand to mean that there is at least an X11 server running. Will play around for a more definitive answer.

Edit: I installed xeyes and I believe that tool confirms that I am using X11

@aadcg
Copy link
Member

aadcg commented May 14, 2024

If you're running X11, then try to run guix install xsel.

@aadcg aadcg changed the title Various Keybindings are failing to work Broken clipboard commands on WSL (using Guix) May 14, 2024
@pierceglenn12345
Copy link
Author

pierceglenn12345 commented May 14, 2024

Will do. Is there anything else I will need to do besides restarting Nyxt?

Edit: Restarted nyxt and I am not getting any changes. Do I need to add some config code? or maybe I need to reboot WSL2 all together.

Edit2: As an aside. I am noticing that gemini capsules and gopherholes are not working. Is this part of the same problem?

@aadcg
Copy link
Member

aadcg commented May 14, 2024

@pierceglenn12345 the issue you're experiencing seems to be exclusively related to the WSL setup. Nyxt depends on sbcl-trivial-clipboard, which in turn depends on the necessary clipboard executables. In other words, if you were to install Nyxt using Guix on top of a Linux distribution, then you wouldn't face the issue. I didn't expect guix install xsel to fix it, but it was worth the try nonetheless.

What you need to figure out is whether your X window system environment is able to invoke xsel (for instance, try to call xsel from the command line and see the output of which xsel). See also the output of:

nyxt --failsafe --eval '(trivial-clipboard::find-paste-command)' --quit

On a typical Guix installation it outputs (/gnu/store/.../bin/xsel --output --clipboard).

Edit2: As an aside. I am noticing that gemini capsules and gopherholes are not working. Is this part of the same problem?

Hard to say. It is not our current top priority to ensure that Nyxt runs smoothly under WSL. If such a bug can be reproduced on the official distribution methods via Guix or Flatpak, then it's a priority bug.

@pierceglenn12345
Copy link
Author

pierceglenn12345 commented May 14, 2024

xsel returns no output at the command line, and which xsel returns '/home/me/.guix-profile/bin/xsel

The longer command returns nil and that also goes for pasting the s-expression portion into the nyxt repl. So, you are right about nyxt not knowing about where to find the clipboard executables.

I get this is not top priority. Just wanted to spur discussion for any others that run into this. I'll take your suggestions and see where I can take this. I appreciate your help @aadcg

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

No branches or pull requests

2 participants