Ope new URL from the command line
Vonfry opened this issue · comments
Describe the bug
After creating a nyxt thread, a new url cannot be opened with the existing thread out of nyxt.
Precise recipe to reproduce the issue
- open a nyxt
- open a terminal and run
nyxt <some url>
Information
- OS name+version: nixos 24.05.20240410.1042fd8
- Graphics card and driver: intel A770
- Desktop environment / Window manager name+version: xmonad
- How you installed Nyxt (Guix pack, package manager, build from source): nix
- Information from
show-system-information
:
Nyxt version: 3.11.6
Renderer: GI-GTK
Operating system kernel: Linux 6.8.5
Lisp implementation: SBCL 2.4.3 (Dynamic space size: 3145728000)
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.44.0 :WEBKIT-2.44 :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 :MARK-REGION-GC
: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.6
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: (/nix/store/yal8d9j9x34w4wzyqf7rdsc52lx50b3w-sbcl-cl-cffi-gtk-20230214-git/gtk/cl-cffi-gtk.asd
/nix/store/zfl2bgv6lk3859gj5im5ndfa3hki6wr9-sbcl-cl-gobject-introspection-20230618-git/cl-gobject-introspection.asd
/nix/store/37pzbd8lhfyi9zmccxyhf671z8d38yq6-sbcl-cl-webkit2-20230618-git/webkit2/cl-webkit2.asd)
Output when started from a shell
The new nyxt command outputs:
Nyxt version 3.11.6
<INFO> [18:39:52] Source location: #P"/nix/store/0gs614434zn0jmi0r9r5clp5hja4bxab-source-patched/"
<INFO> [18:39:52] Nyxt already started, requesting to open URL(s): http://google.com
list-messages
in old nyxt thread appends:
WARN - Warning: Error on separate thread: (UNSIGNED-BYTE 8) is not a valid :ELEMENT-TYPE for MAKE-STRING
@Vonfry your goal is to open a new window, not to start a new Nyxt process. From a Nyxt window, you can interactively call the command make-window
. To achieve the same programmatically, please see https://discourse.atlas.engineer/t/how-to-open-a-new-browser-window-from-command-line/811.
At least, it should be open a new process right? Or open the url in the existing process in a new window or a new buffer in existing window?
@Vonfry, that sounds reasonable to me indeed. However, in the current architecture (in which I didn't participate), Nyxt starts as a server by default. I don't consider it a sane default. In the near term, it is unlikely to change since it would require a major version bump.
In the meantime, I have found out is that the recipe I've shared above doesn't work anymore. I need to investigate.
In the meantime, I have found out is that the recipe I've shared above doesn't work anymore. I need to investigate.
Right, the some error "Error on separate thread: (UNSIGNED-BYTE 8) is not a valid :ELEMENT-TYPE for MAKE-STRING" for me is thrown with nyxt -r -e '(make-window "https://github.com")'
and nyxt https://github.com
.
Perhaps this issue is the one I want to really report.