On Thu, Nov 15, 2012 at 08:52:53AM +0100, Karel Zak wrote: > On Thu, Nov 15, 2012 at 10:44:47AM +0400, Alexey Gladkov wrote: > > 15.11.2012 03:31, Dmitry V. Levin wrote: > > > On Wed, Nov 14, 2012 at 01:26:10PM +0100, Karel Zak wrote: > > > > > >> Alexey, just today I added --erase option to Fedora version. Maybe > > >> you can apply the patch below to your repository too. Author of the > > >> patch is Petr Pisar <ppisar@xxxxxxxxxx>. > > > > > > The first vlock RFE for ages! Alexey, please apply. > > > > Dmitry, I mistakenly did not add you in the Cc. I wrote Karel that > > similar functionality you have already implemented. > > Here is my answer: > > > > > On closer look I found out that the my version of vlock already erases > > > display if we are on the virtual console: > > > > > > http://git.altlinux.org/people/legion/packages/kbd.git?p=kbd.git;a=blob;f=src/vlock/screen.c;h=720d880080f9030553a32d625756b5e30c6d4266;hb=768b8c314e1d3c465d895b206da4aa4543914d1d#l37 > > > > > > http://git.altlinux.org/people/legion/packages/kbd.git?p=kbd.git;a=blob;f=src/vlock/vt.c;h=50746de238f5acc231d2ffef8a5604dfbef3cfad;hb=768b8c314e1d3c465d895b206da4aa4543914d1d#l194 > > > > > > As I understand you want a similar functionality. Is this enough for > > > you, It's similar but insufficient. The difference between your clear_str[] = "\33[H\33[J" and my string is my way clears scroll-back buffer of Linux virtual terminal too. This prevents from reading history using Shift-PgUp while the terminal is locked. Read current console_codes(4) page, especially search for word "buffer". So what I ask is to prepend "\33[3J" to your clear_str[]. This even users with older kernel not implementing this code get console cleared. > or you want to be able to clear the display regardless of conditions? If I understand the code correctly, you clear screen only if it's a virtual terminal. I have no idea how usefull is vlock on other terminals (I use "screen" there), so I do not request any change in this matter. -- Petr
Attachment:
pgpysUTixsimb.pgp
Description: PGP signature