You are not logged in.

#1 2018-06-04 14:38:07

ss
Member
Registered: 2018-06-04
Posts: 89

[SOLVED] Login & post in the forum with a CLI web browser

Is there a way to post in the Arch Linux forum with a terminal web browser like Links? I typed my username and password, clicked login, then it always return to the same login page without any complaints.

I also tried Dillo, which has a very small installation footprint and won't pull in another 100 packages like other mainstream web browsers. But again, login didn't work. I also tried starting Dilla in a terminal emulator in order to catch some hints of error messages, but couldn't find any.

I have a very old machine and don't plan to upgrade the hardware in the foreseeable future. Web browsing is (ironically) the most resource consuming task it is running, although normally I am just passively consuming some lightweight contents like texts and images. While I am OK to avoid visiting all those fancy bloated websites out there, I feel a little bit sad when being forced to open Firefox just in order to login the Arch BBS.

Any suggestions?

Last edited by ss (2018-06-05 21:04:42)

Offline

#2 2018-06-04 14:46:10

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,257

Re: [SOLVED] Login & post in the forum with a CLI web browser

Does your browser accept cookies?  It has been a while, but, IIRC, links handled it just fine.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2018-06-04 15:38:10

ss
Member
Registered: 2018-06-04
Posts: 89

Re: [SOLVED] Login & post in the forum with a CLI web browser

@ewaller Thank you for the suggestion. Now I can login in Dillo after cookies got enabled there. However, I got the following error message when trying to hit the post or preview button. What can I do about it?

Info
Bad HTTP_REFERER. You were referred to this page from an unauthorized source. If the problem persists please make sure that 'Base URL' is correctly set in Admin/Options and that you are visiting the forum by navigating to that URL. More information regarding the referrer check can be found in the FluxBB documentation.

Moreover, I was not able to find cookies-related setting options in Links after a brief search in its user manual and man page. All I could find was a wiki page which states that it has cookies as feature. I am using Links in the Linux console, not the graphical one.

If you or anyone happen to know how to enable cookies in Links, please tell me. Many thanks in advance.

Offline

#4 2018-06-04 17:10:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] Login & post in the forum with a CLI web browser

Last time I used links it worked fine.  I more often use w3m and have no problem accessing the forums with that - I don't believe I've done any configuration for it at all.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2018-06-04 17:16:36

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] Login & post in the forum with a CLI web browser

Give elinks or w3m a try. As for Dillo, there might be a way to set the referer through dillorc. That said, I have never understood the niche that Dillo fills..., at least not for the last 13 years or so.

Offline

#6 2018-06-04 19:33:18

ss
Member
Registered: 2018-06-04
Posts: 89

Re: [SOLVED] Login & post in the forum with a CLI web browser

Thank you for all the suggestions.
elinks works. I also gave links another try and it also works ... Maybe I was confused with the aur site? There also requires a login account. Sorry about that.

Offline

#7 2018-06-04 19:43:22

ss
Member
Registered: 2018-06-04
Posts: 89

Re: [SOLVED] Login & post in the forum with a CLI web browser

As for Dillo, I actually just started using it since yesterday. The lack of key-binding customization does severely limit its appeal to me. But at least in this old machine, it starts and runs much faster than Firefox, Surf and Qutebrowser, has far less dependencies.
All in all, it's a lightweight and somehow usable graphical web browser.
What alternative would you recommend? Aren't all those Gecko or Webkit-based browsers more or less the same?

Offline

#8 2018-06-04 21:01:51

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] Login & post in the forum with a CLI web browser

You might also be interested in netsurf.  Don't bother with the version in the repos, that build baffles me.  But you can readily build netsurf for the framebuffer: so you get a graphical web browser (with at least comparable html rendering to dillo) without even needing X.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2018-06-04 21:02:53

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Login & post in the forum with a CLI web browser

Not a Forum or Wiki issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2018-06-05 00:10:48

ss
Member
Registered: 2018-06-04
Posts: 89

Re: [SOLVED] Login & post in the forum with a CLI web browser

Trilby wrote:

But you can readily build netsurf for the framebuffer: so you get a graphical web browser (with at least comparable html rendering to dillo) without even needing X.

A big big thanks for this invaluable tips! Upon reading your comment, I immediately grabbed the source and compiled netsurf with framebuffer. Now I am posting from netsurf-fb in tty console.

In fact, I have been experimenting with framebuffer apps and living without X for a few months. I am pretty happy with almost everything, like image and video viewing, terminal emulator with proper utf font and color display etc. Graphical web browser is basically the last big piece of puzzle to me.

Last edited by ss (2018-06-05 00:11:54)

Offline

#11 2018-06-05 01:59:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] Login & post in the forum with a CLI web browser

That was quick.  Last time I tried it, I struggled with their build system for a while to get it up and running.

Did you happen to make a PKGBUILD for it?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#12 2018-06-05 05:50:06

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,438

Re: [SOLVED] Login & post in the forum with a CLI web browser

I struggled to build netsurf-fb in past and failed, mostly because I couldn't satisfy all dependencies. Can you make PKGBUILD or explain how to build ?

Offline

#13 2018-06-05 09:42:53

ss
Member
Registered: 2018-06-04
Posts: 89

Re: [SOLVED] Login & post in the forum with a CLI web browser

Docbroke wrote:

I struggled to build netsurf-fb in past and failed, mostly because I couldn't satisfy all dependencies. Can you make PKGBUILD or explain how to build ?

I also struggled, but this time the struggle was short:) Here are the two tips which I wish I had known in the first place:

  • For dependencies, in addition to the top-level README, you also need to checkout the README in the relevant subfolder (i.e. libnsfb)

  • Chances are big that it can't start even after successfully built, run netsurf-fb -v to learn more about the error and fix it accordingly

I don't know the specific problems other users were running into during build, so here I can only write up the steps I went through, mainly as a reminder for myself.

  • Change TARGET to framebuffer in Makefile. make.

  • It said something about missing gperf. pkgfile --search gperf , confirm the package is actually called gperf, install it. Then it (seemed to) build.

  • In tty console, run netsurf-fb . It said unable to initialize framebuffer. netsurf-fb -v will give you the real error messages. It said something about libnsfb and sdl surface.

  • Checked the libnsfb subfolder in the source tree, found another README there, which told me SDL is a dependency if not running X.

  • Install sdl. Then make again. This time, it can't initialise mouse. I have never used a mouse in the framebuffer terminal. But somehow it turned out that I have to put myself into the input group. Or ls -l /dev/input/mouse0 to confirm the required group and permission.

The problem about netsurf is that the official instruction and docs are apparently geared towards the gtk build. They seem to assume framebuffer users should just know their stuffs.

Offline

#14 2018-06-05 09:54:08

ss
Member
Registered: 2018-06-04
Posts: 89

Re: [SOLVED] Login & post in the forum with a CLI web browser

Trilby wrote:

Did you happen to make a PKGBUILD for it?

I am new to this distro and have yet to learn how to make a PKGBUILD. First please let me play with netsurf-fb for a few days to see whether I would use it on a regular basis.

On the plus side, I am really excited to see a graphical browser working in framebuffer. The look is a bit 'retro', and it can only render relatively simple webpages, but I am OK with it.

On the other hand, so far as I can see, it is not a keyboard-driven browser, which is pity for a terminal-centric framebuffer app ... Maybe the original developers had different use cases in mind.

Offline

#15 2018-06-05 11:18:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] Login & post in the forum with a CLI web browser

I just tried to build following their current directions.  First I had to modify all the function names in env.sh as despite using /bin/sh as the shebang, the function names are not valid in a POSIX shell.  After that the ns_pull_install failed in building one of the internal libraries:

make: Entering directory '/tmp/netsurf-build/workspace/libwapcaplet'
 COMPILE: src/libwapcaplet.c
src/libwapcaplet.c: In function ‘lwc_intern_string’:
src/libwapcaplet.c:148:16: error: cast between incompatible function types from ‘void * (*)(void * restrict,  const void * restrict,  size_t)’ {aka ‘void * (*)(void * restrict,  const void * restrict,  long unsigned int)’} to ‘void (*)(char *, const char *, size_t)’ {aka ‘void (*)(char *, const char *, long unsigned int)’} [-Werror=cast-function-type]
       strncmp, (lwc_memcpy)memcpy);

I removed -Werror from the flags in the libwapcaplet Makefile which allowed the build to proceed further to this:

src/svgtiny.c:24:10: fatal error: autogenerated_colors.c: No such file or directory
 #include "autogenerated_colors.c"

Which, after checking the Makefile in the relevant subdir, I found was due to gperf not being installed.  Installed gperf and tried again.

This allowed it to proceed a bit further, but then I had to remove -Werror from yet another Makefile which finally succeeded, then I could move to the workspace/netsurf directory and attempt the netsurf build with TARGET=framebuffer (which also requires perl-html-parser).

This approach could never go in a PKGBUILD.  Patching the makefiles is easy enough, but cloning all those individual repos would be ugly in a prepare function.  And despite building, it doesn't run for what appear similar reasons as ss noted.  Installing SDL was not sufficient, I'm not rebuilding libnsfb and nsfb after installing SDL: no luck, same error:

$ ./nsfb
(0.000002) utils/log.c:263 nslog_init: NetSurf version '3.8 (Dev)'
(0.000057) utils/log.c:274 nslog_init: NetSurf on <Linux>, node <Think>, release <4.16.13-1-ARCH>, version <#1 SMP PREEMPT Thu May 31 23:29:29 UTC 2018>, machine <x86_64>
Message translations failed to load
(0.000243) content/handlers/image/image_cache.c:432 image_cache_init: Image cache initialised with a limit of 3145728 hysteresis of 629145
(0.000268) content/handlers/html/html_css_fetcher.c:70 html_css_fetcher_initialise: html_css_fetcher_initialise called for x-ns-css
(0.000412) content/fetchers/curl.c:1465 fetch_curl_register: curl_version libcurl/7.60.0 OpenSSL/1.1.0h zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) nghttp2/1.31.1
(0.002873) utils/useragent.c:69 user_agent_build_string: Built user agent "NetSurf/3.8 (Linux)"
(0.002885) content/fetchers/curl.c:1554 fetch_curl_register: cURL linked against openssl
(0.002895) content/fetchers/curl.c:174 fetch_curl_initialise: Initialise cURL fetcher for http
(0.002902) content/fetchers/curl.c:174 fetch_curl_initialise: Initialise cURL fetcher for https
(0.002909) content/fetchers/data.c:61 fetch_data_initialise: fetch_data_initialise called for data
(0.002971) content/fetchers/resource.c:288 fetch_resource_initialise: redirect url for adblock.css
(0.003003) content/fetchers/resource.c:288 fetch_resource_initialise: redirect url for default.css
(0.003032) content/fetchers/resource.c:288 fetch_resource_initialise: redirect url for internal.css
(0.003062) content/fetchers/resource.c:288 fetch_resource_initialise: redirect url for quirks.css
(0.003105) content/fetchers/resource.c:288 fetch_resource_initialise: redirect url for credits.html
(0.003139) content/fetchers/resource.c:288 fetch_resource_initialise: redirect url for licence.html
(0.003170) content/fetchers/resource.c:288 fetch_resource_initialise: redirect url for welcome.html
(0.003201) content/fetchers/resource.c:288 fetch_resource_initialise: redirect url for maps.html
(0.003230) content/fetchers/resource.c:288 fetch_resource_initialise: redirect url for favicon.ico
(0.003269) content/fetchers/resource.c:288 fetch_resource_initialise: redirect url for netsurf.png
(0.003369) content/llcache.c:3481 llcache_initialise: llcache initialising with a limit of 9437184 bytes
(0.003392) frontends/framebuffer/gui.c:469 process_cmdline: argc 1, argv 0x7ffeed0dc088
(0.003410) frontends/framebuffer/framebuffer.c:590 framebuffer_initialise: The sdl surface is not available from libnsfb

Unable to initialise framebuffer

Last edited by Trilby (2018-06-05 11:30:40)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#16 2018-06-05 13:29:57

ss
Member
Registered: 2018-06-04
Posts: 89

Re: [SOLVED] Login & post in the forum with a CLI web browser

Trilby wrote:

This approach could never go in a PKGBUILD.  Patching the makefiles is easy enough, but cloning all those individual repos would be ugly in a prepare function.  And despite building, it doesn't run for what appear similar reasons as ss noted.  Installing SDL was not sufficient, I'm not rebuilding libnsfb and nsfb after installing SDL: no luck, same error:

Hmm ... I think I could never go that far before I give up. It's apparently much easier to build in my current system, which is basically an up-to-date vanila Arch with a couple of typical software normies would use.

As an experiment, I also tried to build netsurf-fb in two other Arch-variants: Arch Linux 32bit on an old laptop and Arch Linux ARM on Raspberry Pi 3. They all built successfully and can run. Basically all I had to do is to make sure sdl, gperf and perl html parser are installed.

What kind of deeply customized distro are you running?

Offline

#17 2018-06-05 13:32:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] Login & post in the forum with a CLI web browser

Just arch.  But you keep referring to netsurf-fb, while the upstream source builds nsfb.  Did you get a netsurf-fb specific source?  I got the source from here:
http://www.netsurf-browser.org/downloads/source/


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#18 2018-06-05 14:06:08

ss
Member
Registered: 2018-06-04
Posts: 89

Re: [SOLVED] Login & post in the forum with a CLI web browser

Trilby wrote:

Just arch.  But you keep referring to netsurf-fb, while the upstream source builds nsfb.  Did you get a netsurf-fb specific source?  I got the source from here:
http://www.netsurf-browser.org/downloads/source/

It must be the same thing. I got the netsurf 3.7 of 20 Oct 2017 from the official site. The install script auto-rename it to netsurf-fb. That's why I keep calling it netsurf-fb.
If I cd netsurf && ./nsfb, it's the same program.

Offline

#19 2018-06-05 14:11:25

ss
Member
Registered: 2018-06-04
Posts: 89

Re: [SOLVED] Login & post in the forum with a CLI web browser

Although it's trivial, the only thing I changed in the (top-level) Makefile is this:

 41 export TARGET ?= framebuffer

Then nothing else, except for installing some missing dependencies.

Offline

Board footer

Powered by FluxBB