That error dialog is supposed to be helpful. ;) It was implemented (by me) as a fix of bug #678421, which was originally filed as a bug about GDM and Xsession, and one idea is to *prevent* that errors are silently ignored.
On 06/26/2015 12:58 AM, Derek Martin wrote: > if you don't care to fix this, I'm not in a position to decide on it. > what's your proposed fix for lightdm barfing on errors from terminal > commands that quite rightly belong in .profile? Maybe state that certain commands should only be executed in case of an interactive shell. This Ask Ubuntu answer might give you a hint: http://askubuntu.com/questions/592839 -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to lightdm in Ubuntu. https://bugs.launchpad.net/bugs/1468832 Title: lightdm sources .profile Status in lightdm package in Ubuntu: New Bug description: It is a bug for any display manager to read .profile--you guys are absolutely killing me with this. The user's .profile is to be read by the shell, on interactive shell (i.e. terminal) logins ONLY. The man page for bash explains this in detail; it's also discussed in the dash man page. The problem with display managers reading .profile is that it is the place where commands to set up your terminal (i.e. stty) go --this is the entire point of differentiating interactive shells from non-interactive shells, and it's the reason only interactive shells read .profile at all. Currently, if you have any such commands in your .profile, lightdm barfs on them, delaying the login session and forcing you to click on a prompt. This is extremely annoying (and wrong)! It would be satisfactory to make lightdm not display the errors, but that's the wrong solution. There's already a decades-established method of getting X display managers to source your environment settings: the .xsession file. It should be read by ALL display managers (or the session file that starts them). If you have common environment settings you want set in all your shells, the correct way to handle this is: .bashrc: # set all common environment vars here ENV_VAR=foo ... .profile: # set up terminal stty erase # BASH already sources .bashrc by default on interactive sessions .xsession: if [ -f .bashrc ] source .bashrc If you're not using BASH, you can still use this method without changing anything, except in .profile you need to explicitly source the .bashrc file. Of course you can change the name of the file that contains the common settings to reflect that your shell is not BASH; since the file is sourced by your other files explicitly, it does not matter what the user calls it. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1468832/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp