Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: PDP-8 on January 23, 2018, 04:48:44 PM

Title: My op notes about the DILLO browser on TC/piCore
Post by: PDP-8 on January 23, 2018, 04:48:44 PM
Why do this?

The Dillo browser for many may seem very limited in today's web environment, what with no javascript and so forth.   But I'm not here to turn back the clock to static web-pages, lynx-friendly pages, and prior to that gopher and wais.  I'm not championing Dillo as the sole saviour of the web, nor do I use it for my investment banking. :)  You can read up all about stuff like that elsewhere.

The real motivation was to make the most out of a tiny resource, much like the ethos of TC / piCore / Dcore itself.

Thing is, if you just fire it up and not configure it, you may be left with a bad impression.  Much like firing up an xterm, aterm, rxvt or any other number of manually configured programs without any touches to the configuration files.

So here are my notes on what *I* did on both TC/x86 8.2.1 and PiCore/Arm 9.0.3, each having a slightly different setup.

I'm not a technical writer, and you can help me from turning this into a blog by jumping in at any time with corrections to errors or comments!

I'll try to keep the thread as short as I can, in as few new message breaks to keep it semi-organized and apologize for replying to myself at times. :)

Title: Screen Resolution
Post by: PDP-8 on January 23, 2018, 05:38:09 PM
Dillo, like a *standard* issue of TC / piCore itself, relies upon the fltk toolkit.  Fltk/flwm prides itself on being low resource and with very small window decorations so you can concentrate on your job, not eye candy.

What this means is that unlike other distro's full-blown desktop environments, there are no "appearance" tabs, where you automatically boot up to the highest resolution your screen can support, and start to change all sorts of icon sizes, bar sizes, widget sizes etc, to make it nice for your monitor.

With fltk / flwm, instead of a full blown appearance center, if the appearance looks microscopic and you have to use things like the minimize / maximize / close widget with the skill of a surgeon, fonts are teeny weeny, what are you supposed to do to get the look reasonable to you?

You change (usually lower) your monitor's default resolution to your liking.

If your TC box is a video / photographic or mass entertainment consumption device, then changing your resolution might be a deal breaker for Dillo, as the interface icons may be just too uncomfortable to navigate.

You've all seen the Tinycore "install" videos, and other quickie installation sites where they boot up TinyCore and gawk at how SMALL it seems out of the box.  Maybe they will just adjust the icon size in the Wbar and call it quits in frustration.  They never took the next step!

If they only knew that the "appearance control center" for the standard TC installation is to change your monitor's resolution to fit your needs instead!  Repeat after me, TC is not a distro, but a "toolkit".  Let's use those tools!

Actually changing your screen resolution is covered elsewhere, like using the Xvesa button in the control panel, or for the PI's, editing your config.txt file.

So now you are running at a non-native resolution.  For instance, my HP monitor has a native of 1920x1080 but that is waaay too large for use with a standard TC for my needs.  Typically I'll reduce that to a smaller 1024 x 768 or thereabout for use with TC/picore.  Find your own comfort resolution.  Fire up Dillo, and see if you can handle the icon sizes for the user interface.

"But my monitor doesn't look good at that resolution!"

Hmm.  Might be time to upgrade.  OR, go into your monitor's own menu system, and see if there are any adjustments you can make to overall sharpness and clarity at this non-native res.  With my modern HP monitor, at native resolutions, some of the options seemed to serve no purpose or made things worse.  But AHA!  At 1024x768, the "HP +" option really cleaned it up.  You may have your own manual or automatic options.

So don't be afraid to explore monitor settings that you may have never touched before now that you are running at a non-native res.

Heh, and we haven't even touched Dillo configs yet.  If anything, maybe this will serve to help those who can't seem to find the "appearance center" in TC. :)
Title: More screen resolution notes
Post by: PDP-8 on January 23, 2018, 07:48:12 PM
"I adjusted my screen resolution lower and while the overall desktop window manager seems reasonable,  and I STILL have small fonts in Aterm - it gets ridiculous to go even lower!"

Ah, welcome to the world of configuration files instead of drop-down menus!  Dillo is no exception.

While this isn't so much about configuring aterm - which is covered in another thread - to make it more pleasant so you can edit Dillo's own configuration file, you can try these temporary quickies from within Aterm:

For X86:
Code: [Select]
aterm -fn 10x20 &Don't forget the & at the end.  If you don't use it, and accidentally close this very first aterm root window, you'll also close the new one with bigger fonts.  It's a unix thing. :)

Need even more?
Code: [Select]
aterm -fn 12x24 &
These may not be the best looking fonts, but will at least serve as a more comfortable way to edit your dillo configuration file.  Looking forward, aterm's configuration is set in your .Xresources file - discussed elsewhere.

RPI / PiCore:
Currently, this doesn't work unless you edit your font paths first.

Edit your .xsession file and add these lines:
Code: [Select]
xset fp+ /usr/lib/X11/fonts/75dpi
xset fp+ /usr/lib/X11/fonts/misc

Reboot.  Not the most elegant thing to do, but we're trying to keep it short.

Hint:  If your aren't interested in getting Aterm to look great right now, the quickest way to achieve the drop-down icon menu sizing environment is to just install the lxde-terminal for X86, or the xfce-4 terminal for the pi.

Now that your editing environment is comfortable, we can *finally* move on towards configuring and using Dillo itself.  Whew.



Title: Initial dillo configuration steps
Post by: PDP-8 on January 23, 2018, 10:57:32 PM
I forgot - when doing all these screen resolution changes, the default windows geometries for aterm and dillo may be awkward.  You can fix that, but for now the easiest solution is to just hit CTRL-ALT-M a time or two ...

When you install Dillo, a hidden directory is created in your home directory  ~/.dillo

But you won't find the configuraton file inside it initially.  Since it is more convenient to place and edit in your home directory, let's copy it:

Code: [Select]
cp /usr/local/etc/dillo/dillorc  ~/.dillo/dillorc
What I'll describe is just a minimum of options that should give you a leg up.  It is not a full-blown treatise on each and every dillo option.

We'll discuss fonts later.  But for now, here are some performance tips that have proven valuable in reducing server delays.  The dillorc file is pretty well documented and divided into sections.

1) Go to the Network Section and User-Agent Header options.
UNcomment the line that points to Mozilla, Windows NT, Gecko Firefox

The reason for this is that I find that most servers balk at the default Dillo user agent, and either give up completely, or take waaay too long to respond.  For me, it isn't a security thing by trying to blend in with the crowd, which is now even a joke from that standpoint.  This is a performance setting now.

2) HTTP Referer Header
UNcomment the line
http_referer=host

Again, this is to keep those servers serving.  In some instances, I found that the default caused delay.


3) FIRST SECTION eye candy
I've found that most modern hardware can accept double-buffering without too much of a penalty.  Hence, I changed the buffering line to:

buffered_drawing=2

At this stage, you may find Dillo tolerable as is, but I doubt it.  Later I'll get into font sizing / improvements and how it differs slightly between TC and piCore.

Keep in mind that my usage was not to roll back the clock to the good old days, but to maximize what I can get out of what dillo has to offer.  Ah, the good old days when all you had to worry about was the blink-tag and keeping a yellow-page sized book of url's at your side.  <sniff>  This is not that. :)
Title: Dillo font-sizing basics
Post by: PDP-8 on January 24, 2018, 12:30:29 AM
Even though you may find the fonts as they come pretty ugly, the mechanics of actually changing their size and optionally scaling them is shown here.  Pretty simple.  Good to get some hands on before adding fonts.

In the dillorc config file, go to the Rendering Section

Find the "Minimum Font Size In Pixels" line.
UNcomment and change the line to a typically largish font for practice:

Code: [Select]
font_min_size=16
save the file, open Dillo.  Close dillo, open the config, change the value, rinse and repeat a few times.

Now do the same for scaling.  Find the "All Fonts are scaled by this value" line.
Code: [Select]
font_factor=1.0
Change it to 0.8, 1.2, 1.5, 1.9, 2.5 whatever.

Heh, what you'll quickly find out is how ugly the standard bitmapped fonts can become when scaled.  But the point here is just to get some hands on with the mechanics of it all.  When/if you add fonts later, these values will certainly change.

Don't get too hung up on trying to make Dillo look exactly like your other browsers.  The thing to strive for here is readability, and not necessarily making it look like something else to a tee.
Title: Nice fonts for Dillo
Post by: PDP-8 on January 24, 2018, 01:00:50 AM
If you've been reading a bit in the Rendering Section of the dillorc file, you'll see mention of FLTK being compiled with or without the xft extension - which is needed if you want to use higher quality fonts than the standard bitmapped one, like DejaVu.

From what I can tell, Tinycore for X86 offers two different versions, one with and one without xft.  To get the one with full xft support, download and install

fltk-full.tcz

That may not be the real name since I'm not at the x86 box right now, but search the apps repo for fltk and you'll see that full version.

So, again just for X86, it is pretty easy to install fltk-full, dejavu fonts, and uncomment the default font lines in dillorc to use them.  Adjust minimum font size and scaling to taste.

For PiCore:
At this point in time, it does not appear that fltk is compiled with the xft extension.  I suppose one could wait for a contribution with it, or compile the full version themselves.

In the meantime, there is another alternative:  get a MUCH better looking bitmapped font!  How I did that can be seen in more detail here where I improved both aterm and dillo:

http://forum.tinycorelinux.net/index.php/topic,21604.0.html

In my case, that means the TERMINUS font.  Once installed, I just uncommented all the default bitmapped font lines in dillorc, AND changed all the names from "Helvetica" and others to "Terminus".  Yeah, all pages look, um like terminus, but they do seem to survive many font sizes and even some scaling tweaks.  Of course X86 users can use this technique as well if they so choose.
Title: Re: Nice fonts for Dillo
Post by: polikuo on January 24, 2018, 01:20:34 AM
For PiCore:
At this point in time, it does not appear that fltk is compiled with the xft extension.  I suppose one could wait for a contribution with it, or compile the full version themselves.

When I compiled the fltk-full extension, I had enabled almost every options available by the configure script.
See x86 (http://tinycorelinux.net/7.x/x86/tcz/src/fltk-full/fltk-full.tcz.build), x86_64 (http://tinycorelinux.net/7.x/x86_64/tcz/src/fltk-full/fltk-full.tcz.build)

On PiCore thought, I got stuck missing a bunch of libraries.
I made a fltk-xft.tcz for myself once, but I never submitted it.
I was not sure if an extension compiled on RPI3 will be accepted by the repo.
One day my SD card got corrupted and I sorta stop using PiCore ever since.
Title: Dillo op notes wrapup
Post by: PDP-8 on January 24, 2018, 01:21:09 AM
Well that's about it.  Sorry to be so bloggish...  nobody jumped in.. :)

Realize that Dillo with no javascript, and simplistic cookie and https support may not work with all of today's pages, where much of them are invasive, 90% fluff, and 10% content. 

I personally get a real kick out of finding pages and sites that DO work, or at least allow me to get to the important content, even if the layout can seem a bit funky.  Make use of the CSS and images options while reading.

And if you don't need to, you don't always have to make a search engine your "portal" to everything else.  If you have known good pages, say from another browser to get you there faster, put these in your dillo bookmarks, go there directly, etc.  You may even adopt the old-school habit of putting url's into a text file if the bookmark thing doesn't work for you.  Imagine that.

Obviously one can turn TC into any machine they want.  Even though I get a total kick out of using an RPI, on occasion I'll even run Dillo on my screaming machines just because I think it's fun getting content with the least amount of resources.  But yes, as much as I admire Dillo, I use the right tool for the job if Dillo doesn't cut it.

I hope this helps others get a leg up on how to bring up Dillo (or aterm) from a dinky ugly square, to something that might be useful (and fun with the right mindset) at times.
Title: Re: Nice fonts for Dillo
Post by: PDP-8 on January 24, 2018, 01:28:24 AM
Quote
One day my SD card got corrupted and I sorta stop using PiCore ever since.

Could have been a counterfeit card with poor performance?  Many variables there.  With the Pi3, we have the option of booting from usb, which might be a more robust way to do it with a quality usb stick.  I haven't tried that method of booting on it yet.....

I guess I'd have to ask bmarkus about it - perhaps slightly different project goals than TC, integrity of the user interface concerns, not bloating up a pi, etc etc...
Title: Re: Nice fonts for Dillo
Post by: PDP-8 on January 24, 2018, 03:22:03 AM
Code: [Select]
[quote]On PiCore thought, I got stuck missing a bunch of libraries.
I made a fltk-xft.tcz for myself once, but I never submitted it.
I was not sure if an extension compiled on RPI3 will be accepted by the repo.

You got me going -- I just compiled fltk-1.3.4-2 with all the trimmings on my new AML-S905X-CC "Le Potato" ARM board.  A few minutes later it was done.  Thing is, I'm not sure what can be left in or out to keep with the tc/picore concept of only building absolutely what's necessary before submission.  Dillo seems to like it on that board that's for sure.

Wish I knew more of what I was doing other than fumbling through make configs etc. :)