16

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
Byte Commander
  • 110,243
Efi
  • 161

2 Answers2

25

Install/reinstall the package xdg-utils:

sudo apt-get install --reinstall xdg-utils

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

A.B.
  • 92,125
0

My guess will be that whatever app.js, intend to open a url and your Ubuntu doesn't know what application to open it with. xdg-open gives the error because it doesnt know what software to use to open the url in the app.js.

Try to make sure you have a browser on the computer, or check the url to make sure that you have the correct software, else post the content of app.js.