Internal terminal is different to local terminal

Answered

With the new update to Goland from 2020.3.1 the build in terminal doesnt appear to have some of the executables that my local linux terminal has, is there a way to use the same terminal and bash version as the local terminal ? 

0
16 comments

Hello,

You can configure shell path and other settings via File | Settings | Tools | Terminal.

Could you please elaborate a bit? What kind of problem are you facing? Where did you set up environment variables?

0

I've tried that and the bash version/path are different. In the previous version the bash terminal matched my local terminal for all settings/paths now it seems the built in terminal are different. I haven't configured any path settings or environment variables in either version as far as Im aware.

Exporting and Importing settings also hasn't helped. 

Bash version from Goland

$ bash --version
GNU bash, version 5.1.8(1)-release (x86_64-unknown-linux-gnu)

$ which bash
/usr/bin/bash

Local bash version 

$ bash --version
GNU bash, version 5.0.17(1)-release (x86_64-redhat-linux-gnu)

$ which bash
/usr/bin/bash

0

What's the original issue? Are you trying to execute some binary that specified in your $PATH variable or are some features missing?

0

the main issue is that some scripts and make files I have that use other commands no longer work due to the executables not being available. 

For example, Goland reports different files in /usr/bin even though both local and goland have it as part of the path

Goland

bash-5.1$ ls -lart oc*
-rwxr-xr-x 3 nfsnobody nfsnobody 217504 Apr 22 15:48 ocsptool

VS Local

[cathal@localhost bin]$ ls -alrt oc*
-rwxr-xr-x. 1 root root 47992 Sep 4 2020 ocsptool
-rwxr-xr-x. 1 root root 74528264 Jan 6 12:09 oc
-rwxr-xr-x. 1 root root 17961672 May 6 16:11 ocm

0

How did you install GoLand (via Snap, Flatpak, Toolbox App, manually)? How do you run GoLand (via CLI, desktop entry, Toolbox app)?

0

previous version was manually, This version was though fedora package manager. 

I ran the old version through CLI, new version though desktop shortcut

0

Let's try the following experiment:

  • Download GoLand manually from the Downloads page.
  • Unarchive, navigate to the bin folder and open the CLI.
  • Execute ./goland.sh to run the IDE.
  • Open the built-in Terminal and execute bash --version and ls -lart oc* commands.

Do you see the same output as before?

0

Excellent. Looks like that may be the issue. How do I get the package manager version to work the same way so that I don't have to manually download updates? 

 

[cathal@localhost$ bash --version
GNU bash, version 5.0.17(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

[cathal@localhost bin]$ ls -lart oc*
-rwxr-xr-x. 1 root root 47992 Sep 4 2020 ocsptool
-rwxr-xr-x. 1 root root 74528264 Jan 6 12:09 oc
-rwxr-xr-x. 1 root root 17961672 May 6 16:11 ocm

0

I prefer Toolbox App to manage IDE instances and update them automatically. There is Update all tools automatically option.

I'll try to reproduce the issue on Fedora 32 and check if the issue persists on other package management systems, e.g. snap. After that, I'll fill out a new ticket on the corresponding tracker (YouTrack or fpm). I'm not sure that the problem comes from our side.

0

Awesome, that works also. Thanks for your help. 

1

Also encountered this same issue today on Pop_OS installing Goland from the Pop Shop. Different file system contents outside the start folder while in the terminal emulator. Confused me for a while. Also resolved by downloading the install tarball.

0

Hi Jaimeyap,

I'm not sure what Pop Shop uses under the hood (I suppose snap packages), but most of the stores have their own permissions to access files on your file system, especially system ones, e.g., Flatpak permissions: https://docs.flatpak.org/en/latest/sandbox-permissions.html

These directories are blacklisted: /lib, /lib32, /lib64, /bin, /sbin, /usr, /boot, /root, /tmp, /etc, /app, /run, /proc, /sys, /dev, /var

Other utilities to manage your applications may have their own blocked directories/files, and GoLand doesn't have access to them.

0

Hi, Daniil

I also encountered the same issue with Jaimeyap (install IDE on Pop_OS via their Pop!_Shop) and your suggestion solved my issue.

As you mentioned about sandbox-permission, will you take action to make those program or app under some of blacklisted can be run on terminal?

0

Hi Xenogew,

I think it is not possible due to security reasons for these package managers, regardless of how to launch them from another application.

0

Hi Daniil,
 I am hitting the same issue on RHEL 8. Manually installing the IDE works perfectly, but I prefer working directly with the installed software rather than going to the manually installed goland and opening it from the terminal. I have removed the Goland software and installed a new one and restored default settings, and yet I got the "sh-5.1$ " as the shell prompt. 
I tried modifying the shell path in the terminal settings (file->settings-> tools-> terminal) from /bin/sh to /bin/bash, good thing is that I saw the same prompt I have in my local terminal but bad thing is that it comes now with these messages plus that there are libraries that "are not found":

bash: /usr/share/bash-completion/bash_completion: No such file or directory
bash: kubectl: command not found
bash: /usr/share/git-core/contrib/completion/git-prompt.sh: No such file or directory
bash: __git_ps1: command not found
[shajmakh@shajmakh ~]$  vim nr.yaml 
bash: vim: command not found
bash: __git_ps1: command not found
[shajmakh@shajmakh ~]$ 

Your insights are highly appreciated 

0

Hello,

I prefer working directly with the installed software rather than going to the manually installed goland and opening it from the terminal

What do you mean by working directly with the installed software?

bash: /usr/share/bash-completion/bash_completion: No such file or directory

You can try to check permissions for that directories. Most likely, there are unavailable due to the safe mode in YUM or RPM.

0

Please sign in to leave a comment.