WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Default TinyCore too small? Try this.  (Read 6006 times)

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Default TinyCore too small? Try this.
« on: October 17, 2021, 08:37:56 PM »
Who this is for:
Those who are running TinyCore versions using the default fltk/flwm environment and find the supporting applications too small on modern high-res screens.

Usual Solution: 
The simplest was to change your screen resolution, either by xrandr, or by changing it in the monitor itself.  But that is usually a bit too fuzzy when you change your res beyond the native-resolution to the built in resolutions.  OR, install a much larger resource DE environment that has all the size settings controls built in.

Understand: 
The default FLTK/FLWM environment has its fonts and sizes for handle grabs and so forth set during compile time.  There is no user-adjustable control.  Usually for an embedded device, things like this do not need changing and so are compiled in to the developers need.

In the past, TC and even DSL users were working with glass monitors and as such may not have even had a res beyond 1024x768.  Life was good, but what about today when you want that original look environment with monitors that can be 1920x1080 or even larger like on a tv?  Pretty dinky.  But it is guaranteed to be visible when you first fire up.

Who should not do this:
Generally for photographs, movies, media and so forth it is best to run your monitor at it's native resolution.  Also those who may be dumpster-divers with glass screens and get the modeline wrong, can relive those classic days of letting the smoke out of your monitor and having to air out the house for a day.  Just saying - shouldn't be a problem today if you get it wrong, but this is my CYA statement.

Reduce the screen res, yet still keep fonts and graphics sharp!
First of all, a BIG BIG thanks to Curaga for suggesting something so simple.  Genius.  Simply divide your existing screen resolution in half.

How? 
I'm running a native res of 1920x1080 and cutting that in half to 960x540 simply isn't one of my monitors default options!

Run a custom modeline, and add that to a file in your xorg.conf.d directory.  Details later.

Figure out the new modeline
Code: [Select]
gtf 960 540 60
The modeline will be shown, but we'll now add that to a file to make sure it fires up in that mode at boot.

But let's find our monitor first!  just run
Code: [Select]
xrandrand look for what is connected.  In my case, HDMI-1 was the connected device.

We're going to use this modeline info to create an xorg configuration file inside this directory as root.  I'll title it 5-monitor.conf

Where this file actually should be edited in TC as root should be done:
/usr/local/share/X11/xorg.conf.d/5-monitor.conf

5-monitor.conf contents:

Code: [Select]
Section "Monitor"
     Identifier "HDMI-1"
     Modeline "960x540_60.00"  40.78 960 992 1088 1216 540 541 544 559 -HSync +VSync
     Option "PreferredMode"  "960x540_60.00"
     Option "DPMS"
EndSection

Watch your spelling and punctuation.  Take your time editing.  (Again, tnx to Curaga and Vinnie for the motivation).  My monitor is pretty modern and supports DPMS so I threw that in just for good measure as an option.

PROBLEM!
This new file is NOT part of the normal backup routine, and will be blown away on reboot.  So you have to manually add it to your backup.  This is very easy to do in the gui backup app.  Simply ADD this file to your backup.  Perhaps do a "dry run" to see it happen as the last line in the dry run.

So there you have it.  A pretty LARGE environment, but now fltk/flwm fonts and window decoration sizes should be much easier to deal with.  Cutting the res exactly in half was the key, rather than using your monitors canned resolutions which came close, but weren't good enough.

Tip:  If the core logo is burning a hole in your forehead now, simply use the wallpaper app to remove it. :)

This is meant more as a pointer, and not an exhaustive treatise on using custom modelines with tools like xrandr and gtv /cvt.  They key was to do an exact cut in half of the res, thanks to Curaga.
« Last Edit: October 17, 2021, 08:59:42 PM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Default TinyCore too small? Try this.
« Reply #1 on: October 18, 2021, 04:30:40 AM »
Followup:

Now that the desktop is nice and large and crisp and clean, the terminal font is still a bit small and ugly!

It's been covered elsewhere, but this seems to always be the second question. :)

There are many to choose from if you run xlsfonts to see them.

One that can be tested out immediately is to run this manually and see the immediate difference:

Code: [Select]
aterm -fn 10x20 &

Want to make that permanent so each time you fire up on the Terminal icon it is used by default?

In your home directory (/home/tc) lives a hidden file:  .Xdefaults

Edit the file and change the font line from fixed to 10x20

Code: [Select]
Aterm*font: 10x20
WARNING! in the .Xdefaults file, one must be accutely aware of when making changes NOT to leave any trailing spaces after the last character of the option you change or it will not take.  But when you go to view it, you scratch your head wondering why it looks ok, but is not working.  A trailing space may be hurting you.

So for instance in this case, just make sure there is no hidden trailing space after the zero after the 10x20

« Last Edit: October 18, 2021, 04:35:09 AM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Default TinyCore too small? Try this.
« Reply #2 on: October 20, 2021, 07:18:36 AM »
Personal notes:

Even if you are a minimalist with TC, this implies loading the xorg 7.7 tcz, and usually placing this at the top of your onboot.lst file.  Usually immediately followed by the graphics-kernel-xxxx.tcz.  This small addition is definitely worth it.  I've seen some situations where this is reversed and graphics come first.

Even though your system *may* have come up before this in a somewhat smaller usable res, doing the above may make it even tinier than before at your high native resolution.   But don't fret.  The custom modeline that cuts your high native res in half will come into play after making that 5-monitor.conf file (and be sure to add it to your backup list!)

If xrandr is too much info for you to find the identifier you need for the custom conf file, you can go gui with something like LxRandr extension which makes it easy.

WARNING! When looking at the screen identifier, make special note of whether it uses a hyphen or not.

Ie, there is a big difference between

Code: [Select]
HDMI-1
and
HDMI1

All my systems use the hyphen, but I've seen other systems that identify without the hyphen.

So I'm not doing photo or video editing at this res.  But it is still good enough to enjoy say casual web-browsing without going cross-eyed.
That's a UNIX book! - cool  -- Garth

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11576
Re: Default TinyCore too small? Try this.
« Reply #3 on: October 20, 2021, 09:51:33 AM »
Hi PDP-8
... this implies loading the xorg 7.7 tcz, and usually placing this at the top of your onboot.lst file.  Usually immediately followed by the graphics-kernel-xxxx.tcz. ...
I though  graphics-kernel  was supposed to appear before  xorg  in the  onboot.lst  file.

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Default TinyCore too small? Try this.
« Reply #4 on: October 20, 2021, 10:48:40 PM »
Indeed!  Thank you for the reminder.

I have now placed graphics-kernel *before* xorg in my onboot.lst.  Those are the very first two at the top of the file.
That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Default TinyCore too small? Try this.
« Reply #5 on: October 21, 2021, 09:35:01 PM »
Also made a classic mistake when whipping up a similar system on another box:

Now that I'm running xorg, I forgot to remove xvesa from the onboot.lst file.  Ooops!

Also learned on this box that graphics-kernel may not like being immediately loaded so late in the process when downloading and installing from the repos.  System hung, video goes nuts, had to do the 3-finger-salute or hard-shutdown, and duly making the filesystems dirty.

From now on, whenever I want to install graphics-kernel, I'll merely tell APPS to just download it ONLY, and then MANUALLY enable it by placing it at the top of the onboot.lst file and then rebooting.

No more trashed filesystems. :)

That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Default TinyCore too small? Try this.
« Reply #6 on: October 22, 2021, 01:46:10 AM »
The final touch!

Even though I run a light environment, now that I'm using Xorg to cut my large screen res in half, might as well tweak it a little more.

Here is what I appended to my .Xdefaults file:

Code: [Select]
Xft.dpi: 100.0
Xft.autohint: false
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintslight
Xft.hinting: true
Xft.antialias: true
Xft.rgba: rgb

I'll have to study the ArchLinux wiki again about font setting, but this does seem to bring that slightly sharper edge to a res that has been cut in half by a
custom modeline.  And I could swear that tweaking my dpi from the default of 96 to 100 helped too.

But I've been staring at the screen so long that this might be just wishful thinking. :)

That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Default TinyCore too small? Try this.
« Reply #7 on: October 23, 2021, 06:56:09 AM »
I changed my modeline.  Apparently cvt is more accurate than the slightly older gtf calculator for modern displays.
Like anything after 2002 or so.

My modeline for cutting 1920x1080 in half to 960x540 at 60hz using cvt this:

Code: [Select]
tc@box:~$ cvt 960 540 60
# 960x540 59.63 Hz (CVT 0.52M9) hsync: 33.51 kHz; pclk: 40.75 MHz

Modeline "960x540_60.00"   40.75  960 992 1088 1216  540 543 548 562 -hsync +vsync

Not sure I can tell any difference, but if it's better for the monitor ....
« Last Edit: October 23, 2021, 07:01:56 AM by PDP-8 »
That's a UNIX book! - cool  -- Garth