fsquillace / junest

The lightweight Arch Linux based distro that runs, without root privileges, on top of any other Linux distro.
GNU General Public License v3.0
2.08k stars 111 forks source link

bin wrappers missing junest installed executables that are symlinked in `.junest/usr/bin/` #297

Closed prijatelj closed 2 years ago

prijatelj commented 2 years ago

When trying to have all junest installed binaries from their packages be accessible to the host system, I discovered that some were not accessible within the path by adding ~/.junest/usr/bin_wrappers to my path (discord, zoom, and zotero), while others were (neofetch, rclone, gimp, krita, inkscape). I found that for certain binaries installed using junest result in a symlink to their installed exutable within .junest/usr/bin/ and that .junest/usr/bin_wrappers is missing entries for those executable binaries.

Reproduction Steps:

  1. Fresh install junest as stated in README: 1.1. git clone junest 1.2. export junest into path 1.3. run junest setup. 1.4. export ~/.junest/usr/bin_wrappers to end of path. 1.5 (optional) confirm a typical junest installed package is executable, such as neofetch, rclone, gimp, krita, or inkscape.
  2. Install a package that results in a different executable filepath than /usr/bin, with resulting symlinks in .junest/usr/bin such as /opt/app_name, usr/lib/app_name

Example of packages with atypical executable locations:

$ ls -lh .junest/usr/bin/discord 
lrwxrwxrwx 1 prijatelj prijatelj 20 Jun  9 02:39 .junest/usr/bin/discord -> /opt/discord/Discord
$ ls -lh .junest/usr/bin/zoom
lrwxrwxrwx 1 prijatelj prijatelj 22 Jul 26 12:26 .junest/usr/bin/zoom -> /opt/zoom/ZoomLauncher
$ ls -lh .junest/usr/bin/zotero
lrwxrwxrwx 1 prijatelj prijatelj 22 Jul 26 11:57 .junest/usr/bin/zotero -> /usr/lib/zotero/zotero
  1. Confirm it runs within junest using junest app_exec such as junest zotero.

  2. Attempt to execute such an atypically located executable from a package, or check which app_exec, such as discord or which discord in the terminal.

Expected behavior:

The junest installed packages' executables would execute on the host as they would if I were to run junest app_exec. The expectation of https://github.com/fsquillace/junest#run-junest-installed-programs-directly-from-host-os.

Observed behavior:

Commands are not found via host's PATH.

bash: zoom: command not found

JuNest version: 7.3.14 OS and version: Arch Linux x86_64 Kernel: 5.18.12-hardened1-2-hardened Shell: bash 5.1.16

Installed packages: via junest: gimp, krita, inkscape, rclone, neofetch, discord

AUR via junest yay: zotero, zoom

Verbose JuNest packages or System packages wall of text print out available upon request.

Additional information:

Attempted Workarounds Although this work around failed, I attempted to simply copy the bash script example of one that worked (e.g. ~/.junest/usr/bin_wrappers/neofetch) to create one for the missing programs, e.g. discord. I just copied the file, renaming to discord, ran chmod +x on that file, and executed it. This ran one, but then it seems junest automatically deletes these files.

A successful workaround for running these missing commands in the host terminal is to just add an alias per missing junest package's executable, e.g., adding alias discord="junest discord" within your .bashrc. However, aliases are not included into dmenu which is what I use to run my applications normally. Only those found on the path are added to dmenu, based on dmenu's arch wiki for manually adding items. I have attempted clearing the .cache/dmenu_run and restarting and notably dmenu does not include any junest installed applications, including those that are commands found in the host terminal.

fsquillace commented 2 years ago

Hi,

Thanks for the complete explanation of the problem!

Very good catch! I created a fix for it. Once tests pass I will merge to the main branch.