Hardy's gnome-terminal looses 'focus'

Bug #221152 reported by Adam McGreggor
2
Affects Status Importance Assigned to Milestone
kdebase (Ubuntu)
Invalid
Undecided
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-terminal

adam@nagini:~$ lsb_release -rd
Description: Ubuntu 8.04
Release: 8.04

adam@nagini:~$ apt-cache policy gnome-terminal
gnome-terminal:
  Installed: 2.22.1-0ubuntu2
  Candidate: 2.22.1-0ubuntu2
  Version table:
 *** 2.22.1-0ubuntu2 0
        500 http://gb.archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

ISTR, Feisty had this problem, but can't find the bug :(

When clicking URIs within gnome-terminal (specifically, mutt(1), within a screen(1)), the web-browser comes to the forefront, not keeping windows in the 'right' order (i.e., staying focused within gnome-terminal)

Everything was fine until I did the Hardy update.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it, because your description didn't include enough information. You may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem.
 We have instructions on debugging some types of problems. http://wiki.ubuntu.com/DebuggingProcedures
At a minimum, we need:
1. the specific steps or actions you took that caused you to encounter the problem,
2. the behavior you expected, and
3. the behavior you actually encountered (in as much detail as possible).
Thanks!

Changed in gnome-terminal:
assignee: nobody → desktop-bugs
status: New → Incomplete
Revision history for this message
Adam McGreggor (adam-amyl) wrote :

Ok, with some more details then...

Problem's been since a "mv /etc/apt/sources.list /etc/apt/sources.list-gutsy && sed s/gutsy/hardy/ /etc/apt/sources.list-gutsy > /etc/apt/sources.list && apt-get update && apt-get dist-upgrade" style distro-upgrade: from Gutsy -> Hardy.

When selecting URIs via Gnome Terminal, links open fine in $browser, but instead of keeping gnome-terminal in the foreground (as had been the case with Gutsy), $browser comes to the foreground instead.

In this case my $browser is Firefox 3.

Example:
From gnome-terminal
    adam@nagini:~$ echo "http://www.example.org"
    http://www.example.org

click link, and if it's reproduced elsewhere, that link will open in $browser, but instead of keeping gnome-terminal on-top, the web-browser will come into foreground/focus.

With Gutsy (and until patched in Feisty), gnome-terminal stayed in focus/in the foreground, whilst links opened in the browser.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Ok thanks, i don't think it's a gnome-terminal bug, let's test this, open an xterm and execute firefox from it does it stole the focus too? I don't recall not losing the focus in earlier versions, maybe not a bug.

Revision history for this message
Adam McGreggor (adam-amyl) wrote :

> open an xterm and execute firefox from it does it stole the focus too?

The focus is *not* stolen via xterm, when ~just~ executing 'firefox'.

However, executing 'firefox http://www.example.org' causes a loss of focus in both xterm & gnome-terminal.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

xterm doesn't have magic URL handling ;)

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Obviously not a problem with gnome-terminal or firefox

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Adam, try:

gconftool-2 --set /apps/compiz/general/screen0/options/focus_prevention_level --type integer 3

ie. set "Focus Stealing Prevention Level" to "Very High".

You should now find that your terminal remains stubbonly in the foreground.

I leave it to Michael's judgement as to what the right level of focus stealing is, personally I'd expect Firefox to be in front since it's not a vampire user interface ;)

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Adam has confirmed out-of-band that he's running KDE, so iz kwin bug

Revision history for this message
Adam McGreggor (adam-amyl) wrote :

Ah. Found a work-around (am sure it wasn't needed in previous versions, but still) --- even if it did involve a drift into GUI land!

System Settings -> Window Behavior
'Window Specific Setting' --> New
Workarounds : 'X Focus Stealing Prevention' Force | Extreme
for all apps, and that seems to be doing the trick.

Changed in kdebase:
status: Incomplete → In Progress
Changed in kdebase:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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