30 Commits

Author SHA1 Message Date
Jeffrey C. Ollie
eb5a488b57 clean up duplicated code in installation of desktop services 2025-06-26 10:28:46 -07:00
Jeffrey C. Ollie
cf561fcc55 rename templated files with .in suffix 2025-06-26 10:28:46 -07:00
Jeffrey C. Ollie
b68f9f2321 make sure that the desktop file uses the absolute path everywhere 2025-06-26 10:28:46 -07:00
Jeffrey C. Ollie
ddada2fb3f flatpak: remove references to systemd unit
Replaces #7676

When building as a flatpak, don't install the systemd user services
since flatpaks can't use them. Remove references to the systemd service
from the DBus service.

Also, customize the app metadata depending on the debug mode.

Co-authored-by: Leorize <leorize+oss@disroot.org>
2025-06-26 10:28:46 -07:00
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
Leorize
0473b0c3f4 metainfo: update with extra data
* Added URLs to more resources
* Fixed developer ID
* Added device compatibility information
2025-04-22 10:56:09 -07:00
Leorize
ebc169dbaf Fix flatpak packaging to a working state
This should make testing Flatpak builds a lot easier.

To build, enter `flatpak/` directory and run:

    flatpak-builder --repo=repo builddir com.mitchellh.ghostty.yml

alternatively, using org.flatpak.Builder flatpak:

    flatpak run -p org.flatpak.Builder \
      --repo=repo \
      builddir \
      com.mitchellh.ghostty.yml

The resulting flatpak can be installed using

    flatpak install ./repo com.mitchellh.ghostty

Credit of AppStream metadata goes to @yorickpeterse.
2025-04-22 10:56:09 -07:00
Andrej Daskalov
8c1db16c79 added exec permission back to dolphin action 2025-01-20 20:19:12 +01:00
Samuel
941915b862 declare StartupWMClass in .desktop 2025-01-10 22:26:48 -04:00
Gabriele Musco
c972051611 linux: add "Open in Ghostty" shortcut for nautilus 2025-01-08 13:49:32 +01:00
Misaki Kasumi
5c2fb580d0 misc: add desktop entry fields to support xdg-terminal-exec 2024-12-29 13:58:12 +08:00
Anthony
5180cc6c0e Remove executable permission from readonly config file 2024-12-12 15:26:26 +11:00
Andrej Daskalov
3048d71537 added gtk-single-instance argument 2024-12-01 13:16:56 +01:00
Andrej Daskalov
46afa9c4e1 use cli argument instead of cd 2024-11-29 11:51:10 +01:00
Andrej Daskalov
074312c5ef updated permissions and build process
Removed check for plasma in build.zig, it installs it anyways now
Added executable permissions for ghostty_dolphin.desktop since Plasma
requires them for context menu items
2024-11-29 11:14:17 +01:00
Andrej Daskalov
62fe3eb652 added right click action for plasma 2024-11-28 23:41:55 +01: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
Mitchell Hashimoto
d94cf2f124 remove flatpak
Flatpak support has been a HUGE pain to keep working, the builds take
forever and cost me real money, and there are very few users. Ideally,
we want to just use native system packagers for each distro. I thought
Flatpak would make it easy to support many distros but that ended up
being false.
2023-09-13 11:41:16 -07: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
5db9854e63 build: install the proper linux desktop file depending on flatpak or not 2023-02-27 15:20:31 -08:00
Mitchell Hashimoto
ec956debb7 Command/Pty work better with Flatpak but not 100% yet 2023-02-25 21:19:57 -08:00
Mitchell Hashimoto
1ca0ea361b dist/linux: add freedesktop desktop spec file 2023-02-25 15:23:51 -08:00