Re: Execute associated image viewer or media player on button click





On Tue, Dec 8, 2009 at 3:38 PM, Dov Grobgeld <dov grobgeld gmail com> wrote:
You don't say under what system you need this.

On windows you would simply do:

ÂÂÂ system("foo.png")

and you would call the viewer associated with .png files.

(This works for url's as well as just running it through system, runs the prefered user browser).

On Linux there is no such system default, but the specifics depend on your desktop.
In linux you can do:
Âxdg-open file
or
gnome-open file


--
Emmanuel Rodriguez


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]