The graphical web browser that uses 5mb of memory

71 respostas [Última entrada]
andyprough
Desconectado
Joined: 02/12/2015

If you are tired of bloated web browsers that steal entire gigabytes of your memory and make your laptop hot from CPU over-usage just by browsing simple websites - there's a solution: run the links2 command-line browser in graphical mode.

It renders web pages quite pleasantly, including most of their pictures, but uses about 5mb of memory and almost no cpu to run. I brought up on site with a large number of high quality wallpaper pictures, and the memory use jumped up to 140mb. But for simple websites like this one, you'll be using roughly 5mb to render it.

To install links2 on Trisquel, just get it from the repository:
sudo apt install links2

To run it in graphical mode and see pictures, just add the '-g' option when you start it up in your terminal, followed by the website you'd like to visit:
links2 -g trisquel.info

This post was made using links2 in graphical mode, including attachment of the images.

AnexoTamaño
links2-1.jpg154.29 KB
links2-4.jpg69.55 KB
links2-5.jpg90.99 KB
andyprough
Desconectado
Joined: 02/12/2015

And for people like @damidu who appreciate the tty, 'lins2 -g ' works graphically from the tty just as well.

nadebula.1984
Desconectado
Joined: 05/01/2018

Browsers can be light weight, but the webpages they load can be resource intensive. Therefore light-weight browsers solve only part of the problem.

Actually, some bloated browsers (e.g. Chrom*) can be treated as operating systems.

andyprough
Desconectado
Joined: 02/12/2015

>"Actually, some bloated browsers (e.g. Chrom*) can be treated as operating systems."

In a lot of cases I find that the browser is using far more resources than my entire OS.

SkedarKing
Desconectado
Joined: 11/01/2021

That comment for some reason made me lol...

Its like, what are these web browser developers smoking?

I will say coke just to be nice.

It could be worse... :P

I mean for a web browser to use more than an os. That is staggering...

I should add, back when I used winbugs, I ditched chrome at one point (on XP) because it used an insane amount of ram.

I dare say back then it used more than XP did.

So yeah, your comment is on target probably even more so for gnu/linux itself. ;)

Among other operating systems based originally on unix...

My bad btw, on topic though, 5mb is extremely light.

of the gui browsers I use, I doubt even uxp based browsers ever have used less than 100. Probably more likely to go the opposite direction. To be honest.

I wonder if links can play videos? Probably not, but meh, I wondered. Audio might be possible... though I think? I dunno never used it.

andyprough
Desconectado
Joined: 02/12/2015

When I run Hyperbola, nearly any graphical web browser uses more memory than Hyperbola does. I boot into DWM window manager using 79mb of ram, or into JWM using 69mb of ram, and then start iceweasel and pretty quickly I'm using 250mb.

But it's way worse with other browsers. iceweasel-uxp is actually very low ram usage. Firefox typically uses 400mb without really doing anything, and can quickly use well over 1gb of memory if I browse around to a few websites.

SkedarKing
Desconectado
Joined: 11/01/2021

Sheesh, I wonder then the comparison between Trisquel, parabola, guix and others with regard to whether their web browsers use as much or more than the OS itself.

I wonder that benchmark.

jahoti
Desconectado
Joined: 07/31/2021

> In a lot of cases I find that the browser is using far more resources than my entire OS.

Nobody said they could be treated as *good* operating systems :).

andyprough
Desconectado
Joined: 02/12/2015

This is how I run it now - it tells the internet that I'm running firefox, and keeps me more anonymous from websites:

links2 -g -http.fake-firefox 1 trisquel.info

SkedarKing
Desconectado
Joined: 11/01/2021

Oh, does it work with audio? I am sure it doesn't work with videos... ;)

jahoti
Desconectado
Joined: 07/31/2021

I don't think it does- that would add quite a significant extra layer of complexity that images don't.

However, it would certainly be a pleasant surprise if it does!

andyprough
Desconectado
Joined: 02/12/2015

It does have the ability to make file associations for media files with typical file name endings. So I think I could send audio and video over to be played in mpv. That's probably what I will work on with it next.

jahoti
Desconectado
Joined: 07/31/2021

It actually sounds quite usable- I may have to give it a try!

SkedarKing
Desconectado
Joined: 11/01/2021

Interesting, let me know how it goes...

andyprough
Desconectado
Joined: 02/12/2015

I can associate media files with mpv. My problem is that it seems all the video websites require javascript to interact with their videos. They won't just give you the link to a video file, not without running javascript. So, for youtube videos I can go to the invidio.us instance called yewtu.be and look up a video and copy the yewtu.be link or the youtube link over to mpv. But there's no "mp4" or "webm" link to click on to start up mpv from within the web page.

SkedarKing
Desconectado
Joined: 11/01/2021

That's fine, its an ultra lightweight web browser, it stands to reason that would be the case.

andyprough
Desconectado
Joined: 02/12/2015

By the way, if you DON'T run it with the '-http.fake-firefox 1' option, then the fingerprinting websites show that you are using the links2 browser. And since there are so few links2 users, that would definitely make it easy to track your browsing online. So that fake-firefox option is important.

And for more advanced cases, there's the '-http.fake-user-agent ' option.

So I just started links2 with the user agent string for the latest version of Firefox on 64-bit GNU/Linux with this line:
links2 -g -http.fake-user-agent "Mozilla/5.0 (Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0" trisquel.info

And here's what the internet thinks I am running, according to the deviceinfo.me fingerprint testing website:
Browser: Firefox version 94.0 (64-bit) (Engine: Gecko)
Operating System: Linux (64-bit)

That will blend me in to the rest of the users pretty good.

andyprough
Desconectado
Joined: 02/12/2015

I went ahead and made a bash shell alias, so any time I type "links2" in the terminal, the command 'links2 -g -http.fake-user-agent "Mozilla/5.0 (Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0"' is actually being run.

To make a bash alias:
1. open your .bashrc file with the pluma text editor (if you are using Trisquel with the Mate desktop, as pluma is the default text editor for Mate):
pluma ~/.bashrc

2. Scroll down until you find the line "# some more ls aliases". Underneath the list of "#alias" lines, add the following alias:
alias links2='links2 -g -http.fake-user-agent "Mozilla/5.0 (Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0"'

3. Save and quit from pluma. Exit and restart your terminal. Now when you type "links2", you'll be using the fake firefox user agent string.

GNUser
Desconectado
Joined: 07/17/2013

Just notices this...
Hate to bring bad news, but this is only useful to prevent websites rejecting your browser (some sites will not display data if the user-agent is not well known). But as to make you more private or anonymous... You will be the one guy with the Firefox user-agent that is using some weird graphical browser, very easy to follow online. Sure, there is no JS running, therefore no analytics, but the size of the screen on that browser is probably quite unique for example (and websites get that info without JS).
So, it's a good thing to be able to access websites, but it won't help from a privacy point of view.

andyprough
Desconectado
Joined: 02/12/2015

>"but the size of the screen on that browser is probably quite unique for example (and websites get that info without JS)."

Good point. We do have a '-mode' option which will set the window size, and we can pick a fairly standard size:
links2 -g -mode 1024x768 -http.fake-user-agent "Mozilla/5.0 (Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0" trisquel.info

I'm not sure how that will look to the fingerprinters. All the fingerprinting websites I looked at require javascript to show a browser window size, and since links2 doesn't have any js I don't currently have a way to test it.

Ultimately I'm not looking for perfect anti-fingerprinting with links2. If that was my criteria, I'd be using the Tor browser. But with it being so light and fast, it's worth it to see how useful it could be.

GNUser
Desconectado
Joined: 07/17/2013

That's a useful option!
Yes, I understand that. I only wanted to mention how even a simple browser like Links can be tracked online.
Actually Links can actually use the Tor proxy, if you have it running. So maybe set the user-agent and windows size to be the same as the Tor Browser default values?

SkedarKing
Desconectado
Joined: 11/01/2021

I am on xlinks right now, I find this web browser fascinating, but its also, really weird to use... It puzzles me to no end, how minimal it looks even with a gui. :P

Anywho, that's just how I feel about it.

I still wonder how I can make audio play by mpv automatically in this. If there is no way, oh well. Still was worth a try, besides, I can of course just send the link from here to terminal right? ;)

GNUser
Desconectado
Joined: 07/17/2013

Links is great, and it's also the only currently being developed graphical browser for DOS. Not that many people still use DOS as a main OS these days, but still, it's good to have the option.

That being said, this is also useful for linux users who want a simple web browser and don't mind using the right websites.

Check out this: https://simple-web.org/

Hey Andy, have you tried Nitter and Invidious with Links? A DOS user told me Invidious worked quite well to navigate and download videos.

SkedarKing
Desconectado
Joined: 11/01/2021

Hmm, I will look at it... I wonder if there is a way to bypass javascript on any of these ultra lightweight browsers.

I have no idea, but I wonder...

andyprough
Desconectado
Joined: 02/12/2015

>"Hey Andy, have you tried Nitter and Invidious with Links? A DOS user told me Invidious worked quite well to navigate and download videos."

Yes, I use the yewtu.be invidious instance for videos (although I don't need it much anymore, most of the GNU/Linux video creators I follow have moved to LBRY). I use nitter.net for viewing tweets. And I use teddit.net for viewing reddit materials. They all work well on links2.

I have not been able to get links2 to start yewtu.be videos links yet, but I can find the video address and feed it to mpv, and mpv will run it. One way is by hitting the escape key to bring up the links2 menubar, and going to 'File-Copy current URL location', and then pasting that into the mpv command by middle-clicking the mouse.

That simplyweb link you have is interesting to me because of simplytranslate. I've been looking for a free and private front-end to the major translation sites. simplytranslate.org seems to work ok with links2.

Edit: To get LBRY videos, I visit odysee.com once using odysee's javascript in a regular browser in order to copy the RSS feeds from my favorite channels. I paste those RSS URL's into newsboat, and then newsboat gives me the direct LBRY video URL when a new video is released by that content creator. I copy the LBRY video URL from newsboat and paste it into mpv.

GNUser
Desconectado
Joined: 07/17/2013

Thanks, I'm glad you got something you needed from my reply :)

Also, that was a good piece of information on how to use Links on those websites, thanks!

You mention below that because Links doesn't have Javascript you still need another browser in your system, and that is absolutely right, I too have a browser that I use for online banking and such where JS is necessary, but for the most part I have JS disabled in my "regular" browser, and I use websites that work well without it (hence my interest in the Simple Web project).
For me it's so weird when at work or at a friend's house I use a Windows computer and access Youtube (for example) and get all those ads, and the machine feels so slow... Running without JS is actually a feature in my opinion, hence I like that little browser, it doesn't even need an extension to block ads and such because they can't run on it ahahah!

andyprough
Desconectado
Joined: 02/12/2015

>"Running without JS is actually a feature in my opinion, hence I like that little browser, it doesn't even need an extension to block ads and such because they can't run on it ahahah!"

Yup, I've been running it for a week and a half now, and haven't seen an advertisement yet. I guess web developers have forgotten how to make an advertisement part of their web page, like they used to do in the 1990's. If you have js turned off, the web is a much more pleasant place. I've been a huge fan of noscript for a few years now for that reason.

andermetalsh
Desconectado
Joined: 01/04/2013

For JS-less translations, Peertube search and such:

https://simple-web.org/

CLI alternative to translate-shell, just depending on curl,
and fzf for interactive use (optional)

https://codeberg.org/justwolf/stranslate

Translating instances (URLs) in case of some Simply
Translate is not working well:

https://simple-web.org/instances/simplytranslate

Enjoy.

PublicLewdness
Desconectado
Joined: 03/15/2020

I may have to try this out. I actually came here tonight looking for advice of a low resource browser to use on my T61. It has an Nvidia NV86 GPU, which is slow enough on the proprietary driver but is even slower on the Nouveau driver and even basic web browsing on Abrowser is slow as a snail.

andyprough
Desconectado
Joined: 02/12/2015

I've really been impressed with this little browser. I've spent most of my browsing time in it this past week. With the graphical version, where you get the pictures from the websites loaded in a sane manner, it's very comfortable. And of course it's just faster than lightning. I'm quite certain it would beat any big chromium-based or firefox-based browser in any speed test.

There's no javascript, so you still need a bigger browser on your system. But for 95% of my daily online browsing and research, this handles it all.

Important things to remember: The Escape key will give you a menu with a few options. Very handy.

The 'g' key will let you type in a web address. 's' takes you to bookmarks. I recommend bookmarking nearly everything, saves a lot of time. Shift-G will allow you to copy or edit the url of the page you are currently on. The File menu also has a 'copy current URL' option. I use this to copy yewtu.be pages and paste them into an mpv command to play videos.

Ctrl-b will copy text that you highlight with your mouse, or will copy the current web address after you bring it up with Shift-G. But when you copy, you are only placing the text into the "primary selection" buffer, but not into the clipboard buffer. From inside links2, you can paste anything you have copied inside links2 with Ctrl-v. If you copy something from within links2 with Ctrl-b, you should be able to paste it to an outside application with your middle mouse click. On my Trisquel 10 system, I can also paste it in outside applications with the Shift-Insert key combination. Not sure if that key combo will work on every system or keyboard.

andyprough
Desconectado
Joined: 02/12/2015

Also worth noting, some websites, like this Trisquel forum, have to constantly be reloaded with Ctrl-r, or you will not be seeing the current version of the page. links2 seems to load everything from a cache copy if it can. So if you post anything to the forum, be sure and reload the page or you won't see your own posts. Even upvoting a post requires a page reload. When you log in and navigate around the forum, you'll think you've been logged out, but you just need to reload the page to show that you are in fact logged in.

To get rid of this "aggressive caching" behavior, hit Escape to bring up your menu and go to Setup-Cache, and un-select the "Aggressive cache" option. Then websites like this forum should work more normally.

GNUser
Desconectado
Joined: 07/17/2013

I have been playing out with it a little.
How would you go about having a "dark theme"? It doesn't respect colors from websites, so Invidious and Nitter dark theme don't seem to work...

Also, I have to say it seemed to be better when I was using it for DOS... Lol, maybe because my comparison was with Arachne, a much worse browser ahahah.
But I don't like the way it breaks pages presentation, in some cases works Ok, others not so much...

andyprough
Desconectado
Joined: 02/12/2015

You have to change the colors by writing in their hex values. Go to the main menu by hitting the Escape key, and then go to View - Color. In the Color dialog box, you would enter different hex values for the colors you want for the foreground (which is the text color), the background, and for the links.

For example, I've attached a picture where I changed it to a darker theme with some Ubuntu colors. I went to the Ubuntu color palette page online: https://design.ubuntu.com/brand/colour-palette/

I selected Ubuntu's 'Dark aubergine' color for the background, which is hex # 2C001E. I selected white for the text, so I wrote the hex number for white which is FFFFFF in the 'Foreground' color. And I changed the links color to Ubuntu orange, which is hex number E95420.

There are lots of color palettes online, find one with the colors you want and the hex numbers, and give it a try. Make sure your foreground (text) color and background color have a high degree of contrast, otherwise you might change it in such a way that you can't see anything.

links2-dark-theme.jpg
andyprough
Desconectado
Joined: 02/12/2015

Also, I've checked the "Ignore Document Color" in the Color dialog box, to try to force my colors on the website.

andyprough
Desconectado
Joined: 02/12/2015

Need to use the 'save html options' to save colors in between restarts: Escape key for main menu, View-Save html options

Light grey seems better for text than white in a dark mode scheme. White text is a bit too bright for me. I'm going with the hex code a8a8a8 for 'Grey66' foreground/text color for now.

lanun
Desconectado
Joined: 04/01/2021

> Dark aubergine

That would be Blackadder's cousin, the one who took over after the untimely death of the original dynasty.

Always had a feeling they and Canonical were in league.

andyprough
Desconectado
Joined: 02/12/2015

Lieutenant George: ‘My head… oh, my head… feels like the time I was initiated into the Silly Buggers Society at Cambridge. I misheard the rules and tried to push a whole aubergine up my earhole.’
https://www.bbc.co.uk/comedy/blackadder/epguide/four_corporal.shtml

GNUser
Desconectado
Joined: 07/17/2013

Thanks, that was very helpful!
However, how can we improve the way items are placed on the browser screen? It lacks a proper arrangement. Maybe that's a limitation of the browser only supporting html4 ?

andyprough
Desconectado
Joined: 02/12/2015

I find it kind of charming. I guess it's just all about the attitude of the user. I don't have any websites I routinely visit where the placement of the items make them unreadable.

GNUser
Desconectado
Joined: 07/17/2013

Which version are you running? I am running Trisquel 9 which only has 2.14 so maybe you are getting an improved experience (I think the changelog mentions something about scaling of pages and images).
I tried installing the newer versions but even with the deb file, it complains about libc6 not being up to date. Too bad I guess...

It's impressive how if I was running DOS I could be running the most recent version but in my GNU/Linux machine I can't -.-

andyprough
Desconectado
Joined: 02/12/2015

I'm in Hyperbola 0.4 beta right now, which is using links 2.21. My Trisquel is the beta of version 10, so it probably has about 2.21 also.

GNUser
Desconectado
Joined: 07/17/2013

I have done some more testing... it's really damn fast! You are right, it somehow loads the pages first (text and such) and only after the images, which also load fast anyways. But it allows you to navigate and read the pages so much faster... So cool! :)

andyprough
Desconectado
Joined: 02/12/2015

Yeah, there's only a few pages that don't load instantly, and those are just because of the page's server probably.

GNUser
Desconectado
Joined: 07/17/2013

How do you deactivate "aggressive cache"? I have unchecked the box several times, hit the "Save HTML Options" and everytime I start the browser it is on again.

andyprough
Desconectado
Joined: 02/12/2015

>"How do you deactivate "aggressive cache"? I have unchecked the box several times, hit the "Save HTML Options" and everytime I start the browser it is on again."

Make sure you are hitting the "Save Options" under the "Setup" menu, not the "Save HTML Options" under the "View" menu. The "Save HTML Options" is only for options that you set in the "View" menu. links is a little weird that way - you have to use the "Save" button at the bottom of the sub-menu you are in or it won't take effect.

If that doesn't work, then you could also set a bash alias to always start links with the '-aggressive-cache 0' option on the command line, or add it to the links command in the menu you are starting it from.

GNUser
Desconectado
Joined: 07/17/2013

Sorry, I meant to say I had tried both saving options. Still gives the same behavior. I will try using the command line option and that should do it.

Hey, did you noticed it also works with Onion address? :)
I have it running with socks proxy on, and it connects great to those too!

andyprough
Desconectado
Joined: 02/12/2015

>"Hey, did you noticed it also works with Onion address? :)
I have it running with socks proxy on, and it connects great to those too!"

Oh really, can you write down any steps you took? I'd like to try that.

GNUser
Desconectado
Joined: 07/17/2013

Launch Tor Browser (just to have the Tor proxy running), launch Links and hit Esc, go to Setup, Connections, Proxies. In the socks4A write "127.0.0.1:9150"

That's it! Go to check.torproject.org and you will noticed it says you are running tor. Go to any onion address and it will work fine! Let me know if you have any doubts.

I would love to run any DNS leak test, but haven't found any website that tests browsers without JS being needed.

andyprough
Desconectado
Joined: 02/12/2015

>"Launch Tor Browser (just to have the Tor proxy running), launch Links and hit Esc, go to Setup, Connections, Proxies. In the socks4A write "127.0.0.1:9150"
That's it! Go to check.torproject.org and you will noticed it says you are running tor. Go to any onion address and it will work fine! Let me know if you have any doubts.
I would love to run any DNS leak test, but haven't found any website that tests browsers without JS being needed."

Brilliant!

For testing DNS leaks there's a script you can download, instructions here: https://technotipsy.com/linux/check-for-dns-leaks-on-a-headless-linux-server/

dr.dave
Desconectado
Joined: 03/08/2017

Just thought I'd mention if your in Links2 and you head to: www.iteroni.com (which is an invidious instance)

you can also easily download the file and play it back in VLC, mplayer, whatever. Usually 720p and 360p links have sound, other ones don't. Makes youtube viewing possible on older hardware, like basically anything that can handle 360p like a P4 or maybe even a faster PIII. Note that the download link doesn't look like a "live" link, but it is.

This is now my preferred method of youtube viewing. Damn the G and their ads, and trackers and relentless javascript.

Screenshot.png Screenshot-1.png Screenshot-2.png
andyprough
Desconectado
Joined: 02/12/2015

Oh, that's great, I did not know about the iteroni instance, nice to have the download option again!

But have you tried mpv with youtube-dlp? https://trisquel.info/en/forum/youtube-dl-slow-yt-dlp-fast-replacement

With yt-dlp, mpv streams fast enough you don't need to go to an invidious site and do a download from the browser. And it handles videos from a variety of sources - invidious sites, odysee, twitter/nitter videos, piped.kavin.rocks, lots of stuff.