IO.popen

E

Eko Budi Setiyo

Can any body tell me how to convert "Windows command" IO.popen("start
example.pdf") in to Linux or Unix so that the Linux box will open the
"example.pdf" file application.

regards
Eko
 
C

craig duncan

Eko said:
Can any body tell me how to convert "Windows command" IO.popen("start
example.pdf") in to Linux or Unix so that the Linux box will open the
"example.pdf" file application.

regards
Eko

IO.popen("xpdf example.pdf")

Doesn't "start" on Windows function as sort of a dispatcher? It knows what
application goes with the file type? Linux/Unix doesn't have any such thing
built in AFAIK. You need to run the program that displays the pdf file yourself.
 
J

Joel VanderWerf

craig said:
IO.popen("xpdf example.pdf")

Doesn't "start" on Windows function as sort of a dispatcher? It knows
what application goes with the file type? Linux/Unix doesn't have any
such thing
built in AFAIK. You need to run the program that displays the pdf file
yourself.

KDE has "kfmclient exec URL". Gnome probably has something similar.
 
E

Eko Budi Setiyo

craig said:
IO.popen("xpdf example.pdf")

Doesn't "start" on Windows function as sort of a dispatcher? It knows
what application goes with the file type? Linux/Unix doesn't have any
such thing
built in AFAIK. You need to run the program that displays the pdf
file yourself.
Thanks

I don't know so much about "start" on windows. Personally it's quite
dangerous function. I accidently find it.
Because:

something.exe ---rename---> something.pdf ----> C:\start something.pdf
---> will executed as something.exe



regards
Eko
 
E

Eko Budi Setiyo

Joel said:
KDE has "kfmclient exec URL". Gnome probably has something similar.
Thanks

Is it possible for ruby to find out what is the pdf reader application
installed in the target Computer

regards
Eko
 
Y

Yohanes Santoso

Eko Budi Setiyo said:
Is it possible for ruby to find out what is the pdf reader application
installed in the target Computer

In Linux/UNIX? Generally no, unless you know distribution &
installation specific information.

But do try the program "see". It comes from the same package that
provides /etc/mailcap, and so it should be quite common.

Other than that, allow users to specify their own pdf reader.

YS.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,167
Messages
2,570,911
Members
47,453
Latest member
MadelinePh

Latest Threads

Top