LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-22-2006, 11:40 PM   #1
3saul
Member
 
Registered: Aug 2004
Location: Brisbane, Australia
Distribution: Ubuntu/Fedora
Posts: 86

Rep: Reputation: 15
Get current monitor resolution


I'm wanting to get the resolution of the screen at any particular time (from the command prompt). I've tried the getting the resolution of root but that remains the same even if you have loaded an app/game which changes the resolution.
 
Old 02-23-2006, 07:12 AM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
xdpyinfo | grep -i 'dimensions'
 
Old 02-23-2006, 08:46 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by satinet
xdpyinfo | grep -i 'dimensions'
Interesting---
Where are obscure utilities such as this documented? X users guide..manual..?
 
Old 02-23-2006, 09:17 AM   #4
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
dunno, but i just found this:

http://www.cyberciti.biz/faqs/2006/0...olution-of.php

there are a few little tricks like that i think....
 
Old 02-23-2006, 04:42 PM   #5
3saul
Member
 
Registered: Aug 2004
Location: Brisbane, Australia
Distribution: Ubuntu/Fedora
Posts: 86

Original Poster
Rep: Reputation: 15
Both:
xdpyinfo | grep 'dimensions' | awk '{print$2}'
xrandr | grep '*' | awk '{print$2$3$4}'

Give me 1024x768 - which is what I'm guessing X is set at...
What I'm wanting to do is figure out if an apps is running fullscreen or not, no one seems to be able to give me an answer on that question so I'm trying to do it other way's...like get the currently 'in focus' window and get it's resolution. I then need to compare that to something to figure out if it's full screen or not...
Thanks for the responses.

Last edited by 3saul; 02-23-2006 at 04:50 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect current resolution rose_bud4201 Slackware 6 06-25-2005 09:07 PM
fluxbox, slack-current resolution problem jasone Slackware 2 04-24-2005 09:57 AM
how to know what is the current resolution ttilt Linux - Software 3 11-28-2004 10:38 AM
Monitor problems -- changing resolution back w/o monitor Jiawen Linux - Hardware 5 03-17-2004 10:06 PM
command to show current display resolution ?? itsjustme Slackware 4 12-05-2003 01:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:07 PM.

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