Skip to content

Instantly share code, notes, and snippets.

@tomty89
Last active September 7, 2023 08:13
Show Gist options
  • Save tomty89/bd101e98d73ead7b08527e7867458c6b to your computer and use it in GitHub Desktop.
Save tomty89/bd101e98d73ead7b08527e7867458c6b to your computer and use it in GitHub Desktop.
#!/bin/sh
disp_num="${DISPLAY/:/}"
systemctl --user start gnome-terminal-server@"$disp_num".service
exec /usr/bin/gnome-terminal --app-id org.gnome.Terminal.X"$disp_num"
[Unit]
Description=GNOME Terminal Server (X%i)
PartOf=graphical-session.target
[Service]
Slice=app-org.gnome.Terminal.slice
Type=dbus
BusName=org.gnome.Terminal.X%i
Environment=DISPLAY=:%i XAUTHORITY=%t/xauthority
ExecStart=/usr/lib/gnome-terminal-server --app-id org.gnome.Terminal.X%i
TimeoutStopSec=5s
KillMode=process
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment