atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.64k stars 404 forks source link

Broken clipboard commands on WSL (using Guix) #3399

Closed pierceglenn12345 closed 1 month ago

pierceglenn12345 commented 1 month ago

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

(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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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

pierceglenn12345 commented 1 month ago

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 commented 1 month ago

@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 commented 1 month ago

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