[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Permissions



On Tue, Feb 10, 2004 at 11:38:53AM -0600, daybrown wrote:
> I have a dos text mode program I'd like to port to Linux.
> but- it routinely changes the dos font and number of screen lines 
> besides the default terminal 25 line screen.

This would be probably perceived as annoying by the Unix users.  Try to
redesign the app so that it doesn't change the resolution.

Note that many terminals really have a 80x25 maximum, and the various
PDA/phones' screens can even go smaller.

If a big screen is a necessity, try to figure out the largest resolution
you use, note that in the documentation, and refuse to start the game if
the resolution is smaller.  Then don't switch, just occupy less or more
space on the screen.  But again, this get quite annoying.

You might use ncurses, or some higher level library, in the course.
Generally, accessing the terminal directly (escape sequences and the
like) is not a good idea.

> I understand that to change to 50 lines or whatever, that one need be root.
> is there a way to empower the app with that permission, that does not 
> also empower any other root privileges?

Yes, and not necessarily.  You would make the game binary suid, and will
revoke the unneeded capabilities as soon as you'll start.  And you'd use
something like svgatextmode, btw.

> Would one havta be su or root to install it?

Yes, you have to be root to write a suid binary.

> There are lotsa dos text mode games that change the text mode font.

The Unix terminals have different parameters, and are generally more
diverse.  If you can make it into a real text game, use the terminal
interface, but if you can't, use the xterm approach Colin suggested.
Just be warned that if it can be made into text, and you use the
specially crafted xterm approach, it would be probably both much
fragile, and ugly.

HTH.
Jan.

-- 
Jan Minar                   "Please don't CC me, I'm subscribed." x 9

Attachment: pgpN695L1ecS4.pgp
Description: PGP signature


Reply to: