Git Product home page Git Product logo

Comments (6)

Sheikah45 avatar Sheikah45 commented on August 24, 2024

On linux we use xdg-open for show files so if you don't have this it won't work. Do you have xdg-open in your distribution?

from downlords-faf-client.

cdglitch avatar cdglitch commented on August 24, 2024

I do indeed

@archbird:~$ xdg-open --version
xdg-open 1.1.3+

Edit: the zsh prompt gets butchered by github

from downlords-faf-client.

Sheikah45 avatar Sheikah45 commented on August 24, 2024

The code for linux is

//Might not work on all linux distros but let's give it a try
if (Files.isRegularFile(path)) {
  path = path.getParent();
}
ProcessBuilder builder = new ProcessBuilder("xdg-open", path.toAbsolutePath().toString());
builder.start();

Unfortunately I can't test it since I don't have a linux machine. So this will have to wait until some linux developer can replicate it.

from downlords-faf-client.

cdglitch avatar cdglitch commented on August 24, 2024

You can close this then, I know exactly what the bug is and its not yours.

from downlords-faf-client.

Sheikah45 avatar Sheikah45 commented on August 24, 2024

Could you comment here with what it is so others could find it later as well if it affects them.

from downlords-faf-client.

cdglitch avatar cdglitch commented on August 24, 2024

This is a braindead retarded bug that crops up from time to time when you update a python package which is able to open a directory. For some reason, some dev over there (possibly pip) has decided that one of sane the package update steps is to nuke your mimeapps.list and flood your .local/share/applications/ directory with .desktop files that advertise that package as default for the inode/directory type.

On Arch based distros this is shitemare to solve since if you do xdg-mime query default inode/directory it can still show the correct file manager but because the xdg-open priority list is now fucked it prefers the wrong thing.

2 shitty solutions all over the net:

  1. Dont use shitty python packages
  2. Have everyone migrate to gvfs-open because fuck most distros and users of non-gnome software.

Alternatively, have fun trying to find what python git/datavis/helper package has shipped these stupid .desktop files because this often cant be fixed by a simple

xdg-mime default org.gnome.Nautilus.desktop inode/directory

Edit: For when someone runs into this and xdg-open and xdg-mime arent happy;

XDG_UTILS_DEBUG_LEVEL=2 xdg-mime query default inode/directory

Will give you the list of files xdg-open is considering in what order, in my case,

 .local/share/applications/mimeinfo.cache

was the culprit

from downlords-faf-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.