resources icon indicating copy to clipboard operation
resources copied to clipboard

More accurate detection of Python processes in the app list

Open gwuen opened this issue 6 months ago • 1 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Is your feature request related to a problem? Please describe.

Having only one desktop entry directly launch python (i.e., Exec=/usr/bin/python -m <module>) instead of using some wrapper script, Resources starts associating all python processes to this app.

Describe the solution you'd like

Resources already treats Flatpak processes specially, so I think having something similar for Python would be a desirable solution:

https://github.com/nokyan/resources/blob/c316514197c706c8a7112bb0ed668a2c10a650fb/src/utils/app.rs#L273-L284

Describe alternatives you've considered

I'm aware it would be best if all package maintainers provided wrapper scripts for their Python apps, but it's also not totally unreasonable to launch them directly as python modules, in my opinion. Also, in some cases, this is completely outside the user's control.

Additional context

I'm not labeling this a bug as I'm not sure whether directly launching python is considered good practice and I know Resources can't possibly handle every special case. Feel free to correct me.

gwuen avatar Jun 17 '25 12:06 gwuen

Hi, thanks for the issue. Stuff like "python" or "bash" being the actual programs being launched is a problem. I'm planning to move Resources to Mission Center's app detection at some point, I believe that that might fix it.

nokyan avatar Jun 27 '25 14:06 nokyan