LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-27-2006, 04:57 PM   #1
Cynagen
LQ Newbie
 
Registered: Jul 2004
Distribution: Slackware 11
Posts: 15

Rep: Reputation: 0
Trying to get width and hieght of screen in characters


Yea, I'm trying to write up a text display of the classic snake game in PHP, and I want to be able to set it up as a screensaver in linux of sorts, anytime I walk away from the computer, I want to be able to disable Ctrl-C, and Ctrl-Alt-F* and on input, freeze the auto playing snake game, and ask for a password, my way of securing it down.

Essentially, I need the character width and height of the screen, how to disable Ctrl-Alt-F*, and Ctrl-* combos.
 
Old 07-28-2006, 09:54 AM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
Do you mean in the console or in a terminal? You can have the character width and height of the screen by accessing the environment variables LINES and COLUMNS.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Textarea "cols" and screen width rblampain Programming 5 01-15-2006 11:15 AM
ostringstream width gecoool Programming 3 12-09-2005 03:02 AM
Laptop Screen Height and Width blueStatic Linux - Hardware 1 09-03-2003 01:06 AM
Having Password Speciall Characters on the screen JStew Programming 4 02-11-2003 01:27 PM
Red Hat, non X, screen width. DiBosco Linux - General 6 01-19-2002 11:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration