1 |
If it's O.K. that your default user is root and you su to the other user |
2 |
and start X for him, try this in /root/.bashrc |
3 |
|
4 |
#!/bin/sh |
5 |
mkdir /tmp/usbmount |
6 |
while true |
7 |
do |
8 |
FS=`blkid -c /dev/null | cut -d: -f1` |
9 |
for i in ${FS} |
10 |
do |
11 |
mount -t auto ${i} /tmp/usbmount |
12 |
if [ -f /tmp/usbmount/userid ] |
13 |
then |
14 |
USER=`cat /tmp/usbmount/userid` |
15 |
umount /tmp/usbmount |
16 |
echo "Found userid $USER" |
17 |
echo "Please remove your stick now." |
18 |
sleep 10 |
19 |
su $USER -c "startx" |
20 |
else |
21 |
umount /tmp/usbmount |
22 |
fi |
23 |
done |
24 |
sleep 10 |
25 |
done |
26 |
rmdir /tmp/usbmount |
27 |
|
28 |
Greetings, |
29 |
|
30 |
Georg |
31 |
|
32 |
Andreas Rueckert wrote: |
33 |
> Hi! |
34 |
> |
35 |
> On Friday 09 September 2005 21:05, Chris Gianelloni wrote: |
36 |
> |
37 |
> --<snip>-- |
38 |
> |
39 |
> |
40 |
>>Here's what I do: |
41 |
>> |
42 |
>>echo "[Desktop]" > /home/gentoo/.dmrc |
43 |
>>echo "Session=gnome" >> /home/gentoo/.dmrc |
44 |
>>chown -R 1000:100 /home/gentoo |
45 |
>> |
46 |
>>Remember that session managers do *not* read .xinitrc, but read .dmrc |
47 |
>>instead. I honestly don't know why it doesn't work as it is supposed |
48 |
>>to, but I do know that this solution works. |
49 |
> |
50 |
> |
51 |
> Kinda OT, but somewhat related: does anyone a trick to wait for a USB event, |
52 |
> before the user is logged in? I'd like to identify a user via USB stick or |
53 |
> maybe chipcard, before he is logged in. |
54 |
> |
55 |
> TIA, |
56 |
> Andreas |
57 |
-- |
58 |
gentoo-catalyst@g.o mailing list |