Reply
Thread Tools
Posts: 7 | Thanked: 0 times | Joined on Oct 2010
#1
I'm adding button to application written in C.
The button should fire up the web browser with the given url.

Any suggestions how can I do it?
 
CepiPerez's Avatar
Posts: 1,023 | Thanked: 4,421 times | Joined on Feb 2010 @ Argentina
#2
use system() with a dbus-send command
 
Posts: 56 | Thanked: 31 times | Joined on Jul 2008 @ Austria
#3
Or for a non-security-problem-way, use spawnvp(), which won't have problems with spaces and/or weird quotes and/or mistaking commands for environment variables / bash commands / .... like system() does.
 
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#4
Wasn't there a simple shell command that would do the same thing?
 
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#5
 
Posts: 540 | Thanked: 288 times | Joined on Sep 2009
#6
Wouldn't it be better to make the DBUS call from the C-program directly rather than going through shell ?
__________________
  • Live near Helsinki, Finland & interested in electronics ? Check this out.
  • Want anti-virus/firewall ? Read this (and follow the links, also: use the search, there are way too many threads asking the same questions over and over and over again).
  • I'm experimenting with BitCoins, if you want to tip me send some to: 1CAEy7PYptSasN67TiMYM74ELDVGZS6cCB
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#7
Code:
QDBusInterface *interface = new QDBusInterface("com.nokia.osso_browser","/com/nokia/osso_browser/request","com.nokia.osso_browser");
interface->call("open_new_window",uri);
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:48.