Systemd and D-Bus Integration
Rustty comes with built-in support for D-Bus activation and `systemd` services to launch on demand and create new windows instantly.
If properly installed1, Rustty comes with several systemd units. Running Rustty via these systemd units is the recommended way to run Rustty. The two most important benefits provided by Rustty's systemd integrations are: instantaneous launching2 and centralized logging.
If you are on a system with systemd and you installed Rustty
via a system package or as documented,
then Rustty should just work. You don't have to read this
documentation unless you want to understand how this all works or
if you're troubleshooting.
Important
Rustty does not require systemd to run. You can run the
rusttybinary directly on any system without systemd and Rustty will still work. However, you'll lose out on the benefits documented on this page.
Important
Using
classin your configuration file can interfere with the proper operation of thesystemdunit files or D-Bus activation. We recommend that you remove them from your configuration file and only use them explicitly via the command-line when needed.
Rustty can be configured to start in the background on login,
so that future requests to create new windows are extremely fast.
This is done via systemd by enabling the Rustty user service:
systemctl enable --user app-io.airely.rustty.service
This will configure your system to start Rustty when you log in, but not create any windows. Any startup delay will be "hidden" by the time that your system needs to finish setting up everything after logging in.
Adding some configuration entries to your config can improve the experience even further:
quit-after-last-window-closed = true
quit-after-last-window-closed-delay = 5m
This configuration will quit Rustty five minutes after the last window was closed, thereby saving memory if you haven't been using Rustty for a while.
quit-after-last-window-closed = false
This configuration will keep Rustty running all the time so that new window creation will always be fast.
You can tell Rustty to reload its config (from a script or the CLI) by using this command:
systemctl reload --user app-io.airely.rustty.service
Behind the scenes this just sends a SIGUSR2 to the main Rustty process but
systemd handles the work of keeping track of the main Rustty process. It can
be unreliable to script that using ps or similar utilities.
New windows can be created by using the rustty CLI with no arguments.
However, if you're using the systemd and D-Bus integration, it is much
faster to use rustty +new-window instead.
The +new-window command will use D-Bus directly to create a new window.
If Rustty isn't running, the D-Bus activation unit will start Rustty.
This is much faster than plain rustty because the plain execution has
to load configuration, examine its environment, initialize GTK, and more
to reach the same conclusion.
rustty +new-window
This will create a new window even if Rustty is not already running, because D-Bus activation will cause Rustty to be launched.
This command is very useful in particular for window managers such as i3, Hyprland, or River.
The following is an example of how to bind super+return to open
a new Rustty window in Hyprland. The configuration typically goes
in ~/.config/hypr/hyprland.conf:
bind = SUPER, return, exec, rustty +new-window
On systems with systemd and D-Bus, Rustty will launch via D-Bus
activation by default.
Instead of executing Rustty directly, the application launcher will
send a signal to the D-Bus session broker asking it to open a Rustty
window. The D-Bus session broker knows if Rustty is running or not,
because Rustty will claim a specific bus name (io.airely.rustty).
If there is a program that claimed this bus name, it is assumed to be
Rustty.
From this point, the behavior depends on whether Rustty is already running or not.
This process ensures that any startup delay caused by GTK (or any other initialization) is only incurred once if there are active windows or if Rustty is configured to remain running (not the default).
If Rustty is already running, the broker will send a D-Bus signal directly to Rustty asking it to create a new window. Rustty listens for this signal and opens a new window. This is very fast, and very cheap.
If Rustty is not running, the D-Bus session broker will ask systemd
to start Rustty in a user service, and then will send Rustty a D-Bus
signal to create a new window after it starts.
This "other" section collects less critical information or less commonly used information. This information may still be extremely useful (as such it is documented here), but it is not frequently used.
Logs emitted by Rustty when run via systemd can be viewed using
journalctl:
journalctl -a -f --user -u app-io.airely.rustty.service
The following command will show you the status of Rustty:
systemctl status --user app-io.airely.rustty.service
Which should produce output similar to the following:
● app-io.airely.rustty.service - Rustty
Loaded: loaded (/home/user/.local/share/systemd/user/app-io.airely.rustty.service; disabled; preset: enabled)
Active: active (running) since Fri 2026-07-10 14:05:42 PDT; 24h ago
Invocation: 42b48b0aa1bf4134a030e38acb04b8dd
Main PID: 2525 (rustty)
Tasks: 0 (limit: 71639)
Memory: 81.4M (peak: 107.9M)
CPU: 98ms
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/app-io.airely.rustty.service
‣ 2525 /home/user/.local/bin/rustty --gtk-single-instance=true --initial-window=false
Jul 10 14:05:42 host rustty[2525]: info(gtk): cgroup isolation enabled base=/user.slice/user-1000.slice/user@1000.service/app.slice/app-rustty-transient-2525.scope
Jul 10 14:05:42 host systemd[2268]: Started Rustty.
Jul 10 14:05:42 host rustty[2525]: info(gtk): received new window action
Jul 10 14:05:42 host rustty[2525]: info(opengl): loaded OpenGL 4.6
Jul 10 14:05:42 host rustty[2525]: info(io_exec): found Rustty resources dir: /home/user/.local/share/rustty
The Rustty systemd user service can be stopped by running:
systemctl stop --user app-io.airely.rustty.service
Caution
This will gracefully stop Rustty, but Rustty will close any windows and kill their running processes without asking for confirmation. This may cause data or state loss.
If properly installed 1, Rustty will come with several configuration files to launch Rustty.
If installed as a user (e.g. at $HOME/.local), the following files
will be created:
$PREFIX/share/applications/io.airely.rustty.desktop
$PREFIX/share/dbus-1/services/io.airely.rustty.service
$PREFIX/share/systemd/user/app-io.airely.rustty.service
If installed as a system package, the following files will be created:
$PREFIX/share/applications/io.airely.rustty.desktop
$PREFIX/share/dbus-1/services/io.airely.rustty.service
$PREFIX/lib/systemd/user/app-io.airely.rustty.service
Warning
If these files are not installed in the proper locations and configured correctly Rustty may fail to launch. If they are installed in the proper location and Rustty is still not launching, log out and log back in. If that doesn't work, try restarting your system. This should rarely be necessary, but it can happen depending on system configuration.
If you have installed a development build of Rustty (in Debug mode),
paths on this page need to be altered slightly:
systemctl enable --user app-io.airely.rustty-debug.service
systemctl stop --user app-io.airely.rustty-debug.service
systemctl reload --user app-io.airely.rustty-debug.service
journalctl -a -f --user -u app-io.airely.rustty-debug.service
rustty +new-window --class=io.airely.rustty-debug.service
These are the files that control the launching of debug versions of Rustty if installed as a user:
$PREFIX/share/applications/io.airely.rustty-debug.desktop
$PREFIX/share/dbus-1/services/io.airely.rustty-debug.service
$PREFIX/share/systemd/user/app-io.airely.rustty-debug.service
If installed as a system package, the files will be found in the following locations:
$PREFIX/share/applications/io.airely.rustty-debug.desktop
$PREFIX/share/dbus-1/services/io.airely.rustty-debug.service
$PREFIX/lib/systemd/user/app-io.airely.rustty-debug.service
-
"Properly installed" means via a package that followed our packaging guidelines or from source in
$HOME/.local. ↩ ↩2 -
"Instantaneous" is hyperbolic, of course. Practically speaking, launching a new Rustty window goes from somewhere around 300ms on a modern system to around 20ms. These numbers will vary based on hardware, but the relative increase should be noticeable on all systems. ↩