junest icon indicating copy to clipboard operation
junest copied to clipboard

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

Open All3xJ opened this issue 3 years ago • 7 comments

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

All3xJ avatar Apr 10 '21 20:04 All3xJ

You can create a .desktop file of the program you want to use. I can give an example in an hour. (I just woke up ;-))

PrivacyDragon avatar Apr 11 '21 06:04 PrivacyDragon

  • 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

PrivacyDragon avatar Apr 11 '21 08:04 PrivacyDragon

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

All3xJ avatar Apr 11 '21 20:04 All3xJ

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.

bayazidbh avatar Jan 16 '22 08:01 bayazidbh

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 avatar Jan 17 '22 10:01 fsquillace

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.

fsquillace avatar Jan 17 '22 10:01 fsquillace

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

clemencyworld1 avatar Mar 28 '22 16:03 clemencyworld1