Andrei Popescu wrote:
On Sat,09.Aug.08, 17:04:47, Ron Johnson wrote:
On 08/09/08 08:57, Damon L. Chesser wrote:
On Fri, 2008-08-08 at 01:05 -0500, Ron Johnson wrote:
[snip]
I put this at the bottom of my family members' .bashrc files. Works like
a charm.
if [ "$TERM" == "linux" ]; then
startx
exit
fi
--
Ron Johnson, Jr.
Jefferson LA USA
Ron,
I like that. Alleviates the need for a login manager at all and if all
win users snooping around would not even know what to type at the login:
prompt. But does this not kill any vt's for that user? ie,
cntrl-alt-F2, login, wham, GUI and not a term.
Possibly. But they never do that, so it hasn't come up yet. Neither have I
found a need to, yet, for that matter.
If I try to run startx with X already active I get:
Fatal server error:
Server is already active for display 0
If this server is no longer running remove /tmp/.X0-lock
and try again
And eventually it will return the prompt. I think most cases will be
covered by something like:
,----
| if [ "$TERM" = "linux" ]; then
| if [ ! -f /tmp/X0-lock ]; then
| startx
| exit
| fi
| fi
`----
Or maybe something like this in that users .bashrc?
----------------
x()
{
D=x
for i in `seq 0 4`;do if [ ! -f /tmp/.X${i}-lock ]; then D=$i;
break; fi; done
if [ "${D}" = "x" ]; then
echo "No free virtual terminal"
else
if [ $# -lt 1 ];
then /usr/bin/startx -- :${D} -depth 24 -dpi 120 2> ~/.X.err
> ~/.X.out &
else /usr/bin/startx -- :${D} -depth $1 -dpi 120 2> ~/.X.err
> ~/.X.out &
fi;
fi
}
----------
With -depth and -dpi adjusted accordingly.
WT
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]