You are not logged in.

#1 2012-08-27 10:22:22

drobole
Member
From: Norway
Registered: 2012-07-23
Posts: 125

Terminal size on installation media [SOLVED]

I'm working on a curses installer and I was wondering if I can trust the terminal size on the installation media to be COLUMNS=170, LINES=48 ?

Last edited by drobole (2012-08-27 13:26:31)

Offline

#2 2012-08-27 10:48:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,507
Website

Re: Terminal size on installation media [SOLVED]

Wouldn't it be better, in either case, to detect the width and height and use those variables in place of the "magic numbers" 170 and 48?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2012-08-27 10:58:10

drobole
Member
From: Norway
Registered: 2012-07-23
Posts: 125

Re: Terminal size on installation media [SOLVED]

Trilby wrote:

Wouldn't it be better, in either case, to detect the width and height and use those variables in place of the "magic numbers" 170 and 48?

That would be the logical way to do things, but the problem is that its hard to create a UI that will take advantage of a bigger terminal only when available.
Simply resizing the UI might make it look better, but I wont be of any help layout wise.

Right now I'm trying to fit the UI on a 80x25 terminal, something that puts a serious limitation on the layout. However, if I could increase this minimum size it would make things a lot easier

Last edited by drobole (2012-08-27 11:05:32)

Offline

#4 2012-08-27 12:57:45

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Terminal size on installation media [SOLVED]

No, you can't count on anything but 80x25. Not everyone will have KMS (which means any number of sizes based on native monitor resolution), and not everyone who doesn't use KMS will boot with a vesa framebuffer.

Offline

#5 2012-08-27 13:25:53

drobole
Member
From: Norway
Registered: 2012-07-23
Posts: 125

Re: Terminal size on installation media [SOLVED]

Ok, thanks for the input guys

Offline

Board footer

Powered by FluxBB