Re: Start only one program at login

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2007-01-29 at 10:34 +1100, Cameron Simpson wrote:
> You don't need two exec lines. You don't even need one:-)
> 
> Using "exec" _replaces" the shell running the script with the program
> being called. Normally the called program is a child of the shell. For
> the last program in a script it can be a tiny performance win to exec
> it, since the shell is no longer needed.
> 
> Using "exec" with a "&" is harmless but also useless.
> 
> So I would write:
> 
>   metacity --sm-disable &
>   exec gnome-terminal --window --full-screen

Thanks for the explanation - that makes sense.  Your suggestion also
worked just as you said. I'm going to make the change.

> I normally try to avoid full pathnames to executables - things will just
> break if the system layout is changed. Do you type full paths at your
> shell prompt? Rarely I would hope:-) Scripts are no different.

I originally left the full path out, but then put it back in because I
thought it would make it _more_ reliable.  The paths aren't ever going
to change on this box, unless it comes from upstream.

Your point is valid, though.

Thanks,

Ranbir
-- 
Kanwar Ranbir Sandhu
Linux 2.6.19-1.2895.fc6 i686 GNU/Linux 
19:48:26 up 55 min, 1 user, load average: 1.47, 0.93, 0.63 



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux