Using Rider with zsh doesn't work when Unity opens Rider (Linux)

Completed

I am running into an issue where when Unity (2019.1 and .2) opens Rider (which has terminal set within IDE to /usr/bin/zsh, happens with both Rider 2019.1.3 and 2019.2 so far which are all I have tested on linux), it won't use zsh for some reason, and of course all of my applications and env variables are setup using scripts and such via zsh.

If I open Rider on it's own zsh is picked up and works just fine. It has all my env variables, installed applications and proper $PATH, but with Unity I just keep getting:

Cannot open Local Terminal
Failed to start [/usr/bin/zsh, -i] in /home/mosthated/path/to/project


For Rider to work in general with zsh I had to go into /home/mosthated/.local/share/JetBrains/Toolbox/apps/Rider/ch-0/192.5895.1069/plugins/terminal/.zshrc and change the last function to the following for it to work:

(Can't figure out how to post a code block on this forum)

function override_jb_variables {
for VARIABLE in $(env)
do
NAME=${VARIABLE%%=*}
if [[ $NAME = '_INTELLIJ_FORCE_SET_'* ]]
then
NEW_NAME=${NAME:20}
if [ -n "$NEW_NAME" ] && [ "$NEW_NAME" != "PATH" ]
then
VALUE=${VARIABLE#*=}
export "$NEW_NAME"="$VALUE"
fi
fi
done
}

Does Unity have it's own settings/config somewhere that is overwriting what may be in the above path that I need to change somewhere for it to work? Unity/Rider is even thinking Git isn't installed when it opens, so it is going to end up being quite inconvenient.

Thanks,
-MH

2 comments

My bad, I got it worked out. I had to start the Unity hub as sudo then everything was fine.

0

Great to know everything works. :) Feel free to contact us in case of any questions or problems!

0

Post is closed for comments.