After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 569869 - change terminal properties from the shell running inside the terminal
change terminal properties from the shell running inside the terminal
Status: RESOLVED OBSOLETE
Product: gnome-terminal
Classification: Core
Component: Profiles
2.22.x
Other All
: Normal enhancement
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-30 18:24 UTC by Kai Johnson
Modified: 2021-06-10 19:53 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Kai Johnson 2009-01-30 18:24:46 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.
Comment 1 Mariano Suárez-Alvarez 2009-01-30 20:34:16 UTC
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.
Comment 2 aleksandar 2009-04-06 11:39:26 UTC
(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"
Comment 3 slinkp 2010-09-30 03:04:03 UTC
FWIW, roxterm has such a dbus interface. See: 
http://roxterm.sourceforge.net/index.php?page=guide&lang=en#AdvancedDbusUsage
Comment 4 Stefano Forli 2011-02-16 00:04:51 UTC
I support this bug-as-a-missing-feature request.
Comment 5 Gerhardus Geldenhuis 2011-08-09 15:15:48 UTC
I would certainly support this as a useful feature to be added.
Comment 6 Christian Persch 2011-11-25 20:53:05 UTC
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.
Comment 7 GNOME Infrastructure Team 2021-06-10 19:53:03 UTC
-- 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.