nikhil
nikhil

Reputation: 9363

Invoke Gedit in ubuntu

This may sound weird but thats what i need. How do we invoke gedit(or for that matter any application) from some other application automatically. I am trying to develop a system which allows a user to work on an application that is present in the cloud and when the cloud disconnects(due to low bandwidth), the system must transfer the control to the local copy of that application. The ultimate goal is that the user must not be interrupted at all times. The system must take care of actively switching from cloud application to local application and vice versa. The first hurdle here is that i must be able to invoke an application(say Gedit) from another process. Any ideas???

Upvotes: 1

Views: 158

Answers (3)

Craig552uk
Craig552uk

Reputation: 681

I think you might want to look at using the Application Cache in HTML5.

http://www.html5rocks.com/en/tutorials/appcache/beginner/

This would let you write a web app that runs in the cloud, but keeps working while offline.

Upvotes: 0

Alex
Alex

Reputation: 4362

Here's a REALLY simple version in C:

#include <stdio.h>
main() {
 FILE *fp;
 fp = popen('/usr/bin/gedit', 'r');
 /* do something with it... */
 pclose(fp);
}

popen isnt in the standard library, but it will work fine on linux boxes. You can also use exec, which is more standard, but not quite as nice.

Upvotes: 0

Elalfer
Elalfer

Reputation: 5338

I think you need something like popen or exec

Upvotes: 2

Related Questions