Skip to content

Instantly share code, notes, and snippets.

@letoram
Created December 29, 2017 00:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save letoram/d4597f17b3389dfd80dbed426d99ce8e to your computer and use it in GitHub Desktop.
Save letoram/d4597f17b3389dfd80dbed426d99ce8e to your computer and use it in GitHub Desktop.
Launching clients in arcan:
The main ways to use other applications are:
1. Xarcan xorg server
2. arcan-wayland protocol service
3. specialized Qemu/kvm backend
4. emulators via libretro
5. games via LD_PRELOAD hack on SDL1.2
6. games via specialized SDL2.0
7. custom arcan applications via arcan_lwa.
1. Xarcan Xorg server
This one is probably the most useful, and act as a self-contained Xorg server that you
can run as a normal window, fullscreen on a workspace of its own, or even as an 'underlay'
wallpaper (experimental feature in durden, workspace to float mode,
target/window/workspace-background).
You start it with Xarcan :0 (where 0 indicates your DISPLAY=:0 number, you can have
multiple, you just need to set the environment for letting clients connect), and you
attach your favorite window manager etc. the same way, e.g. DISPLAY=:0 wmaker &
Notes:
It is a bit sensitive when it comes to drag-resize and so on, you can probably play with
target/video/scaling and target/video/advanced to work around any issues.
It can be run in a few modes, which one you want depends a bit on what you want to do
with it. The default arguments does not use 'glamor' and 'dri3' - though these are the
fastest one. For normal 'oh I just need to run this application', the default arguments
are fine - it's when you have accelerated games and so on you want to try -glamor and
possible -glamor -nodri3 if the other fails.
If dri3 is disabled with nodri3, you likely want to give it access to privileged GPU,
which is a security game-over if you don't trust the client. It is enabled globally
via global/config/system/gpu delegation=full.
The clipboard isn't transparently integrated, there's a separate 'aclip' tool in
src/tools for connecting to an arcan clipboard, check the manpage there for how to
connect to something like xclip in order to combine the two.
Durden needs to be told to accept external clipboards as well, do that via
global/config/clipboard bridge.
2. Arcan-Wayland
This is built separately, and need the other suite of wayland tools (separate README)
as well. It is easiest use by simply running arcan-wayland -exec name-of-wayland-program
and this is the better way of running mpv/kodi/retroarch/gtk3 applications.
3. Qemu
This is for VMs, and should be a bit faster than going via a gtk frontend. Clone
github.com/letoram/qemu, build and run like you would a normal kvm/qemu session but
specify -ui arcan
4. Emulators via libretro
Libretro wraps emulators and some games into its own API and builds cores (shared
libraries). These can be run from the terminal by setting:
ARCAN_ARG=core=/path/to/core:resource=/path/to/rom afsrv_game
(or added to the database via arcan_db and launched from durden via global/open/target).
5. games via LD_PRELOAD hack on SDL1.2
This requires that the sdl1.2 developer headers are installed, SDL-devel, and you build
arcan with support for hijack libraries (-DDISABLE_HIJACK=OFF). Then you get a
libahijack_sdl12.so that can be set as LD_PRELOAD when running an old SDL1.2 application
(those won't get wayland support), though it might be better now to run them via the
Xarcan server.
6. games via specialized SDL2.0
Same as QEmu, I maintain a separate repository. This is primarily for debugging and
measuring performance, the arcan-wayland way should be 'good enough' to not need this.
7. custom arcan applications via arcan_lwa
This is if you want to play around with building appls of your own, tutorials/docs on
the wiki. Works just like the normal arcan instance, but with the _lwa suffix, it will
work via arcan instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment