Score:1

JetBrains Toolbox won't start on Ubuntu 20.04

hk flag

I tried installing JB Toolbox on Ubuntu 20.04. I downloaded it from the official website and extracted it to opt using this

sudo tar -xzf jetbrains-toolbox-1.21.9712.tar.gz -C /opt

But when I open it using ./jetbrains-toolbox command it opens up in the background and closes within around 10 seconds (checked this using the top command). Nothing can be seen in the UI. Not even the top bar icon can be seen.

I checked the logs ~/.local/share/JetBrains/Toolbox/logs in this location but nothing can be found as well.

I tried this on wayland and x11 but still not working.

Can someone please help me with this issue?

Thanks.

Nate T avatar
it flag
Did you give it the proper permissions?
Score:6
in flag

For me it was an issue with missing libfuse.

0728 Apr  4  2022 /opt/jetbrains-toolbox-1.23.11731/jetbrains-toolbox
sandeep@maystreet-work-pc:~$ /opt/jetbrains-toolbox-1.23.11731/jetbrains-toolbox 
dlopen(): error loading libfuse.so.2

AppImages require FUSE to run. 
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 
See https://github.com/AppImage/AppImageKit/wiki/FUSE 
for more information

I was able to fix it by installing libfuse2:

sudo apt install libfuse2

In any case, running jetbrains-toolbox from command line will help and it is located in /opt. For me the complete path is /opt/jetbrains-toolbox-1.23.11731/jetbrains-toolbox

Score:0
it flag

Tl;dr: Adjust file permissions and invoke using sudo

Just going on what you have written so far, you also need to give the app the execute permission.

one way to do this is to use the chmod command as follows:

sudo chmod u+x /opt/rest-of-the-qualified-pathname

The relative path will work as well, in case you already have a terminal opened to the parent directory.

The instructions above assume that you are the owner of the file. If you have doubts about ownership, here are some other options that you can use. It is up to you to decide which best fits your situation.

In the u+x bit above, the u is for user, and so it will be runnable only by you (assuming no other permissions are set.) The options here are 'u' for user(owner of the file, not the user running the command, which should be root anyway), 'g' for group (which denotes the owner's home group), 'o' for other (to change the permission for users not in the owner's group), or 'a' for all. Additionally, leaving that character out completely, as in

sudo chmod +x /opt/rest-of-the-qualified-pathname

will work as well for most at-home single user Ubuntu desktop installations.

EDIT:

Once the program is installed, it will usually need to be invoked with escalated privileges. The best way to do this is with the following command:

sudo ./jetbrains-toolbox

As it stands, this needs to be called from inside /opt. If you want to call from another directory, change the invocation to:

sudo /opt/jetbrains-toolbox

Below are a couple of options that will let you omit the full-path invocation.

OPTION 1

If you add /opt to $PATH, then you will be able to call the program name as a command. The command to add it to $PATH is:

echo 'export PATH="${PATH}:/opt"' | sudo tee -a ~/etc/environment.d/99-addoptdir.conf
source /etc/environment.d/99-addoptdir.conf

The first line adds a command to add it to $PATH, and it adds it in a way that ensures that it is run each time a shell instance is created (more or less each time you open up a terminal.) Since the current shell was created before the command was added, trying to type the command in this shell won't work. Therefore, the second line is a workaround that runs the 99-addoptdir.conf retroactively.

Now the following command should work:

sudo jetbrains-toolbox

Remember that it will not work in any terminals that were already opened. If you need it to do so, run the source command above in each old terminal that you need it to work in.

OPTION 2

You can also use this command to set a "shortcut command" which will get it working quickly.

# Use this if ~/.bash_aliases exists in your file system
echo 'alias jbtb="sudo /opt/jetbrains-toolbox"' | sudo tee -a ~/.bash_aliases

# Otherwise use this one
echo 'alias jbtb="sudo /opt/jetbrains-toolbox"' | sudo tee -a ~/.bashrc

Now you can open the program with the command:

jbtb

No need for typing out paths or even sudo. Although you will need to type in your password. Working around that part is never a good idea. XD

This method uses an alias, and some people have mixed feelings about aliases, because they feel that they are a hindrance to new users learning the "real" commands. However, it works, and at the end of the day, that is usually what matters most.

**IMPORTANT! Make sure that the -a flag is included after the tee command, anywhere it is used above! If it is left out, your entire .bashrc file will be overwritten! If you'd like, you can just copy / paste the command(s) to be safe. **

Etienne Bruines avatar
jp flag
How is this applicable? Wouldn't the terminal complain about permissions, instead of "running" for ten seconds and then returning with exit code 0?
Nate T avatar
it flag
When it gets started without the proper permissions, the error message (or lack thereof) is usually the responsibility of the program's developer. The OS will send a signal which is supposed to be caught by the program and trigger the error msg, logging actions, etc. That is why the error msg displayed Is worded differently for each program. I probably gave the answer above because the OP put the executable in `/opt/`.
Nate T avatar
it flag
The `/opt` directory is not on `$PATH` by default, so every program placed here has to have its permissions set (first octal must be 1,3, or 7) or else it wont run... or you cn just add `/opt` to $PATH. That would be the same as setting exec perms for everything inside.
Nate T avatar
it flag
@EtienneBruines How is this? This (after edit) was the solution that the OP needed. I would bet the farm on it. Didnt realize Id left out `sudo` invocation. Thx for pointing it out.
Etienne Bruines avatar
jp flag
I learned something new - always thought it would always result in an error, regardless of what the application was/did. I always got `zsh: permission denied: ` when trying to run non-executable files. (Even when it is part of the `PATH`)
Daniel Tabuenca avatar
mq flag
@EtienneBruines You are 100% correct, permissions would prevent the application from running at all if an application would just be 'sent a signal which is supposed to be caught by the program' this would be a massive security breach. I don't think what Nate is saying is correct.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.