w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
I need a script to change screen resolution in Linux Mint 15 then launch an application

You have not listed what you have tried, if anything, thus far. However since you are running Mint, you probably have xrandr or can easily get it.

xrandr -q
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 32767 x 32767
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis)
293mm x 164mm
1366x768       60.0*+
1360x768       59.8     60.0  
1024x768       60.0  
800x600        60.3     56.2  
640x480        59.9  

Then you just user xrandr -s to change the screen resolution mode. So say I wanted to change to change to 1024x768 I would just run:

xrandr -s 2

Here is a really simple script to demonstrate:

echo "I am going to check the screen resolution"
xrandr -q
sleep 5s
echo "I am going to change the screen resolution to 1024x768"
xrandr -s 2
echo "Now we are going to to check the resolution again"
xrandr -q
sleep 5s
echo "Now I am going to change the resolution back to 1366x768"
xrandr -s 0
echo "Now we check yet again"
xrandr -q
sleep 5s

If I am misinterpreting what you are asking for then please update your question to better reflect your aim.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.