I had the same issue with Linux Mint (Cinnamon 2.8.8), and there was no way I could get it working with the usual fixes (using a .profile
, changing Xsession
shebang to /bin/sh -l
).
The issue is that /bin/sh
, which is usually a symlink to /bin/dash
reads ~/.profile
if it's a login shell (i.e., given the -l
option).
You can check that with strace:
$ strace -e open dash
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/dev/tty", O_RDWR) = 3
$ ^D
+++ exited with 0 +++
$ strace -e open dash -l
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/dev/tty", O_RDWR) = 3
open("/etc/profile", O_RDONLY) = 3
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12260, si_status=0, si_utime=0, si_stime=0} ---
open("/etc/profile.d/Z97-byobu.sh", O_RDONLY) = 3
open("/etc/profile.d/bash_completion.sh", O_RDONLY) = 3
open("/etc/profile.d/vte.sh", O_RDONLY) = 3
open("/home/elias/.profile", O_RDONLY) = 3
$ ^D
+++ exited with 0 +++
I couldn't figure out which script to change (tried a bunch of them under /etc/X11 and /etc/mdm), but no luck.
So I threw the towel and changed /bin/sh
to point to /bin/bash
instead of /bin/dash
and it's working now. :)