1

I am literally a day or two old with Xubuntu 16.04 and am learning the basics of how to get things done. I have found one way to get my monitor to (temporarily) display 1280 x 1024 but have to repeat the process with every restart.

mike@mike-OptiPlex-GX270:~$ xrandr
Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768      60.00* 
   800x600       60.32    56.25  
   848x480       60.00  
   640x480       59.94  
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
mike@mike-OptiPlex-GX270:~$ cvt 1280 1024
# 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
Modeline "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
mike@mike-OptiPlex-GX270:~$ xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
mike@mike-OptiPlex-GX270:~$ xrandr --addmode VGA1 1280x1024_60.00
mike@mike-OptiPlex-GX270:~$ xrandr --output VGA1 --mode 1280x1024_60.00

How do I make these changes permanent? I have read related threads but need step by step instructions for my specific setup.

Also, I want to continue using LightDM because the computer only has 1.5 gb ram.

Thanks in advance.

earthpages
  • 119
  • 2
  • 14

1 Answers1

1

This thread may help you : How can I make xrandr customization permanent? . Basiquely, if you are using lighdm, follow the following steps:

Step 1: Create the script

Create a script like this:

sudo mkdir -p /opt/screen_config/
sudo touch /opt/screen_config/mycustomdesktopvideo.sh
sudo chmod +x /opt/screen_config/mycustomdesktopvideo.sh
# I don't remember xfce editor, replace maybe gedit with leafpad
sudo gedit /opt/screen_config/mycustomdesktopvideo.sh

and put in this file :

#!/usr/bin/env bash
xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
xrandr --addmode VGA1 1280x1024_60.00
xrandr --output VGA1 --mode 1280x1024_60.00

Then, test it:

/opt/screen_config/mycustomdesktopvideo.sh

This should resize your desktop.

Step 2: Load it at startup,

Now, edit the file /etc/lightdm/lightdm.conf with the following code, and put in the [SeatDefaults] section the line

session-setup-script=/usr/share/mycustomdesktopvideo.sh

At the end it should looks like something like this:

[SeatDefaults]
session-setup-script=/usr/share/mycustomdesktopvideo.sh

Reboot, it should work.

If it fails

If you have a bug at startup, don't re-install: press Ctrl+Alt+F2, login, and with

sudo nano /etc/lightdm/lightdm.conf

remove the line session-setup-script=.... Then press Ctrl+Alt+F7 and try to login.

tobiasBora
  • 2,588