A weird xdg-open issue

.local/share/applications/defaults.list
[MIME Cache]
application/arj=xarchiver.desktop;
application/ogg=vlc.desktop;
application/pdf=epdfview.desktop;evince.desktop;
application/postscript=evince.desktop;
application/vnd.mozilla.xul+xml=firefox.desktop;
application/vnd.rn-realmedia=vlc.desktop;
application/x-7z-compressed=xarchiver.desktop;
application/x-arj=xarchiver.desktop;
application/x-bittorrent=deluge.desktop;
application/x-bzdvi=evince.desktop;
application/x-bzip=xarchiver.desktop;
application/x-bzip-compressed-tar=xarchiver.desktop;
application/x-bzip2=xarchiver.desktop;
application/x-bzip2-compressed-tar=xarchiver.desktop;
application/x-bzpdf=evince.desktop;
application/x-bzpostscript=evince.desktop;
application/x-cb7=evince.desktop;
application/x-cbr=evince.desktop;
application/x-cbt=evince.desktop;
application/x-cbz=evince.desktop;
application/x-compressed-tar=xarchiver.desktop;
application/x-designer=designer.desktop;
application/x-dvi=evince.desktop;
application/x-extension-mp4=vlc.desktop;
application/x-flac=vlc.desktop;
application/x-gzdvi=evince.desktop;
application/x-gzip=xarchiver.desktop;
application/x-gzpdf=evince.desktop;
application/x-gzpostscript=evince.desktop;
application/x-linguist=linguist.desktop;
application/x-matroska=vlc.desktop;
application/x-ogg=vlc.desktop;
application/x-openbox-theme=obconf.desktop;
application/x-rar=xarchiver.desktop;
application/x-rar-compressed=xarchiver.desktop;
application/x-shockwave-flash=vlc.desktop;
application/x-tar=xarchiver.desktop;
application/x-xzpdf=evince.desktop;
application/x-zip=xarchiver.desktop;
application/x-zip-compressed=xarchiver.desktop;
application/xhtml+xml=firefox.desktop;
application/zip=xarchiver.desktop;
application/x-directory=Thunar-folder-handler.desktop; ############# I added this
audio/mp4=vlc.desktop;
audio/mpeg=vlc.desktop;
audio/vnd.rn-realaudio=vlc.desktop;
audio/webm=vlc.desktop;
audio/x-flac=vlc.desktop;
audio/x-m4a=vlc.desktop;
audio/x-mp3=vlc.desktop;
audio/x-mpeg=vlc.desktop;
audio/x-mpegurl=vlc.desktop;
audio/x-ms-asf=vlc.desktop;
audio/x-ms-asx=vlc.desktop;
audio/x-ms-wax=vlc.desktop;
audio/x-pn-aiff=vlc.desktop;
audio/x-pn-au=vlc.desktop;
audio/x-pn-realaudio=vlc.desktop;
audio/x-pn-realaudio-plugin=vlc.desktop;
audio/x-pn-wav=vlc.desktop;
audio/x-pn-windows-acm=vlc.desktop;
audio/x-real-audio=vlc.desktop;
audio/x-scpls=vlc.desktop;
audio/x-vorbis+ogg=vlc.desktop;
audio/x-wav=vlc.desktop;
image/tiff=evince.desktop;
image/vnd.djvu=evince.desktop;
image/vnd.rn-realpix=vlc.desktop;
image/x-bzeps=evince.desktop;
image/x-eps=evince.desktop;
image/x-gzeps=evince.desktop;
inode/directory=Thunar-folder-handler.desktop;
misc/ultravox=vlc.desktop;
multipart/x-zip=xarchiver.desktop;
text/html=firefox.desktop;
text/mml=firefox.desktop;
text/plain=leafpad.desktop;
text/vnd.trolltech.linguist=linguist.desktop;
text/xml=firefox.desktop;
video/dv=vlc.desktop;
video/mp4=vlc.desktop;
video/mp4v-es=vlc.desktop;
video/mpeg=vlc.desktop;
video/msvideo=vlc.desktop;
video/quicktime=vlc.desktop;
video/vnd.rn-realvideo=vlc.desktop;
video/webm=vlc.desktop;
video/x-anim=vlc.desktop;
video/x-avi=vlc.desktop;
video/x-flc=vlc.desktop;
video/x-fli=vlc.desktop;
video/x-flv=vlc.desktop;
video/x-mpeg=vlc.desktop;
video/x-ms-asf=vlc.desktop;
video/x-ms-wmv=vlc.desktop;
video/x-msvideo=vlc.desktop;
video/x-nsv=vlc.desktop;
video/x-ogm+ogg=vlc.desktop;
x-content/audio-cdda=vlc.desktop;
x-content/audio-player=vlc.desktop;
x-content/video-dvd=vlc.desktop;
x-content/video-svcd=vlc.desktop;
x-content/video-vcd=vlc.desktop;
x-scheme-handler/http=firefox.desktop;
x-scheme-handler/https=firefox.desktop;
x-scheme-handler/magnet=deluge.desktop;
$xdg-open folderA/
was opening folderA/ in firefox, so I added "application/x-directory=Thunar-folder-handler.desktop;" to defaults. Now
$xdg-open folderA/
opens the folderA in thunar,
but the weird thing is, the moment I close thunar, firefox fires up and opens the folderA once again
any ideas?

OK, I have no idea but this problem ceased to exist. I did nothing but, It works fine now

Similar Messages

  • Weird PDF open issue

    My dad's iMac started doing something really weird and I can't figure out how to fix it. I am hoping someone here can help out.
    Whenever he tries to click on a PDF file on the Internet, it downloads to his desktop and then tries to open it in iPhoto - which of course it can't do.
    If you click on the file on his desktop - it automatically opens in Preview with no problem. If I save a PDF from an application to the hard drive - it also automatically opens in Preview.
    I have right clicked on the file and chosen "open with" "preview and I have always checked "always use this app to open this file type. But as soon as one is clicked on via the Internet it goes back to trying to open in iPhoto.
    This is happening in Firefox. When I try in Safari it opens in the browser window using the Adobe Acrobat viewer (which he also has installed).
    I looked in FireFox preferences but saw nowhere to change the PDF settings.
    Any help you be greatly appreciated here. I am totally out of ideas. Thanks!

    Thanks for the post - however, where it's downloading is not my problem. The problem is that whenever I click open in Firefox - it downloads and then tries to open PDFs in iPhoto and then gives me an error message.
    If I click on the item once downloaded - it opens in Preview fine.
    So How do I stop Firefox trying to open PDFs with iPhoto?
    Sorry if I wasn't more clear before. It was late!

  • Xdg-open is slow opening files

    Whenever I use xdg-open to open an application it takes a while until the application is shown, but if I try to open it with the application itself it works almost instantaneously. While using xdg-open I can notice a high increase of the cpu usage.
    What could it be that's causing this issue? Is there maybe a log file I can check to see what's going on under the hood? This issue is happening with gpicview (for images), nemo, and thunar; I haven't tried with other applications but I assume it's going to be the same.
    As relevant info I might add that I'm using openbox and no desktop environment. I'll upload any config files if requested, but I don't really know what to include as a start besides my mimeapps.list:
    #~/.local/share/applications/mimeapps.list
    [Default Applications]
    inode/directory=Thunar.desktop
    image/png=gpicview.desktop
    [Added Associations]
    image/png=gpicview.desktop;
    I've checked the wiki for xdg-open and all the forums (arch and outside of arch) and have just found people with the same issue, but no answers whatsoever.
    Any help on this would be much appreciated.

    After analyzing the loop (and the inner search_desktop_file function), I can tell that function is what's taking all the CPU time, also I can tell that only 3 iterations of the loop are run, one for each X, which have the values:
    $x_1 = Thunar.desktop /home/josep/.local/share/
    $x_2 = Thunar.desktop /usr/local/share/
    $x_3 = /usr/share/
    I can tell the first two searches take close to no time, and actually, the binary /usr/bin/thunar, which is located in the third iteration, doesn't take much time either, so surprisingly what's eating most of CPU resources is this part of the script:
    command="$(get_key "${file}" "Exec" | first_word)"
    command_exec=`which $command 2>/dev/null`
    arguments="$(get_key "${file}" "Exec" | last_word)"
    arg_one="`echo "$arg" | sed 's/[&*\\]/\\\\&/g'`"
    icon="$(get_key "${file}" "Icon")"
    if [ "${icon}" != "" ]
    then
    icon="--icon '${icon}'"
    else
    icon="''"
    fi
    # FIXME: Actually LC_MESSAGES should be used as described in
    # http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s04.html
    localised_name="'$(get_key "${file}" "Name")'"
    arguments_exec="$(echo "$arguments" | sed -e 's*%[fFuU]*"'"$arg_one"'"*g' \
    -e 's*%i*'"$icon"'*g' \
    -e 's*%c*'"$localised_name"'*g')"
    The first two variables command and command_exec are set to "thunar" and "/usr/bin/thunar", and this happens relatively fast (although it takes some time to find it, it's not even a 10% of the total time).
    EDIT: I think all signs lead to the disk read taking too long (for example the get_key function which reads the .desktop file looking for the asked key, takes too much), but this is weird, as I had never encountered this issue in other linux distributions, everything has ran always smooth and fine, despite not having a good machine.
    EDIT2: After finally tracking down the issue, I've found this loop: (inside the get_key function)
    while read line
    do
    echo "readline" 1>&2
    case "$line" in
    "[Desktop Entry]")
    desktop_entry="y"
    # Reset match flag for other groups
    desktop_entry=""
    # Only match Desktop Entry group
    if [ -n "${desktop_entry}" ]
    then
    echo "${line}" | grep -E "^${key}=" | cut -d= -f 2-
    fi
    esac
    done < "${file}"
    More than 90% of CPU time is spent in this function, but I can't see why. Parsing a .desktop file is not a difficult task by any means and even if this was reading the file every time, everything would be cached in the ram anyway, as modern OSs use paging for that matter (and by modern I mean not modern at all) and I'm well aware that linux does).
    So TL;DR I don't understand how can the simple task of parsing a .desktop file take more time than opening google chrome or gimp. Any help on that?
    Last edited by setzer22 (2014-07-27 19:07:43)

  • [SOLVED] Chromium not calling xdg-open

    Hi,
    I have been trying to get Chromium to call external applications based on their name and/or mime type. My desktop is XFCE.
    I have read about setting up the xdg-utils, and believe I have it configured. The following command line when run from bash opens up acroread and displays the PDF:
    xdg-open http://cran.r-project.org/doc/manuals/R-intro.pdf
    My ~/.local/share/applications/defaults.list file is:
    application/pdf=acroread.desktop;
    But when I click on the link in chromium I get the "Save File" dialog.
    As a test, I edited the /usr/bin/xdg-open shell script, and made it write to a file in /tmp when ever it is called. (The second line where I send the date to the /tmp/xdg-open.log file.)
    #!/bin/sh
    /usr/bin/date >> /tmp/xdg-open.log
    # xdg-open
    # Utility script to open a URL in the registered default application.
    # Refer to the usage() function below for usage.
    # Copyright 2009-2010, Fathi Boudra <[email protected]>
    When I try and download a PDF in chromium, it never adds to the /tmp/xdm-open.log file. (But does if I call it from the command line as I did above.)
    So to me, it looks like chromium isn't even calling the xdg-open script.
    Any one have any ideas?
    Thanks in advance.
    Last edited by landzend (2012-11-16 10:54:29)

    hiciu wrote:
    Hello,
    For me, chromium is not using xdg-open. You can verify it with:
    strace -e process chromium
    Then download something and try to open it from chromium. As for solution, try this: install perl-file-mimeinfo package and setup it with 'mimeopen --ask-default some-pdf-file.pdf'.
    landzend wrote:
    I have read about setting up the xdg-utils, and believe I have it configured. The following command line when run from bash opens up acroread and displays the PDF:
    xdg-open http://cran.r-project.org/doc/manuals/R-intro.pdf
    This is separate issue, it should run browser (http:// protocol), not acroread. Check this link: http://hiciu.org/some-pdf-file.pdf (harmless). All you know before you open it is the url, not the file type.
    Thanks. I already had the "perl-file-mimeinfo" installed.
    Yes. The link you gave above is type "image/jpeg", so the browser has to start the download to even know what it has coming.

  • Xdg-open and i3wm

    Has anyone had any luck with trying to get xdg-open to work with magnet links in Chromium? My hopeful end result would be to have magnet links open in rtorrent (command line utility), but my current workaround is to use a Chrome plugin that turns magnet links into .torrent files.
    I'm also having issues with other URL scheme handlers such as irc:// and opening PDFs from within Chromium.
    I am running 3.6.11-1 ARCH #1, 64-bit machine, on a laptop.
    Thank you!

    anonymous_user wrote:However since it is a terminal application, I don't know how well it would work (if at all).
    It should.  I beleive there is even an option in desktop files to open in a terminal, but I've never relied on that.  I just build it into the exec line.  For example, to open a file in vim in urxvt I'd just have
    Exec=urxvt -c vim %s
    or something like that.

  • Xdg-open is indecisive and causes applications to not respond!

    For some reason, xdg-open will not respond usually when only called once on a file. Repeating the command rapidly however will work eventually (!?)
    $ touch foo.txt
    $ xdg-open foo.txt
    $ xdg-open foo.txt
    $ xdg-open foo.txt # after rapid [up-key]+[enter]s, this will work, for example
    $ xdg-mime query filetype foo.txt
    text/plain
    $ xdg-mime query default text/plain
    org.gnome.gedit.desktop
    It looks like everything should work fine, from the examples given above, but the problem is there. As a result, I have to repeat the command rapidly in the command line to work, and in Chromium I have to keep on clicking "open in folder" to get Nautilus to launch
    I remember when the problem started - it was when I installed libreoffice, and for whatever not-so-smart reason, it sets itself as the default app for text/plain, and application/javascript, in my limited usage. So I used:
    $ xdg-mime default gedit.desktop text/plain
    $ xdg-mime default gedit.desktop application/javascript
    ... to try and solve the issue, however I faced the same symptoms I am facing now, and even after removing .local/applications/*, I'm still experiencing the same problems
    I'm in desperate need of some help, and would appreciate anyone who has insight on this

    I've had this bug ever since GNOME 3.14 came in to Arch but have never found anybody else reporting it so I thought it was something specific to my configuration. Glad to see some others have it!
    If you run xdg-open once then it does start nautilus but nautilus does not open the window, e.g. "xdg-open .". Nautilus will stay running for about 1 min and it you run xdg-open again within that time it will work and open the window. As soon as Nautilus stops (or after you stop it with nautlius -q), then the next invocation of xdg-open will not work.
    PS later edit: I should point out that, consistent with my description of the problem above, if you use Nautilus to manage your desktop (i.e. set "Icons on Desktop" in GNOME Tweak Tool) then you won't see this bug because Nautilus is always running.
    Last edited by bulletmark (2014-12-22 05:34:16)

  • [SOLVED] xdg-open: no method available for opening

    I'm using Openbox. Whenever I try to use xdg-open to open a file or link from the command line, I get the error "xdg-open: no method available for opening". This happens with all files and links, regardless of type. I've tried editing ~/.local/share/applications/mimeapps.list, both manually and with xdg-mime; neither had any effect. I've also tried setting environment variables such as $BROWSER; that had no effect, either.
    Strangely, exo-open works with no problem (although the only way I've found to change file associations is by using Thunar). I would just switch to exo-open, except I've encountered a couple of programs that rely on xdg-open for opening web links and the like.
    Has anyone else seen this problem? At this point, I'm pretty confused, and I would appreciate any help. Thanks!
    Last edited by morganmay (2013-11-19 16:31:08)

    Was poking around with this again. I still haven't solved the problem, but I did notice an error that might be a clue. When I enter "xdg-settings get default-url-scheme-handler", I get the error "xdg-settings: unknown desktop environment". I don't have a DE installed, just openbox (although as far as I can tell, XDG doesn't require a DE).
    Does anyone know what this means? Searches for this error have only led me to threads recommending solutions that I've already tried without success (editing mimeapps.list, setting environment variables like BROWSER, etc.).

  • Xdg-open is opening files with no extension in wine notepad

    xdg-open is opening files with no extension in wine notepad. This is really annoying. How can I change it?

    Click on "Browse" button at the "Open With" dialog and navigate to the location, where acrord32.exe is located. Preferebly, it should be this location "C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe" unless you have installed at some customized location.  I'm assuming you have installed Reader 9. Once you add Adobe Reader in the open with list, it would continue to appear next time onwards.

  • [solved] xdg-open url.jpg opens it in firefox

    Hello,
    I'm working on xfce. While clicking in psi IM to a http://....image.jpg link, the image gets opened in a new card of Firefox. Firefox is my default browser. In terminal
    xdg-open http://upload.koci.net.pl/uploads/crusader.jpg
    does the same. I wish this image to be opened in my image viewer, not in Firefox. In xfce's MIME type configuration I can see image image/jpeg is set to Ristretto.
    Last edited by mkkot (2013-06-11 15:29:41)

    Creating your own script could work.  But my best recommendation would be to use one of the ready made replacements for xdg-open.  I've never used it enough to have a real opinion on it, but you're not the first to be unsatisfied with xdg-open - and when archers are unsatisfied, they write solutions.
    There is a relatively recently active thread one one archers solution to this problem ... was it mimi or mimi-open, something like that.  I've never had a need for such a tool, but it seems to have been warmly received by other users, so it may do what you want.

  • Xdg-open for irc links in chromium

    Hey!
    I know that the first thing to do is search before bothering other people and I did it a lot. Google, posts, how-to`s, wikis... I see my last chance in asking this community
    So here is my problem:
    I use chromium as default browser and konversation for irc on lxde desktop. chromium uses xdg-open to associate files and links with programs. I tried everything I found but couldn`t get it to work. When I click on an IRC link, it asks me for opening the associated program, I confirm with yes and nothing happens. When trying to open an irc link from the terminal I get
    xdg-open: no method available for opening 'irc://...'
    I got it to work with mimeo, so please no suggestions in this direction, I would like to learn how to do it without it and so to learn it distribution independently.
    For anyone looking for it, this is the working mimeo solution
    $ yaourt -Sy mimeo xdg-utils-mimeo mime-type
    $ nano /home/tom/.config/mimeo.conf
    /usr/bin/konversation
      ^irc://
    # there have to be exactly two spaces in front of ^irc://
    This is the working solution in gnome using gconf:
    $ gconftool-2 --set --type=string /desktop/gnome/url-handlers/irc/command 'konversation "%s"
    $ gconftool-2 --set --type=bool /desktop/gnome/url-handlers/irc/enabled true
    $ gconftool-2 --set --type=bool /desktop/gnome/url-handlers/irc/need-terminal false
    This is what I tried in lxde:
    $ yaourt -Sy mime-type xdg-utils
    $ xdg-mime default konversation.desktop application/irc
    $ xdg-mime default konversation.desktop x-scheme-handler/irc
    $ xdg-mime default konversation.desktop application/x-xdg-protocol-irc
    $ nano /usr/share/applications/kde4/konversation.desktop
    MimeType=application/irc;x-scheme-handler/irc;x-xdg-protocol-irc
    $ nano /usr/share/mime/packages/irc.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
    <mime-type type="application/irc">
    <comment>irc url</comment>
    <magic priority="50">
    <match value="%irc://-" type="string" offset="0"/>
    </magic>
    <alias type="application/irc"/>
    </mime-type>
    </mime-info>
    $ update-mime-database /usr/share/mime/
    I appreciate every suggestion. I`ll be on the road for two days and will try your suggestions on the weekend and will give feedback.
    Please explain as understandable as possible, at best with all commands and paths to the files - this is the newbie corner, right?
    Thanks in advance
    Tom
    Last edited by archtom (2011-06-15 19:44:57)

    really noone? Would be so glad if anyone could help!
    Last edited by archtom (2011-06-20 20:21:06)

  • Xdg-open strange behaviour

    When I have no defaults.list and mimeapps.list, xdg-open opens text/plain with gvim. But when I create defaults.list in /usr/share/applications/ and add the following lines :
    [Default Applications]
    text/plain=emacs.desktop
    it opens text files with firefox.
    However, if I move /usr/share/applications/defaults.list to ~/.local/share/applications/mimeapps.list, it opens text files with emacs as expected.
    What is happening with xdg-open?

    Thanks for this quick reply. Yes, the $ is present in the real path and yes, mapping seems to work. If it is this easy, why doesn't the default file>open work, this looks like a bug? It is not that userfriendly if every user (hundreds) should map there own drive letter to get this to work.

  • [solved] Xdg-open to open everything with file manager

    I like to screw around with my system constantly and xdg-utils is an annoying utility to have to constantly fiddle with. I know there is a way to get xdg-open to open everything with the default file manager, but my google fu has failed me. As of right now I use pcmanfm, and I'm fairly certain I'm sticking with it for the long haul.
    Last edited by shamanstk (2010-05-11 17:57:15)

    Mr.Elendig wrote:perl-file-mimeinfo installed?
    This helped with a xdg-open anomaly. Before installing perl-file-* packages, pcmanfm used to open everything in firefox (which is set as default browser in xdg-open). Thought could be helpful to anyone having problems with applications using xdg-open.
    Last edited by shemz (2010-08-03 15:02:52)

  • Whippet (formerly Ease): application launcher and xdg-open replacement

    Whippet is a Bash script which opens files and urls with applications associated by name and/or MIME-type. Applications and associations may be customized within an SQLite database, and can be weighted according to the importance you assign to them. Whippet can serve as an xdg-open replacement for those who wish to have total control over which applications are associated with which types of files. For more experienced users only, but ideal for integrating with light desktop environments and file managers. Whippet uses dmenu to manage its menus, and you will also need a program such as DB Browser for SQLite for managing the SQLite database. Once installed from the AUR package, execute the command 'man whippet' for more information.
    Edit on 2015-06-23: Updated for Whippet 2.1.2.
    Edit on 2015-03-15: Rebranded as Whippet; was formerly Ease.
    Last edited by ninian (Today 14:24:22)

    Version 1.2.0 has been released, with the following new features:
    Can now optionally associate applications by matching regexes to file/URI names in the configuration file.
    New option -n and configuration variable $assocname control the usage of associations by file/URI name.
    Also:
    Fixed a bug causing a loop in the fallback menu when an alternative configuration directory is specified.

  • Linopen - Yet another xdg-open replacement

    Inspired by Taylorchu's mimi, I decided to make xdg-open replacement written in bash that has somewhat flexible configuration.
    You can match either, extensions, mime types, mime groups, or regular expressions of the filename.
    You can also specify applications that you wish to open in terminal, and linopen knows when the process should be opened in new terminal or in your current open terminal.
    Example configuration
    # linopen configuration
    # enviroiment variables can be used
    # Specify your terminal emulator here
    # for terminal support.
    terminal=xterm
    # Specify all programs you want to
    # open in terminal like this:
    interm=vim
    # There are 4 ways to match filetypes.
    # The following examples are in the order
    # which linopen chooses the program as well.
    # 1. File extension
    # .png:sxiv
    # .mp4:mplayer
    # .txt:vim
    # 2. Mime type
    # image/png:sxiv
    # video/mp4:mplayer
    # text/plain:vim
    # 3. Mime category
    image:sxiv
    video:mplayer
    audio:mplayer->interm # you can also specify the interm rule explictly after '->'
    text:vim
    # 4. Regexp
    # Match some protocols by default
    ?'^http:\/\/':$BROWSER
    ?'^https:\/\/':$BROWSER
    ?'^www.':$BROWSER
    # Directory rule for directories
    # ideally you want to use file manager
    # here if you are a GUI user.
    directory:echo
    # Default rule just echoes back whatever
    # was feed. If you are using DE you could
    # just map a file manager here and it would
    # integrate with your system.
    default:echo
    PKGBUILD here
    Refer to the configuration file for more detailed how-to.
    There is also 'open' symlink to xdg-open to emulate Mac Os X behaviour.
    Last edited by Cloudef (2012-07-17 16:08:41)

    In this case it would be better to change the PKGBUILD to this
    # Maintainer: Cloudef <[email protected]>
    # Intelligent and suckless replacement for xdg-open
    pkgname=linopen
    pkgver=1.0
    pkgrel=1
    pkgdesc='Intelligent and suckless replacement for xdg-open'
    arch=('any')
    url='http://cloudef.eu'
    license=('WTFPL')
    provides=('xdg-utils')
    conflicts=('xdg-utils')
    backup=('etc/linopen.conf')
    source=('xdg-open' 'linopen.conf')
    package() {
    cd "$srcdir"
    mkdir -p "${pkgdir}/usr/bin"
    mkdir -p "${pkgdir}/etc"
    ln -s "/usr/bin/xdg-open" "$pkgdir/usr/bin/open"
    install -m755 xdg-open "${pkgdir}/usr/bin/"
    install -m755 linopen.conf "${pkgdir}/etc/"
    md5sums=('f5487fc4c305a20124da7bb164e6b04d'
    '2c9078f3ee82d619dc150bb44837d9e8')
    or (imho nicer) with this package function
    package() {
    install -Dm755 "$srcdir/xdg-open" "${pkgdir}/usr/bin/xdg-open"
    install -Dm755 "$srcdir/linopen.conf" "${pkgdir}/etc/linopen.conf"
    ln -s "/usr/bin/xdg-open" "$pkgdir/usr/bin/open"
    Last edited by Army (2012-07-03 16:04:13)

  • Fixing xdg-open

    Hi all fellow archers!
    For quite some time, those of us running without a desktop environment have been struggling to cope with xdg-open for handling file opens (especially for Chromium).
    Although xdg-open has gotten a bit better over time (it now falls back to mimeopen if it doesn't know what to do).
    Unfortunately, this solution is not a "proper" one since mimeopen currently does not work with URIs, only with files.
    To get around this, I have made two minor adjustments to my system to make it handle even URIs gracefully.
    The first is a hack, the second a (small) patch to xdg-open:
    The hack:
    ln -s /usr/share/applications/mimeinfo.cache to /usr/share/applications/defaults.list
    this will make all applications that register MIME types using MimeType= in their .desktop files the default for their respective MIMEs.
    This is required since xdg-mime does not check mimeinfo.cache when looking up applications for mime types, only defaults.list files.
    If multiple applications happen to register for the same MIME type, I'm not sure which is chosen as the default, but this should be overridden in ~/.local/share/applications/defaults.list anyway.
    The second part, the patch, can be viewed here: http://pastebin.com/EduF8GjC
    For those not used to merging patches like this, download the raw .patch file from here: http://pastebin.com/download.php?i=EduF8GjC , and then run
    sudo patch /usr/bin/xdg-open <xdg-open_uri_patch.txt
    Note that you shouldn't normally just do what strangers like me tell you to, so have a look through the .patch file before patching /usr/bin/xdg-open to make sure I haven't done something naughty.
    There are also unreleased patches for this upstream here and here if you'd prefer using those, but they may not patch nicely against the current Arch version.
    Essentially, whenever a URI is being opened with the internal, generic opener, xdg-mime is queried for the default application for "x-scheme-handler/$scheme" where $scheme is the scheme part of the URI.
    That application is then started with the full URI the path to open.
    Now sit back and enjoy Chromium opening all your files correctly, even magnet:, mailto: and spotify: links (if you've got a client for each installed of course).
    Jon
    PS: The patch has also been submitted to the Portland/XdgUtils team as bug #44873
    EDIT: Turns out this has already been patched after a similar bugreport, just not released, in these commits. The patch is still needed until a release with these changes comes though. Feel free to use the upstream patches instead if you want.
    Last edited by Jonhoo (2012-01-17 22:49:21)

    I tried to find out what was going on using strace. Here is the output:
    strace -f /usr/bin/gvfs-open file.pdf 2>&1 | grep exec
    execve("/usr/lib/xfce4/exo-1/exo-helper-1",
    Why is gvfs-open resorting to xfce's opener while I am running gnome???
    A bit earlier in the trace, gvfs loads /usr/lib/gio/modules/libexo-module-1.so which is certainly the culprit.
    My question is then: how do I make gvfs-open use gnome's facilites?
    --- edit ---
    Looks like my problem:
    https://qa.mandriva.com/show_bug.cgi?id=62203
    --- edit 2 ---
    Some more info:
    http://penguincopter.blogspot.com/2010/ … ty-of.html
    Last edited by benob (2011-02-21 18:38:56)

Maybe you are looking for

  • Creation of New Acct. Determination Transaction keys in OBYC

    Hi All How do I create new Acct determination keys in OBYC . i.e. just like FR1,FR2 etc so that I can do my own asignments in pricing procedure and other accurals? I  guess it has to start with Z.. Thanks Samuel

  • External HDD won't mount at boot. [Solved]

    Edit: I've noticed that this is an issue regarding my NTFS partition being on an external drive. Please check post #8 by me to get further details. Hello guys, I'm having some problems getting my external NTFS HDD to mount automatically at boot. I ha

  • Moving Bookmarks from one Mac to another

    I have a version of Safari on one of my other Macs that has all my bookmarks. How do I move those to a new one? I guess my question is really WHAT do I move to transfer bookmarks from one computer to another in Safari? Thanks.

  • Property Name not generated correctly

    Hi, I use Netbeans 5.5 with VWP and MySQL. The Database-Setup is working. When I Drag and Drop a table on the ApplicationBean the RowSet and DataProvider are generated. But the names used in Code are different to the names used in declaration. Regard

  • What is causing FF6.02 to have VERY slow and incomplete page loads

    Every since I've upgraded to FF 5 [now running 6.02] on Win7, the browser loads extremely slowly on ALL pages and often [most of the time] just hangs and doesn't display all images. I can start Chrome, copy and paste the URL and have the full page co