Re: chromium 48 (64-bit) crashes on 5.9-beta and xfce-4.12

2016-02-03 Thread Henrique N. Lengler
On Wed, Feb 03, 2016 at 08:35:29PM +0100, bian wrote:
> Hi,
> 
> running stock OpenBSD 5.9-beta, xfce-4.12p3, and chromium 48.0.2564.97
> (64-bit) from snapshots as of Feb. 2 I get get frequent chromium crashes
> with resulting core dumps (about every 7-8 starts). This happens when
> starting the browser. Once started it is stable. dmesg and output from gdb
> on a chromium core dump can be found below.
> 
> I have similar problems when using firefox-esr 38.6.0, also from snapshots
> of the same date. Here the start typically goes well, but when switching to
> another desktop, opening thunar (the file manager), and opening a text file
> for editing, then chances are high that firefox crashes. This is, however
> highly irregular and I haven't really found a reliable way to reproduce the
> error.
> 
> Both browsers have one extension installed, uBlock Origin, otherwise they
> are stock. This crashing behaviour occurred also on obsd-5.8 and it was one
> of my reasons for switching from 5.8 to 5.9-beta.
> 
> Does anyone know what is going on here?

I experienced this problem a few times, when starting the browser it used to
crash. But it didn't happened anymore. However I'm not on last chromium, mine 
is 47.0.2526.111. All the rest seems to work normally.



Get detailed keyboard input on OpenBSD, without depending on X

2016-02-18 Thread Henrique N. Lengler
Hi misc,

I am writing some code. My program will need detailed keyboard input,
like key press and key release.
I know I can get this setup with X (SDL too, which depends on X), but since I 
don't necessarily need a GUI, it wouldn't be cool opening a window just to 
get the keyboard.

I read on the internet that ncurses also don't detect key release, so it is
also out of the list.

So, since the only alternative I found was X. I started to look about 
getting raw keyboard input, dismembering input from the graphics stack 
(maybe create a lib), and search if there is any other program 
that already did this. I read wskbd(4), but It basically talks only about
devices.

Playing with "/dev/wskbd*" I didn't saw a light on it, since for example once 
the X is using the keyboard, this file stay "idle";

The only piece of example was the propper X code, on xf86-input-keyboard, but 
it is a hard code, wih lots of #ifdefs. Hard to get into without much
information, and not being not that good on C programming.

So I decided before getting into it, ask here on the ml, if anyone already 
faced this problem, knows any fix, workaround, or else can point me better
documentation about the OpenBSD keyboard driver. I think that having a
_default_ way of getting input (if there isn't one yet) 
enough detailed, would be great, and then turn into the 
way that all applications get input on OpenBSD, from ncurses to X, would
improve a lot the system. Or even turn that into a independent lib, which one 
could use in any type of application, dismembering it from graphics libs, or 
any other dependency.

Do you guys think there is a way of doing that?

Thanks for the attention,
correct me any mistake;

--
Regards,

Henrique N. Lengler



OpenBSD missing manpages?

2016-02-22 Thread Henrique N. Lengler
Hi,

As I posted here , 
I was in an attempt to work with wskbd, and seeking for documentation.

I said that the only info I get was wskbd(4), which does not provide info about
working with code and the wskbd framework.

_tl;dr_ - Turns out that I could find information about wskbd framework 
(wskbd(9)), 
and the others like wsdisplay, wsmouse ... not on my system, but on netbsd
manpages.

See the links:

http://netbsd.gw.com/cgi-bin/man-cgi?wskbd+9+NetBSD-6.0
http://netbsd.gw.com/cgi-bin/man-cgi?wsdisplay+9+NetBSD-6.0
http://netbsd.gw.com/cgi-bin/man-cgi?wsdisplay+9+NetBSD-6.0
...

So the question is, shouldn't openbsd include these manpages, or at least any
other that document these frameworks?



Recording computer sound.

2016-04-08 Thread Henrique N. Lengler
Hi,

Is there a way to record the sound playing on my speakers?
Like duplicating it and saving on my computer everything that goes out to the
speaker.

I would like to to this to record some screencast.

Any way of doing this?

Thanks;

--
Regards

Henrique N. Lengler



Re: Recording computer sound.

2016-04-08 Thread Henrique N. Lengler
But what device should I specify?

Please give full answers.

On Sat, Apr 09, 2016 at 12:46:53AM +0200, ropers wrote:
> You mean with aucat(1)?
> 
> On 9 April 2016 at 00:09, Henrique N. Lengler 
> wrote:
> 
> > Hi,
> >
> > Is there a way to record the sound playing on my speakers?
> > Like duplicating it and saving on my computer everything that goes out to
> > the
> > speaker.
> >
> > I would like to to this to record some screencast.
> >
> > Any way of doing this?
> >
> > Thanks;
> >
> > --
> > Regards
> >
> > Henrique N. Lengler



Re: Recording computer sound.

2016-04-09 Thread Henrique N. Lengler
On Sat, Apr 09, 2016 at 01:18:11PM +0200, Alexandre Ratchov wrote:
> On Fri, Apr 08, 2016 at 07:09:59PM -0300, Henrique N. Lengler wrote:
> > Hi,
> > 
> > Is there a way to record the sound playing on my speakers?
> > Like duplicating it and saving on my computer everything that goes out to 
> > the
> > speaker.
> > 
> > I would like to to this to record some screencast.
> > 
> > Any way of doing this?
> > 
> 
> First you have to create a record-whay-you-hear device (aka
> monitoring), for instance add these options to /etc/rc.conf.local:
> 
> sndiod_flags=-s default -m play,mon -s mon
> 
> see -m and -s options in sndiod man page for more details.  Then,
> restart sndiod with:
> 
> rcctl restart sndiod
> 
> Then, use your favourite program to record audio and configure it
> to record from device "snd/0.mon".  Example:
> 
> aucat -f snd/0.mon -o file.wav
> 
> at this point whatever your system plays is recorded into file.wav.
> 
> HTH
> 

Thank you, that worked.

Henrique N. Lengler.



long name functions in bc

2016-07-17 Thread Henrique N. Lengler
Hi,

I'm new on bc, I'm writing a library with some math functions I intend to use
on calculations.
I would like to use long names for variables and functions on my library
but also use functions from the main math library, which I do by calling bc
with '-l' flag. But once I start bc with '-l' I can't use any long name, why?

Is there a way to change this behaviour?
Why it works like this?

Regards,

Henrique N. Lengler



Re: long name functions in bc

2016-07-17 Thread Henrique N. Lengler
On Sun, Jul 17, 2016 at 07:20:48PM +0200, Otto Moerbeek wrote:
> On Sun, Jul 17, 2016 at 12:51:03PM -0300, Henrique N. Lengler wrote:
> 
> > Hi,
> > 
> > I'm new on bc, I'm writing a library with some math functions I intend to 
> > use
> > on calculations.
> > I would like to use long names for variables and functions on my library
> > but also use functions from the main math library, which I do by calling bc
> > with '-l' flag. But once I start bc with '-l' I can't use any long name, 
> > why?
> > 
> > Is there a way to change this behaviour?
> > Why it works like this?
> > 
> > Regards,
> > 
> > Henrique N. Lengler
> 
> This is a bug introduced by not execing dc anymore, but calling the
> dc code as a function.
> 
> In that case getopt is called a second time for a new set of
> parameters and it has to be reinitialized,
> 
> The code below should fix it. Recompile both dc and bc after patching.
> 
>   -Otto
> 
> Index: dc.c
> ===
> RCS file: /cvs/src/usr.bin/dc/dc.c,v
> retrieving revision 1.17
> diff -u -p -r1.17 dc.c
> --- dc.c  3 Nov 2015 04:58:58 -   1.17
> +++ dc.c  17 Jul 2016 17:20:19 -
> @@ -50,6 +50,8 @@ dc_main(int argc, char *argv[])
>   if ((buf = strdup("")) == NULL)
>   err(1, NULL);
>   /* accept and ignore a single dash to be 4.4BSD dc(1) compatible */
> + optind = 1;
> + optreset = 1;
>   while ((ch = getopt(argc, argv, "e:x-")) != -1) {
>   switch (ch) {
>   case 'e':

Will try it, shouldn't this patch go to the repository?

Regards,

Henrique N. Lengler