tmux-continuum/docs/automatic_start.md

48 lines
2.0 KiB
Markdown
Raw Permalink Normal View History

2015-10-08 16:44:32 +00:00
# Automatic Tmux start
Tmux is automatically started after the computer/server is turned on.
### OS X
To enable this feature:
2020-09-01 16:54:02 +00:00
- put `set -g @continuum-boot 'on'` in `.tmux.conf`
2015-10-08 16:44:32 +00:00
- reload tmux config with this shell command: `$ tmux source-file ~/.tmux.conf`
Next time the computer is started:
- `Terminal.app` window will open and resize to maximum size
- `tmux` command will be executed in the terminal window
- if "auto restore" feature is enabled, tmux will start restoring previous env
Config options:
- `set -g @continuum-boot-options 'fullscreen'` - terminal window
will go fullscreen
- `set -g @continuum-boot-options 'iterm'` - start [iTerm](https://www.iterm2.com) instead
2015-10-08 16:44:32 +00:00
of `Terminal.app`
- `set -g @continuum-boot-options 'iterm,fullscreen'` - start `iTerm`
in fullscreen
- `set -g @continuum-boot-options 'kitty'` - start [kitty](https://sw.kovidgoyal.net/kitty) instead
of `Terminal.app`
- `set -g @continuum-boot-options 'kitty,fullscreen'` - start `kitty`
in fullscreen
- `set -g @continuum-boot-options 'alacritty'` - start [alacritty](https://github.com/alacritty/alacritty) instead of `Terminal.app`
- `set -g @continuum-boot-options 'alacritty,fullscreen'` - start `alacritty`
in fullscreen
Note: The first time you reboot your machine and activate this feature you may be prompted about a script requiring
access to a system program (i.e. - System Events). If this happens tmux will not start automatically and you will need
to go to `System Preferences -> Security & Privacy -> Accessability` and add the script to the list of apps that are
allowed to control your computer.
2015-10-08 16:44:32 +00:00
### Linux
Help with this would be greatly appreciated. Please get in touch.
2015-11-28 18:36:02 +00:00
#### Systemd
##### this will only start the tmux server, it will *not* start any terminal emulator
To enable automatic start with systemd:
2020-09-01 16:54:02 +00:00
- Put `set -g @continuum-boot 'on'` in `.tmux.conf`
2015-11-28 18:36:02 +00:00
- reload tmux config with this shell command: `$ tmux source-file ~/.tmux.conf`
2022-06-09 19:37:02 +00:00
- see [systemd](/docs/systemd_details.md) for more details about how this is implemented