You are not logged in.

#1 2009-12-27 10:36:23

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

BASH question.

I have a bash function[1] that opens a URL from the terminal. When I execute this function the terminal loses focus and the browser attains focus. When doing the same thing through dmenu or an xmonad key binding this doesn't happen. The currently focused window stays focused. Is there a way to execute firefox <URL> in a BASH script without the terminal losing focus? I have tried various combinations of sub-shells and backgrounding without luck. An, admittedly quick, goggle hasn't turned up anything. Will keep looking but if anyone has a solution...

[1] http://bbs.archlinux.org/viewtopic.php? … 00#p675400

Offline

#2 2009-12-27 11:05:30

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: BASH question.

try:

sh -c "firefox $url"

Edit: I find with plain `firefox $url' I don't lose focus, either. (With firefox already running, that is)

Last edited by lolilolicon (2009-12-27 11:07:59)


This silver ladybug at line 28...

Offline

#3 2009-12-27 12:31:37

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: BASH question.

hmmmm, no joy.

Edit: I find with plain `firefox $url' I don't lose focus, either. (With firefox already running, that is)

That's interesting. I'll double check my config settings in case something in there is causing it.

Offline

Board footer

Powered by FluxBB