Increase Font Size in Terminal


19 posts in this topic Last Reply

Recommended Posts

  • 4 weeks later...

I believe it would be very helpful if this was a native user configurable option, especially for users that might not be comfortable trying to figure out how to implement xterm-webfont themselves.

Link to post

Are you talking about the terminal window you get when you click under the "uptime" in the top right?  Did you try increasing the size with openapple-+ (control-+ on other os).  Or just ssh in using whatever your favorite terminal is.

Link to post

This is the webterminal in the GUI.

 

2021-04-15_08-31-47.png.d41c57a5e3d32e015abcc95c348d01fd.png

 

The text in the webterminal is difficult to read at default zoom. (my monitor resolution is 1920x1200)

 

2021-04-15_08-27-32.png.dcbb7f7ac0564ea0aff61045afb3d8a6.png

 

Increasing zoom to 200% makes it more readable, at the expense of less displayable text.

 

2021-04-15_08-28-10.png.e109aca05b3dbf8ddbec22eeb823d183.png

Link to post

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 post

Is this not configurable from somewhere in the Unraid menu? It also impacts the terminals under the docker menu where you exec into containers. The font is nearly illegible on my screen.

image.png.bbab4a49fdecd79983f8807dbaa05980.png

Link to post

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 post
On 4/28/2021 at 5:22 PM, JokesOnYou77 said:

I spent some time messing with it and reading docs and made a little progress. 

 

Great find! We should be able to use this.

Link to post

@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? 

Link to post
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 post
Posted (edited)
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 post

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 post

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.