links2 - The graphical web browser that uses 5mb of memory (part II)

17 Antworten [Letzter Beitrag]
andyprough
Offline
Beigetreten: 02/12/2015

The first part of this series is getting a bit older now and was locked due to its age, but still has tons of good ideas for turning links2 into a powerful graphical browser, theming it, setting up useragent and other settings, etc: https://trisquel.info/en/forum/graphical-web-browser-uses-5mb-memory

I had some stuff I wanted to add, so since that thread is locked I'm starting a Part II here.

In recent months I've figured out the torturous process of getting links2 to automatically open some audio and video files in external media player programs. I prefer VLC for this purpose, because for music files, MPV and some of the smaller audio players just start playing in the terminal background, and don't give me options of controlling volume, fast forwarding or rewinding, etc. With VLC, I open a full VLC window and have all the controls, plus VLC usually is a very low resource media player, and so fits in very nicely with the links2 browser.

As in the past, a big reason I'm placing this here is that I will be able to find it and remind myself in the future how to do this on new systems that I'm setting up. Hope it can also help someone else move their daily browsing of simple web pages to this most amazing minimalist, libre, graphical browser.

To get media files to open automatically from links2 is process with 2 major steps and several minor steps: 1) set up the media type in the "File Extensions" menu; 2) set up the external media player in the "Associations" menu.

For my example, I'll show how to set up VLC to start up automatically and play an mp3 file, and I'll use one of my favorite Bible teaching websites, which has tons of mp3's to click on.

1) First, open links2, and hit the Escape key - the escape key starts up the menu at the top of the browser window.
2) Push the "s" button on your keyboard for the "Setup" menu, and the "e" button for the "File Extensions" dialog box (you can also use your mouse instead of the key presses to navigate the menu)
3) Each of the file extensions has a type of file (or several), followed by a colon ":", followed by a file type. In this case we are looking for the "audio/mpeg" file type. If you have a File Extension that says "mp3:audio/mpeg", then scroll down to it. If you don't have one, you'll need to create it by pushing the "a" key for "Add", and adding the word "mp3" in the top line, and the words "audio/mpeg" in the bottom line of the box that pops up. You can add more than just mp3 files to this File Extension, for example, my top line says "mp3,ogg" - so any time I click on an mp3 or ogg file, links2 will know that it is part of the File Extension "audio/mpeg". If you want to add additional file types to an existing "audio/mpeg" line, then hit the "e" key for the "Edit" dialog box, and add the additional file endings in the top line in the "mp3,ogg" format with a comma between file endings, and no spaces. In case this doesn't make sense, I've added a screenshot of my audio/mpeg dialog box so you can see how the top and bottom lines are supposed to be filled out in the dialog box.
4. Press the "Enter" key or click the "OK" button with your mouse to save the File Extension.
5. Press the "c" key to close the File Extension menu box
6. Your menu at the top will have disappeared - hit the "Escape" key again to bring it back up. Press the "s" key again to bring up the "Setup" menu, and then the "a" key to bring up the "Associations" menu box
7. Here you will need to add a new Association, so press the "a" key on your keyboard or push the "Add" button on the screen with your mouse to bring up the "Add" dialog box
8. Here it gets complicated - you have three lines to fill out, and several checkboxes to either fill or avoid
9. First, on the top "Label" line, I've given my Association a name - "MP3"
10. Next, in the "Content Type(s)" line, I add any File Extension that I want to be opened by VLC. For me, I not only want VLC to open audio/mpeg files, but also any that I designate as video/mpeg files (which I had already set up for myself in the File Extension menu). So on line two, I type out "audio/mpeg,video/mpeg". Make sure you don't have any spaces, and separate any File Extensions that you use by a comma. I've added a second picture to this post to show a completed version of the "add" dialog box for my links2.
11. On line 3, the "Program" line, add the name of the program, followed by a space and then the percent sign "%". In my case, this line reads "vlc %"
12. Underneath line three, there's a bunch of checkboxes that you MUST DEAL WITH in order to get this to work. For me, I've found that the only combination that works consistently is to uncheck the "Block Terminal While Program Running" box, to check the next 3 boxes ("Run in Terminal", "Run in X-Window", and "Ask Before Opening"), and to uncheck the final 2 boxes ("Accepts HTTP urls" and "Accepts FTP urls"). Be sure and look at the attached picture so you see what I'm talking about. I've tried every combination multiple times, and this is the only combination that works consistently. I do not know why it works and the other combinations of checking boxes do not work, and I have not been able to find good documentation, but it works with VLC for me, and so I'm happy. If anyone has a better way to do this part, please let me know in the replies below this post.
13. Press the "Enter" key or click the "OK" button with your mouse, and then click "c" for "Close" to close this "Associations" menu box
14. At this point, you may have to kill links2 and restart it to get the file-opening to work - I don't recall for sure if a restart is necessary.
15. To test it out, I go to my favorite Bible teaching/Bible Q&A radio show website, thenarrowpath.com. There are tons of mp3s of lectures and radio shows on this site - literally thousands of them. To hear today's radio broadcast, click on "Radio Program", and then "Listen to previously recorded The Narrow Path radio archives", and then on the right-hand side there will be an "Evening Show" link under either today's date or yesterday's (weekdays only). Click on the word "Evening Show" there, and your "Associations" dialog box will pop up
16. The Associations dialog box will ask you "What to do?" - "Open", "Save", "Display", or "Cancel". To hear the radio program in the VLC player, press the "o" key or click on "Open" with your mouse. Immediately VLC pops up, you will hear whistling and slow guitar playing for a few moments, and then the Bible teacher Steve Gregg will start talking.
17. If you've gotten this far and you are an atheist - good for you! You've found the #1 Bible radio show that is willing to take questions from atheists and answer them without yelling and screaming and shaming. In fact, there are regular atheist, Buddhist, and other non-Christian callers that have become good friends of the show over the years. If you listen to some of the thousands of shows that Steve Gregg has recorded since May 2006, you might find your atheism questions answered!

AnhangGröße
2022-11-01_21-15.png90.68 KB
2022-11-01_21-26.png34.29 KB
prospero
Offline
Beigetreten: 05/20/2022

Thank you very much, I had been feeling like a chicken facing a tire iron at times while using Links 2. These times have ceased to be though, I now foresee a much brighter future. For myself and for chickens too.

> the #1 Bible radio show that is willing to take questions from atheists and answer them without yelling...

I am certainly no atheist, I believe God made me to shine as a beacon of glory at the center of Their Multiverses. Why and when did their plans fail, I have no idea. Maybe I should call in to investigate further?

andyprough
Offline
Beigetreten: 02/12/2015

You are standing at the point of emanation - how could you know how much you shine into the multiverses? If you went and stood on the top of a mountain on one of the multiverse planets, you would probably look up at the night sky and say, "wow, look at how brightly that prospero star is shining tonight. It's the brightest star in the Magic Banana constellation".

tonlee
Offline
Beigetreten: 09/08/2014

Can you tell how links2 is on
privacy if run through tor, text only? Fingerprinting?
Is it a falsehood to believe a command line
text mode browser would give away less information
than graphical browsers? How would you run links2
through tor? Proxychains? Thank you.

andyprough
Offline
Beigetreten: 02/12/2015

>"Can you tell how links2 is on privacy if run through tor, text only? Fingerprinting?"

I have not run it through Tor, but @GNUuser was doing that on the earlier Links2 thread, and showed how to do it: https://trisquel.info/en/forum/graphical-web-browser-uses-5mb-memory#comment-162935

You can check the fingerprint on amiunique.com - it will give you your useragent and a small amount of additional fingerprint information, but not much. Most fingerprinting techniques seem to require that you enable javascript, so I think that most fingerprinting will not work against links2.

I don't use Tor, but I do use a generic Firefox ESR useragent to screw up the fingerprinting and tracking a little bit. To change the useragent, hit the 'Escape' key to bring up the Links2 menu, go to Setup-Network Options-HTTP Options, and on the HTTP Options dialog box select "Header options". You'll get another dialog box, and in there you can set some anti-tracking, anti-fingerprinting options, such as whether or not to send 'Do Not Track' signals, a 'No referer' option, and you'll see a 'Fake User Agent' box there. I put a Firefox ESR user agent in the fake user agent box: Mozilla/5.0 (Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0

Click OK when done, and then you MUST 'Save Changes' in Links2 by hitting 'Escape' to bring back up the Links2 menu, and going to Setup-Save Options and selecting that. Otherwise none of your changes will ever save in Links2. I think you may have to restart Links2 for your HTTP header options changes to take effect.

tonlee
Offline
Beigetreten: 09/08/2014

does links2 support proxy dns
calls if socks4a
is selected?

andyprough
Offline
Beigetreten: 02/12/2015

>"does links2 support proxy dns calls if socks4a is selected?"

I don't know how it works, but you do have proxy and socks4A options by hitting the 'Escape' key and going to Setup - Network - Proxy. DNS options are in Setup - Network - DNS. I don't know what it means to "support proxy dns calls if socks4a is selected", so you would need to try it out for yourself.

tonlee
Offline
Beigetreten: 09/08/2014

> support proxy dns

abrowser -> edit -> settings -> general ->
network settings ->
proxy dns when using socksv5.
I do not know if the proxy socks4a setting in links2 also
includes proxy dns? And I do not know
if torbrowser and torsource supports socks4a?

> try it out

I would not know how to verify if
links2 runs through tor.

GNUser
Offline
Beigetreten: 07/17/2013

Sorry I'm late to the party :P
I never got any DNS leak checker to run properly. Because of that I am unable to confirm or deny that Links respects proxy settings for DNS requests or not.
I don't really have much of a use for Links2 on my main machine anyways, so... I usually go with Tor Browser, security settings set to "safest" which disables all JS among other things. Much better internet experience that way these days!
I do understand the need for Links2 if you have a much older machine. Or want to run FreeDOS :P

andyprough
Offline
Beigetreten: 02/12/2015

>"I never got any DNS leak checker to run properly."

Point your links2 browser to https://dns.ipleak.net/json/, and tell links2 to "Display" the page.

Look to see if your ISP's data is showing up anywhere in the json data that appears on the page, or if you are only seeing the data from your Tor node/relay/whatever-you-call-it. If you only see Tor stuff, then my understanding is that you are not suffering from a DNS leak. If you see your ISP's information anywhere in there, then my understanding is that you ARE suffering from a DNS leak.

It seems to work for me. I get completely different json data when I am using a vpn than when I am going through my ISP.

GNUser
Offline
Beigetreten: 07/17/2013

Thanks! That's a nice one.
I guess it all works ok. I even got it to work with onion services, so I suppose it must be working correctly...
Though, do be fair, if I was afraid of my information leaking, I wouldn't trust it, since I cannot confirm if there are no other leaks.

Besides, fingerprinting this is easy... Window size, colors, fonts, etc. Any change you make to the browser will make you unique. Like I said, unless it's for a novelty, I would keep using Tor Browser with security slider on Safest.

If you really have an old machine that needs a very lightweight browser, this might be an option yes.

nparafe

I am a member!

Offline
Beigetreten: 10/20/2020

Browsing with Links2 is such a calm experience that it is almost uncomfortable... It is very interesting. Thank you Andy for the suggestion.
Also is a great way to browse the web @work. Nobody will ever think that you are doing unprudactive things from the terminal, and it will seem too important and complex for other people to ask you what you are doing...
Btw, has anyone found a way to enable something like https always? And what about cookies? I haven't found a way to enable it (at least to select the sites to enable it).

andyprough
Offline
Beigetreten: 02/12/2015

>"Browsing with Links2 is such a calm experience that it is almost uncomfortable... It is very interesting. Thank you Andy for the suggestion."

Excellent!

>"Also is a great way to browse the web @work. Nobody will ever think that you are doing unprudactive things from the terminal, and it will seem too important and complex for other people to ask you what you are doing..."

Don't tell everyone all my secrets. But yes, you are absolutely correct. Also, your family will think "looks like he's busy doing important computer programming or something - I'd better not bother him".

>"has anyone found a way to enable something like https always?"

I don't see an option for that. I've read that you could simply make a firewall rule on your distro that enables https and disables http. I talked to one browser dev about it, and he said https-only is not terribly important in 2022. He said that all the sites that should be https already are, and the remaining ones that are still http are probably not transmitting any important information. I don't know, but it seems that generally he is pretty correct.

>"And what about cookies? I haven't found a way to enable it (at least to select the sites to enable it)."

I'm not sure your question here. The cookie menu is accessed by hitting the 'Escape' key and going to Setup - Cookies. Your options are to enable and save cookies, to set a maximum time to keep them (I have it set for 0.01 days - just long enough to allow me to log into a site like Trisquel), and to clear cookies. I don't see any cookie whitelist options, if that is what you are looking for. It appears that your options are to either keep them all, clear them all, or have them deleted on a set daily schedule.

nparafe

I am a member!

Offline
Beigetreten: 10/20/2020

There must be some witchcraft involved. My version is 2.21

witchcraft.png
andyprough
Offline
Beigetreten: 02/12/2015

Oh I see, I've been on my Libre antiX respin recently, which has links2 version 2.28. I do have a "Cookies" menu item under Setup.

Maybe that would be a good reason to try out Trisquel 11?

Or the Trisquel devs are usually pretty nice about back-porting packages on request - maybe you could put in a request in the main forum for a back-ported version?

prospero
Offline
Beigetreten: 05/20/2022

And here I reappear, under my new Aramo hat, shipping with Links2 2.25.

https://packages.trisquel.org/search?suite=aramo&searchon=names&keywords=links2

Well, it seems to behave like 2.28. I like this feeling of permanent but stable improvement.

andyprough
Offline
Beigetreten: 02/12/2015

You know what's weird? antiX gets its packages from Debian stable, whereas Trisquel gets its packages from Ubuntu which gets its packages from Debian unstable and Debian experimental. So why is the version of links2 on antiX ahead of the version on Trisquel Aramo? Seems a bit odd.

prospero
Offline
Beigetreten: 05/20/2022

> Trisquel gets its packages from Ubuntu

But only from the LTS it is based on, which is currently 22.04. So Ubuntu 22.04 Blobby Blobfish probably ships with Links2 2.25 too. Blobbedness is getting too thick there, I dare not venture any more to check version numbers without a heavy duty diving suit.

EDIT: I ventured, and 2.25 it is (https://packages.ubuntu.com/jammy/links2).