14

I'm new with Ubuntu, and I read in another thread that to open a file in the default editor (gedit for me), I need to run xdg-open, but for some reason, when I run the command xdg-open app.js I'm getting a bash: xdg-open: command not found notification. Why is it?

Following a request from a comment, the output of echo $PATH is :

/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/efiminzer/.local/bin:/home/efiminzer/bin
6
  • When you run 'xdg-open' does it throw the error?
    – Thomas Ward
    Dec 1, 2015 at 19:20
  • Yes, right after I run the command
    – Efi
    Dec 1, 2015 at 19:22
  • What's the exact error message? Copy/paste it into your question as an edit
    – Thomas Ward
    Dec 1, 2015 at 19:23
  • I've edited the exact error notification I've got
    – Efi
    Dec 1, 2015 at 19:25
  • Please add also the output of echo $PATH.
    – kos
    Dec 1, 2015 at 19:28

1 Answer 1

16

Install/reinstall the package xdg-utils:

sudo apt-get install --reinstall xdg-utils

/usr/bin/xdg-open is part of this package.

1
  • 5
    I've installed reinstalled the package and still the same error message
    – Efi
    Dec 1, 2015 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.