Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
se7enOffline
Post subject: xrandr script  PostPosted: 02.01.2011, 13:54



Joined: 2010-09-11
Posts: 164

Status: Offline
I use a simple one liner in autostart to start my external monitor.
      Code:
xrandr --verbose --output LVDS --mode 1024x768 --output VGA-0  --mode 1600x900 --left-of LVDS

I have now 2 problems.
1. I can setup the notebook monitor and external with it's own panel, but once I restart I have them both on top of each other on the external one.
2. I can not find out how I could modify the script to first check if there is a second monitor connected.
 
 View user's profile Send private message  
Reply with quote Back to top
micha_52Offline
Post subject: RE: xrandr script  PostPosted: 02.01.2011, 14:41



Joined: 2010-09-12
Posts: 18
Location: Nordstemmen
Status: Offline
When running xrandr without any arguments you'll get the current status including an overview of a second monitor if connected.
If you want to have a more convenient method to use xrandr then give grandr a try
 
 View user's profile Send private message  
Reply with quote Back to top
timrichardsonOffline
Post subject: RE: xrandr script  PostPosted: 06.01.2011, 10:06



Joined: 2010-09-12
Posts: 66
Location: Melbourne
Status: Offline
I have intel graphics.
this is a script I use to activate the external monitor. It runs as my normal user and I have it mapped to a hotkey.


Note: in the repositories there is a package arandr which is a gui for xrandr with one nice feature: you can get it to save the xrandr command for the monitor configuration.

this script below is hard-coded for some particular details of my home office setup.

      Code:

#!/bin/dash
(xrandr | grep "VGA1 connected"  - )
if [ $? -eq 0 ]
then
   (xrandr | grep "1920x1080" - )
   if [ $? -eq 0 ]
   then
      xrandr --output DVI1 --off --output LVDS1 --mode 1280x800 --pos 1920x280 --rotate normal --output VGA1 --mode 1920x1080 --pos 0x0 --rotate normal
   fi
fi


for what it's worth, I have a another script to turn off the external monitor.
      Code:

#!/bin/dash
export XAUTHORITY=/home/tim/.Xauthority  #this line is not needed, I am experimenting with getting this working from a console
xrandr --output VGA1 --off --output LVDS1 --mode 1280x800

_________________
There are some who call me Tim
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
se7enOffline
Post subject: RE: xrandr script  PostPosted: 07.01.2011, 01:55



Joined: 2010-09-11
Posts: 164

Status: Offline
Nice thank you timrechardson that was what I was looking for.

_________________
Don't mention the war!
Meine Meinung steht fest! Bitte verwirren Sie mich nicht mit Tatsachen!
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio