Re: scroll-back buffer

1997-10-17 Thread Joey Hess
Torsten Hilbrich wrote:
> Another way:
> 
> runvc false
> 
> where runvc is the following script:
> 
>#!/bin/sh
># Run something on a VC, from X, and switch back to X when done.
># GPL Joey Hess, Thu, 10 Jul 1997 23:27:08 -0400
>exec open -s -- sh -c "$* ; chvt `getvc`"

Hm, maybe I should include runvc and getvc in the open package (which I
happen to maintain).

BTW, since you are already at the console, you don't need to use all this,
the following command will flip you breifly to a free vt and back, which
does clear the scrollback buffer (neat trick!):

open -s -w false

-- 
see shy jo


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: scroll-back buffer

1997-10-17 Thread Bruce Perens
Excuse my naivete, but won't printing a bunch of blank lines clear it?

Thanks

Bruce
-- 
Can you get your operating system fixed when you need it?
Linux - the supportable operating system. http://www.debian.org/support.html
Bruce Perens K6BP   [EMAIL PROTECTED]   NEW PHONE NUMBER: 510-620-3502


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: scroll-back buffer

1997-10-17 Thread B. Bell
On Mon, 13 Oct 1997, Paul Miller wrote:
> How can I clear the scroll-back buffer when a use logs out (other than
> changing tty's)?

if you have SVGATextMode installed, executing 'stm' will do it.

-brad

- Free the West Memphis Three - http://www.pobox.com/~mms/wm3/

[EMAIL PROTECTED] - http://weber.u.washington.edu/~maximill


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: scroll-back buffer

1997-10-16 Thread Torsten Hilbrich
Pete Harlan <[EMAIL PROTECTED]> writes:

> > How can I clear the scroll-back buffer when a use logs out (other than
> > changing tty's)?
> 
> Echo four thousand spaces from .bash_logout?

Another way:

runvc false

where runvc is the following script:

   #!/bin/sh
   # Run something on a VC, from X, and switch back to X when done.
   # GPL Joey Hess, Thu, 10 Jul 1997 23:27:08 -0400
   exec open -s -- sh -c "$* ; chvt `getvc`"

and getvc is compiled from the following source

   /* getvc.c
* Prints the number of the current VC to stdout. Most of this code
* was ripped from the open program, and this code is GPL'd
*
* Joey Hess, Fri Apr  4 14:58:50 EST 1997
*/
   
   #include 
   #include 
   
   main () {
 int fd = 0;
 struct vt_stat vt;
   
 if ((fd = open("/dev/console",O_WRONLY,0)) < 0) {
   perror("Failed to open /dev/console\n");
   return(2);
 }
 if (ioctl(fd, VT_GETSTATE, &vt) < 0) {
   perror("can't get VTstate\n");
   close(fd);
   return(4);
 }
 printf("%d\n",vt.v_active);
   }
   
   /* End of getvc.c */

This method automates the switching of VC and can be run from .logout
(if you run a csh).

I use this script for 'runvc mc' from inside X.

Torsten

-- 
"And pray that there's intelligent life somewhere up in space.
 Because there's bugger all down here on Earth"
Monthy Python, Galaxy Song
PGP Public key available


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: scroll-back buffer

1997-10-13 Thread Pete Harlan
> How can I clear the scroll-back buffer when a use logs out (other than
> changing tty's)?

Echo four thousand spaces from .bash_logout?

--Pete


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


scroll-back buffer

1997-10-13 Thread Paul Miller
How can I clear the scroll-back buffer when a use logs out (other than
changing tty's)?

-Paul


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .