APP2UNIT(1)
β¨ APP2UNIT(1) β¨
okay so bestie, welcome to the app2unit(1) page β general commands manual, but make it a group chat π
the whole fam of commands lives here, and they're all the same vibe with different defaults baked in: app2unit, app2unit-open, app2unit-term, app2unit-open-scope, app2unit-open-service, app2unit-term-scope, and app2unit-term-service π
it's literally your application launcher, your file opener, and your default terminal launcher for systemd environments. main character energy fr fr π
πΈ SYNOPSIS πΈ
app2unit [options] [--] {entry-id.desktop | entry-id.desktop:action-id |
command} [args ...]
app2unit -T [options] [--] [entry-id.desktop |
entry-id.desktop:action-id | command] [args ...]
app2unit -O [options] [--] {URL|Path ...}
π DESCRIPTION π
app2unit launches applications by their Desktop Entry IDs, or by arbitrary command lines. and the way it does it? it launches them as systemd user units β slay β¨
with the -O option it can open files or URLs in the applications associated with them π«Ά
with the -T option it can force the application to run in a terminal, or just open the default terminal (utilizing xdg-terminal-exec). iconic behavior honestly π
and here's a cute little trick: symlinks with specially suffixed names can be used to pre-select some modes and unit types with a single command π§
app2unit-openapp2unit-open-scopeapp2unit-open-serviceapp2unit-termapp2unit-term-scopeapp2unit-term-service
π¦ OPTIONS π¦
-s{a|b|s|custom.slice} β select slice among the short references, and the first one is the default:"a=app.slice b=background.slice s=session.slice". or just set the slice explicitly. both the default and the short references can be preset via theAPP2UNIT_SLICESenv var in the format above π-t{scope|service} β the type of unit to launch. can be preselected via theAPP2UNIT_TYPEenv var, and also if$0ends with-scopeor-serviceβ-aapp_name β override the substring of the Unit ID that represents the application name. defaults to the Entry ID without its extension, or the executable name. conflicts with-uπ-uunit_id β override the whole Unit ID. must match the type. defaults to the recommended templates:
app-${desktop}-${app_name}@${random}.service
app-${desktop}-${app_name}-${random}.scope
conflicts with -a π
-xβ do not insert the${desktop}substring into the generated unit name. can also be preset with the env var"APP2UNIT_INSERT_XSD=false"π-Xβ insert the${desktop}substring into the generated unit name (this is the default behavior, so it's giving "yes bestie keep it" β¨)-ddescription β set or override the unit description. by default the description is generated from the Entry's"Name="and"GenericName="keys π-p{Property=value|@file} β set an additional unit property. or load them from a@file(one assignment per line, lines are trimmed, and empty lines plus lines starting with"#"are ignored). this option is repeatable π₯-Tβ force launch in a terminal (xdg-terminal-execis used). any unknown option starting with'-'after this will be passed toxdg-terminal-exec. the command may be omitted to just launch the default terminal. this mode can also be selected if$0ends with"-term"or"-terminal", also optionally followed by"-scope"or"-service"unit type suffixes π-S{out|err|both} β silence stdout, stderr, or both. shhh π€«-cβ do not add thegraphical-session.targetdependency and ordering. can also be preset with the env var"APP2UNIT_PART_OF_GST=false"πΈ-Cβ add thegraphical-session.targetdependency and ordering (this is the default behavior, no cap) π-O,--openβ opener mode: the argument(s) are treated as file(s) or URL(s) to open. the Desktop Entry for them is found viaxdg-mime. only a single association is supported. this mode can also be selected if$0ends with"-open", also optionally followed by"-scope"or"-service"unit type suffixes π¦--fuzzel-compatβ for using infuzzel<1.14.0, like this:
fuzzel --launch-prefix='app2unit --fuzzel-compat --'
since 1.14.0 it's no longer needed, because DESKTOP_ENTRY_* vars are handled automatically. it's giving legacy support, we love her anyway π
--testβ do not run anything, just print the resulting command. dry run queen π--β disambiguate a command from options. the classic "hey, everything after this is literally an argument" move π«Ά
π§ ENVIRONMENT π§
APP2UNIT_TYPEβscope|service, presets the default unit type (default:scope) βAPP2UNIT_SLICESβ assignments of short selectors to slice names. the first assignment is the default slice for apps (default:"a=app.slice b=background.slice s=session.slice") πAPP2UNIT_PART_OF_GSTβtrue|false, whether to set the"PartOf=graphical-session.target"dependency for launched applications (default:true) πAPP2UNIT_DEBUG,DEBUGβ a truthy or greater-than-zero value enables debug messages to stderr. turn it on when you need to snoop π
π SEE ALSO π
systemd-run(1), systemd.special(7), xdg-terminal-exec(1) β go read these too bestie, iykyk π
π AUTHORS π
Vladimir-csp (https://github.com/Vladimir-csp, https://gitlab.freedesktop.org/Vladimir-csp) β the icon who wrote all this π
okay that's the whole page, and the footer says this is from the APP2UNIT(1) manual, dated 1980-01-01 β yes that date is a vibe, don't question it πβ¨ periodt π
π¦ where this page comes from
- nixpkgs unstable: app2unit 1.4.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms