UM 17.04: launching Caja in the terminal - error: "Could not display .. The location is a not a folder"

I've recently installed UM 17.04, and i'm unable to launch caja to open files in the terminal window. for example, in the terminal:

> caja somerandom.pdf

I used to run UM 16.04 LTS, and I used to be able to open all sorts of different files automatically from the terminal by using the caja command but instead now I get a pop error message saying:

'Could not display "/home/someone/somerandom.pdf"
The location is not a folder.'

Is this feature disabled in 17.04? Or is there a setting that I can check to make this work again?

I've never done it that way but as an alternative would "xdg-open" work?

> xdg-open somerandom.pdf

2 Likes

xdg-open is the correct way to do that kind of things.

2 Likes

Yes, this works the way I want. Thank you!

I don't know, in 16.04 LTS I was able to use caja for this same thing. I can still do

> caja .

in 17.04 to open up caja in the current directory though.

1 Like

Well basicly this won't work since caja is a file browser and knows how to open only directories .
in order to open a file from terminal you have to specify the program and file in terminal like so

atril somerandom.pdf

or use xdg-open to open the prefered application like @Meticulus said .

this is clearification on how things work.