How do I determine which app xdg-open will use for a file?
Ok so got a question about xdg-open I can't figure out
When I xdg-open a text file it uses less. If I check `xdg-mime query default text/plain` it tells me gedit.desktop, which I don't even have. |
xdg-open is a shell script that behaves differently depending on the used DE. In Enlightenment, it will first try invoke enlightenment_open before resorting to its open_generic function based on xdg-mime output.
|
Ok that's interesting its a script, I'm trying to follow it now. Although it seems it only uses that enlgightenemnt_open for web urls....
when I use enlightenment_open on a text file, it tries to open it in vim, which I dont have, so I get a command not found. So it seems that's not in fact what xdg-open is using on text, and I should try to follow that xdg-open script a bit and figure it out still... but you got me on the right path... |
Ok update, it was not vi, it was less! That was my mistake cuz to get out I had to :q so figured vi.
and I think its using it from run-mailcap --action=view |
For such puzzlers I always find it helpful to get more information about the command executed - either 'man command' or 'command --help' or just 'command'. And next about the package the command belongs to.
And yes, many programs are "just" scripts and can be inspected. Quote:
|
All times are GMT -5. The time now is 11:05 AM. |