public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Pisar <ppisar@redhat.com>
To: Alexey Gladkov <gladkov.alexey@gmail.com>
Cc: util-linux@vger.kernel.org, "Dmitry V. Levin" <ldv@altlinux.org>,
	Karel Zak <kzak@redhat.com>
Subject: Re: vlock command
Date: Thu, 15 Nov 2012 09:48:21 +0100	[thread overview]
Message-ID: <20121115084821.GB1877@dhcp-0-146.brq.redhat.com> (raw)
In-Reply-To: <20121115075253.GA26255@x2.net.home>

[-- Attachment #1: Type: text/plain, Size: 2074 bytes --]

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@redhat.com>.
> > > 
> > > 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 #2: Type: application/pgp-signature, Size: 230 bytes --]

  reply	other threads:[~2012-11-15  8:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14 10:35 vlock command Karel Zak
2012-11-14 11:04 ` Alexey Gladkov
2012-11-14 12:22   ` Karel Zak
2012-11-14 23:54     ` Dmitry V. Levin
2012-11-16  8:36       ` Karel Zak
2012-11-14 12:26   ` Karel Zak
2012-11-14 12:38     ` Alexey Gladkov
2012-11-14 23:31     ` Dmitry V. Levin
2012-11-15  6:44       ` Alexey Gladkov
2012-11-15  7:52         ` Karel Zak
2012-11-15  8:48           ` Petr Pisar [this message]
2012-11-15  9:35             ` Alexey Gladkov
2012-11-15  9:48               ` Karel Zak
2012-11-15 10:03                 ` Alexey Gladkov
2012-11-15 10:23               ` Petr Pisar
2012-11-16 10:01                 ` Alexey Gladkov
2012-11-16 13:21                   ` Petr Pisar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121115084821.GB1877@dhcp-0-146.brq.redhat.com \
    --to=ppisar@redhat.com \
    --cc=gladkov.alexey@gmail.com \
    --cc=kzak@redhat.com \
    --cc=ldv@altlinux.org \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox