I'm using Ubuntu 14.04 and I wish to force a specific program to run at a predetermined screen resolution and have the screen return to my default resolution after closing the program. The program is the Brackets text editor and the extensions manager is not shown completely when I run Brackets at 1024*768, as seen below in the picture.
It displays well at 1280*1024 but it is very uncomfortable to my eyes.
Here is my xrandr
command output:
Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
VGA1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 340mm x 255mm
1600x1200 74.8
1280x1024 85.0 75.0
1024x768 85.0 75.1* 70.1 60.0
1024x768i 87.1
832x624 74.6
800x600 85.1 72.2 75.0 60.3 56.2
640x480 85.0 75.0 72.8 66.7 60.0
720x400 87.8 70.1
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
Best Answer
You can use the following python script to start your application at a given resolution:
Save the above script (e.g as
my-script.py
) and make it executable:To set a resolution of
1280x1024
and startgedit
just type:To avoid typing this command everytime, save the script in your home directory and add the following lines to your
.bashrc
:Or even better, modify the desktop file that the package installs in
/usr/local/share/applications/brackets.desktop
.And replace the file content with the new lines below:
Source: Checkbox xrandr_cycle script