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

How can I open the programs installed inside junest without the need of using the terminal? #263

Open
All3xJ opened this issue Apr 10, 2021 · 7 comments

Comments

@All3xJ
Copy link

All3xJ commented Apr 10, 2021

If I want to open a file with a program installed with junest, how can I do it in a easy and fast way?

@PrivacyDragon
Copy link

PrivacyDragon commented Apr 11, 2021 via email

@PrivacyDragon
Copy link

  • create a file called PROGRAMNAME.desktop in ~/.local/share/applications
  • Put this text in the file, where you replace the stuff in caps for that what you need.
[Desktop Entry]
Name=PROGRAM NAME
Comment=SOME DESCRIPTION, CAN BE THE SAME AS THE NAME
Exec=~/.local/share/junest/bin/junest -- PROGRAM
Terminal=False
Type=Application
Icon=PROGRAMNAME.png
Categories=CATEGORIES THE PROGRAM SHOULD BE LISTED IN.;
MimeType=MIMETYPE OF THE TYPE OF FILE YOU WANT TO OPEN WITH THE PROGRAM

For the Icon, you should go to ~/.junest/usr/share/icons/hicolor and there look where the icon of the program is and copy it to the same place of ~/.local/share/icons/hicolor

@All3xJ
Copy link
Author

All3xJ commented Apr 11, 2021

Thanks for answer!

You can create a .desktop file of the program you want to use.

Yeah I know, I was just looking for something automated instead of manually creating a .desktop file actually

@bayazidbh
Copy link

Maybe we can follow what Wine does with its generated StartMenu items, which is then mirrored in ~/.local/share/applications? Say, a command to do a detection of all items in ~/.junest/usr/share/applications and then automatically convert detected .desktop files into .desktop files useable by host OS placed inside ~/.local/share/applications/junest ?

I think it'll especially help as while many packages are inside ~/.junest/usr/bin there are a few created in ~/.junest/opt/ which doesn't seem to be picked up automatically by bin_wrappers but does create .desktop files inside ~/.junest/usr/share/applications.

@fsquillace
Copy link
Owner

Thanks for answer!

You can create a .desktop file of the program you want to use.

Yeah I know, I was just looking for something automated instead of manually creating a .desktop file actually

That's a great idea! It might be as simple as updating the XDG_DATA_DIRS variable like:

export XDG_DATA_DIRS=$XDG_DATA_DIRS:~/.junest/usr/share

I've never tested this though. This may only work if you update the PATH variable first with the bin wrappers: https://github.com/fsquillace/junest#run-junest-installed-programs-directly-from-host-os

We'd need to check whether the PATH update with bin_wrappers gets picked up by the desktop. For that I guess a restart is needed first.

If this work 🤞, I will update the documentation.

@fsquillace
Copy link
Owner

That's a great idea! It might be as simple as updating the XDG_DATA_DIRS variable like:

export XDG_DATA_DIRS=$XDG_DATA_DIRS:~/.junest/usr/share

Actually no, some .desktop files contains absolute path under Exec entry (like bssh), whereas others don't (like htop). So, it might be not that trivial.

@clemencyworld1
Copy link

in my case, absolute PATH is needed for the desktop file to work.

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

No branches or pull requests

5 participants