1 |
On Thu, 2005-07-14 at 15:36 -0400, Christophe PEREZ wrote: |
2 |
> Le Thu, 14 Jul 2005 14:57:53 -0400, Chris Gianelloni a écrit : |
3 |
> |
4 |
> > I just did it like this: |
5 |
> > |
6 |
> > sed -i 's/##STARTX/su - $first_user -c "source /etc/profile && |
7 |
> > startx"/' /root/.bashrc |
8 |
> |
9 |
> ??? |
10 |
> |
11 |
> - $first_user won't be used |
12 |
> - too much '/' |
13 |
> - & will be replaced |
14 |
> |
15 |
> In the way with "'", it should be : |
16 |
> sed -i 's|##STARTX|su - '"${first_user}"' -c "source /etc/profile \&\& |
17 |
> startx"|' /root/.bashrc |
18 |
> |
19 |
> no ? |
20 |
|
21 |
"s:##STARTX:su - $first_user -c 'source /etc/profile \&\& startx':" |
22 |
works... I just tested it... |
23 |
|
24 |
-- |
25 |
Chris Gianelloni |
26 |
Release Engineering - Strategic Lead/QA Manager |
27 |
Games - Developer |
28 |
Gentoo Linux |