Reputation
Top tag
Next privilege 200 Rep.
See reduced ads
Badges
6
Impact
~2k people reached

Mar
9
awarded  Popular Question
Jan
14
awarded  Editor
Jan
14
revised Can lightdm/gnome/compiz use bash instead of sh?
typo fix
Jan
14
comment Can lightdm/gnome/compiz use bash instead of sh?
Right approach, @Gilles! lightdm starts /usr/sbin/lightdm-session which is a plain #!/bin/sh-shell script which attempts to mimic the shell's login behaviour (including sourcing things like the .profile). This is ugly as hell. Whoever implemented this should be … pyunished (to quote Boss Nass). My current workaround to solve this issue is to patch that script to use /bin/bash instead. Works, but is prone to be overwritten with the next update of the package :-/
Jan
14
comment Can lightdm/gnome/compiz use bash instead of sh?
This is a really nice idea to replace the running shell. Unfortunately this loses all the (source-)caller stack; nothing after the exec gets evaluated, whatever script sources us is not going to continue after the source statement. Restarting the script completely is a weak attempt to work around that which in my case does not solve the problem, unfortunately.
Jan
14
comment Can lightdm/gnome/compiz use bash instead of sh?
@datUser, yes, that would solve the issue, but applying changes to the system always is a bit problematic (e. g. such a link might get overwritten on the next update of the package which installed the dash), so I would like to avoid that.
Jan
14
comment Can lightdm/gnome/compiz use bash instead of sh?
@orion, no, this .profile is not an executable (i. e. not called as such), it is a configuration file which gets sourced by the caller (i. e. it is executed by the caller process) and is supposed to apply changes to the environment. If I call a bash from within it, this creates a new process, and all environment changes this applies get lost when this bash terminates, leaving no changes on the environment of the caller.
Jan
14
comment Can lightdm/gnome/compiz use bash instead of sh?
① I intend to do a lot in this script file, so it should be done just once, not each time a new shell is started. Creating shell functions is just one aspect. ② Since I'm talking about the very initial login point, I have no chance to set $SHELL prior to this. I would have expected that $SHELL would be filled with whatever is stated in /etc/passwd, but I guess that compiz just isn't using that variable but instead calls sh hard-wired.
Jan
14
asked Can lightdm/gnome/compiz use bash instead of sh?
Jan
11
awarded  Teacher
Jul
30
comment rsyslog.conf only partly honored
Yes, the problem remains unsolved. But the workaround is to get the info from the global log file, so it isn't nagging me a lot.
Apr
14
comment Having trouble exporting FUSE via NFS
Yes, I did. To no avail, unfortunately. But in the meantime we switched off the old hardware with the old system, so this question isn't interesting anymore. I should maybe close it ... ;-)
Feb
5
answered What could cause the clock to jump by 5 minutes?
Jan
29
asked rsyslog.conf only partly honored
Dec
5
comment How to recover TrueCrypt datas?
Would be a pity if it didn't; after all that's the typical case I guess (i. e. if people use weak passwords at all).
Dec
2
comment Do applications usually use dynamic linked libraries?
Due to that information and the link, I can easily ⁺¹ this answer :)
Dec
2
awarded  Commentator
Dec
2
comment How to recover TrueCrypt datas?
What about if you have keyfiles but still a weak password? Shouldn't the brute-force dictionary attack still work?
Dec
2
comment Do applications usually use dynamic linked libraries?
That's interesting. Can you point to some documentation on LD_RUN_PATH?
Dec
2
comment Do applications usually use dynamic linked libraries?
And if you bundle them, the user (or your install or start script) can set the LD_LIBRARY_PATH to point to the location of the libraries.