Re: kitty termcap entry

2021-06-20 Thread Karl Pettersson
Hi

Have you tried this (specifically the last part about generating a termcap
description and appending to the termcap database)?

https://sw.kovidgoyal.net/kitty/faq.html?highlight=termcap#i-get-errors-about-the-terminal-being-unknown-or-opening-the-terminal-failing-when-sshing-into-a-different-computer

Cheers

On Sun, Jun 20, 2021 at 03:51:26PM +0100, Björn Gohla wrote:
> 
> hi all,
> 
> i have the following problem with the kitty terminal emulator:
> 
> 
> 15:43:39 bgohla@titanic ~ $ doas pkg_add hello
> doas (bgo...@titanic.my.domain) password: 
> failed termcap lookup on xterm-kitty at 
> /usr/libdata/perl5/OpenBSD/ProgressMeter/Term.pm line 113.
> 15:44:02 bgohla@titanic ~ $ echo $TERM
> xterm-kitty
> 15:44:17 bgohla@titanic ~ $
> 
> 
> it seems the problem is that there is no entry for xterm-kitty in
> /etc/termcap. the above pkg_add invocation works when i set TERM=xterm .
> 
> i suppose one could just add a termcap entry that redirects to
> xterm.
> 
> would this be a patch in the kitty port, or does this require a change
> to the base system?
> 
> --
> cheers,
> björn
> 

-- 
Karl Pettersson



Re: The OpenBSD talk at 36c3

2019-12-30 Thread Karl Pettersson
On Mon, Dec 30, 2019 at 11:46:58AM +0100, Claudio Jeker wrote:
 
> Sorry but 25k is no where close to 75% of 202198.
> Seems he did count words not characters.
> 

Yes, the author has published code for generating the chart:
https://isopenbsdsecu.re/mitigations/development_practises/

The count is generated by "awk '{ print NF}'", which should count words
separated by space if no field separator is specified.

> -- 
> :wq Claudio
> 



Re: Tools for writers

2019-11-03 Thread Karl Pettersson
On Sun, Nov 03, 2019 at 01:44:20PM +0100, Xianwen Chen (陈贤文) wrote:
> Dear Marc,
> 
> > I wasn't talking about mandoc but pandoc (https://pandoc.org/): you
> > write most of the things just using markdown format and add latex
> > instructions whenever you want. this way, you keep simple things simple
> > but you keep the power of latex under the wood.
> 
> Does _pandoc_ work on OpenBSD now?

I have built Pandoc on OpenBSD a couple of times: latest was in 2017.
However, it can be sensitive to the GHC version used, and I have not
bulit it using Stack. There are people who report building it in 2018,
after some tweaking.

https://github.com/jgm/pandoc/issues/4940

> 
> Yours sincerely,
> Xianwen
>

Sincerely



Re: Ubuntu in vmd and avx

2017-05-02 Thread Karl Pettersson
On Mon, Apr 24, 2017 at 11:56:25AM -0700, Mike Larkin wrote:
> On Mon, Apr 24, 2017 at 11:50:07AM -0700, Mike Larkin wrote:
> > On Mon, Apr 24, 2017 at 08:18:17PM +0200, Karl Pettersson wrote:
> > > I run 64-bit Ubuntu as a vmm guest, according to:
> > > https://gist.github.com/reyk/6d369c5c0bd0c76f4906f83933f3bb71
> > > 
> > > It works well for the most part; I have removed cloud-init becaue I do
> > > not need it. However, I used Python 2.7 with numpy 1.12 (installed via 
> > > Pip),
> > > and experienced crashes which seemed to be related to AVX2
> > > instructions, even though the cpu should support this, according to
> > > /proc/cpuinfo. (cf. https://github.com/numpy/numpy/issues/8128). For
> > > example, when I tried to reproduce this simple chart,
> > > https://matplotlib.org/examples/lines_bars_and_markers/fill_demo.html,
> > > this made Python exit with illegal instruction, according to gdb:
> > > 
> > > Program received signal SIGILL, Illegal instruction.  0x73ce5d56
> > > in UBYTE_less_equal_avx2 (args=0x7fffba50, dimensions= > > out>, steps=, __NPY_UNUSED_TAGGEDfunc=) at
> > > numpy/core/src/umath/loops.c.src:899
> > > 
> > > Downgrading to numpy 1.11.1~rc1 (the version available from as an Ubuntu
> > > package) seems to have fixed the issue.
> > >
> > 
> > we filter out avx2 from the guest, for now.  
> > 
> 
> actually after looking at this it appears we don't, and we should. the filter
> mask is only for avx (and not the later ones). I'll add suppression of avx2,
> that may force your software to downgrade to something we do allow. I'll 
> commit
> that tonight.
>

Was this commit ever made? I only find references to AVX in the CVS log
for vmm.c.



Arch and vmd

2017-04-26 Thread Karl Pettersson
Arch Linux works well as a vmd guest. Some notes about my experiences 
installing the system:

* The Arch installation can be started from the serial console, see:
  https://wiki.archlinux.org/index.php/Working_with_the_serial_console
  #Installing_Arch_Linux_using_the_serial_console
  However, the installation still tends to be unstable, due to unreliable
  downloads (which has been discussed earlier). Until this is fixed, the 
  installation can be run in QEMU, or in a guest under Linux/KVM (as is
  currently required by distributions with graphical install).

* Syslinux has to be used as bootloader, and serial console should be
  enabled: https://wiki.archlinux.org/index.php/Syslinux#Serial_console
  Moreover, the generated config has to be edited to point to the
  correct root device, and if Ext4 is used as root file system, it must
  not be 64bit (which is enabled by default when the file system is
  created): http://www.syslinux.org/wiki/index.php?title=Filesystem



Ubuntu in vmd and avx

2017-04-24 Thread Karl Pettersson
I run 64-bit Ubuntu as a vmm guest, according to:
https://gist.github.com/reyk/6d369c5c0bd0c76f4906f83933f3bb71

It works well for the most part; I have removed cloud-init becaue I do
not need it. However, I used Python 2.7 with numpy 1.12 (installed via Pip),
and experienced crashes which seemed to be related to AVX2
instructions, even though the cpu should support this, according to
/proc/cpuinfo. (cf. https://github.com/numpy/numpy/issues/8128). For
example, when I tried to reproduce this simple chart,
https://matplotlib.org/examples/lines_bars_and_markers/fill_demo.html,
this made Python exit with illegal instruction, according to gdb:

Program received signal SIGILL, Illegal instruction.  0x73ce5d56
in UBYTE_less_equal_avx2 (args=0x7fffba50, dimensions=, steps=, __NPY_UNUSED_TAGGEDfunc=) at
numpy/core/src/umath/loops.c.src:899

Downgrading to numpy 1.11.1~rc1 (the version available from as an Ubuntu
package) seems to have fixed the issue.



Re: Please: Is there ANY chance that Linux binaries might run again???

2017-03-07 Thread Karl Pettersson
One alternative, for production of Word documents, might be to use
Pandoc for converting from a lightweight markup language to DOCX. There
is no OpenBSD package for Pandoc, and building it OpenBSD can be tricky,
but I have succeeded with GHC 7.10.3 (wxallowed has to be enabled on
home and tmp). You might still need access to a system with Word,
however, for working with document templates, previewing documents, and
render some elements such as tables of contents.

Regards,
Karl P

On Tue, Mar 07, 2017 at 10:01:49PM +0100, Stefan Wollny wrote:
> Hi there,
> 
> I have to live up to my obligations - and one of them is to be able to
> work with M$-Word docs. I used to do this with SoftMaker's office suite,
> but since Linux-compat is gone I am stuck with LibreOffice which is just
> a PITA.
> 
> As at the end of the day I have to deliver results in a form my clients
> wants and pays for; switching to e.g. LaTeX is not an option (= is not
> paid).
> 
> "If you only have a hammer, every task looks like a nail!" - I will have
> to use a Linux Live-CD system to deliver shorthandedly. But I'd really
> prefer to stick to OpenBSD on my main production system. ANY chance that
> there will be a way to run Linux binaries again? (On my own risk, of
> course!) With search engines I only found outdated information.
> 
> Either which way, any hint is welcome.
> 
> Best,
> STEFAN



Re: Looking for replacement of thinkpad x201

2017-02-26 Thread Karl Pettersson
I run OpenBSD (dual boot with Linux) on an X250, which I bought in January
with the price about 50 percent discounted, because it is being replaced
with X260. There is also a rather helpful blogpost from 2016 on setting it up on
this model:

https://blogs.fsfe.org/h2/2016/01/15/openbsd-on-the-thinkpad-x250/

Regards,
Karl Pettersson

On Sun, Feb 26, 2017 at 08:19:32AM +, Florian Obser wrote:
> I need some help since I'm terrible with hardware...
> 
> So my x201 main hacking laptop is getting old and benno@ is always
> mocking me for the amount of gaffer and stickers that are holding it
> together.
> 
> Long story short, I'm in the market for a new thinkpad.
> Yes it has to be a thinkpad. I require the pointing stick and 3
> physical mouse buttons.
> 
> On the x201 I like the ease of changing the HDD and battery. I would
> prefer if that was the case with the new one.
> 
> So what's the done thing here? I'm not a hardware hacker, so I want a
> kinda fully supported one. That means accelerated X and working wifi
> (this is probably not an issue with stsp@'s hard work). Also I'm happy
> with the size of the x201, I don't want to lug a brick around, so that
> means an x series laptop. As a first approximation assume that money is
> not an issue.
> 
> Thanks,
> Florian
> 
> -- 
> I'm not entirely sure you are real.



Re: Looking for replacement of thinkpad x201

2017-02-26 Thread Karl Pettersson
Since January, I run OpenBSD (dual boot with Linux) on an X250. There is
also a rather helpful blogpost (from January 2016)on configuring the system
on this model:

https://blogs.fsfe.org/h2/2016/01/15/openbsd-on-the-thinkpad-x250/

Regards,
Karl Pettersson

On Sun, Feb 26, 2017 at 08:19:32AM +, Florian Obser wrote:
> I need some help since I'm terrible with hardware...
> 
> So my x201 main hacking laptop is getting old and benno@ is always
> mocking me for the amount of gaffer and stickers that are holding it
> together.
> 
> Long story short, I'm in the market for a new thinkpad.
> Yes it has to be a thinkpad. I require the pointing stick and 3
> physical mouse buttons.
> 
> On the x201 I like the ease of changing the HDD and battery. I would
> prefer if that was the case with the new one.
> 
> So what's the done thing here? I'm not a hardware hacker, so I want a
> kinda fully supported one. That means accelerated X and working wifi
> (this is probably not an issue with stsp@'s hard work). Also I'm happy
> with the size of the x201, I don't want to lug a brick around, so that
> means an x series laptop. As a first approximation assume that money is
> not an issue.
> 
> Thanks,
> Florian
> 
> -- 
> I'm not entirely sure you are real.



Re: Huawei E353 as HiLink device

2017-02-05 Thread Karl Pettersson
On Sun, Feb 05, 2017 at 12:46:51PM +, Stuart Henderson wrote:
> On 2017-02-03, Karl Pettersson <karl_pettersson_1...@yahoo.com> wrote:
> > I have a Huwaei E353 USB device, which I use to connect with the tre.se
> > Internet provider. This device initially attaches as a mass storage
> > device with product id 1f01. Under Linux, it is then switched to HiLink
> > Ethernet mode with the usb_modeswitch program. OpenBSD 6.0 instead makes the
> > device attach as a umsm modem device (after initially identifying it as
> > a UMASS5 storage device), and I have been unable to connect
> > using ppp in that mode. Maybe the device is not supposed to be used
> > that way: AT^SETPORT=? does not even list modem mode as
> > available.
> >
> > I made the following changes to src/sys/dev/usb/umsm.c, after the
> > settings in the device_reference.txt for usb_modeswitch (l 2632):
> >
> > *** 704,709 
> > --- 704,711 
> > cbw.bCBWFlags = CBWFLAGS_OUT;
> > cbw.CBWCDB[0] = 0x11;
> > cbw.CBWCDB[1] = 0x06;
> > +   cbw.CBWCDB[2] = 0x20;
> > +   cbw.CBWCDB[8] = 0x01;
> > break;
> > case DEV_UMASS6:/* ZTE */
> > USETDW(cbw.dCBWDataTransferLength, 0x20);
> >
> > After I recompiled the kernel with these changes, the device correctly
> > attaches as a cdce Ethernet device, and after giving the following 
> > commands, I
> > can use my Internet connection normally:
> >
> > # ifconfig cdce0 up
> > # dhclient cdce0
> >
> > So, these changes should perhaps be merged with the default kernel?
> >
> > Regards,
> > Karl Pettersson
> >
> >
> 
> This code is used by 11 different entries in umsm(4)'s device id table,
> some of which may not support this, so would either need matching against
> only this device id, or testing with a wide range of other Huaweis.
> 
> Even then, presumably there are some devices with this product id which
> *do* work (it may be that the mobile provider can programme the device to
> provide only certain modes). So those users would need notice in release
> notes etc about the change of device type, otherwise they might not be
> able to get into a remote machine following an upgrade..
>

Yes, in usbdevs (l. 2214), the 1f01 id is connected with a different
Huawei device (E303), and in the usb_modeswitch file, it is connected
with E353 with tre.se and yet another different device (E355s-1), while
E353 with unspecified provider has id 151a. So, I certainly agree that
testing with different devices would be necessary before merging my
additions.



Huawei E353 as HiLink device

2017-02-03 Thread Karl Pettersson
I have a Huwaei E353 USB device, which I use to connect with the tre.se
Internet provider. This device initially attaches as a mass storage
device with product id 1f01. Under Linux, it is then switched to HiLink
Ethernet mode with the usb_modeswitch program. OpenBSD 6.0 instead makes the
device attach as a umsm modem device (after initially identifying it as
a UMASS5 storage device), and I have been unable to connect
using ppp in that mode. Maybe the device is not supposed to be used
that way: AT^SETPORT=? does not even list modem mode as
available.

I made the following changes to src/sys/dev/usb/umsm.c, after the
settings in the device_reference.txt for usb_modeswitch (l 2632):

*** 704,709 
--- 704,711 
cbw.bCBWFlags = CBWFLAGS_OUT;
cbw.CBWCDB[0] = 0x11;
cbw.CBWCDB[1] = 0x06;
+   cbw.CBWCDB[2] = 0x20;
+   cbw.CBWCDB[8] = 0x01;
break;
case DEV_UMASS6:/* ZTE */
USETDW(cbw.dCBWDataTransferLength, 0x20);

After I recompiled the kernel with these changes, the device correctly
attaches as a cdce Ethernet device, and after giving the following commands, I
can use my Internet connection normally:

# ifconfig cdce0 up
# dhclient cdce0

So, these changes should perhaps be merged with the default kernel?

Regards,
Karl Pettersson