SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-04-29 20:02:26

boncey
New Member
Registered: 2009-04-29
Posts: 4

How to prevent apps switching workspaces when they get focus?

Hi, just installed Crunchbang on the weekend and so far I love it.
I've been using Linux for over ten years, mainly Slackware then I switched to Ubuntu about 2 years ago for the ease of package management.
Using Crunchbang reminds me of using Slackware - and I mean that as a compliment! :-)

There is one thing that is driving me nuts though.
That is that when an application (that is in another workspace) takes focus it automatically switches from the workspace it was on to the one I am in.

As a simple example; I always have Firefox running in Workspace 5.
If I am in Workspace 1 and I select a link in a terminal then Firefox immediately moves to my current workspace and loads the link.
I want it to load the link but to stay in Workspace 5 and not move.

I guess for some people this might be a feature but for me it's not.
I need to find a way to turn it off.

I have searched on Google and looked through config files but to no avail.
I tried searching these forums but it seemed to want me to wait 30 seconds between searches so I gave up on that idea pretty fast. :-)

Thanks in advance for any help.

Offline

Be excellent to each other!

#2 2009-04-29 20:17:15

fhsm
#! Junkie
From: New Hampshire, USA
Registered: 2009-01-05
Posts: 445

Re: How to prevent apps switching workspaces when they get focus?

Not on CB right now but I was just in rc.xml does something like this work for you:

  <application name="firefox">
     ...
    <desktop>5</desktop>
  </application>

Here are the docs I found most helpful: http://icculus.org/openbox/index.php/Help:Applications

Should have mentioned that that goes in the applications block which is near the bottom of the default rc.xml file.

Last edited by fhsm (2009-04-29 20:21:31)

Offline

#3 2009-04-29 20:21:57

boncey
New Member
Registered: 2009-04-29
Posts: 4

Re: How to prevent apps switching workspaces when they get focus?

Hi, thanks for your reply.

I had tried something similar with another app but it didn't seem to make any difference.
I'll try it again with Firefox.

If I do change that file do I have to do anything to make OpenBox pick up my change?

Ta.

Offline

#4 2009-04-29 20:44:58

fhsm
#! Junkie
From: New Hampshire, USA
Registered: 2009-01-05
Posts: 445

Re: How to prevent apps switching workspaces when they get focus?

Yes,

In the openbox menu off the root menu (can't remember where exactly) there is an option that's something like "reconfigure." 

Or I think you can just run obconf at the command line. 

I can't remember if what I suggested will keep you from having the window jump on a change of focus.  I know it will force all new windows from that application to open on the specified desktop and I think it forces them to stay there.

Offline

#5 2009-04-29 20:50:52

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 9,418

Re: How to prevent apps switching workspaces when they get focus?

After changing rc.xml you should reconfigure Openbox. Openbox menu > Preferences > Openbox Config > Reconfigure.

Offline

#6 2009-04-29 20:55:55

boncey
New Member
Registered: 2009-04-29
Posts: 4

Re: How to prevent apps switching workspaces when they get focus?

Hi, thanks for the tips.

I tried that setting and it doesn't fix it. :-(

Firefox now starts in Workspace 5 (which is good) but still follows me around when I click a link in another app.

Is this an Openbox problem then?
I can go post on their forums perhaps.

Offline

#7 2009-04-29 21:38:25

fhsm
#! Junkie
From: New Hampshire, USA
Registered: 2009-01-05
Posts: 445

Re: How to prevent apps switching workspaces when they get focus?

I just set it up and I'm getting inconsistent behavior out of it also.  Seems to depend on how FF is run whether it stays put on the other desktop or jumps to the active one.  For example clicking an html file in the file manager it stays on the other desktop.  Running FF w/o a URI and if it's the first copy it goes to the specified desktop if it's a new window it shows up on the desktop with focus.  I've also hacked how firefox launches so this might now be the best example. 

I seem to be getting more consistent behavior out of Opera / Midori.

Offline

#8 2009-04-29 22:09:33

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 9,418

Re: How to prevent apps switching workspaces when they get focus?

Open Firefox and go to about:config. Search for "browser.tabs.loadDivertedInBackground" and set it to true.

Offline

#9 2009-04-29 23:47:42

fhsm
#! Junkie
From: New Hampshire, USA
Registered: 2009-01-05
Posts: 445

Re: How to prevent apps switching workspaces when they get focus?

anonymous wrote:

Open Firefox and go to about:config. Search for "browser.tabs.loadDivertedInBackground" and set it to true.

As always your knowledge is astounding.

Offline

#10 2009-04-30 06:17:08

boncey
New Member
Registered: 2009-04-29
Posts: 4

Re: How to prevent apps switching workspaces when they get focus?

Cool, that's fixed it for Firefox at least.
I am already less annoyed. :-)

I have other apps that aren't so simple to fix though.

I'll go post on the Openbox forums too.

If that fails I'll break out the compiler and fix it properly. :-)

Offline

#11 2009-04-30 11:16:38

Nicky
#! CrunchBanger
From: Paris (France)
Registered: 2009-04-05
Posts: 172

Re: How to prevent apps switching workspaces when they get focus?

I had the same problem, thank you anonymous.
I will try the solution this evening.

Offline

#12 2009-04-30 17:29:59

Nicky
#! CrunchBanger
From: Paris (France)
Registered: 2009-04-05
Posts: 172

Re: How to prevent apps switching workspaces when they get focus?

It works ! \o/

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo