Xdg-open

Problem:
Can't locate URI/Escape.pm in @INC (@INC contains: /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /usr/lib/xfce4/exo-1/exo-compose-mail-1 line 24.
BEGIN failed--compilation aborted at /usr/lib/xfce4/exo-1/exo-compose-mail-1 line 24.
(exo-helper-1:2540): Gtk-WARNING **: Im Modulpfad »clearlooks« konnte keine Themen-Engine gefunden werden,
Solution: (as root)
# perl -MCPAN -e shell
(hit enter several times)
cpan[1]> install URI::Escape
cpan[1]> quit
See http://www.question-defense.com/2010/01 … -pm-in-inc
Is that a bug?

Yes, i tried adding mime types manually
Defaults:
[Added Associations]
application/vnd.ms-excel=userapp-soffice-VYSFLV.desktop;userapp-thunderbird-GOB0KV.desktop;
application/x-shockwave-flash=userapp-firefox-8S50LV.desktop;userapp-chromium-CI92KV.desktop;
application/octet-stream=vlc.desktop;userapp-gedit-0IS4KV.desktop;
application/x-ms-dos-executable=wine.desktop;
image/png=eog.desktop;
image/jpeg=eog.desktop;
application/x-cd-image=vlc.desktop;
text/html=chromium.desktop;userapp-firefox-J8M9KV.desktop;
text/x-csrc=userapp-gedit-CVMNLV.desktop;
text/x-readme=gedit.desktop;
application/x-java-archive=userapp-java-YCOYLV.desktop;
text/plain=gedit.desktop;
application/x-shellscript=userapp-gedit-P1C7LV.desktop;
application/vnd.oasis.opendocument.text=userapp-soffice-11P6MV.desktop;evince.desktop;
application/x-executable=userapp-gedit-K2DCNV.desktop;
video/x-matroska=vlc.desktop;
image/gif=eog.desktop;
x-content/video-dvd=vlc.desktop;
x-content/audio-cdda=vlc.desktop;
x-content/audio-player=vlc.desktop;
application/x-sqlite3=startcenter.desktop;userapp-gedit-P1C7LV.desktop;
x-scheme-handler/file=exo-file-manager.desktop
x-scheme-handler/trash=exo-file-manager.desktop
video/x-msvideo=vlc.desktop;
application/x-ole-storage=wine-extension-ini.desktop;userapp-gedit-CVMNLV.desktop;
application/x-wine-extension-ini=userapp-gedit-1FMBRV.desktop;
text/x-python=userapp-python2-J62BRV.desktop;
I dont think it is using this file though. I tried renaming it, and still uses soffice. I logged onto another account, it asked me what to use to open a file, i chose evince, and now it uses evince for everything.
EDIT: I don't think it is even using XDG-Open. I removed it from /usr/bin, and still the same thing.
EDIT EDIT: It is using gnome-open
Last edited by rp181 (2011-03-02 18:51:32)

Similar Messages

  • [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 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)

  • 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] 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.

  • [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)

  • Xdg-open Fix

    This is for any frustrated by Google Chrome using random applications to open its downloads.
    Google Chrome uses xdg-open to open its downloads. Since I don't use Gnome or KDE, the DE environment variable is unset. If the DE environment variable is unset or set to "generic", xdg-open uses the open_generic_xdg_mime() function to choose the application to open files. This function incorrectly determines the location of the .desktop file. It will come up with something like
    /usr/share/applications//usr/share/applications/mplayer.desktop
    instead of
    /usr/share/applications/mplayer.desktop.
    To fix this I added
    default=`echo $default | sed "s|[^\w]*/||"`
    below the line (line number 384)
    default=`xdg-mime query default "$filetype"`.
    Setting the default application with xdg-mime default [.desktop file] [mime-type] populates the $HOME/.local/share/applications/defaults.list file. With the fix, xdg-open now correctly uses this file and open applications as expected.

    By the way OP. If you are using pcmanfm: here is handy replacement for /usr/bin/xdg-open  - http://dumpz.org/15027/
    It handles http(s), mail and magnet links, and on all other lets pcmanfm deside

  • How to tell firefox to always use xdg-open?

    Firefox has always been a pain when it comes to file associations. It's very annoying to specify which program I want to open a specific file type everytime - especially when I have to find the program in /usr/bin every time. Is there any way to make firefox use xdg-open or exo-open for ANY file type?

    By modifying the source code? Should be easy to do. Or maybe there is a patch for this somewhere (but I haven't found one when I was looking for it).

  • Can't open links through applications - xdg-open default browser?

    Trying to open a link through an application such as Pidgin gives me the following error:
    /usr/bin/xdg-open: line 478: firefox: command not found
    /usr/bin/xdg-open: line 478: mozilla: command not found
    /usr/bin/xdg-open: line 478: epiphany: command not found
    /usr/bin/xdg-open: line 478: konqueror: command not found
    /usr/bin/xdg-open: line 478: chromium-browser: command not found
    /usr/bin/xdg-open: line 478: google-chrome: command not found
    /usr/bin/xdg-open: line 478: links2: command not found
    /usr/bin/xdg-open: line 478: links: command not found
    ...and then shows me the following in the terminal: http://gyazo.com/aa5232a846762f42edc95994f8a2a15c
    It doesn't even try to open it with Aurora which is what I have set as my default browser in Xfce settings.
    xdg-open http://www.google.com produces the same effect.
    This only happens since I did a fresh Arch install a few days ago.

    There are so many wonderful tools in the *nix community, xdg-open is really not one of them (IMO).  It is drastically overly complex - it's just a really convoluted shell script, open it up in an editor sometime.  This complexity leads to countless situations in which it will produce undesireable behavior.  I may be the least "unix-like" tool on my computer ... or at least it was until I removed it and replaced it with a much simpler version.
    Admittedly this is the jumping-ship option.  Or really jumping-ship while tossing a molatov cocktail back to watch the whole ship burn ... but it works.  The skeleton of my replacement script can be found here.  Customize it to your tastes once, then plop it in xdg-open's place and your set.  Just keep a copy around to re-replace xdg-open if/when it gets updated by pacman.

  • Xdg-open / xdg-utils: a security hazard?

    I just noticed these programs after doing an update on my laptop. In particular, web browsers started suggesting I open things with "xdg-open" -- I'm suspicious of anything that "auto-decides" what program to run in order to open something. This is one of the main reasons I got away from Windows -- I open things by either:
    - Starting the program first, then using whatever load/open command it has or dragging a file onto it.
    or
    - Explicitly opening a file with a specific program, either by "programname filename" from the terminal, or by right-click menu in a graphical file manager.
    I've gone to great lengths to cripple most of the desktop MIME functionality that comes with KDE apps, because of its insistence on associating .exe files with WINE (look -- now you can accidentally run something by double-clicking it!).
    How long before we start seeing malware that works because of xdg-open, xdg-email, an so on? Hopefully no one ever helpfully adds extensions like ".sh" to xdg-open... ("oh, it looks like you just downloaded / someone just e-mailed you a shell script. Would you like me to open it for you? Look, I'll save you the trouble of chmod +x ing it...")
    Am I just being overly paranoid?
    ~Felix.

    ngoonee wrote:
    thetrivialstuff wrote:Am I just being overly paranoid?
    Yes you are, modifying xdg-open behaviour would require access to your machine (network or physical) which means you're screwed anyway. The more serious problem is *.desktop files, I saw a blog on that a while back.
    I think the .desktop files is the problem I'm after -- I'm not assuming that a machine will be compromised by an attacker modifying xdg's behaviour; I'm assuming that some well-intentioned package maintainer will have opened up a security hole by associating some file type that shouldn't have an association (e.g. .exe's opening with WINE makes it possible to run arbitrary code if you can get the user to double-click it, or just accidentally bump "open" instead of "save" in Firefox).
    Likewise, poor defaults in web browser packages' "out of the box" configuration could set filetypes to have a default of "open" instead of "save", and then you have to pray that whoever packaged the mime defaults for that file type picked a sane default association. (For example, I've seen browser packages configured to auto-view PDF files if there's a suitable viewer on the system. Not a good idea if the PDF viewer in question supports JavaScript in PDF's.)
    ~Felix.

Maybe you are looking for

  • Itunes 8 & Windows 7 Beta

    Has anybody had a chance to try itunes 8 on Windows 7? Would welcome any feedback on performance and issues before trying the public beta on Friday. Yes I will be backing up all my files before entering the unknown, and I know itunes is only supporte

  • Make http header available webservice layer

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2900.2627" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY> <DIV align=justify

  • Itunes playback skips

    I have 3.7g quad core pc with 8gb of ram unning windows 8.1. When I playback songs using itunes, I have the latest 64 bit version for windows, there is noticeable and frequent skips in playback. When I play the same songs in windows media player, und

  • Mac Pro (early 2008) cannot startup

    Today, I shut down my Mac Pro (early 2008) for about two hours and now it just refuses to startup. This is the symptom: Power-on LED illuminates when power button is pressed and fans spin continuously but there is no boot tone or video Apple Service

  • System acting wonky - unable to deauthenticate

    Hey all, Happy Holidays! I've been having some "weird" issues for the past couple of days. It started off with not being able to repair permissions on the machine unless I booted from the startup disk. Now, I've noticed that I'm unable to run Cocktai