Closed colemickens closed 3 years ago
I've succeeded in building and running Arcan and Durden. The package definition for Arcan works but I'm sure there are things in the closure that don't belong (X11?). I started with Void Linux's dependency list and kept adding things cmake complained about until it built.
Getting it running was challenging because it depends on a bunch of environment variables being set correctly and neither the error messages or the documentation are all that clear. It also wants its binary to be SUID. Here's what I've been doing while working on the package and figuring out how to run the binary:
From a virtual terminal:
$ nix-build '<nixpkgs>' -A arcan -I nixpkgs=/path/to/my/branch
$ sudo cp result/bin/arcan .
$ sudo chmod +s arcan
$ ./arcan durden
Here are my settings for the environment variables:
export ARCAN_APPLBASEPATH=$HOME/.config/arcan/appl
export ARCAN_APPLSTOREPATH=$HOME/.config/arcan/store
export ARCAN_RESOURCEPATH=$HOME/files
export ARCAN_BINPATH=$PWD/result/bin/arcan_frameserver
export ARCAN_SCRIPTPATH=$PWD/result/share/arcan/scripts
export ARCAN_LOGPATH=$HOME/.config/arcan/logs
export ARCAN_STATEPATH=$HOME/.config/arcan/state
export ARCAN_FONTPATH=/run/current-system/sw/share/X11-fonts
I created all the directories in $HOME which are referenced in the variables.
I don't have a package for Durden. I installed it by cloning it off github and then making a symbolic link to its durden
subdirectory from $HOME/.config/arcan/appl
.
I'm running this on a laptop with Intel graphics, and have been working on it in a virtual terminal with my x session left running in another. The one time I switched back to xserver without killing arcan first, it hung my laptop.
That is great to hear @gazally, thank you for sharing. I'm pretty occupied right now with some traveling, but I'll try to take a look at this soon. Thank you for writing it up though, I'm sure someone will stumble on that and be thankful too!
EDIT: oops, I thought this was on a different repo, I probably would've worded this differently otherwise. Either way, still excited to see this. :)
I've added a draft package for Xarcan and am typing this in Firefox running in an X server in a window on Arcan.
The package definition builds an executable called Xarcan
and you can invoke it from a shell prompt in a Durden window to run it. To run a second instance, use Xarcan :1
. To start an application or window manager in the X server from a shell prompt, set DISPLAY
first as in DISPLAY=:0 awesome
. It doesn't automatically detect when its window size changes, but xrandr
works.
The font path part of the derivation isn't right. I made two attempts at making it work and left them both in the derivation. The code in preConfigure
puts a font path into the configure flag provided for that purpose, but the resulting executable can't find the fonts. The other chunk of code in postInstall
links fonts into the derivation, and that part gets the truetype fonts to work but not the bitmap fonts. I'm happy to run xterm -fa FreeMono
so I stopped there, but someone who knows more about X fonts than me should take a look.
I was curious about the various Arcan tools (clipboard, image viewer, network proxy, wayland bridge) so I packaged them. There had been a lot of change in the tools directory between the last release and master, so I packaged the tools from master. So the latest commit in my branch adds arcan-unstable
, xarcan-unstable
and several child packages under arcanTools-unstable
.
I haven't figured out how to get the Wayland bridge to work, but I wasn't using Wayland before this so may be missing something obvious.
I have been running arcan-unstable
and xarcan-unstable
with Durden on my laptop for about a week now and am finding it very usable and stable.
Hey there @colemickens and @gazally! Wish I had found this thread earlier. I had a go at packaging Arcan at egasimus/arcan-nix. It builds, however it still has some rough edges at runtime (most glaringly, mouse and keyboard don't work if not running as root - addressing that now).
I'm going to study what the two of you have discovered so far, and maybe we can join forces in bringing this very interesting piece of software to the Nix ecosystem.
Hey @egasimus! I've just updated my branch with a commit to make it build more recent versions of arcan
and Xarcan
. I've had no problems with arcan 0.6.0-pre2
but the recent Xarcan
litters the screen with mouse cursor trails.
It would be great to get it running not as root so keep us posted on your progress.
To get the keyboard and mouse to work when not running as root, just add the user running arcan
to the input
group.
@gazally thanks, that worked!
I brushed the dust off my Arcan/Nix code just to try out your suggestion. Now I have Arcan, its core utilities and the example compositors (except safespaces
which fails to find something or other) running on my system, including a terminal - one more thing to run besides startx
, sway
, or fbterm
in a vanilla console! Neat!
I skipped the whole overlays thing and ended up with a file that can be submitted to Nixpkgs (or imported into environment.systemPackages=[(pkgs.callPackage (import ./Arcan.nix) {})]
). Guess I should share that part of my config as a gist or something before submitting a PR?
Or is there something missing, as might be suggested by https://gist.github.com/telent/4a92294a767656759959006fe8440122?
Food for thought a.k.a. "and then what?":
awesomewm
can be ported over to an environment outside X.Gist: https://gist.github.com/egasimus/0254dcd67f95f262aa6e133794738392
(Sure is cool how Durden and Prio have different mouse capture behavior btw)
I marked this as stale due to inactivity. → More info
There is still some good progress over at the gist.
I found this while looking into a new project (pipeworld, https://github.com/letoram/pipeworld) posted to lobste.rs today. (By same developers as arcan, and uses arcan, so I was curious if we had it packaged.) Just cross-referencing on the off-chance it helps anyone here. I'll also add this to the gist.
Package Request
Anyone want to collaborate? I will try my hand at packaging it in a bit, and will probably add it to the wayland/windowmanager overlay I'm maintaining along with a nixpkgs PR if I get it working.
Arcan
Durden