I would like to install cryoSPARC, and looking through the readme it looks like this program requires that the user use bash as their default shell. At the moment I'm using tcsh, and have built up a .cshrc file that I wouldn't know how to translate into a .bashrc file so I'd rather not change shells.

The software is to be installed on one particular machine that I use, of several that I have access to. I access this computer via ssh -X. So perhaps I could change the default shell only for when I log in to this particular machine?

Does anyone have any suggestions about the best way to install this software?

Turns out the reason that bash is required to be the default shell is probably because of the way the program is structured: when it runs a job, the master checks all the workers and runs the job on one of the workers via ssh. That happens in whatever the user's default shell is, in my case tcsh. Just to see if it helped, I tried adding the lines

setenv SHELL /bin/bash
exec /bin/bash --login

to the end of my .cshrc file, but this a) didn't seem to help and b) created issues with login where when I tried to log in to a machine, I got a black screen and then was back at the login screen. However, I'd rather not change my default shell anyway, because of the reason above. Does anyone have any ideas about how to get around this?

  • What software? can you provide a link to the readme? It may be a matter of trying it - and then posting back for help with specific issues (if any arise) – steeldriver May 9 '18 at 22:58
  • It's called cryoSPARC, link to readme here: github.com/cryoem-uoft/cryosparc2_public/blob/master/README.md Do you mean just to try it with tcsh and see what happens? They specify bash is necessary so I'd be hesitant to do that... – Suzanne Scott May 9 '18 at 23:14
  • It seems to work if I just ssh and then change to bash - thanks for the advice :) – Suzanne Scott May 10 '18 at 10:56
  • @SuzanneScott I made it an answer, please ping me with @dessert in a comment if there's room for improvement. – dessert May 10 '18 at 18:06

You can just start a bash shell in the ssh shell (whatever the default shell for ssh may be), or start it directly when sshing with:

ssh -tX USER@SERVER "bash -l"

This last approach however may not pick up your tcsh environment, if you want it to do that use the following command instead:

ssh -tX USER@SERVER "tcsh -cl bash"

Source: SSH then change Shell · SO

| improve this answer | |
  • This works for installation, which requires bash, but running the program I encounter errors. I think the reason for this is becuase of the way the program is structured: I install a 'master' and a 'worker', and then once installed I only interact with the 'master' though a browser interface. When I ask the 'master' to run a job, it sends them to runs the on the 'worker' via ssh. So while the program is running, I do not execute ssh myself, it happens internally. When it does that, it uses the default shell, which in my case is tcsh, but then runs into issues. – Suzanne Scott May 10 '18 at 20:13
  • The error I encounter is Command '['ssh', u'<user>@<server>', 'nohup', u'<worker_path> run --project P1 --job J9 --master_hostname <server> --master_command_core_port 39002 > <project_directory>/P1/J9/job.log 2>&1 & ']' returned non-zero exit status 1 – Suzanne Scott May 10 '18 at 20:15
  • @SuzanneScott No problem, the post owner always gets notified. :) Please post a new question with this description, the error message and the content of <project_directory>/P1/J9/job.log. However, if the program doesn't let you change its ssh call I fear the only way will be to change the default shell of the “worker” machine. I really don't know why the developer didn't just make it start a bash shell itself – that's worth a github issue with a feature request in my opinion. Things like that get fixed quickly sometimes! – dessert May 10 '18 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.