Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugins/filebrowser] Change external open default to xdg-open #3815

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ntrel
Copy link
Member

@ntrel ntrel commented Apr 5, 2024

No description provided.

@ntrel ntrel changed the title [filebrowser] Change external open default to xdg-open [plugins/filebrowser] Change external open default to xdg-open Apr 5, 2024
@elextr
Copy link
Member

elextr commented Apr 5, 2024

The existing command "nautilus" is a Gnome file manager, so its not likely to be available on non-gnome distros, so "xdg-open" is likely to be more portable, but is it doing the same thing?

The (expletive deleted useless) nautilus man page doesn't say what it does when run with a file path, does it open that file or open the file manager at the path with the file selected1? In other words does xdg-open do the same thing?

Does it matter since "nautilus" won't work for lots of people anyway but xdg-open probably will?

Footnotes

  1. no I can't try nautilus, it isn't installed on my non-Gnome desktop and the file manager here when run with a file opens itself with the file selected, it does not open the file.

@ntrel
Copy link
Member Author

ntrel commented Apr 5, 2024

The default contains the %d wildcard, which is replaced by the directory. This man page says "Open the current directory in the default file explorer: xdg-open .", which implies you can give it a directory and it will open a file explorer program. It works on my Linux Mint anyway. (I did the cinnamon install and I don't have nautilus).

does it open that file or open the file manager at the path with the file selected1? In other words does xdg-open do the same thing?

xdg-open with a file (i.e. if the user changes %d to %f), opens the associated program for that file, it doesn't open the file manager. If the user wanted the file manager to select the file, they should change it to e.g. nemo %f, which works on my system.

@ntrel
Copy link
Member Author

ntrel commented Apr 14, 2024

OK to merge?

@elextr
Copy link
Member

elextr commented Apr 14, 2024

(I did the cinnamon install and I don't have nautilus).

Welcome to the light ;-)

As the default xdg-open %d opens a file manager then thats safe, it won't open some random software on the users system. If they change the setting they are responsible for the consequences.

So my opinion is that xdg-open looks to be a better more portable (among Linuxes) alternative to nautilus and its ok to merge, although give the weekend at least for others (with non LM distros) to look at it.

@eht16
Copy link
Member

eht16 commented Apr 14, 2024

I think this is OK even if when called for a file the file will be opened and not the file manager. Since the whole command can be configured and by the same default %d is used, the behavior should not be changed, just the default will work probably for more users.

Edit: forgot to say, tested on Xfce with Thunar and it works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants