Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to get current X screen resolution Post 302382679 by tcfx44 on Thursday 24th of December 2009 09:04:06 AM
Old 12-24-2009
How to get current X screen resolution

Hi,

I need to get the current X*Y resolution of X in a shell script. xrandr -q gives me a line like this:
Screen 0: minimum 320 x 200, current 1600 x 1200, maximum 3080 x 1600

How can I extract the X and Y current resolution values? sed, awk, cut or any other console solution is welcomed.

Thanks
 

10 More Discussions You Might Find Interesting

1. Solaris

Changing Screen Resolution

I have installed Solaris 10 over vmware onto my machine. Now when I want to change my screen resolution it only has one option which is 800x600. Is there a way to change that to a bigger resollution? And if there is, what file do I have to edit and what text editor do I have to use? (1 Reply)
Discussion started by: Aco
1 Replies

2. Solaris

Pre-Login Screen Resolution

I'm trying to configure the resolution that the pre-login screen is set at, I have looked on the net and all I can find is people telling me to edit the 'm46config' file. I cant find this file anywhere in any directory. I'm running Solaris 10 - any ideas how I can alter the resolution? :confused: (1 Reply)
Discussion started by: Dredz
1 Replies

3. UNIX for Dummies Questions & Answers

Changing my Screen Resolution (Not in X)

I have no graphical environment, no X, just a shell... but its WAY bigger than my monitor... what do I do? (3 Replies)
Discussion started by: jjinno
3 Replies

4. Solaris

Someone's got to know... Screen resolution question.

Hi all, Someone please help, I have a machine running Sun Solaris 5.8. X used to run fine, not it can't start. (possible user intervention) It looks to be trying to run at 1280x1024. I don't think the hardware will support it, it seems high. Anyways, how from the commandline, via ssh, can I... (4 Replies)
Discussion started by: komputersman
4 Replies

5. Solaris

Screen Saver Resolution

I am using sun solaris machine i have given the specs of that machine given below Name of athe Platform : SUNW,Ultra-5_10 Machiene hardware :sun4u Processor Type :sparc Operating system : solaris 10 Monitory TYpe : SAMSUNG Sync Master... (2 Replies)
Discussion started by: ambavaram
2 Replies

6. Solaris

screen resolution

how to change screen resolution in CDE prompt (2 Replies)
Discussion started by: tirupathi
2 Replies

7. Red Hat

Screen resolution before and after login

system: Fedora14 on vmware the login screen resolution is 1024*768, but after login the resolution is 800*600. I want to set the login screen resolution as 800*600 too. How to do this? thanks! (2 Replies)
Discussion started by: vistastar
2 Replies

8. UNIX for Dummies Questions & Answers

Changing the screen resolution

I have installed several flavors of Linux and FreeBSD onto my machine. Now when I want to change my screen resolution, it only has one option which is 800x600. Is there a way to change that to a bigger resolution? And if there is, what file do I have to edit and what text editor do I have to use?... (2 Replies)
Discussion started by: figaro
2 Replies

9. Linux

How to change screen Resolution?

Dear all I install Cent OS 5.5 ( Linux OS), with bshell and also Windows OS on the my laptop (ASUA) maximum screen resolution in Windows OS is 1024*760 but in Cent OS 5.5 is 800 *600, I have a program that is necessary to install on Cent OS and I have problem with other Linux distributions... (2 Replies)
Discussion started by: mkhorami76
2 Replies

10. Solaris

Screen Resolution

Hi all. I have a very peculiar problem in Solaris 10. The output of the m64config -prconf command with regards the Card Adapter is the following. Card possible resolutions: 720x400x85, 640x480x60, 640x480x72, 640x480x75 800x600x56, 800x600x60, 800x600x72, 800x600x75, 1024x768x60 ... (0 Replies)
Discussion started by: lynxman
0 Replies
Gtk2::Gdk::Screen(3pm)					User Contributed Perl Documentation				    Gtk2::Gdk::Screen(3pm)

NAME
Gtk2::Gdk::Screen - wrapper for GdkScreen HIERARCHY
Glib::Object +----Gtk2::Gdk::Screen METHODS
window = $screen->get_active_window Since: gtk+ 2.10 $screen->broadcast_client_message ($event) o $event (Gtk2::Gdk::Event) colormap = $screen->get_default_colormap $screen->set_default_colormap ($colormap) o $colormap (Gtk2::Gdk::Colormap) screen or undef = Gtk2::Gdk::Screen->get_default display = $screen->get_display fontoptions or undef = $screen->get_font_options Since: gtk+ 2.10 $screen->set_font_options ($options) o $options (Cairo::FontOptions or undef) Since: gtk+ 2.10 integer = $screen->get_height integer = $screen->get_height_mm boolean = $screen->is_composited Since: gtk+ 2.10 list = $screen->list_visuals Returns a list of Gtk2::Gdk::Visual's. string = $screen->make_display_name integer = $screen->get_monitor_at_point ($x, $y) o $x (integer) o $y (integer) integer = $screen->get_monitor_at_window ($window) o $window (Gtk2::Gdk::Window) rectangle = $screen->get_monitor_geometry ($monitor_num) o $monitor_num (integer) integer = $screen->get_monitor_height_mm ($monitor_num) o $monitor_num (integer) Since: gtk+ 2.14 unsigned = $screen->get_monitor_output ($monitor_num) o $monitor_num (integer) Since: gtk+ 2.14 string or undef = $screen->get_monitor_plug_name ($monitor_num) o $monitor_num (integer) Since: gtk+ 2.14 integer = $screen->get_monitor_width_mm ($monitor_num) o $monitor_num (integer) Since: gtk+ 2.14 integer = $screen->get_n_monitors integer = $screen->get_number integer = $screen->get_primary_monitor Since: gtk+ 2.20 double = $screen->get_resolution Since: gtk+ 2.10 $screen->set_resolution ($dpi) o $dpi (double) Since: gtk+ 2.10 colormap = $screen->get_rgb_colormap visual = $screen->get_rgb_visual colormap or undef = $screen->get_rgba_colormap Since: gtk+ 2.8 visual or undef = $screen->get_rgba_visual Since: gtk+ 2.8 window = $screen->get_root_window integer = $screen->get_screen_number Since: gtk+ 2.2 scalar = $screen->get_setting ($name) o $name (string) boolean = $screen->supports_net_wm_hint ($property) o $property (Gtk2::Gdk::Atom) Since: gtk+ 2.2 colormap = $screen->get_system_colormap visual = $screen->get_system_visual list = $screen->get_toplevel_windows Returns a list of Gtk2::Gdk::Window's. integer = $screen->get_width integer = $screen->get_width_mm string = $screen->get_window_manager_name Since: gtk+ 2.2 list = $screen->get_window_stack Since: gtk+ 2.10 PROPERTIES
'font-options' (gpointer : default 0 : readable / writable / private) The default font options for the screen 'resolution' (double : default -1 : readable / writable / private) The resolution for fonts on the screen SIGNALS
composited-changed (Gtk2::Gdk::Screen) size-changed (Gtk2::Gdk::Screen) monitors-changed (Gtk2::Gdk::Screen) SEE ALSO
Gtk2, Glib::Object COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.14.2 2012-05-27 Gtk2::Gdk::Screen(3pm)
All times are GMT -4. The time now is 11:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy