Announcement

Collapse
No announcement yet.

[SOLVED] xdg-open has stopped working

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] xdg-open has stopped working

    This is kind of a strange issue. xdg-open is supposed to open any kind of file or directory in the desktop manager's default application for that kind of file, whatever the desktop manager might be. I'm using KDE, and this used to work perfectly.

    For a couple of weeks now (at the least) it has somehow stopped working. This is the output I get when trying to open a simple text file:
    Code:
    $ xdg-open /home/user/Desktop/text
    Warning: unknown mime-type for "/home/user/Desktop/text" -- using "application/octet-stream"
    Error: no "view" mailcap rules found for type "application/octet-stream"
    this is for an image:
    Code:
    $ xdg-open /home/user/Desktop/image.jpg 
    Error: no "view" mailcap rules found for type "image/jpeg"
    and this is for a directory:
    Code:
    $ xdg-open /home/user/Desktop/
    Warning: unknown mime-type for "/home/user/Desktop/" -- using "application/octet-stream"
    Error: no "view" mailcap rules found for type "application/octet-stream"
    Putting double quotes around the file's address makes no difference, and URLs still work fine.
    I've tried it with different kinds of files, in different directories, created by different programs.

    As far as I know, xdg-open simply calls the DM's specific command to open things, which in my case is kde-open. kde-open works fine, so it should be something "between" xdg-open and kde-open that causes the problem.

    Does anyone have any ideas?

    #2
    Re: xdg-open has stopped working

    See KGear --> Settings --> Systemsettings --> Advanced tab --> File Associations.

    Browse it a bit and you catch on about how to set mimes so the proper applications are called for a particular file type.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Re: xdg-open has stopped working

      Thanks for the reply, but everything there looks fine to me. Unless setting up mimes isn't as simple as picking which program I want to use for each file type.

      Comment


        #4
        Re: xdg-open has stopped working

        Try the fix shown in this bug report.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          Re: xdg-open has stopped working

          Thanks for the ideas!

          I looked at that thread, but since it was a per-user solution I did something simpler. I created an alias for xdg-open to kde-open.

          (Added the following line to .bashrc near the end)
          Code:
          alias xdg-open='kde-open'

          Comment


            #6
            Re: xdg-open has stopped working

            IF that solved your problem would you mark it [SOLVED] in the OP subject line?
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Re: xdg-open has stopped working

              It didn't work perfectly, so I also did this:
              Code:
              ln -s /usr/bin/kde-open ~/bin/xdg-open
              Adding [SOLVED] now.

              Comment

              Working...
              X