daltor
August 1, 2023, 10:43am
1
I’m trying to make a buffer with make-buffer
nyxt --remote --quit --eval '(make-window (make-buffer :url "https://en.wikipedia.org/wiki/Tomato"))'
The first time after a restart of Nyxt, I get this
<INFO> [12:40:09] Probing remote instance listening to /run/user/1000/nyxt/nyxt.socket.
, but nothing happens to Nyxt
The second or third time, this happens.
debugger invoked on a IOLIB/SOCKETS:SOCKET-NOT-CONNECTED-ERROR in thread
#<THREAD tid=2138444 "main thread" RUNNING {10051E8003}>:
#<SOCKET-NOT-CONNECTED-ERROR 107 :ENOTCONN "Transport endpoint is not connected", FD: 8>
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit from the current thread.
(IOLIB/SOCKETS::SOCKET-WRITE-FN 8 #.(SB-SYS:INT-SAP #X0200CB90) 71)
source: (%SENDTO FD BUFFER NBYTES 0 (NULL-POINTER) 0)
0]
Am I running this correctly?
My config file
(define-configuration browser
;; Enable --remote --eval code evaluation.
((remote-execution-p t)
(external-editor-program
(list "emacsclient" "-cn" "-a" "" "-F"
"((font . \"IBM Plex Mono-17\") (vertical-scroll-bars) (tool-bar-lines) (menu-bar-lines))"))))
aadcg
August 1, 2023, 11:48am
2
@daltor you’re not passing a valid URL.
I think you want to say nyxt --remote --quit --eval '(make-window (make-buffer :url "https://en.wikipedia.org/wiki/Tomato"))'
daltor
August 1, 2023, 12:16pm
3
;), no, that was just the forum code here, that was translating that. I’ve updating the question. I’m on NixOS 23.05 with Nyxt-3.5
aadcg
August 1, 2023, 12:55pm
4
@daltor I can’t reproduce the issue on NixOS or Guix.
Given that remote-execution-p
is set to t
, issuing:
$ nyxt &
$ nyxt --remote --quit --eval '(make-window (make-buffer :url "https://en.wikipedia.org/wiki/Tomato"))'
opens a second window, as expected.
I see the following log:
<INFO> [15:50:48] Probing remote instance listening to /run/user/1000/nyxt/nyxt.socket.
<INFO> [15:50:48] External evaluation request: "(make-window (make-buffer :url \"https://en.wikipedia.org/wiki/Tomato\"))"
daltor
August 2, 2023, 7:55am
5
I see this in the terminal
<WARN> [09:53:31] Warning: Error on separate thread: (UNSIGNED-BYTE 8) is not a valid :ELEMENT-TYPE for MAKE-STRING
This is my entire config
(define-configuration browser
(
(remote-execution-p t)
)
)
aadcg
August 2, 2023, 8:04am
6
@daltor maybe your Nix system is using CL dependencies that are out of date.
Try to run nix-channel --update
and then nix-env -u nyxt
.
daltor
August 2, 2023, 9:03am
7
aadcg:
nix-env -u nyxt
That last command just prompt, but still the same.
aadcg
August 2, 2023, 9:10am
8
The error seems to be coming from your system, since I can’t reproduce it.
Which nix channel are you using? What’s the content of your ~/.nix-channels
?
daltor
August 2, 2023, 10:19am
9
It contains
$ cat ~/.nix-channels
https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager
https://channels.nixos.org/nixos-23.05 nixos
It did at first only contain that home-manager line, but I just added the second line.
I use this package in configuration.nix
unstable.nyxt
aadcg
August 2, 2023, 10:45am
10
Add the unstable channel, i.e. the one that contains the most up-to-date packages - https://nixos.org/channels/nixpkgs-unstable nixpkgs
daltor
August 2, 2023, 11:07am
11
I have defined unstable in configuration.nix, like this
unstable = import (fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz) {config.allowUnfree = true;};
I still need to add it with nix-channels?
aadcg
August 2, 2023, 11:35am
12
I’m not sure since I don’t use NixOS. I only have the package manager installed on top of my system. Maybe issuing nix-channel --list
answers that question.
I suggest contacting someone who uses NixOS to check whether the issue you mention in the top post is reproducible.
daltor
August 3, 2023, 6:17am
13
ok, I vented this in NixOS forum, but lackluster response;)
What distribution do you use, cause I want to test this in a VM?
aadcg
August 3, 2023, 7:23am
14
You don’t need a VM to test it. You can install the Guix package manager on top of your NixOS system.
Download, set as executable and run this script . Then, run guix pull
(may take a while) and guix install nyxt
.
As a side note, the official distribution channels (i.e. curated by the Nyxt team) are Guix and the Flatpak. All other forms of distribution are maintained by users and enthusiasts.
daltor
August 3, 2023, 11:16am
15
I would need to remove my own nyxt from configuration.nix, then?
aadcg
August 3, 2023, 11:26am
16
Not necessarily. You can have both packages installed via Guix and Nix. But notice that nyxt
will be resolved according to the order of directories in $PATH
.
To avoid confusion, you could uninstall Nyxt from Nix. If you’ll have Guix available, that will be the most reliable way to use Nyxt.
daltor
August 4, 2023, 6:58am
17
I see that Guix has some support, but it seems Flatpak is more supported.
They tried to add Guix here:
https://github.com/NixOS/nixpkgs/issues/75669#issuecomment-579432702
However, is there some repo I can add to Flatpak?
If I download the file and run it with Flatpak, it gives me this.
error: The application engineer.atlas.Nyxt/x86_64/master requires the runtime org.gnome.Sdk/x86_64/44 which was not found
aadcg
August 4, 2023, 8:20am
18
You don’t need to install Guix through Nix. The method that I’ve shared with you, via the script, should be more effective.
Currently, it’s only possible to install Nyxt via the Flatpak file. Soon it will be added to Flathub.
Does the following work?
$ flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
$ flatpak --user install --noninteractive org.gnome.Sdk/x86_64/44
$ flatpak --user install /path/to/flatpak-file
daltor
August 4, 2023, 10:24am
19
Yes, that installed it
$ .local/share/flatpak/exports/bin/engineer.atlas.Nyxt
, but now I get this;)
<WARN> [12:22:35] Could not extract URLs from "(make-window (make-buffer :url \"https://en.wikipedia.org/wiki/Tomato\"))".
aadcg
August 4, 2023, 10:36am
20
I can’t reproduce again. Works as expected.
$ flatpak run engineer.atlas.Nyxt &
$ flatpak run engineer.atlas.Nyxt --remote --quit --eval '(make-window (make-buffer :url "https://en.wikipedia.org/wiki/Tomato"))'
Look closely at which config is being read, e.g.
<INFO> [13:31:06] Loading Lisp file #P"/home/aadcg/.config/nyxt/config.lisp".
Confirm the contents:
(define-configuration browser
((remote-execution-p t)))
The error you see seems to derive from the fact that you’re not enabling remote execution. I can reproduce it when not enabling it:
<WARN> [13:36:27] Could not extract URLs from "(make-window (make-buffer :url \"https://en.wikipedia.org/wiki/Tomato\"))".