GNOME Bugzilla – Bug 569869
change terminal properties from the shell running inside the terminal
Last modified: 2021-06-10 19:53:03 UTC
I'd like to be able to enter a command in the gnome-terminal that changes the existing profile of the current window. My personal use case is that I like my different projects to have different backgrounds, so I've resorted to creating shortcut icons with the --tab-with-profile and --working-directory specified so they open to the root of my project with a profile with a distinct background color. I understand that vte handles the terminal emulation, so is this even possible? If it is, I'd love some advice on how to implement this myself.
A way to deal with this is to make gnome-terminal 'scriptable'. For example, expose a dbus interface (list open windows, open tabs per window, and properties of such tabs (profile, size, etc); manipulate all that (open, close, detach and reattach screens to windows...); list profiles, set/get specific profile properties (you can do this now using gconftoot-2, of course, but it's quite a hack, specially taking into account the fact that profiles have two names) Extra points for adding an environment variable to the process running in each screen so that it one can say «change the profile of this tab». Then you can write a standalone command line app which sends commands to a running terminal. It shouldn't be hard. I wonder if it is worth the trouble, though.
(In reply to comment #0) > I'd like to be able to enter a command in the gnome-terminal that changes the > existing profile of the current window. My personal use case is that I like my > different projects to have different backgrounds, so I've resorted to creating > shortcut icons with the --tab-with-profile and --working-directory specified so > they open to the root of my project with a profile with a distinct background > color. > > I understand that vte handles the terminal emulation, so is this even possible? > If it is, I'd love some advice on how to implement this myself. > I guess this is not what you're looking for but maybe this can help :) golub@c3p0:~/workspace$ cat /bin/sshHotbox #!/bin/sh echo "\033[00;31m" #red from now on ssh -i /home/golub/keys/ttyKey -o GSSAPIAuthentication=no -o TCPKeepAlive=no -o ServerAliveInterval=15 -o ServerAliveCountMax=3 hotbox@somehost #back to white after connection is closed echo "\033[00m"
FWIW, roxterm has such a dbus interface. See: http://roxterm.sourceforge.net/index.php?page=guide&lang=en#AdvancedDbusUsage
I support this bug-as-a-missing-feature request.
I would certainly support this as a useful feature to be added.
This should be easy to do on the 'gsettings' branch where already the terminal exports a dbus object; just add a new command to the 'gnome-terminal-client' programme.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/6776.