nagygergo/jetbrains-toolbox-install

update README.md and support for sudo install

Closed this issue · 1 comments

NJT145 commented

README.md needs to be updated.
It says that this installer automates the extraction of the tarball to the recommended /opt/jetbrains-toolbox directory, but it extracts to /tmp .
It says that this installer creates a symbolic link in the /usr/local/bin directory, but it creates a symbolic link to $HOME/.local/bin and adds this path to $HOME/.profile .

Need support for sudo install.
I used this script to install jetbrains toolbox:

##*************************** JetBrains Toolbox
#install script for FUSE from 'https://github.com/AppImage/AppImageKit/wiki/FUSE'
sudo add-apt-repository universe
# Ubuntu (<= 21.10)
#sudo apt-get install -y fuse libfuse2
#sudo modprobe fuse
#sudo groupadd fuse
#user="$(whoami)"
#sudo usermod -a -G fuse $user
#
# Ubuntu (>= 22.04)
sudo apt-get install -y libfuse2
#

sudo mkdir jetbrains-toolbox-downloading
cd jetbrains-toolbox-downloading
sudo curl -o "jetbrains-toolbox.sh" "https://raw.githubusercontent.com/nagygergo/jetbrains-toolbox-install/master/jetbrains-toolbox.sh"
sudo chmod +x ./"jetbrains-toolbox.sh"
sudo rm /usr/local/bin/jetbrains-toolbox
sudo rm -r /opt/jetbrains-toolbox
sudo ./"jetbrains-toolbox.sh"
cd ..
sudo rm -r jetbrains-toolbox-downloading
echo "Use command 'jetbrains-toolbox' to make first run for shotcut config."
##***************************

However, it now installed it as root, and I cannot user it as my local user.
As a result, sudo install breaks the setup.

Hello, it was my PR which made these changes. It's true that I totally forgot to adjust the README.

The reason I made this change is that jetbrains-toolbox itself does some system changes on the first run, essentially "installing itself". It copies its binary to ~/.local/share/JetBrains/Toolbox/bin, adds .desktop entry for it so it is available from the app launcher, adds itself to startup apps, and edits the .profile to include its shim folder. That's all done by the Toolbox itself, not by this script.

This script just: downloads the latest version, extracts it to ~/.local/share/JetBrains/Toolbox/bin (where it would copy itself anyway), adds a shim to ~/.local/bin (it does not add this path to .profile, most distros already have it there though) and finally runs it so all the above described magic happens.

This is pretty much fundamentally incompatible with root installation, multi-user installation, installing to /opt etc. -- we can't change what the closed-source blob jetbrains-toolbox does.