Is there a .deb file, repo, PPA, or anything to install CrashPlan other than the non-standard install.sh file? I have fish as my shell, and I had to mess around a lot and finally use chsh first before the install script would even work. I don't want to have to jump through all these hoops every time there's an upgrade.
According to CrashPlan:
If you are running 2.6.13 Series Kernel or greater 1GHZ+ x86-64 CPU, 1GB+ memory, 250MB+ free drive space, Oracle (Sun) Java version 1.6+, Glibc 2.4+, GTK, Xorg then it will work for you.
CrashPlan automatically starts up after installation and prompts you to create a new account. Enter the information and click Create Account. CrashPlan will send backup reports and notifications to the email address you enter.
Important detail: You need to start the install script with this command in order to avoid error messages:
This is pretty straight-forward. Read the 'read me and install information' for the install instructions.
Normally
bash install.sh
orsudo bash install.sh
should have worked but with CrashPlan's script indeed some internal commands end up running under fish and failing due to syntax differences.A common reason this may happen is the $SHELL environment variable, which still points to /usr/bin/fish - many programs execute subcommands using $SHELL. So I tried
env SHELL=/bin/bash sudo bash install.sh
=> still same fish error!Hmm. Let's try harder — let's work from a real root login shell, which does a more thorough reset (environment variables, directory etc.):
NOTE: when it asks you if you want to start CrashPlanDesktop, say NO. Instead, exit the root shell and run it as yourself, as the above example shows. (If you do run it as root, you may later have trouble starting it yourself due to log files being only writable by root — you'll have to
sudo rm
them and then it'll launch; also, it will default to only backing up /root/ so make sure you configure the right directorie(s).)su -
is enough to get a login shell butsu
asks for root's password and in ubuntu we're so used tosudo
only asking for our password we don't even remember root's password. But if you're already root,su
doesn't ask anything sosudo su -
works.I felt a bit silly using this redundant
sudo su
combination just becausesu -
is the syntax I remember, so a quick --help told mesudo --login
should be enough.Surprisingly
sudo --login
failed with the same fish error!That got me curious. Reading through install.sh I found:
(later used to create
/home/${SRC_USER}/Desktop/${APP_BASENAME}.desktop
via a bunch ofsu ${SRC_USER} -c "..."
commands).=> Aha! So the problem was that sudo snitches on us by exporting $SUDO_USER, even to a login shell.
sudo su -
happenned to work becausesu -
discards all environment variables — including SUDO_USER — in a separate step.