14 Commits

Author SHA1 Message Date
Jeffrey C. Ollie
81403f59ce dbus and systemd activation - take 2
This replaces #7433. The improvements are:

1) Install the systemd user service in the proper directory depending
on if it's a 'user' install or a 'system' install. This is controlled
either by using the `--system` build flag (as most packages will) or by
the `-Dsystem-package` flag.

2) Add the absolute path to the `ghostty` binary in the application
file, the DBus service, and the systemd user service. This is done so
that they do not depend on `ghostty` being in the `PATH` of whatever
is launching Ghostty. That `PATH` is not necessarily the same as the
`PATH` in a user shell (especially for DBus activation and systemd user
services).

3) Adjust the DBus bus name that is expected by the system depending on
the optimization level that Ghostty is compiled with.
2025-06-26 10:28:46 -07:00
Mitchell Hashimoto
f941a2185e Revert "linux: add dbus and systemd activation services (#7433)"
Reverts two commits:

977cd530c7bb9551de93900170bdaec4601b1b5b
820b7e432b57cd08c49d2e76cce4cb78016f0418

These break build from source on Linux for two reasons:

1.) The systemd user service needs to be installed in the `share`
prefix, not the `lib` prefix. This lets it get picked up in `~/.local`
but is also correct for just standard FHS paths.

2.) The `ghostty` path in the systemd user service needs to be absolute.
We should interpolate in the build install prefix to form an absolute
path.
2025-06-24 22:07:09 -04:00
Jeffrey C. Ollie
e5c737a423 linux: use launched-from for new window action 2025-06-13 10:22:16 -05:00
Jeffrey C. Ollie
57392dfcb5 linux: use explicit launched-from config in service files 2025-06-13 10:22:16 -05:00
Jeffrey C. Ollie
8824d11e1c linux: add dbus and systemd activation services 2025-06-13 10:22:12 -05:00
Samuel
941915b862 declare StartupWMClass in .desktop 2025-01-10 22:26:48 -04:00
Misaki Kasumi
5c2fb580d0 misc: add desktop entry fields to support xdg-terminal-exec 2024-12-29 13:58:12 +08:00
Mitchell Hashimoto
9b81d57cb9 remove new-window action from desktop file
Fixes #1006
2023-12-07 20:46:05 -08:00
Tim Culverhouse
caf2252144 gtk: implement desktop notifications 2023-11-17 12:59:23 -06:00
Nathan Fisher
865b43cd4d Add Categories entry to .desktop file so Linux desktops have a better
chance of placing the menu entry into an appropriate category
2023-09-29 18:24:48 -04:00
Mitchell Hashimoto
cbbafc70e2 gtk: set Name for new-window action 2023-09-15 22:10:06 -07:00
Tim Culverhouse
6484c34bec linux: don't presume install location in desktop file
The app.desktop file shipped with the default build presumes the install
location of the binary. Let the OS determine the executable through it's
normal PATH variables.
2023-09-15 03:22:48 -05:00
Thorsten Ball
d275256e32 gtk: add new-window action to .desktop files
Inspired by #413.

This modifies the .desktop files so that it's possible to right-click on
the Ghostty icon in a dock and get the "New window" action.

Apparently this is how you implement that in GTK applications. In order
for us to also get "New tab", we'd have to implement a CLI flag, I
think.
2023-09-09 07:04:22 +02:00
Mitchell Hashimoto
1ca0ea361b dist/linux: add freedesktop desktop spec file 2023-02-25 15:23:51 -08:00