Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System wide defaults #782

Closed
baryluk opened this issue Jun 25, 2023 · 4 comments
Closed

System wide defaults #782

baryluk opened this issue Jun 25, 2023 · 4 comments

Comments

@baryluk
Copy link

baryluk commented Jun 25, 2023

Hi,

I am using Terminator for over a decade, and love it.

Currently at terminator 2.1.2-2 on Debian.

The issue is, I use livecds very frequently, so every time I boot, I loose settings.

For example I always do change following two settings:

  • Scrollback: 1000000 (1 million lines), instead of 500
  • Disable F1 (help) and F10 (menu accelerator) keybindings, so they are properly forwarded to apps running in terminal instead. (I leave F11 and F12 bound usually)

So changing this every day, is annoying. Especially if you already executed the command, but history was too short, so you need to change settings, and do a rerun.

However, I can modify the livecd to change some defaults.

As far as I can see this is currently hardcoded in /usr/lib/python3/dist-packages/terminatorlib/config.py on my system, and I would prefer to avoid patching this file, as future updates might break it.

I also do not want to set user-specific config, because it is not something I can easily do (i.e. there might be multiple users, user home directory might not exist yet, etc).

So I would like to change some defaults.

terminator_config manpage and source code suggests there is no way to do this.

Any way to do this?

My suggestion, if /etc/terminator/config exists (I would prefer /etc/terminator_config actually), should be read, and any settings there should be merged with default from source code, then user config read. Any differences should be saved in user config (~/.config/terminator/config). Even better, maybe move hardcoded defaults to /usr/share/terminator/config / /usr/local/share/terminator/config), then read / merge order will be:

  • /usr/share/terminator/config
  • /usr/local/share/terminator/config
  • /etc/terminator/config
  • /usr/local/etc/terminator/config
  • ${XDG_CONFIG_HOME:-${HOME}/.config}/terminator/config
@mattrose
Copy link
Member

There's a variable XDG_CONFIG_DIRS which allows you to store system-wide config files that terminator started following as of 2.1.0 or so. You should be able to put a config file in /etc/xdg/terminator/config that will do what you want.

Dupe of #308

@baryluk
Copy link
Author

baryluk commented Jun 25, 2023

Thank you, unfortunately this feature is broken.

user@debian:~$ cat /etc/xdg/terminator/config
[global_config]
[keybindings]
[profiles]
  [[default]]
    scrollback_lines = 1000000


user@debian:~$ terminator 
Unable to open ‘/etc/xdg/terminator/config’ for reading and/or writting.
([Errno 13] Permission denied: '/etc/xdg/terminator/config')

This is because code is trying to open that file for writing.

@baryluk
Copy link
Author

baryluk commented Jun 25, 2023

Actually, it does look to work, the error message is a just bit confusing.

@baryluk
Copy link
Author

baryluk commented Jun 25, 2023

Also it might be worth documenting in terminator_config manual page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants