Ubuntu

Set window manager "URGENT" hint on bell.

Reported by Jason Liquorish on 2008-09-21
68
This bug affects 11 people
Affects Status Importance Assigned to Milestone
GNOME Terminal
New
Wishlist
Gnome Virtual Terminal Emulator
Fix Released
Medium
Terminator
Wishlist
Chris Jones
gnome-terminal (Ubuntu)
Wishlist
Ubuntu Desktop Bugs
Nominated for Intrepid by Stefano Maioli
vte (Ubuntu)
Low
Ubuntu Desktop Bugs
Nominated for Intrepid by Stefano Maioli

Bug Description

I would like to see an option to set the window manager "URGENT" hint on a visual bell or audible bell when silent_bell is active. Currently the visual notifications for bells are not as effective as actually flashing the entry in the window list and this would solve the problem.

Related branches

description: updated
Chris Jones (cmsj) wrote :

the URGENT hint will generally cause the entry in the window list to keep on pulsating indefinitely, but a bell is transient.
Are you sure this is what you want?

Changed in terminator:
importance: Undecided → Wishlist
status: New → Incomplete

This is what I would like. I have not found a decent way to get informed of events from a remote irssi and this would be a perfect solution to me.

Chris Jones (cmsj) wrote :

Fair enough, accepting this as a wishlist. It seems like it ought to be fairly easy to add, and would be disabled by default, so the impact is negligable.

Changed in terminator:
status: Incomplete → Confirmed

Sounds perfect. Thank you.

Chris Jones (cmsj) wrote :

I was wrong, this isn't even possible to add at the moment because the VTE widget we use does not emit a signal when it fires off a bell.

Chris Jones (cmsj) wrote :

Added an upstream bug report about firing off a bell signal. Looks like they have a patch almost ready, so maybe it will be in the next GNOME release.

Changed in vte:
status: Unknown → Confirmed
Changed in vte:
status: Confirmed → Fix Released
Mikel Ward (mikelward) wrote :

The patch was applied and committed on VTE's trunk. The signal name is "beep" rather than "bell" because one of the developers requested that the name be a verb.

I have also written a patch for GNOME Terminal to implement this behavior.
http://bugzilla.gnome.org/show_bug.cgi?id=557593

Changed in vte:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Fix Committed
Changed in gnome-terminal:
assignee: nobody → desktop-bugs
importance: Undecided → Wishlist
status: New → Triaged
Stefano Maioli (smaioli) wrote :

Where is the fix committed for vte (Ubuntu)?

Pedro Villavicencio (pedro) wrote :

upstream at svn.gnome.org.

Changed in gnome-terminal:
status: Unknown → New
Chris Jones (cmsj) wrote :

afaics this is fix released for vte in jaunty

Chris Jones (cmsj) wrote :

I have added this feature to Terminator. It's committed to trunk as revision 703.

Changed in terminator:
assignee: nobody → cmsj
status: Confirmed → Fix Committed
Mikel Ward (mikelward) wrote :

I've updated the GNOME Terminal patch at http://bugzilla.gnome.org/show_bug.cgi?id=557593 to include preferences, documentation, and another option to also show a desktop notification.

Please try it if you are interested and let me know if you have any thoughts or suggestions.

Chris Coulson (chrisccoulson) wrote :

The vte task is already fixed in Karmic

Changed in vte (Ubuntu):
status: Fix Committed → Fix Released
Chris Jones (cmsj) on 2009-06-23
Changed in terminator:
status: Fix Committed → Fix Released
Changed in gnome-terminal:
importance: Unknown → Wishlist
Changed in vte:
importance: Unknown → Medium
Mikel Ward (mikelward) wrote :

I've created a PPA at https://launchpad.net/~mikelward/+archive/flashing-gnome-terminal if anyone wants to try the patch on Maverick.

You can do this by running:
sudo add-apt-repository ppa:mikelward/flashing-gnome-terminal
sudo apt-get update
sudo apt-get install gnome-terminal gnome-terminal-data

My aim is to get this integrated into Gnome, so if you find any problems, let me know, otherwise a comment in https://bugzilla.gnome.org/show_bug.cgi?id=557593 asking to get this merged upstream could be helpful.

Note that the PPA replaces the existing gnome-terminal package. I don't know if this is the right way or not. It might cause problems when the next official build comes out. Help/advice appreciated.

Mikel Ward (mikelward) wrote :

The patch adds these options under the General tab:
   [ ] Bold the tab title when the terminal rings the bell
   [ ] ...even if I am working in that tab
   [ ] Flash the window's entry in the window list when the terminal rings the bell
   [ ] ...even if I am working in that window

which ones you turn on will depend on how you want to use it.

USE CASE 1 - Notify when command in background window is done

Description:
Enabling the "Bold the tab title" and "Flash the window's entry", but not the "...even" options provides a useful way of letting you know when a long-running command is finished. You can start a long-running command, go away and do something else, and then when the command is done, the terminal icon in the taskbar will flash. That way you don't have to keep Alt-Tabbing back to your terminal to check if the command is done.

Settings:
   [*] Bold the tab title when the terminal rings the bell
   [ ] ...even if I am working in that tab
   [*] Flash the window's entry in the window list when the terminal rings the bell
   [ ] ...even if I am working in that window

and put
   PS1="\\007$PS1"
at the end of your ~/.bashrc.

Demo:
   <http://mikelward.com/software/gnome/terminal-bell-demo2.ogv>

USE CASE 2 - Better visual bell

Description:
Enabling all four options will give you a persistent bell that you must acknowledge, so you don't miss an important event if you were away from your computer. e.g. if somebody sends you a message using "wall" or the system writes a critical log message on the console, the terminal icon in the taskbar will flash until you Alt-Tab back to the window (or, if you're already in that window, you can stop it flashing by typing something).

Settings:
   [*] Bold the tab title when the terminal rings the bell
   [*] ...even if I am working in that tab
   [*] Flash the window's entry in the window list when the terminal rings the bell
   [*] ...even if I am working in that window

and if you added
   PS1="\\007$PS1"
to your ~/.bashrc, for use case 1, you should remove it for use case 2.

Demo:
   <http://mikelward.com/software/gnome/terminal-bell-demo4.ogv>

Daniel Hahler (blueyed) wrote :

@Mikel: thanks for your work on this!

Any chance to have your PPA updated for the current Ubuntu release (saucy and trusty)?

tags: added: patch
Daniel Hahler (blueyed) wrote :

FWIW, I have tried to create a package, with the patch (obviously not properly) refreshed, but it failed to build (against gnome-terminal in trusty, built in a saucy pbuilder):

libtool: link: gcc -pthread -DVTE_SEAL_ENABLE -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/gtk-3.0 -I/usr/
gnome_terminal-terminal-screen.o: In function `terminal_screen_beep_cb':
/tmp/buildd/gnome-terminal-3.6.2/src/terminal-screen.c:769: undefined reference to `GTK_WIDGET_HAS_FOCUS'

Maybe it will work in the trusty PPA? https://launchpad.net/~blueyed/+archive/ppa/+sourcepub/4045470/+listing-archive-extra

At least there is a patch therein, which applies.

Daniel Hahler (blueyed) wrote :

There should show up a package at https://launchpad.net/~blueyed/+archive/ppa/+sourcepub/4046208/+listing-archive-extra

However, I do not see the options (and they are not in the patch as far as I can see).

From your description it also does not look like it solves the single set the X client/window's urgent flag on the event of a terminal bell, as in `sleep 5; echo ^G` (try "<C-V><C-G>" to get the real ^G (bell code)) and then tabbing away.

Mikel Ward (mikelward) wrote :

Which patch did you use?

AFAIR, you need the three most recent patches attached to that bug.

And make sure to install the config schema stuff before running.

Daniel Hahler (blueyed) wrote :

Mikel,

I have used the patches from your website: http://mikelward.com/software/gnome/flashing-terminal, and obviously missed the config schema stuff.

Does this patch after all is able to just "forward" the terminal bell by setting the X client window's urgent property? Because that's all I want it to do.
For monitoring activity etc I would use tmux then, but without gnome-terminal forwarding/handling the terminal bell from tmux, this does not work currently.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.