1
votes

If I am trying to open Cloud Shell, I see the message:

Your Cloud Shell session closed before the initial prompt displayed, which can mean there is a problem with your ~/.bashrc file or ~/.tmux.conf file.

I logged in as root (safe mode) and deleted my user & the home directory, then restart Cloud Shell. My user was created from a skeleton, but I got the same message.

If disable tmux in terminall settings, will be added messege:

bash: [[: /etc/profile.d/customize_environment.sh: syntax error: operand expected (error token is "/etc/profile.d/customize_environment.sh") but Shell doesn't work.

File customize_environment.sh is the same as it on another google account.

How fix it?

screenshot

2
Have you tried to follow the documentation Resetting Cloud Shell? - Serhii Rohoza
In my initial message is wrote that Shell Reset was done. > I logged in as root (safe mode) and deleted my user & the home directory, then restart Cloud Shell. - Iurii Tarasenko
Could you update your question with the actions you did that cause this issue? - Serhii Rohoza

2 Answers

2
votes

Go into safe/root mode, navigate into your $HOME directory (/home/{user}) and move/remove your .customize_environment file. This worked for me. I don't know about you, but my script hasn't been working these past few days. Maybe Google changed something and this crashes our .customize_environment script.

Maybe this will work for you too.

(You can create the script again after everything is normalized and it shouldn't crash a second time, but double check it)

0
votes

remove /home/{user}/.customize_environment file, but be aware that if you run rm $HOME/.customize_environment, you wull get no such file. that's because you are trying to delete another file for anotjer youser i.e: /home/root.

if you forgot your user name rum ls /home first.