Re: [PATCH] vc bell config
Hi! > >> It is already possible to deactivate the vc bell on a per-tty basis, > >> by using echo -en "\e[11;0]", but this is reset on reset(1). > >> > >> This adds a sysfs parameter to globally control the vc bell, as well > >> as sysfs parameters for default pitch and duration. > >> > >> Signed-off-by: Jan Engelhardt <[EMAIL PROTECTED]> > > > >There are more parameters that should be set during reset... like > >cursor size and color, palette, What about /sys/.../string_to_interpret > >_on_reset ? > > On reset(1), cursor size, palette, and bell parameters _do_ get reset > to the defaults. Some defaults may already be changed by the user, > like palette or default_utf8. > > Bell configuration is currently not one of them so, should a program > decide to reset the tty, or should it happen that your output is > garbled (forcing you to do reset), some settings change back to > "unwanted defaults". Ok, and I'm suggesting general method for the "unwanted defaults" problem. Just have a /sys/.../terminal_init_string. During reset, let console code interpret terminal_init_string, to set _wanted_ defaults. So you'd do: echo -en "\e[11;0]" > /sys/.../terminal_init_string... and I'd do something similar with softcursor settings. (Which are currently reset to compiled-in defaults, and that is "unwanted defaults" to me). Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] vc bell config
On Oct 11 2007 18:11, Pavel Machek wrote: > >> It is already possible to deactivate the vc bell on a per-tty basis, >> by using echo -en "\e[11;0]", but this is reset on reset(1). >> >> This adds a sysfs parameter to globally control the vc bell, as well >> as sysfs parameters for default pitch and duration. >> >> Signed-off-by: Jan Engelhardt <[EMAIL PROTECTED]> > >There are more parameters that should be set during reset... like >cursor size and color, palette, What about /sys/.../string_to_interpret >_on_reset ? On reset(1), cursor size, palette, and bell parameters _do_ get reset to the defaults. Some defaults may already be changed by the user, like palette or default_utf8. Bell configuration is currently not one of them so, should a program decide to reset the tty, or should it happen that your output is garbled (forcing you to do reset), some settings change back to "unwanted defaults". - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] vc bell config
Hi! > It is already possible to deactivate the vc bell on a per-tty basis, > by using echo -en "\e[11;0]", but this is reset on reset(1). > > This adds a sysfs parameter to globally control the vc bell, as well > as sysfs parameters for default pitch and duration. > > Signed-off-by: Jan Engelhardt <[EMAIL PROTECTED]> There are more parameters that should be set during reset... like cursor size and color, palette, What about /sys/.../string_to_interpret _on_reset ? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] vc bell config
Hi! It is already possible to deactivate the vc bell on a per-tty basis, by using echo -en \e[11;0], but this is reset on reset(1). This adds a sysfs parameter to globally control the vc bell, as well as sysfs parameters for default pitch and duration. Signed-off-by: Jan Engelhardt [EMAIL PROTECTED] There are more parameters that should be set during reset... like cursor size and color, palette, What about /sys/.../string_to_interpret _on_reset ? On reset(1), cursor size, palette, and bell parameters _do_ get reset to the defaults. Some defaults may already be changed by the user, like palette or default_utf8. Bell configuration is currently not one of them so, should a program decide to reset the tty, or should it happen that your output is garbled (forcing you to do reset), some settings change back to unwanted defaults. Ok, and I'm suggesting general method for the unwanted defaults problem. Just have a /sys/.../terminal_init_string. During reset, let console code interpret terminal_init_string, to set _wanted_ defaults. So you'd do: echo -en \e[11;0] /sys/.../terminal_init_string... and I'd do something similar with softcursor settings. (Which are currently reset to compiled-in defaults, and that is unwanted defaults to me). Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] vc bell config
Hi! It is already possible to deactivate the vc bell on a per-tty basis, by using echo -en \e[11;0], but this is reset on reset(1). This adds a sysfs parameter to globally control the vc bell, as well as sysfs parameters for default pitch and duration. Signed-off-by: Jan Engelhardt [EMAIL PROTECTED] There are more parameters that should be set during reset... like cursor size and color, palette, What about /sys/.../string_to_interpret _on_reset ? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] vc bell config
On Oct 11 2007 18:11, Pavel Machek wrote: It is already possible to deactivate the vc bell on a per-tty basis, by using echo -en \e[11;0], but this is reset on reset(1). This adds a sysfs parameter to globally control the vc bell, as well as sysfs parameters for default pitch and duration. Signed-off-by: Jan Engelhardt [EMAIL PROTECTED] There are more parameters that should be set during reset... like cursor size and color, palette, What about /sys/.../string_to_interpret _on_reset ? On reset(1), cursor size, palette, and bell parameters _do_ get reset to the defaults. Some defaults may already be changed by the user, like palette or default_utf8. Bell configuration is currently not one of them so, should a program decide to reset the tty, or should it happen that your output is garbled (forcing you to do reset), some settings change back to unwanted defaults. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] vc bell config
On Oct 5 2007 17:00, Andrew Morton wrote: >> >> It is already possible to deactivate the vc bell on a per-tty basis, >> by using echo -en "\e[11;0]", but this is reset on reset(1). >> >> This adds a sysfs parameter to globally control the vc bell, as well >> as sysfs parameters for default pitch and duration. > >Why do we need this? To fix the stupid-app-makes-my-box-beep problem, I >guess. Is there no other way of suppressing the beep? The user has a number of choices: - rmmod pcspkr, to disable all beeps (including X) - vt.bell_enabled=0, to disable beeps on all VCs, but not X - vt.default_bell_pitch=400, to give VC the frequency used in X (400 is perceived less penetrant than 750) >> * Here is the default bell parameters: 750HZ, 1/8th of a second >> */ >> -#define DEFAULT_BELL_PITCH 750 >> -#define DEFAULT_BELL_DURATION (HZ/8) >> +static unsigned int default_bell_pitch = 750; >> +static unsigned int default_bell_duration = HZ / 8; > >It is inapt to call these default_X. Because once they have been altered >by the user, they aren't defaults any more. They are still default, as in: they will define the initial pitch/duration when a tty is created, or when the tty is reset. If they were just 'bell_pitch', one culd assume that changing it changes the pitch of all ttys, which it does not. Whether it's good or not that the vc subsytem has per-tty pitches is a different story. Well, that's what I am thinking about it. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] vc bell config
On Oct 6 2007 10:55, Alan Cox wrote: >> > >> > It is already possible to deactivate the vc bell on a per-tty basis, >> > by using echo -en "\e[11;0]", but this is reset on reset(1). >> > >> > This adds a sysfs parameter to globally control the vc bell, as well >> > as sysfs parameters for default pitch and duration. >> >man setterm > >See -blength and -bfreq Only sets length and freq of current tty, and only until `reset`. It's equivalent to \e[10;x] and \e[11;x]. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] vc bell config
On Fri, 5 Oct 2007 17:00:11 -0700 Andrew Morton <[EMAIL PROTECTED]> wrote: > On Fri, 5 Oct 2007 13:55:52 +0200 (CEST) > Jan Engelhardt <[EMAIL PROTECTED]> wrote: > > > > > It is already possible to deactivate the vc bell on a per-tty basis, > > by using echo -en "\e[11;0]", but this is reset on reset(1). > > > > This adds a sysfs parameter to globally control the vc bell, as well > > as sysfs parameters for default pitch and duration. > > > > Why do we need this? To fix the stupid-app-makes-my-box-beep problem, I > guess. Is there no other way of suppressing the beep? (no jokes about wire > cutters or earplugs, please). man setterm See -blength and -bfreq Alan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] vc bell config
On Fri, 5 Oct 2007 17:00:11 -0700 Andrew Morton [EMAIL PROTECTED] wrote: On Fri, 5 Oct 2007 13:55:52 +0200 (CEST) Jan Engelhardt [EMAIL PROTECTED] wrote: It is already possible to deactivate the vc bell on a per-tty basis, by using echo -en \e[11;0], but this is reset on reset(1). This adds a sysfs parameter to globally control the vc bell, as well as sysfs parameters for default pitch and duration. Why do we need this? To fix the stupid-app-makes-my-box-beep problem, I guess. Is there no other way of suppressing the beep? (no jokes about wire cutters or earplugs, please). man setterm See -blength and -bfreq Alan - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] vc bell config
On Oct 6 2007 10:55, Alan Cox wrote: It is already possible to deactivate the vc bell on a per-tty basis, by using echo -en \e[11;0], but this is reset on reset(1). This adds a sysfs parameter to globally control the vc bell, as well as sysfs parameters for default pitch and duration. man setterm See -blength and -bfreq Only sets length and freq of current tty, and only until `reset`. It's equivalent to \e[10;x] and \e[11;x]. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] vc bell config
On Oct 5 2007 17:00, Andrew Morton wrote: It is already possible to deactivate the vc bell on a per-tty basis, by using echo -en \e[11;0], but this is reset on reset(1). This adds a sysfs parameter to globally control the vc bell, as well as sysfs parameters for default pitch and duration. Why do we need this? To fix the stupid-app-makes-my-box-beep problem, I guess. Is there no other way of suppressing the beep? The user has a number of choices: - rmmod pcspkr, to disable all beeps (including X) - vt.bell_enabled=0, to disable beeps on all VCs, but not X - vt.default_bell_pitch=400, to give VC the frequency used in X (400 is perceived less penetrant than 750) * Here is the default bell parameters: 750HZ, 1/8th of a second */ -#define DEFAULT_BELL_PITCH 750 -#define DEFAULT_BELL_DURATION (HZ/8) +static unsigned int default_bell_pitch = 750; +static unsigned int default_bell_duration = HZ / 8; It is inapt to call these default_X. Because once they have been altered by the user, they aren't defaults any more. They are still default, as in: they will define the initial pitch/duration when a tty is created, or when the tty is reset. If they were just 'bell_pitch', one culd assume that changing it changes the pitch of all ttys, which it does not. Whether it's good or not that the vc subsytem has per-tty pitches is a different story. Well, that's what I am thinking about it. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] vc bell config
On Fri, 5 Oct 2007 13:55:52 +0200 (CEST) Jan Engelhardt <[EMAIL PROTECTED]> wrote: > > It is already possible to deactivate the vc bell on a per-tty basis, > by using echo -en "\e[11;0]", but this is reset on reset(1). > > This adds a sysfs parameter to globally control the vc bell, as well > as sysfs parameters for default pitch and duration. > Why do we need this? To fix the stupid-app-makes-my-box-beep problem, I guess. Is there no other way of suppressing the beep? (no jokes about wire cutters or earplugs, please). > --- > drivers/char/vt.c | 18 +++--- > 1 file changed, 11 insertions(+), 7 deletions(-) > > Index: linux-2.6.23/drivers/char/vt.c > === > --- linux-2.6.23.orig/drivers/char/vt.c > +++ linux-2.6.23/drivers/char/vt.c > @@ -134,8 +134,12 @@ const struct consw *conswitchp; > /* > * Here is the default bell parameters: 750HZ, 1/8th of a second > */ > -#define DEFAULT_BELL_PITCH 750 > -#define DEFAULT_BELL_DURATION(HZ/8) > +static unsigned int default_bell_pitch = 750; > +static unsigned int default_bell_duration = HZ / 8; It is inapt to call these default_X. Because once they have been altered by the user, they aren't defaults any more. They should be just bell_pitch and bell_duration. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] vc bell config
On Fri, 5 Oct 2007 13:55:52 +0200 (CEST) Jan Engelhardt [EMAIL PROTECTED] wrote: It is already possible to deactivate the vc bell on a per-tty basis, by using echo -en \e[11;0], but this is reset on reset(1). This adds a sysfs parameter to globally control the vc bell, as well as sysfs parameters for default pitch and duration. Why do we need this? To fix the stupid-app-makes-my-box-beep problem, I guess. Is there no other way of suppressing the beep? (no jokes about wire cutters or earplugs, please). --- drivers/char/vt.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) Index: linux-2.6.23/drivers/char/vt.c === --- linux-2.6.23.orig/drivers/char/vt.c +++ linux-2.6.23/drivers/char/vt.c @@ -134,8 +134,12 @@ const struct consw *conswitchp; /* * Here is the default bell parameters: 750HZ, 1/8th of a second */ -#define DEFAULT_BELL_PITCH 750 -#define DEFAULT_BELL_DURATION(HZ/8) +static unsigned int default_bell_pitch = 750; +static unsigned int default_bell_duration = HZ / 8; It is inapt to call these default_X. Because once they have been altered by the user, they aren't defaults any more. They should be just bell_pitch and bell_duration. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/