Increase Font Size in Terminal


Recommended Posts

  • 4 weeks later...

Yes the window can be resized, but the font size and scaling remains the same.

 

Yes you can zoom to 200% and then maximize the window, but it also applies to the main GUI as well as the web terminal.

 

Hopefully I explained well enough. :)

 

Using an SSH client works fine, but there are times when it is much more convenient to use the web terminal. It used to work fine in the previous version, but since the major update to 6.9 the web terminal hasn't displayed well in certain situations such as mine.

Link to comment

I'd also like to see the web terminal don't size made configurable.  As it is, I can't increase the terminal font size without also zooming in on the main UI page which blows that up and makes it difficult to have terminal and GUI both open and readable. 

 

Has anyone done the work to see how we could actually use xterm-webfonts?  Maybe we can make a browser addon to inject it?

 

UPDATE:

I spent some time messing with it and reading docs and made a little progress.  Entering the following in the browser JavaScript console gets the desired behavior:

term.setOption("fontSize", 20)

Just need to package as a browser addon to distribute.  I'm unlikely to have a ton of time to do that so I'll probably run manually for the time being, but I hope this helps others.  

 

In the future, it looks like ttyd has options to override the client-side options on the initial start: https://github.com/tsl0922/ttyd/wiki/Client-Options#basic-usage  I suspect that UNRAID users could be given a config file with options they could add to the ttyd call at some point if that's determined to be a desirable direction. 

Edited by JokesOnYou77
Found a workaround
Link to comment
1 minute ago, JokesOnYou77 said:

@ljm42 My PHP isn't very good, but it doesn't look like there's a place to inject logic for this in the UNRAID webGUI on github.  That leaves browser plugins or greasemonkey scripts as the best way to distribute this in an easy to use fashion.  If I were to build such a thing, what would be the right forum to announce it in? 

 

I'd prefer to handle this with an OS update. 

Link to comment
15 hours ago, JokesOnYou77 said:

@ljm42 My PHP isn't very good, but it doesn't look like there's a place to inject logic for this in the UNRAID webGUI on github.  That leaves browser plugins or greasemonkey scripts as the best way to distribute this in an easy to use fashion.  If I were to build such a thing, what would be the right forum to announce it in? 

Nice find.

 

The rc.nginx needs to be updated. or another script to be called on size changed as needs to stop ttyd and reload. Created a little bash script to test. Fontsize=12 looks to be the default.

 

Note that you cannot run from Term as it ends the sessions.

 

#!/usr/bin/bash
killall -q ttyd &>/dev/null
rm -f /var/run/ttyd.sock
exec ttyd -d 0 -T linux -t disableLeaveAlert=true -t fontSize=30 -i /var/run/ttyd.sock bash --login &>/dev/null &

 

image.thumb.png.4188f30d617885cc609791418e6a489e.png

 

Or you can use User Scripts 

 

image.thumb.png.d5f2373df4dbc8ff4a9f5fd7f6045a2a.png

Edited by SimonF
Link to comment

If this can be done in an OS update, it would be awesome. But I don't have that power, unless there's something I'm missing in the code on github.  But what I can do to solve this problem for myself and others in the immediate term is to write about 50 lines of code/JSON with instructions on my github.

 

But by no means am I proposing that we mark this topic as closed/solved. Building this into the OS would be great. But I think that's a much longer discussion around the right scope, user experience, and implementation.  To me, that means it's likely to take a while.  

 

To get that discussion started though, let me share some of what I've learned so far (I lost the source links though, sorry):

 

1. The change can't be made through CSS. Seems like there are a few contributing factors here but the big one is that the drawing is all done in Canvas.

2. Ttyd is started once and has to be restarted to change the server-side configuration.

 

In addition to the above, I would add another point which is that I have observed, from my own behavior, that I access the web terminal from different devices with different screen sizes at different times and I re-attach to the same tmux/screen/byobu session each time and I'd like to have a different font size on different client machines.  Moreover, if restarting ttyd kills the running multiplexer session because ttyd is the parent process that would not be a great user experience (not to mention other stuff like losing command history depending on how users have that configured). Both the screen size and multiplexer issues make me think that a client/browser-side solution would be preferable to restarting ttyd on the server side.  That said, a server-side "base" configuration might not be a bad idea either. 

 

I don't have the time this instant, but a good next step might be good to run a test by starting a tmux session, starting htop or something, then restarting ttyd and seeing if tmux is still running. 

 

Link to comment
  • 4 weeks later...

I was having this same issue recently until I just noticed today that it seems to be fine. I don't think I've changed anything recently on my server that would affect this. I'm accessing my server using Firefox 88.0.1, and unfortunately I don't know what version of Firefox I had the last time I noticed the web terminal was hard to read.

Link to comment
  • 5 weeks later...
On 4/30/2021 at 4:50 PM, ljm42 said:

 

I'd prefer to handle this with an OS update. 

It would also be nice to address the color blind accessibility concerns by implementing terminal color profile support. I had a topic on this previously, but it seems heavily related to this since we're talking about readability. I basically am forced to use putty/kitty/ssh in another terminal emulator just so I can have colors that I can see (specifically the folders being light blue on bright green is awful)

  • Like 1
Link to comment
  • 3 weeks later...

Other sites report that the strange font in terminal is due to fingerprint blocking added to a number of browsers recently. Brave browser which I use, has a demo site which you can check your browser against being fingerprinted but it appears that their fingerprint mitigation is causing this. If this is the case, I'd prefer a solution in the server since I don't want to turn this off in my browser. Here are the other discussions people are having and for the record, this definitely happens in brave browser.

 

Discussions here and here.

 

Here's an article describing the fingerprint mitigation added to Brave browser

 

  • Thanks 1
Link to comment
  • 5 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.