1 |
On Sun, Feb 21, 2010 at 05:33:35PM +0100, Damian wrote: |
2 |
> On Sun, Feb 21, 2010 at 4:05 PM, Willie Wong <wwong@××××××××××××××.edu> wrote: |
3 |
> > On Sun, Feb 21, 2010 at 03:45:14PM +0100, Damian wrote: |
4 |
> >> So I tried to see how xdg-open works, but the man page didn't give me |
5 |
> >> any useful information. The related command, xdg-mime, doesn't work as |
6 |
> >> I expected. |
7 |
> > |
8 |
> > I asked a similar question a week or so back. |
9 |
> I searched in my mails but I couldn't find it. Sorry, I probably |
10 |
> didn't enter a relevant search string. |
11 |
> |
12 |
> >> But xdg-open (and therefore beagle-search) still refuses to open jpeg |
13 |
> >> images with geeqie. |
14 |
> >> |
15 |
> >> Any ideas? |
16 |
> > |
17 |
> > xdg-open is just a shell script. If you are interested, take a look at |
18 |
> > less `which xdg-open` |
19 |
> > and you will be enlightened as to why it is a complete piece of crap |
20 |
> > unless you are using KDE, GNOME, or XFCE. (Hint, notice how nowhere in |
21 |
> > the script does it read whatever you modified with xdg-mime.) |
22 |
> > |
23 |
> > A possible way to work around it (depends on your application, which, |
24 |
> > in your case, is beagle, which I am not familiar with) is to go into |
25 |
> > the offending application that is calling xdg-open and see if you can |
26 |
> > configure MIME types in there yourself. The application that made me |
27 |
> > look this up, Jabref, does allow that configuration. Your mileage can |
28 |
> > of course vary. |
29 |
> Thanks Willie for your answer. |
30 |
> |
31 |
> Sadly beagle-search doesn't offer any option. The developers must use |
32 |
> only gnome. |
33 |
> |
34 |
> I guess I will have so find another beagle front end, or choose a |
35 |
> different desktop search engine. |
36 |
|
37 |
xdg-open tries to determine the desktop enviroment you are running and |
38 |
uses its way to open files... |
39 |
If you are in a kde session, it will just run kfmclient XXX (kde way to |
40 |
open files in their application), for gnome it will use gnome-open or |
41 |
something... |
42 |
|
43 |
So even if you are not logged in a "full" gnome or kde session, but have |
44 |
some of its packages installed, you can "trick" xdg-open to use that |
45 |
enviroment |
46 |
for kde just export KDE_FULL_SESSION=true, |
47 |
for gnome GNOME_DESKTOP_SESSION_ID=something |
48 |
|
49 |
so you can run beagle-search with |
50 |
GNOME_DESKTOP_SESSION_ID=something beagle-search |
51 |
|
52 |
you have to set which applications to use in corresponding config |
53 |
(for kde, just run konqueror/dolphin and right click a file, don't know |
54 |
for gnome) |
55 |
|
56 |
for kde, you need the package kde-base/kfmclient, which should depend |
57 |
juast on kdelibs, for gnome-open you need gnome-base/libgnome, which |
58 |
shouldn't have much dependences that you don't have allready if you have |
59 |
some gtk app.. |
60 |
|
61 |
btw, gnome-open/kfcmclient will open files in any available program that |
62 |
correctly registers its mime-types, not only in kde/gnome apps..., so |
63 |
you really need only kfmclient/libnome to use it... |
64 |
|
65 |
|
66 |
one last remark, if set KDE_FULL_SESSION/GNOME_DESKTOP_SESSION_ID for |
67 |
xdg-open and it starts a gnome/kde app, that app might think that there |
68 |
are some desktop specific things running, that are not, though I haven't |
69 |
seen any real problems with it... |
70 |
You might however just edit the "detectDE" function in xdg-open to |
71 |
always behave like gnome/kde without settings the variables... |
72 |
|
73 |
yoyo |
74 |
|
75 |
|
76 |
PS the idea of xdg-open using a browser, when it cannont detect which DE |
77 |
are you running, is that a browser usually knows how to open which |
78 |
files... and you should have your preffered browser set in $BROWSER... |