problems with system-config-display and crtl-alt-backspace

Suvayu Ali fatkasuvayu+linux at gmail.com
Tue Dec 29 06:17:01 UTC 2009


Hi Paul,

On Monday 28 December 2009 09:21 PM, Paul Allen Newell wrote:
> Ed Greshko wrote:
>>
>> The man page tells you under what conditions the various files
>> (/etc/profile, ~/.bash_profile ~/.bash_login etc) are read depending on
>> what type of shell (interactive, login).
>> Are you saying there is a situation not covered?
>>
>> Remember, everything that is executed is executed under a shell.
>
> I think part of my confusion is that I am not understanding whether a
> login shell covers everything that is done once I have logged in via
> splash screen or if it is confined to "logining into a shell". If the
> former, then I would assume bash_profiles is hit once and everything
> done thereafter would be under its command. If the latter, then I am
> probably unclear about whether launching a terminal is a "login" act
> (hence under bash_profile only within that shell).
>

I think a small experiment is in order. Open up any terminal emulator of 
your choice, go fullscreen (well just stretching it to be really big 
should be enough for the experiment ;) )

Now run the following,

$ ps uf -u `whoami`

The output might be a little truncated on the right depending on the 
size of your monitor, but that is not too important. As you can see, the 
command to start your desktop is initiated by a shell. So if you setup 
your environment variables appropriately, then all those should be 
available to the shell starting your desktop. This allows you to have a 
consistent environment for your applications no matter how you launch 
them, from a terminal or from the gui of your desktop.

The lesson to learn here are the differences between shells/apps 
inheriting the environment of its parent shell/process depending on how 
you set the environment.

If you are interested, you can try another small experiment to see for 
yourself what I mean. Try putting this in your ~/.bash_profile,

export PATH=$PATH:${HOME}/bin

And then put a symbolic link to some small application of your choice in 
your ${HOME}/bin.

For example I did this, (I chose thunar as I use XFCE)

$ ln -s -T `which thunar` ${HOME}/bin/fakethunar

Now logout and log back in. Try running `fakethunar' with the Alt-F2 
dialogue. It will open up thunar. Now comment out those lines, logout, 
login again and repeat that. You will get an error message. You can do 
many different variations of this to explore some more subtleties. But I 
think this paints a clearer picture now. :)

>
> Paul
>

Have fun hacking.

PS: This kind of info is usually in the FILES or INVOCATION section of 
the man pages.
-- 
Suvayu

Open source is the future. It sets us free.




More information about the fedora-list mailing list