I found myself on a command line window, wanting to open a PDF, and I didnt remember the name of the pdf reader that now comes as a default install for Fedora. Too many years of "just installing Acrobat" left me with "./acroread whatever.pdf" engraved into my brain cells.
So.. I had to go to "add/remove programs" type "PDF" in the search field, and then wait as the program showed the name of the app: evince.
Now that's great. I now know its 'evince whatever.pdf'.
But that got me thinking. Shouldn't there be a "meta-command" like "open filename.whatever" that just seeks the default file association in gnome or whatever, and find the app name, and invoke the right app without the end user having to memorize the exact app name associated with any given file extension type?.
I'm not exceptionally bright, and my bright ideas more often than not tend to be ideas implemented ages ago... so I guess that utilty might exist already, no?
FC
On Fri, Apr 13, 2012 at 3:56 PM, Fernando Cassia fcassia@gmail.com wrote:
But that got me thinking. Shouldn't there be a "meta-command" like "open filename.whatever" that just seeks the default file association in gnome or whatever, and find the app name, and invoke the right app without the end user having to memorize the exact app name associated with any given file extension type?.
I haven't tried using this directly but I would think it would do what you need: $ xdg-open --help xdg-open -- opens a file or URL in the user's preferred application
Synopsis
xdg-open { file | URL }
xdg-open { --help | --manual | --version }
Use 'man xdg-open' or 'xdg-open --manual' for additional info. --- end ---
Richard
On Fri, Apr 13, 2012 at 17:59, Richard Shaw hobbes1069@gmail.com wrote:
I haven't tried using this directly but I would think it would do what you need: $ xdg-open --help xdg-open -- opens a file or URL in the user's preferred application
Worked like a charm. Now, see how linux devs shoot themselves in the foot and usability in the process by naming it "xdg-open" instead of just "open". What's the harm of using an English language word for a command, that states exactly what it does?.
Were the xdg-open devs afraid that some user might type "open" and, gee, a file would *OPEN* ? That would be too user friendly, right?. ;)
Perhaps I should find the xdg-open devs and start a kerfuffle about this... H*ck if I were in charge of Fedora there would be a default bashrc alias open=/usr/bin/xdg-open
Usability, usability, usability! they' ve heard of it. :) FC
On Fri, Apr 13, 2012 at 4:11 PM, Fernando Cassia fcassia@gmail.com wrote:
On Fri, Apr 13, 2012 at 17:59, Richard Shaw hobbes1069@gmail.com wrote:
I haven't tried using this directly but I would think it would do what you need: $ xdg-open --help xdg-open -- opens a file or URL in the user's preferred application
Worked like a charm. Now, see how linux devs shoot themselves in the foot and usability in the process by naming it "xdg-open" instead of just "open". What's the harm of using an English language word for a command, that states exactly what it does?.
Were the xdg-open devs afraid that some user might type "open" and, gee, a file would *OPEN* ? That would be too user friendly, right?. ;)
Well "open" is already taken :)
Try "man open"
Richard
On Fri, Apr 13, 2012 at 18:13, Richard Shaw hobbes1069@gmail.com wrote:
Well "open" is already taken :)
Try "man open"
OMG, perl, the root of all evil.
It's simple, xdg-open becomes open, and 'open' becomes something easier for perl devs, like, I don't know, perl-open--MYAML -ne '$c{$_}++for split//;END{print Dump%c}'
;-P FC
On Fri, Apr 13, 2012 at 18:13, Richard Shaw hobbes1069@gmail.com wrote:
Well "open" is already taken :)
Try "man open"
I'm happy to report that setting alias open=/usr/bin/xdg-open in bashrc works wonders. FC
On 04/13/2012 05:56 PM, Fernando Cassia wrote:
I found myself on a command line window, wanting to open a PDF, and I didnt remember the name of the pdf reader that now comes as a default install for Fedora. Too many years of "just installing Acrobat" left me with "./acroread whatever.pdf" engraved into my brain cells.
So.. I had to go to "add/remove programs" type "PDF" in the search field, and then wait as the program showed the name of the app: evince.
Now that's great. I now know its 'evince whatever.pdf'.
But that got me thinking. Shouldn't there be a "meta-command" like "open filename.whatever" that just seeks the default file association in gnome or whatever, and find the app name, and invoke the right app without the end user having to memorize the exact app name associated with any given file extension type?.
I'm not exceptionally bright, and my bright ideas more often than not tend to be ideas implemented ages ago... so I guess that utilty might exist already, no?
FC
gnome-open? xdg-open?
On Fri, Apr 13, 2012 at 17:59, "Germán A. Racca" german.racca@gmail.com wrote:
gnome-open? xdg-open?
Thanks Germán. The question marks are because you're not sure? ;-) Or because you're implying "sheesh, how doesn't he know?". INQminds want to know. ;-)
*joke*. I appreciate your answer.
FC
On 04/13/2012 06:07 PM, Fernando Cassia wrote:
On Fri, Apr 13, 2012 at 17:59, "Germán A. Racca"german.racca@gmail.com wrote:
gnome-open? xdg-open?
Thanks Germán. The question marks are because you're not sure? ;-) Or because you're implying "sheesh, how doesn't he know?". INQminds want to know. ;-)
Hi Fernando:
More or less... hahaha! No, no... it was because I wasn't sure about what you were asking for.
*joke*. I appreciate your answer.
FC
All the best, Germán.
On Fri, 2012-04-13 at 17:59 -0300, "Germán A. Racca" wrote:
gnome-open? xdg-open?
In true lazy-ix-typist fashion, I made an alias of the word "go" to the "gnome-open" command, long ago. Nothing on my system was already using "go" as a command. One could do the same for "xo".
# cat /etc/bashrc # /etc/bashrc
# System wide functions and aliases alias go='gnome-open' alias xo='xdg-open'
Am 13.04.2012 22:56, schrieb Fernando Cassia:
I found myself on a command line window, wanting to open a PDF, and I didnt remember the name of the pdf reader that now comes as a default install for Fedora. Too many years of "just installing Acrobat" left me with "./acroread whatever.pdf" engraved into my brain cells.
So.. I had to go to "add/remove programs" type "PDF" in the search field, and then wait as the program showed the name of the app: evince.
Now that's great. I now know its 'evince whatever.pdf'.
But that got me thinking. Shouldn't there be a "meta-command" like "open filename.whatever" that just seeks the default file association in gnome or whatever, and find the app name, and invoke the right app without the end user having to memorize the exact app name associated with any given file extension type?
no
simply because in the GUI this is still the case and extensions are MEANINGLESS at all, on a modern OS you need no extension at all
remove the .pdf in you GUI froma file and your DE still knows what type of file this is and which application should be used to open
this happens by mimetype
Microsoft Windows is the only OS relying blindly on a file extension, really the only OS
On Fri, Apr 13, 2012 at 18:00, Reindl Harald h.reindl@thelounge.net wrote:
Microsoft Windows is the only OS relying blindly on a file extension, really the only OS
You're right. If I remember correncly OS/2 and Amiga also didn't care about filename extensions, one because of filesystem EAs (Extended Attributes) and the other because of .info files.
FC
Microsoft Windows is the only OS relying blindly on a file extension...
You're right.
Of course this is why Internet Explorer works correctly so much more often than Firefox, because 99.997% of all web servers are misconfigured and send the wrong mime type for half the files :-).
On Fri, Apr 13, 2012 at 17:19:23 -0400, Tom Horsley horsley1953@gmail.com wrote:
Of course this is why Internet Explorer works correctly so much more often than Firefox, because 99.997% of all web servers are misconfigured and send the wrong mime type for half the files :-).
You mean incorrectly. Like when I tried to provide links to html source using a text/plain mimetype and internet explorer disregarded this and treated the pages as html instead based on the URL ending in .html.
On Fri, 13 Apr 2012, Bruno Wolff III wrote:
On Fri, Apr 13, 2012 at 17:19:23 -0400, You mean incorrectly. Like when I tried to provide links to html source using a text/plain mimetype and internet explorer disregarded this and treated the pages as html instead based on the URL ending in .html.
Perhaps it be useful to be able to tell a browser --force text/plain .
Am 14.04.2012 00:07, schrieb Michael Hennebry:
On Fri, 13 Apr 2012, Bruno Wolff III wrote:
On Fri, Apr 13, 2012 at 17:19:23 -0400, You mean incorrectly. Like when I tried to provide links to html source using a text/plain mimetype and internet explorer disregarded this and treated the pages as html instead based on the URL ending in .html.
Perhaps it be useful to be able to tell a browser --force text/plain
and what do you think is the intention of "Content-Type: text/plain"? MSIE is simply to stupid to act as standards saying
noobs saying "but MSIE behaves correctly if the server is misconfigured" does not chnage this fact - a client must not make assumptions in cases where standards are defining correct behavior
On Sat, 14 Apr 2012, Reindl Harald wrote:
Am 14.04.2012 00:07, schrieb Michael Hennebry:
On Fri, 13 Apr 2012, Bruno Wolff III wrote:
On Fri, Apr 13, 2012 at 17:19:23 -0400, You mean incorrectly. Like when I tried to provide links to html source using a text/plain mimetype and internet explorer disregarded this and treated the pages as html instead based on the URL ending in .html.
Perhaps it be useful to be able to tell a browser --force text/plain
and what do you think is the intention of "Content-Type: text/plain"? MSIE is simply to stupid to act as standards saying
I was suggesting that if either the browser or the server does not know how to play nice, the user might want to make a firm suggestion. I've occasionally been annoyed by a text, not .txt, file mime-typed application/binary or some such.
noobs saying "but MSIE behaves correctly if the server is misconfigured" does not chnage this fact - a client must not make assumptions in cases where standards are defining correct behavior
On Fri, 2012-04-13 at 17:19 -0400, Tom Horsley wrote:
Of course this is why Internet Explorer works correctly so much more often than Firefox, because 99.997% of all web servers are misconfigured and send the wrong mime type for half the files :-).
Ironically, it's problems stem from MSIE doing the opposite. It sniffs the file, ignores the header info, and lets Windows explorer do what it thinks that type of file should normally do.
i.e. Someone sends you an executable, while claiming it's a MIDI file. Your various options for protecting your computer think that MIDI files are safe, so make no attempt to protect you from an incoming MIDI file. The browser sniffs the content, discovers it's an executable, and executes it (and probably as the admin user thinks to stupid programmers and dumb users), and the virus/trojan/malware does its trick.
And all it takes is for some webpage, or email, to embed such a file in the background, and your browser or mail client automatically launches such malware for you.
I do NOT miss using Windows, one little bit. Windows and the IBM-clone are the worst designed products ever invented. The internet would have been a much better place (less spam and viruses, for instance), if Microsoft had a bloody clue about how to do computing properly.
On Fri, 2012-04-13 at 17:56 -0300, Fernando Cassia wrote:
I found myself on a command line window, wanting to open a PDF, and I didnt remember the name of the pdf reader that now comes as a default install for Fedora. Too many years of "just installing Acrobat" left me with "./acroread whatever.pdf" engraved into my brain cells.
So.. I had to go to "add/remove programs" type "PDF" in the search field, and then wait as the program showed the name of the app: evince.
Now that's great. I now know its 'evince whatever.pdf'.
But that got me thinking. Shouldn't there be a "meta-command" like "open filename.whatever" that just seeks the default file association in gnome or whatever, and find the app name, and invoke the right app without the end user having to memorize the exact app name associated with any given file extension type?.
I'm not exceptionally bright, and my bright ideas more often than not tend to be ideas implemented ages ago... so I guess that utilty might exist already, no?
FC
If you display the file as a GUI icon inn your home file system. Start at the Home icon (or computer icon) and go down to the file, clicking will show you options for opening a pdf file. Although evince will do that, acroread is the adobe reader application.
On Sat, Apr 14, 2012 at 11:01, Aaron Konstam akonstam@sbcglobal.net wrote:
Although evince will do that, acroread is the adobe reader application.
You missed the point I was trying to make, completely. Please, re-read my message. It has been answered already anyway. But thanks for your response.
FC