Hi Everyone

I've got a bit of a niggle that I cannot work out, so didn't know if
someone could point me in the right way.

For reasons I won't go into, I am using one monitor between two PCs, and
using a VGA splitter to manage which signal the monitor receives.  The
splitter unfortunately does pass along any information about the monitor
to the PC (it cannot auto-detect the correct resolution), so each PC is
assuming a default 1024x768 VESA output.

Using Bash in a terminal, I can type the following commands, which
effectively tells the PC that it can use a higher monitor resolution.
This works very well, but it's annoying having to run the command each
time I log in.  (I'm using Ubuntu 10.04 & 10.10).

$ xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024
1027 1034 1063 -hsync +vsync
$ xrandr --addmode VGA-1 1280x1024_60.00
$ xrandr --output VGA-1 --mode 1280x1024_60.00

I've tried setting these instructions in my ~/.xprofile file, but this
doesn't seem to work.  When I log in, I get a message saying it has
tried to apply the settings, but for some reason it's not able to do it.

What I want to know is whether I can put these commands in a file and
get Ubuntu to just carry out each instruction - maybe with a 5sec delay
between each request - without opening a terminal and repeating the
above commands each time I log in.

This is only a temporary issue for me until I get another monitor, so
it's not affecting my work, but one of the PCs is a shared "family"
system, and I do want others in my household having to worry about the
command line.

I suppose what I'm asking could apply to any command you may wish to
automate, so I'm hoping someone will have a relatively easy solution.

Thanks

Chris


_______________________________________________
Peterboro mailing list
Peterboro@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/peterboro

Reply via email to