Re: A minimal browser in base

2022-09-18 Thread unix
On Sat, 10 Sep 2022 21:04:54 +0300
unix  wrote:

> Hello. My reasons for this proposition:
> 1. The user will be able to test basic websites without installing
> anything.
> 2. The user will be able to read an incredibly useful official
> FAQ, with no external devices involved.
> 3. The user will be able to manage mailing list
> membership via the web interface. 
> 4. Using ftp(1) and reading pure HTML is inconvenient.
> 5. The browser (Lynx) was already included. It was removed due to
> concerns about code quality, licensing, and support for insecure
> protocols.
> You could say that you don't need a browser installed by default if
> you have a network connection and can install the package anyway.
> Still, am I the only one who feels like it's pretty much the only
> thing missing in the base for a comfortable day to day desktop usage?
> So, if we include a browser, which one?
> I could only find two options. The rest use
> unacceptable licenses or are way too big and scary.
> w3m:
> - terminal only.
> - No CSS or Javascript support. CSS can be used for tracking. CSS3 +
>   HTML5 is Turing complete. I don't need to convince you that
>   Javascript is a security nightmare.
> Sources:
> https://lemire.me/blog/2011/03/08/breaking-news-htmlcss-is-turing-complete/ 
> https://www.templarbit.com/blog/2018/03/20/tracking-users-with-css/
> - No support for obscure protocols. Just HTTP/S and FTP.
> - MIT license. Seems to align well with our copyright policy.
>   (For those who don't know, it's an equivalent to ISC and BSD
>   2-clause. Xorg also uses MIT).
> - Can also be used as a pager/e-reader with bookmark
>   functionality. Two birds with one stone? Anybody feel like replacing
>   less? Joke.
> - Optional image support (we shouldn't use it for security concerns,
> obviously).
> - 70k of C + boehm garbage collector, another 40k.
> Current source is maintained by a a Debian developer.
> https://tracker.debian.org/pkg/w3m
> w3l, fork of w3m:
> - Removed some features that can be provided by other tools (e.g. tab
>   functionality).
> - Completely removed image support. The keybinding to open an image in
>   an external viewer is enough.
> - For some reason uses curl. I guess, it can
>   use ftp(1) instead.
> - Minimal reliance on the garbage collector. I suspect that it can be
>   completely removed.
> - 30k of C + 40k of C in boehm gc.
> Source: https://sr.ht/~vdupras/w3l/
> If you know about any other options, I will be interested in
> discussing them.
> 
Several days reading the archives and sources, here are my thoughts.
w3m consists of two parts:
1. html to text converter
2. a pager.
I don't see a point in including a pager since we already have less, vi
and mg.
I don't see a point in doing an html to text converter in
C. Perl serves this purpose quite well since text manipulation in Perl
is awesome. One module for this purpose is already in ports.
https://metacpan.org/pod/HTML::FormatText
But then, after thinking a bit more, is there a
point? Is there anybody who needs this? The average OpenBSD user
is capable of reading. If something that he
needs to read is missing, we should just add it to the usual locations
in plain text. HTML conversion is not needed for 99% of cases. 
I should do something else.
I posted this for anybody who thinks that OpenBSD needs a web browser.
Not everybody needs to read the web, and if you do, it doesn't mean that
the tools for this should be included in the base.



Re: A minimal browser in base

2022-09-14 Thread Marc Espie
We used to have lynx in the base system.

It was removed because of security concerns and no-one willing to 
audit/replace it.

This is a fairly common pattern in OpenBSD. Considering the complexity of
the web, I don't see this ending any differently with any other text 
browser.



Re: Old Unix manuals (was: Re: A minimal browser in base)

2022-09-14 Thread Jonathan Gray
On Wed, Sep 14, 2022 at 07:00:56AM +0100, Jason McIntyre wrote:
> On Tue, Sep 13, 2022 at 06:54:40PM -0400, luna wrote:
> > On Tue, Sep 13, 2022 at 07:04:55 +0100, Jason McIntyre wrote:
> > > hi.
> > > 
> > > we stopped installing them because many of them were falling out of date
> > > and there wasn;t really the resources (or motivation) to update them.
> > > however not all of them were removed. although no longer installed, some
> > > of the better ones remain in the source tree. from a quick look:
> > 
> > Note that you'll need to pull /usr/src/share/mk/bsd.doc.mk out of the 
> > attic and install it in /usr/share/mk, and then you'll need a copy of 
> > groff to build these documents. I haven't tested this on a recent 
> > version of OpenBSD, though I can say that older versions of both 
> > OpenBSD and FreeBSD work quite well for building these old docs. If you 
> > want versions you can read on your terminal, you can pass -Tascii to 
> > groff like FreeBSD's bsd.doc.mk does, which is (handwaving over other 
> > details here) what groff does to render manpages.
> > 
> > I can wholeheartedly recommend building and reading the ones you can
> > find, especially if you're interested in Unix history. They're something
> > of a time capsule, providing a snapshot of what Unix was at the time and
> > how people used it. In addition, as said above, some of them are just as
> > applicable today as when they were written.
> > 
> 
> also, although it won;t be pretty, you can just pass the documents to
> mandoc and get something that's at least semi-readable.
> 
> jmc

can also be found at

https://docs-legacy.freebsd.org/44doc/
https://wolfram.schneider.org/bsd/7thEdManVol2/

https://9p.io/7thEdMan/v7vol2b.pdf
http://bitsavers.org/pdf/att/unix/7th_Edition/UNIX_Programmers_Manual_Seventh_Edition_Vol_2_1983.pdf



Re: Old Unix manuals (was: Re: A minimal browser in base)

2022-09-13 Thread Jason McIntyre
On Tue, Sep 13, 2022 at 06:54:40PM -0400, luna wrote:
> On Tue, Sep 13, 2022 at 07:04:55 +0100, Jason McIntyre wrote:
> > hi.
> > 
> > we stopped installing them because many of them were falling out of date
> > and there wasn;t really the resources (or motivation) to update them.
> > however not all of them were removed. although no longer installed, some
> > of the better ones remain in the source tree. from a quick look:
> 
> Note that you'll need to pull /usr/src/share/mk/bsd.doc.mk out of the 
> attic and install it in /usr/share/mk, and then you'll need a copy of 
> groff to build these documents. I haven't tested this on a recent 
> version of OpenBSD, though I can say that older versions of both 
> OpenBSD and FreeBSD work quite well for building these old docs. If you 
> want versions you can read on your terminal, you can pass -Tascii to 
> groff like FreeBSD's bsd.doc.mk does, which is (handwaving over other 
> details here) what groff does to render manpages.
> 
> I can wholeheartedly recommend building and reading the ones you can
> find, especially if you're interested in Unix history. They're something
> of a time capsule, providing a snapshot of what Unix was at the time and
> how people used it. In addition, as said above, some of them are just as
> applicable today as when they were written.
> 

also, although it won;t be pretty, you can just pass the documents to
mandoc and get something that's at least semi-readable.

jmc



Re: A minimal browser in base

2022-09-12 Thread Jason McIntyre
On Mon, Sep 12, 2022 at 03:43:30PM -0700, Lyndon Nerenberg (VE7TFX/VE6BBM) 
wrote:
> 
> Long ago and far away, the Berkeley distributions used to ship an
> assortment of system documentation in /usr/share/doc, including a
> general-purpose system administrators manual.
> 
> I guess people didn't want to update those, or maybe thought they
> were sacred relics, never to be touched.  But all the *BSDs dropped
> them, years ago.  I thought that was the wrong move; they should
> have been kept, along with a /usr/share/doc/README that noted they
> are historical, and therefore probably out of date.  Although I'm
> sure the vi documentation stands up to this day.
> 

hi.

we stopped installing them because many of them were falling out of date
and there wasn;t really the resources (or motivation) to update them.
however not all of them were removed. although no longer installed, some
of the better ones remain in the source tree. from a quick look:

/usr/src/usr.bin/gprof/PSD.doc
/usr/src/usr.bin/lex/PSD.doc
/usr/src/usr.bin/m4/PSD.doc
/usr/src/usr.bin/make/PSD.doc
/usr/src/usr.bin/yacc/PSD.doc
/usr/src/bin/csh/USD.doc
/usr/src/bin/ed/USD.doc
/usr/src/games/trek/USD.doc
/usr/src/usr.bin/awk/USD.doc
/usr/src/usr.bin/bc/USD.doc
/usr/src/usr.bin/dc/USD.doc
/usr/src/usr.bin/mail/USD.doc
/usr/src/usr.bin/sed/USD.doc
/usr/src/usr.bin/vi/docs/USD.doc
/usr/src/sbin/fsck_ffs/SMM.doc
/usr/src/usr.sbin/lpr/SMM.doc

jmc



Re: A minimal browser in base

2022-09-12 Thread prx
For what it's worth, I keep a downloadable copy of the FAQ : 

=> https://si3t.ch/pub/openbsd-faq/
=> https://si3t.ch/pub/openbsd-faq.tgz

html is dumped to txt to read with any pager.
One can keep it on a disk if necessary.

Regards.



Re: A minimal browser in base

2022-09-12 Thread Josuah Demangeon
"Lyndon Nerenberg (VE7TFX/VE6BBM)"  wrote:
> Regardless, if someone does write a new "intro to sysadmin" document,

I really like to say to fresh new admins that if they want to learn everything
about system administration, find an OpenBSD system and type "help" in any 
shell,
then start reading from here and keep going.


HELP(1) General Commands ManualHELP(1)

NAME
 help – help for new users and administrators

DESCRIPTION
 This document is meant to familiarize new users and system administrators
 with OpenBSD and, if necessary, UNIX in general.

[...]



Re: A minimal browser in base

2022-09-12 Thread Lyndon Nerenberg (VE7TFX/VE6BBM)
Chris Bennett writes:
> I would instead recommend a new package with the critical newbie
> information included in text form.
> FAQ, anoncvs and ftp addresses, etc.

Long ago and far away, the Berkeley distributions used to ship an
assortment of system documentation in /usr/share/doc, including a
general-purpose system administrators manual.

I guess people didn't want to update those, or maybe thought they
were sacred relics, never to be touched.  But all the *BSDs dropped
them, years ago.  I thought that was the wrong move; they should
have been kept, along with a /usr/share/doc/README that noted they
are historical, and therefore probably out of date.  Although I'm
sure the vi documentation stands up to this day.

Ragardless, if someone does write a new "intro to sysadmin" document,
it should live in /usr/share/doc, and not an external package that
the new sysadmin might need to read to know how to install the
package that contains the documentation she needs to know how to
install the documentation she needs to know how to ... [SIGSEGV --
stack overflow]

--lyndon



Re: A minimal browser in base

2022-09-12 Thread Chris Bennett
I would instead recommend a new package with the critical newbie
information included in text form.
FAQ, anoncvs and ftp addresses, etc.

The first afterboot man page could suggest something like
pkg_add newuser_docs.

If you need or want it, just install it.

Sure, I install Lynx to look at the packages list to see what's new.
But honestly, who is really going to take the time to audit the code
before using it? What are you really going to be getting given all of
the DNS attacks and other risks (some new, never before seen threat
could appear at any time).
I really don't feel that recommending a browser from outside to a first
time user is appropriate. That really does require a lot of effort
better spent elsewhere.

My 2 cents.

-- 
Chris Bennett



Re: A minimal browser in base

2022-09-11 Thread Tomasz Rola
On Sat, Sep 10, 2022 at 09:04:54PM +0300, unix wrote:
> Hello. My reasons for this proposition:
> 1. The user will be able to test basic websites without installing
> anything.
> 2. The user will be able to read an incredibly useful official
> FAQ, with no external devices involved.
> 3. The user will be able to manage mailing list
> membership via the web interface. 
> 4. Using ftp(1) and reading pure HTML is inconvenient.
> 5. The browser (Lynx) was already included. It was removed due to
> concerns about code quality, licensing, and support for insecure
> protocols.
> You could say that you don't need a browser installed by default if you
> have a network connection and can install the package anyway.
> Still, am I the only one who feels like it's pretty much the only thing
> missing in the base for a comfortable day to day desktop usage?
> So, if we include a browser, which one?
[...]
> If you know about any other options, I will be interested in
> discussing them.

I do not want to derail the discussion but I think that if I can have
a pendrive with O*BSD install, then I can also have another pendrive
with some sources and maybe a bash script to compile them. For
browsing on the text console, I like emacs-w3m, which (if I am
correct) is w3m for rendering pages and emacs for showing them, with
tabs and easy way to copy-paste fragments into other emacs buffer, be
it a code or shell.

I would probably also have lynx on this pendrive, because it can open
gopher sites, so I can vent off some steam by looking at obsolete
stuff.

I realize that certain propositions are no-no for base system (and I
totally agree with this), which is why my best option is to be my own
guest and help myself.

In my opinion none of text browsers I use nowadays (links/elinks, lynx
&& emacs-w3m) will work on every website (some are polite enough to
tell me I need to turn js on). There is good chance with pages written
for programmers, however.

-- 
Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.  **
** As the answer, master did "rm -rif" on the programmer's home**
** directory. And then the C programmer became enlightened...  **
** **
** Tomasz Rola  mailto:tomasz_r...@bigfoot.com **



Re: A minimal browser in base

2022-09-11 Thread Christopher Turkel
pkg_add -r w3m

On Sun, Sep 11, 2022 at 9:01 AM unix  wrote:

>
> > With the web as it is, I can't see a text-mode browser as being
> > comfortable for day-to-day desktop usage. In addition, some of the gui
> > browsers have some degree of process separation and jailing, and
> > active enough development there's a better chance to find and fix
> > fixed more quickly which seems not the case with the text-mode
> > browsers.
> >
>
> I don't mean that everybody will be comfortable using a
> text-mode web browser.
> I assume (since I can't know for sure) that the average
> OpenBSD user reads a lot. Man pages, sources, mailing list archives,
> news, etc.
> The ideal new user reads all of FAQ, and some man pages
> (help, afterboot, you name it).
> w3m is a good tool for reading pure HTML pages (which is what most if
> not all of online OpenBSD documentation consists of).
> The bookmark
> functionality. Integration with external editors and filters. Keyboard
> navigation.
> My point is, it is viable for the OpenBSD desktop user. Once it is not,
> he presses a keybinding and the page is opened in whatever other
> browser he/she/it prefers.
> The security problems - I agree. It doesn't look good.
>
> https://www.cvedetails.com/vulnerability-list/vendor_id-15995/product_id-35351/opov-1/W3m-Project-W3M.html
> I guess if somebody were to do a more secure version of w3m, he should
> choose the w3l fork simply because of LOC.
> This might make it to my
> to-do list.
> I really want OpenBSD to have a good independent
> browser, even if it's going to be basic. As it is, we're relying on
> other entities to control the web experience of our users.
> I don't like Mozilla, Google or Apple (Webkit) browsers in terms of
> security. All of those engines have inappropriate licensing. All of
> them are bloated to hell and back.
> Meanwhile the only other alternatives are Netsurf (GPL, supports CSS
> and minimal JS, C), Lynx (GPL, some CSS, C), Links (GPL, some
> CSS, C), Serenity OS's libweb (BSD 2-clause, supports a lot of
> stuff, but written in C++, eww) and w3m (MIT, just HTML, C). Currently,
> for the purpose of quick reading, w3m is enough. And I don't think the
> OpenBSD user needs much more.
>
>


Re: A minimal browser in base

2022-09-10 Thread Philipp Buehler

Am 10.09.2022 21:29 schrieb Stuart Henderson:

With the web as it is, I can't see a text-mode browser as being
comfortable for day-to-day desktop usage. In addition, some of the gui
browsers have some degree of process separation and jailing, and active
enough development there's a better chance to find and fix fixed more
quickly which seems not the case with the text-mode browsers.


maybe thinking of a headless/non-X server where "checking" the FAQ (as
the example was given) .. i really like the idea - before someone starts
piping HTML into pandoc (or rewrites the FAQ in mandoc to render .html,
oh wait...)

ciao
--
pb



Re: A minimal browser in base

2022-09-10 Thread Stuart Henderson
On 2022-09-10, unix  wrote:
> Hello. My reasons for this proposition:

We went through this before when we decided to remove lynx.

> 1. The user will be able to test basic websites without installing
> anything.
> 2. The user will be able to read an incredibly useful official
> FAQ, with no external devices involved.
> 3. The user will be able to manage mailing list
> membership via the web interface. 
> 4. Using ftp(1) and reading pure HTML is inconvenient.
> 5. The browser (Lynx) was already included. It was removed due to
> concerns about code quality, licensing, and support for insecure
> protocols.
> You could say that you don't need a browser installed by default if you
> have a network connection and can install the package anyway.
> Still, am I the only one who feels like it's pretty much the only thing
> missing in the base for a comfortable day to day desktop usage?

With the web as it is, I can't see a text-mode browser as being
comfortable for day-to-day desktop usage. In addition, some of the gui
browsers have some degree of process separation and jailing, and active
enough development there's a better chance to find and fix fixed more
quickly which seems not the case with the text-mode browsers.

-- 
Please keep replies on the mailing list.