home about contact feed
vagra vaBlo
C++(7) Solaris(4) tntnet(3) vi(3) Linux(2) DeleGate(2) Postgres(2) proxy(2) cxxtools(1) regex(1) readline(1) dtrace(1) gcc(1) MeeGo(1) ssh(1) firefox(1)

How to switch the default shell on MeeGo

Changing users shell on MeeGo

MeeGo uses busybox as default shell for root as well as for the unprivileged default user. This might be unpleasant for some people escpecially since it doesn't support the vi-mode. Installing an other shell is easy, however if you want to switch the default shell you need to be carefull.

Since some scripts will get executed by the users shell early at boot, changing the shell of root or the user might leave your system unbootable. You system will also stop booting if you load a shell via the users .profile without checking, so here is how you can load it via .profile:


if [ ${TERM} != "linux" ] && [ ${SHELL} == "/bin/sh" ] && [ -x ${MYSHELL} ]; then
        export SHELL
        exec ${MYSHELL}

Of course MYSHELL can be any shell installed on the system. The important part is the check if TERM is "linux", since all scripts executed by the os will have that TERM, while remote ssh sessions or terminal emulators will typically have "xterm" setted.

While this is expected also to work on maemo or Sailfish OS, i did tested it on Harmattan only. Thus you might check first, by temporary adding "env >> /tmp/user.env" to the .profile and reboot.

Write comment