BenWiley4000
Posts: 100
Joined: Sun Jun 24, 2012 1:36 am

Use Lynx!

Sat Jun 30, 2012 4:30 pm

As much as I enjoy using Debian Squeeze on the RPi, like everyone else, I can find the speed pretty frustrating, especially with Internet, which often refuses to load in Midori. After installing omxplayer, yt, and a really cool utility I found call fbcmd that allows you to do a ridiculous number of facebook operations from command line, I was curious to find a tool for general-purpose web browsing. This is especially relevant because the raspberry pi forum itself has terrible performance on the machine, and I wanted to be able to view it without using an extra computer.

I discovered Lynx-- a command line browser that has apparently been around for decades but which has stood the test of time. You can follow links and input text on most pages, so even though you can't look at pictures or use dynamic content, most of the web is already accessible! It loads the RPi site wonderfully with no delay, since it loads text and nothing else.

You can install it in debian through sudo apt-get install lynx.. simple. The interface takes some getting used to; the color text formatting is sort of ugly (but readable!) and it can be confusing to navigate at first.

I would make sure as soon as you start to press 'o' to open up options. Change "ask user" to accept cookies to "accept all". Honestly if you don't do this then you will constantly be prompted to approve loading web pages, which is really annoying. Unfortunately you have to apply this setting every time you start an instance of Lynx, though there are several options which can be saved to disk.

This has been really helpful and improved my RPi experience! I hope it helps others too.

User avatar
Gunbard
Posts: 4
Joined: Tue Jun 26, 2012 9:56 pm

Re: Use Lynx!

Sat Jun 30, 2012 11:37 pm

Lynx is great for command line use. You might want to give links2 in graphical mode a try, too. I think it only runs in a desktop environment, but it's extremely lightweight, more than Midori.

Code: Select all

sudo apt-get install links2
Then to run in graphical mode:

Code: Select all

links2 -g

BenWiley4000
Posts: 100
Joined: Sun Jun 24, 2012 1:36 am

Re: Use Lynx!

Sun Jul 01, 2012 12:17 am

Gunbard wrote:Lynx is great for command line use. You might want to give links2 in graphical mode a try, too. I think it only runs in a desktop environment, but it's extremely lightweight, more than Midori.

Code: Select all

sudo apt-get install links2
Then to run in graphical mode:

Code: Select all

links2 -g
er... I tried this, but it's not in the repo

User avatar
Gunbard
Posts: 4
Joined: Tue Jun 26, 2012 9:56 pm

Re: Use Lynx!

Sun Jul 01, 2012 4:57 am

Hmm, that's odd.

Code: Select all

apt-cache search links2
gives me a result.

Here's my /etc/apt/sources.list file. I guess it's probably in backports.

Code: Select all

deb http://ftp.uk.debian.org/debian/ squeeze main
deb http://ftp.uk.debian.org/debian/ squeeze main non-free
deb http://backports.debian.org/debian-backports squeeze-backports main non-free

BenWiley4000
Posts: 100
Joined: Sun Jun 24, 2012 1:36 am

Re: Use Lynx!

Tue Jul 03, 2012 5:28 pm

I think I know what the problem was. I had switched my software sources to US but that was evidently invalid. Switching back to UK made apt work again.

BenWiley4000
Posts: 100
Joined: Sun Jun 24, 2012 1:36 am

Re: Use Lynx!

Tue Jul 03, 2012 10:30 pm

I have links2 working-- this is really excellent! Thanks!

User avatar
oztrailrider
Posts: 55
Joined: Sat Jan 14, 2012 3:21 am

Re: Use Lynx!

Wed Jul 04, 2012 3:21 am

I'll be keen to give links2 a go, I have been using elinks lately for command line web browsing however I find a lot of sites get formatted quite badly with links being wrongly placed in vertical columns etc.

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: Use Lynx!

Wed Jul 04, 2012 7:14 am

Lynx is great! And really handy in some situations. Technically you could "browse the web" on a pi in a dumb terminal connected via serial console. In the rare event you have those options but no other functioning computer, or just for giggles.

User avatar
RaTTuS
Posts: 10539
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Use Lynx!

Wed Jul 04, 2012 8:13 am

sudo apt-get install elinks
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

BenWiley4000
Posts: 100
Joined: Sun Jun 24, 2012 1:36 am

Re: Use Lynx!

Wed Jul 04, 2012 9:11 am

Elinks is also really good!.. I like its legitimate scrolling in terminal-- even links2 doesn't have that (though it has it in standalone form). I would probably ditch both the earlier mentioned browsers for this one, but I'm keeping links2 because it loads pictures and makes everything look nice when it's not in the terminal.

godFather89
Posts: 150
Joined: Fri May 18, 2012 9:40 am
Location: Timisoara, RO

Re: Use Lynx!

Wed Jul 04, 2012 9:15 am

links2 is the best. Runs in graphic mode and it doesn't need X. You can also use the mouse :!:

User avatar
grumpyoldgit
Posts: 1452
Joined: Thu Jan 05, 2012 12:20 pm

Re: Use Lynx!

Wed Jul 04, 2012 9:31 am

Links2 is not happy under Wheezy.
(*) DirectFB/Core: Single Application Core. (2012-05-20 16:16)
(!) DirectFB/core/vt: Error opening `/dev/tty0'!
--> Permission denied
(!) DirectFB/Core: Could not initialize 'system_core' core!
--> Initialization error!
svgalib: Cannot open /dev/mem.

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: Use Lynx!

Wed Jul 04, 2012 10:13 am

Strange. Am on wheezy myself and links2 worked without the above issue.

User avatar
grumpyoldgit
Posts: 1452
Joined: Thu Jan 05, 2012 12:20 pm

Re: Use Lynx!

Wed Jul 04, 2012 10:16 am

I am doing it with the -g graphical option.
I am up to date with update, upgrade and rpi-update.

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: Use Lynx!

Wed Jul 04, 2012 10:22 am

gotchya. It gets a little further if you run it with sudo.

godFather89
Posts: 150
Joined: Fri May 18, 2012 9:40 am
Location: Timisoara, RO

Re: Use Lynx!

Wed Jul 04, 2012 10:25 am

Seems that the https proxy bug was fixed in version 2.7 but the installed package is 2.6. How long will it take the latest version to get into the packages?

User avatar
grumpyoldgit
Posts: 1452
Joined: Thu Jan 05, 2012 12:20 pm

Re: Use Lynx!

Wed Jul 04, 2012 10:29 am

clickykbd wrote:gotchya. It gets a little further if you run it with sudo.
I was just trying that. By doing it under ssh and then ctrl C ing out of it I can get
(*) DirectFB/Core: Single Application Core. (2012-05-20 16:16)
(*) Direct/Thread: Started 'VT Switcher' (-1) [CRITICAL OTHER/OTHER 0/0] <8388608>...
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Generic USB K/B (1) 0.1 (directfb.org)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Generic USB K/B (2) 0.1 (directfb.org)
(*) Direct/Thread: Started 'Keyboard Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Keyboard 0.9 (directfb.org)
(*) Direct/Thread: Started 'PS/2 Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)
(*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org)
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) FBDev/Surface: Allocated 640x480 16 bit LUT8 buffer (index 0) at offset 0 and pitch 2368.
(*) FBDev/Mode: Setting 640x480 LUT8
(*) FBDev/Mode: Switched to 640x480 (virtual 640x480) at 8 bit (LUT8), pitch 640
^C(!) [ 7750: 0.000] --> Caught signal 2 (sent by pid 7749, uid 1000) <--
(!!!) *** WARNING [still objects in 'Window Pool'] *** [../../../lib/fusion/object.c:241 in fusion_object_pool_destroy()]
(!!!) *** WARNING [still objects in 'Layer Region Pool'] *** [../../../lib/fusion/object.c:241 in fusion_object_pool_destroy()]
(!!!) *** WARNING [still objects in 'Layer Context Pool'] *** [../../../lib/fusion/object.c:241 in fusion_object_pool_destroy()]
(!!!) *** WARNING [still objects in 'Surface Pool'] *** [../../../lib/fusion/object.c:241 in fusion_object_pool_destroy()]

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: Use Lynx!

Wed Jul 04, 2012 10:52 am

same here on console. the permissions bug seems common between several distributions, not sure if the directfb issues are raspi specific, or wheezy specific, or other. I can tell it's running, memory wrote commands to exit work (Esc, f, x, y).

I get a sense it's framebuffer resolution and virtual console config related, but i'm no expert here.

John_C
Posts: 12
Joined: Mon Jun 25, 2012 11:47 am

Re: Use Lynx!

Wed Jul 04, 2012 10:56 am

just installed links2 on my Pi and this is so much better than Midori. Very fast and less CPU usage

thanks for bringing this one to our attention folks ;)

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: Use Lynx!

Wed Jul 04, 2012 11:02 am

John_C wrote:and this is so much better than Midori.
May raspi and similar light weight platforms will revive web programmers and designers desires to make text/ada compliant websites the norm again. (we can dream?)

godFather89
Posts: 150
Joined: Fri May 18, 2012 9:40 am
Location: Timisoara, RO

Re: Use Lynx!

Wed Jul 04, 2012 12:20 pm

It didn't work for me either from the start

I used something like "links2 -g -driver fb".
It also needed some console mouse library. gpm or something like that.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Use Lynx!

Wed Jul 04, 2012 3:58 pm

I did a quick search and found a list of other webbrowsers in this topic http://www.raspberrypi.org/phpBB3/viewt ... f=63&t=772

User avatar
piglet
Posts: 913
Joined: Sat Aug 27, 2011 1:16 pm

Re: Use Lynx!

Wed Jul 04, 2012 5:55 pm

godFather89 wrote:It didn't work for me either from the start

I used something like "links2 -g -driver fb".
It also needed some console mouse library. gpm or something like that.
This works for me (am using it now from cli). Without -driver fb all I got was a load of red lines on the screen. Before running it I had to install gpm:

sudo apt-get install gpm

This is great. I can now get info from web pages without having to start up desktop. Thanks for the heads-up.

BenWiley4000
Posts: 100
Joined: Sun Jun 24, 2012 1:36 am

Re: Use Lynx!

Wed Jul 04, 2012 6:09 pm

Everyone should definitely try Elinks. I no longer have any reason for Lynx and I only use Links2 when I need to load graphics, which isn't often (none of them work on facebook anyway, because forget javascript). It's definitely the best terminal browser.

cosmiq
Posts: 1
Joined: Mon Mar 18, 2013 8:07 pm

Re: Use Lynx!

Mon Mar 18, 2013 8:10 pm

I had lots of garbage on the screen when running links2 -g from terminal (stripes and wrong resolution). Setting the resolution via param didnt help, it was always 640x480 and scrambled.

sudo apt-get install gpm

This did the trick! Thanks very much. I dont know why but the mouse is a bit big. I also have another raspbian that I build up from scratch (the problematic one was pre built) that worked right away.

Thanks for the help!

Return to “General discussion”