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

On Tue, Dec 8, 2009 at 10:04 PM, Zettai Muri <zettaimuri ymail com> wrote:

And thanks for the linux information.

Is xdg-open file the best way to go rather than checking whether or not the user is using KDE/Gnome? Â

xdg-open is by far the easiest way to open a file no matter which desktop the user is running. In old linuxes that command wasn't available but today it seems to be available. This is also why I posted the alternative gnome-open which is always available but is desktop specific.

Just out of interest is there a way to confirm which desktop they are using? ÂSome clever variable like the $^O one for checking the OS?

xdg-open is a shell script so you an peek and see how they do to detect which desktop is running. But why going through all the hassle when xdg-open does everything? :)

Emmanuel Rodriguez

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