From owner-freebsd-hackers Wed Nov 4 16:14:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA10187 for freebsd-hackers-outgoing; Wed, 4 Nov 1998 16:14:06 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ocean.campus.luth.se (ocean.campus.luth.se [130.240.194.116]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA10181 for ; Wed, 4 Nov 1998 16:14:04 -0800 (PST) (envelope-from karpen@ocean.campus.luth.se) Received: (from karpen@localhost) by ocean.campus.luth.se (8.9.1/8.9.1) id BAA06026; Thu, 5 Nov 1998 01:08:10 +0100 (CET) (envelope-from karpen) From: Mikael Karpberg Message-Id: <199811050008.BAA06026@ocean.campus.luth.se> Subject: Re: kld screensavers In-Reply-To: <199811030302.MAA01789@zodiac.mech.utsunomiya-u.ac.jp> from Kazutaka YOKOTA at "Nov 3, 98 12:02:37 pm" To: yokota@zodiac.mech.utsunomiya-u.ac.jp (Kazutaka YOKOTA) Date: Thu, 5 Nov 1998 01:08:10 +0100 (CET) Cc: hackers@FreeBSD.ORG, yokota@zodiac.mech.utsunomiya-u.ac.jp X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG According to Kazutaka YOKOTA: > >I haven't looked at the current code, I'm affraid, so go easy on me. > >Example: > > > >Three screensavers: (say default prio is 5) > > > >lock: prio 1, 10 minutes, fallthrough (Demands password...) > >green: prio 4, 20 minutes (Turn screen off) > >stars: prio 5, 5 minutes (Twinkle, twinkle, little star) > [...] > > I am not sure if we want to have this kind of screen saver stack. It > will complicate things a lot: multiple saver module management, > priority management, flag checking... Is this worth the effort? > > If you want to lock the vty with password, you can always use > `lock(1)'. And it is easy to modify screen savers, `start' or > whatever, and add them the ability to turn off the display after set > period (the screen saver can check system time when it is called > periodically); it will be far easier than implementing the screen > saver stack thingy. Yes, but I think I could offer to write the stack. I still haven't looked at the current code, and i think I should before I attempt such a project, but the stack itself is a very minor problem, I think. It's just coding. :-) I imagine something with an interface like: called_periodically_from_syscons(); called_by_syscons_at_char_pressed_when_in_screensaver_mode(); register_screensaver(); unregister_screensaver(); list_screensavers(); And have a couple of functions which gets called in the screensavers that are registered, when appropriate. Again I haven't read the code yet, but I guess the screensavers now just attack the hardware directly. This seems undesirable, and I think for this to work well you would have to make a couple of functions available to the screensavers. Syscons should provide something like: screensaver_set_mode(); /* normal (no saver), text, graphics, green */ screensaver_put_char(); /* for text mode */ screensaver_draw_line(); /* for graphics mode */ Umm... I actually can't think of anything else that would be needed. If the screensavers were written to use this interface then syscons would also know exactly what has happened to the screen, and would therefor put it back easilly, when called with a screensaver_set_mode(normal), I'm guessing. Umm... All this is not really well anchored in reality yet, but... comments are welcome. What do Søren and Kazutaka think? Anyone else? /Mikael To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message