You are not logged in.

#1 2011-09-17 10:57:24

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Openbox - default applications - mimetype handling

Hi guys,

I use thunar-dropbox which provides the context menu entries.

Two of them are not working properly.

"Browse on Dropbox Website"
"View Previous Versions"

Those functions are supposed to open a new browser window. However on my system nothing happens.

Chromium is set as my default browser which can be proved with xdg-open google.com and opens a new chromium window.

I guess it can be a mime type problem, however I'm not sure what to try out.

Regards

Last edited by orschiro (2011-09-22 06:41:25)

Offline

#2 2011-09-19 21:44:38

Aakko
Member
Registered: 2007-10-23
Posts: 65

Re: Openbox - default applications - mimetype handling

I have same problem. When I start Dropbox from terminal and choose launch dropbox website it starts Links on terminal. Not Chromium that I have choosed as default browser on Xfce.

Offline

#3 2011-09-20 10:19:06

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Openbox - default applications - mimetype handling

Good to hear I'm not alone.

When I start Dropbox from terminal and choose launch dropbox website it starts Links on terminal

How did you do that? I only have dropboxd which is nothing more than the tray application.

Offline

#4 2011-09-20 10:54:02

Awebb
Member
Registered: 2010-05-06
Posts: 6,293

Re: Openbox - default applications - mimetype handling

I also had this problem. It's either a problem with xdg-open or a problem with you not setting the right environment variables, depending on how you see it.

/usr/bin/xdg-open says close to the end:

detectDE

if [ x"$DE" = x"" ]; then
    DE=generic
fi

# if BROWSER variable is not set, check some well known browsers instead
if [ x"$BROWSER" = x"" ]; then
    BROWSER=links2:links:lynx:w3m
    if [ -n "$DISPLAY" ]; then
        BROWSER=x-www-browser:firefox:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
    fi
fi

It's often not enough to configure the XFCE browser in exo-{open}, but it's also wise to register a browser with xdg and/or set the variable. I know, manually setting the variable sort of defeats the reason to use exo or xdg, but I don't see how we can have consistent behavior without some manual intervention.

I first set DE=xfce globally, but then decided to add BROWSER=exo-open, it will make sure the URL is interpreted by the XFCE thing. Another radical approach might be removing xdg-open entirely and linking exo-open to /usr/bin/xdg-open, but I'd expect this to break in the long run.

Offline

#5 2011-09-20 11:12:48

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Openbox - default applications - mimetype handling

Thanks for the tip with exo-open.

When I run 'exo-open http://google.com' I get asked to select my default browser. But as you said, still not enough to open the links.

Running 'xdg-open http://google.com' afterwards didn't help either.

So, if I understand you right, I need to add DE=xfce and BROWSER=exo-open to my bashrc?

Regards

Offline

#6 2011-09-22 06:47:30

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Openbox - default applications - mimetype handling

To generalise this a bit more. Not only thunar-dropbox does not open the link in my preferred browser, i.e. chromium, but also other applications such as zim do not open links in chromium.

This must be a special problem related to links.

To recapitulate.

- xdg-open http://google.com opens a new chromium window. works
- exo-open http://google.com opens a new chromium window. works
- chromium-browser is defined as default browser through exo-preferred-applications
- perl-file-mimeinfo is installed
- xdg-settings get default-web-browser reports me

xdg-settings: unknown desktop environment

- I export the DE and BROWSER variable in my .bashrc

export DE=xfce
export BROWSER=exo-open

- As fallback my ~/.local/share/applications/defaults.list contains the following entries

text/html=chromium-browser.desktop;
application/x-directory=chromium-browser.desktop

I'm helpless what else to do. So if someone can please explain me the mimetype handling in Openbox. I'm very glad for that.

Regards

Last edited by orschiro (2011-09-23 03:09:44)

Offline

#7 2011-09-23 22:54:47

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Openbox - default applications - mimetype handling

Anybody?

Offline

#8 2011-09-23 23:21:55

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Openbox - default applications - mimetype handling

x-scheme-handler/http=chromium-browser.desktop
x-scheme-handler/https=chromium-browser.desktop

Last edited by Gusar (2011-09-23 23:23:07)

Offline

#9 2011-09-24 06:37:24

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Openbox - default applications - mimetype handling

Sorry, I forgot to mention that I already added those two entries to defaults.list as well as mimeapps.list. But they didn't help either.

Regards

Offline

#10 2011-09-24 17:37:57

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 726
Website

Re: Openbox - default applications - mimetype handling

Gusar wrote:
x-scheme-handler/http=chromium-browser.desktop
x-scheme-handler/https=chromium-browser.desktop

If you're using the standard Arch 'chromium' package, you should be using:

x-scheme-handler/http=chromium.desktop
x-scheme-handler/https=chromium.desktop

Do a 'pacman -Ql <chromium_packagename> | grep desktop' to check the name of the .desktop file to use.

Offline

#11 2011-09-24 21:03:36

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Openbox - default applications - mimetype handling

Hi ninan,

That cannot be the problem. I'm using chromium-browser-bin from AUR which states:

chromium-browser-bin /usr/share/applications/chromium-browser.desktop

This problem is such a mess, I do not understand it all.

Last edited by orschiro (2011-09-24 21:04:49)

Offline

#12 2011-09-26 21:01:05

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Openbox - default applications - mimetype handling

Any other ideas?

Offline

#13 2011-10-05 00:43:13

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Openbox - default applications - mimetype handling

I'm getting closer to the solution and exported DE and BROWSER in .xinitrc before I start openbox. Before I had both in .bashrc.

export BROWSER=chromium-browser
export DE=xfce

That is, opening links in zim works now. The one and only thing that does not work are thunar-dropbox's functions 'Browse on dropbox website' and 'View previous versions'.

But still I cannot explain why. Let's assume I want to browse the file on dropbox website then it would be the same link that I can get through the 'Copy public link' function.

If I run 'xdg-open http://dl.dropbox.com/u/823asd/1.JPG' a new tab gets opened in chromium. However, there happens nothing when invoked through the functions above.

Last edited by orschiro (2011-10-05 00:43:43)

Offline

Board footer

Powered by FluxBB