Hacker Newsnew | comments | show | ask | jobs | submitlogin

Can anyone explain how the OP's solution works, in particular the chvt 3/7? I looked up chvt and it seems like it would switch a different terminal into the foreground, but this raises more questions than it answers.

Like how does he know what 3 and 7 have on them? And would this work on a windowing system? And why does it appear as if the screen has turned off?




Are you running linux currently? You have a number of virtual terminals, commonly Ctrl+Alt+F1 through Ctrl+Alt+F7, with 1-6 running text consoles and 7 with your X11 session on it.

If you boot into the GUI and spend all your time there, then although 1 will probably contain remnants of the boot process, 2-6 will be unused, a blank screen with some text in the corner.

-----


On linux, it defaults to virtual terminals 1-6 (for the keys 1-6) behave like command lines, and X11 will occupy virtual terminal 7.

Basically, he's switching between a near-blank screen, and the graphical environment.

-----


X typically runs on vt 7. Switching away to any other vt would probably show a login prompt, unless he had something else running on vt 3 that presented only a blank screen.

-----


terminal 7 is were X resides...

So basically it's :

switch to text terminal wait 15 seconds switch to X Window

-----




Applications are open for YC Summer 2015

Guidelines | FAQ | Support | Lists | Bookmarklet | DMCA | Y Combinator | Apply | Contact

Search: