Is there something like ShellExecute in linux??
I am porting a windows application written in VC++ to linux that uses a function ShellExecute to perform an operation on a file, Can anybody tell me the alternative in linux C++, I also want to open some document from my program as with ShellExecute in Windows.
|
cppkid; am assuming you are not unfamilar with programming. recommend
Linux Programming-A beginner`s guide. excellent coverage on all shell,s. also open all subsections of http://tldp.org/HOWTO/HOWTO-INDEX/ section 4.6Programming subsections 4.6.1 through 4.6.10. and please expand all sections including subsection for detailed information. |
That depends...
If it is a KDE or Gnome (or maybe XFCE) application, this should be possible. If it's just a plain X-windows, GTK, SDL, Qt, or whatever "normal" (i.e. non-desktop evironment) toolkit, you would need to program you own file-type-to-application association table. Sorry, I don't know the exact funtions to call from KDE or gnome. |
There are two Glib functions available. g_spawn_command_line_sync() and g_spawn_async(). Here is an example of the later.
Code:
/* ************************************************** Code:
static gint get_new_ptable (P_Fah_monitor fm) |
Thanks Skona that was really helpfull,
Thank's alot. |
All times are GMT -5. The time now is 04:17 AM. |