Skip to contentSkip to conversation

Simple local DOS

DISCUSSION David Balazic 8 participants 12 messages Jan 10, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines · Matthias Andree
Quoted 4 lines · David Balazic

log in on some virtual terminal, then run the following line in a bourne type shell, like bash :

Quoted 6 lines
Quoted 4 lines

X 2>&1 | less

A reboot "fixes" it. We want to reach windows level quality on desktop after all, don't we ?

You can also fix that by a remote login,

How do I pull a network connection and a terminal out of a hat ? Where do I get the hat ?
read : it is a sandalone system.

Quoted 1 line

chvt,

how do I start chvt if I have a locked up console system ?

Quoted 1 line

or by just not piping X

I didn't do it on purpose to lock up my system and risk FS corruption durin unclean reboot. I was interested in the server output and " 2>&1 | less" is the logical way to do that.

I could also "solve" this problem by not running linux. And I can "solve" all gcc bugs by not using gcc. Those are not solutions. Not to me at least.

Quoted 1 line

output into interactive programs. tail -f is a viable workaround -- and

tail -f ? what is the difference between :

$ X 2>&1 | tail -f
and
$ X 
?
Quoted 1 line

all this is off-topic on linux-kernel,

non-root user locked up the console code. console code is part of kernel. it is a kernel topic.

Quoted 3 lines

it's your own dumbness that makes
you do these things. Better run kdm, gdm or xdm or something and you're not having this problem.

My own dumbness ? Did you also say that ping-of-death is not a problem ? After all it is just the dumbness of people who send out broken ping packets, no ? And if a computer crashes , businesses lose time and money, you pop up and explain "no it is not really lost money/time, because it was caused by dumbness !".

Signature · 4 lines
David Balazic
--------------
"Be excellent to each other." - Bill S. Preston, Esq., & "Ted" Theodore Logan
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#1 lore raw
Quoted 3 lines · David Balazic
Quoted 1 line

chvt,

how do I start chvt if I have a locked up console system ?

Ctrl-Alt-F1 ?

Xav

#2 lore raw
In reply to David Balazic

From: David Balazic <[email protected]>
Date: Thu, 10 Jan 2002 14:46:19 +0100

Quoted 1 line

all this is off-topic on linux-kernel,

non-root user locked up the console code. console code is part of kernel. it is a kernel topic.

The real issue is that X has the console in an indeterminate state (it probably just saved the VGA state and is outputting probing information) but now it is blocked on terminal output due to the "less".

There is nothing the kernel can do about what X is up to. The suid wrapper for X can check if stdout/stderr is a pipe and refuse to run if it is.

So really, it is in fact off topic for linux-kernel. Please take this to the xfree86 lists, I'm sure they'll be more than happy to fix it.

Franks a lot,
David S. Miller
[email protected]

#3 lore raw
In reply to David Balazic
Quoted 7 lines · Xavier Bestel
Quoted 3 lines · David Balazic
Quoted 1 line

chvt,

how do I start chvt if I have a locked up console system ?

Ctrl-Alt-F1 ?

Which part of "locked up console system" you don't understand ? :-)

( There is a smiley on that line. It was ment to be funny. No need to get mad at me and send me suspicios white powder over snail mail ! )

Maybe I did not describe the problem detailed enough. I thought everybody can check it for themselves :-)

After running "X 2>&1 | less" you get a black screen and it does not respond to any keypresses any more.

I will take this to the xfree people as David S. Miler suggested.

Signature · 4 lines
David Balazic
--------------
"Be excellent to each other." - Bill S. Preston, Esq., & "Ted" Theodore Logan
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#4 lore raw
In reply to David Balazic
Quoted 8 lines · David Balazic
Quoted 6 lines · Matthias Andree
Quoted 4 lines · David Balazic

log in on some virtual terminal, then run the following line in a bourne type shell, like bash :

Quoted 7 lines
Quoted 6 lines
Quoted 4 lines

X 2>&1 | less

A reboot "fixes" it. We want to reach windows level quality on desktop after all, don't we ?

You can also fix that by a remote login,

Ctrl-ALT-F12 selects VT mode from a locked X-window, ALT-F1 gets you to the first VT, ALT-F2, next, etc.
No problem at all.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (797.90 BogoMips).

I was going to compile a list of innovations that could be attributed to Microsoft. Once I realized that Ctrl-Alt-Del was handled in the BIOS, I found that there aren't any.

#5 lore raw

From: "Richard B. Johnson" <[email protected]>
Date: Thu, 10 Jan 2002 09:07:51 -0500 (EST)

Ctrl-ALT-F12 selects VT mode from a locked X-window, ALT-F1 gets you to the first VT, ALT-F2, next, etc.
No problem at all.

Only if X services the keypress, in his case X is blocked on stdout/stderr output so it won't.

Franks a lot,
David S. Miller
[email protected]

#6 lore raw
Quoted 10 lines · David S. Miller

From: "Richard B. Johnson" <[email protected]>
Date: Thu, 10 Jan 2002 09:07:51 -0500 (EST)

Ctrl-ALT-F12 selects VT mode from a locked X-window, ALT-F1 gets you to the first VT, ALT-F2, next, etc.
No problem at all.

Only if X services the keypress, in his case X is blocked on stdout/stderr output so it won't.

I tried it before I answered the query. It works fine here. The only problem I found is the VT that X was using ended up with strange non-usable characteristics in graphics mode. The others are fine and X can be killed, releasing its resources. Also, CTL-Alt-Backspace works at least 50 percent of the time when an attempt is made to lock it up as reported.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (797.90 BogoMips).

I was going to compile a list of innovations that could be attributed to Microsoft. Once I realized that Ctrl-Alt-Del was handled in the BIOS, I found that there aren't any.

#7 lore raw
In reply to Richard B. Johnson

Nope, if the console is hosed that won't work.

That's when I use the magic sys rq keys -

cu

jjs

Quoted 36 lines · Richard B. Johnson
Quoted 4 lines · David Balazic
Quoted 2 lines · Matthias Andree

On Wed, 09 Jan 2002, David Balazic wrote:

Quoted 8 lines
Quoted 8 lines
Quoted 6 lines

log in on some virtual terminal, then run the following line in a bourne type shell, like bash :

X 2>&1 | less

A reboot "fixes" it. We want to reach windows level quality on desktop after all, don't we ?

You can also fix that by a remote login,

Ctrl-ALT-F12 selects VT mode from a locked X-window, ALT-F1 gets you to the first VT, ALT-F2, next, etc.
No problem at all.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (797.90 BogoMips).

I was going to compile a list of innovations that could be attributed to Microsoft. Once I realized that Ctrl-Alt-Del was handled in the BIOS, I found that there aren't any.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#8 lore raw
In reply to David Balazic
Quoted 6 lines · David Balazic

I didn't do it on purpose to lock up my system and risk FS corruption durin unclean reboot. I was interested in the server output and " 2>&1 | less" is the logical way to do that.

I could also "solve" this problem by not running linux. And I can "solve" all gcc bugs by not using gcc. Those are not solutions. Not to me at least.

It's not Linux-specific, but will ALWAYS happen when you use one program that eats all your input and pipe its output into another program that waits for your input.

What and when do you think you will eat when you feed your dog the sausage you want to eat yourself?

Quoted 6 lines
Quoted 1 line

output into interactive programs. tail -f is a viable workaround -- and

tail -f ? what is the difference between :

$ X 2>&1 | tail -f
and
$ X 

That you're clueless.

You'd do:

X >/my/safe/tmp/dir/X.log 2>&1 & tail -f /my/safe/tmp/dir/X.log

Quoted 4 lines
Quoted 1 line

all this is off-topic on linux-kernel,

non-root user locked up the console code. console code is part of kernel. it is a kernel topic.

Nope. Non-root user has used setuid application and thus become root. Drop setuid privileges and use xdm/kdm/gdm if you're to avoid this.

Quoted 1 line

My own dumbness ? Did you also say that ping-of-death is not a problem ?

Ping-of-death is a kernel bug or correctness issue or whatever you call it. This is not. root gave away the privilege to redirect console input by installing a setuid-application, X, XFree86, Xwrapper, whatever it may be called.

And now please take this off the list.

#9 lore raw
In reply to David Balazic
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

log in on some virtual terminal, then run the following line in a bourne type shell, like bash :

X 2>&1 | less

or by just not piping X

into less or more.

Quoted 6 lines

I didn't do it on purpose to lock up my system and risk FS corruption durin unclean reboot. I was interested in the server output and " 2>&1 | less" is the logical way to do that.

I could also "solve" this problem by not running linux. And I can "solve" all gcc bugs by not using gcc. Those are not solutions. Not to me at least.

You could also solve all your computer problems by not using a computer.

Quoted 8 lines
Quoted 1 line

output into interactive programs. tail -f is a viable workaround -- and

tail -f ? what is the difference between :

$ X 2>&1 | tail -f
and
$ X 
?
Quoted 4 lines
Quoted 1 line

all this is off-topic on linux-kernel,

non-root user locked up the console code. console code is part of kernel. it is a kernel topic.

This is not the problem. It's not the kernel's fault, it's less's fault. When you pipe to less, it only reads enough to display on the screen. X is sending tons more information than less is willing to read therefor X will block (stop) until less reads more. I've done this myself. my work around is to press END as soon as I hit enter. That way less will go to the end and not block.

You're better off doing:
X > somefile 2>&1
then lessing "somefile". this won't block the X server.

I agree with matt that this is off-topic as it's not a kernel issue, it's userland.

Signature · 1 line
 Lab tests show that use of micro$oft causes cancer in lab animals
#10 lore raw
In reply to David Balazic
Quoted 3 lines · David Balazic
Quoted 2 lines
Quoted 1 line

how do I start chvt if I have a locked up console system ?

Ctrl-Alt-F1 ?

Which part of "locked up console system" you don't understand ? :-)

In that case, log in through telnet, become root, and type 'chvt 1'.

Works like a charm here.

Regards,

Signature · 4 lines
Jasper Spaans
http://jsp.ds9a.nl/contact/
Tel/Fax: +31-84-8749842
``Got no clue? Too bad for you.''
#11 lore raw
In reply to David Balazic

More likely <ALT><SysRq>K

if magic sysrq keys are not disabled -

cu

jjs

Quoted 18 lines · Xavier Bestel
Quoted 4 lines · David Balazic
Quoted 2 lines

chvt,

how do I start chvt if I have a locked up console system ?

Ctrl-Alt-F1 ?

Xav

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/