1 |
On Fri, 2005-07-08 at 14:21 -0400, Christophe PEREZ wrote: |
2 |
> >> - create a user (with livecd/users I suppose) |
3 |
> > |
4 |
> > livecd/users: cperez |
5 |
> |
6 |
> of course. |
7 |
> I tried that, and I have something very strange. |
8 |
> I'm not very good at shell scripting, but when I see that, I don't find it |
9 |
> really normal : |
10 |
> livecd ~ # cat /root/.bashrc |
11 |
> #!/bin/bash |
12 |
> |
13 |
> if [ -x /usr/bin/X ]; then |
14 |
> if [ -e /etc/su - chris -c startx ]; then |
15 |
> rm -f /etc/su - chris -c startx |
16 |
> su - chris -c startx |
17 |
> cat /etc/motd |
18 |
> fi |
19 |
> fi |
20 |
> |
21 |
> "-x /usr/bin/X", I understand, but what is that : |
22 |
> "-e /etc/su - chris -c startx" ??? |
23 |
> My livecd/users is "chris" |
24 |
> |
25 |
> Of course, I always have an error at boot : |
26 |
> .bashrc: line 4: [: too many arguments |
27 |
|
28 |
OK. This was an oversight on my part. Here's how you can fix it |
29 |
locally (this will be in the next catalyst)... |
30 |
|
31 |
Edit /usr/lib/catalyst/livecd/files/livecd-bashrc and change the third |
32 |
mention of "startx", where it is on a line of its own, to ##STARTX. |
33 |
|
34 |
Next, edit /usr/lib/catalyst/livecd/runscript-support/livecdfs-update.sh |
35 |
and change line 83 from: |
36 |
|
37 |
sed -i "s/startx/su - $first_user -c startx/" /root/.bashrc |
38 |
|
39 |
to: |
40 |
|
41 |
sed -i "s/##STARTX/su - $first_user -c startx/" /root/.bashrc |
42 |
|
43 |
This will resolve the bug. I didn't pay much attention to what I was |
44 |
doing here, apparently. I apologise. |
45 |
|
46 |
Anyway, I've now fixed this is catalyst 1.1.10.1 (the first bug fix). |
47 |
|
48 |
> > If you follow the directions there, X will be auto-started. I might |
49 |
> > suggest avoiding the use of the xdm init script, and instead using a |
50 |
> > livecd/xinitrc to start X, as the build will try to execute "startx" |
51 |
> > automatically as the first user specified in livecd/users when using |
52 |
> > livecd/type generic-livecd. |
53 |
> |
54 |
> I found this solution too, but if I don't use xdm, what will execute X ? |
55 |
|
56 |
Well, the root user is automatically logged in, and when his .bashrc is |
57 |
executed, it will run startx, or in your case, it will run su - chris -c |
58 |
startx to start X as user chris. |
59 |
|
60 |
> Thank you for all your help even if you can't understand all what I mean ;-) |
61 |
|
62 |
Hehehe.... it's all good. Sometimes the language barrier makes things |
63 |
harder, sometimes it doesn't exist. |
64 |
|
65 |
-- |
66 |
Chris Gianelloni |
67 |
Release Engineering - Strategic Lead/QA Manager |
68 |
Games - Developer |
69 |
Gentoo Linux |