0

I am using Ubuntu 17.04 on my laptop and I am using an additional monitor with a optimal resolution of 1600x900 and since Ubuntu doesn't have this resolution by default I managed to write a script with a bun ch of commands to add the new resolution and affect it to the monitor but sometimes even though the script runs and the resolution changes an error window pops up that I cannot see because it's black and it's flickering and every time this problem happens my custom theme restores to default along with the custom icons and cursor and can't change them even if I select the theme from Unity Tweak Tool. As a result the font becomes thinner and shortcuts such as Ctrl+Alt+T to open terminal don't work.

Here is the script I run at the start of every session:

xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync

xrandr --addmode HDMI-1 1600x900_60.00

xrandr --output HDMI-1 --mode 1600x900_60.00

xrandr --output HDMI-1 --left-of eDP-1

xrandr --output eDP-1 --pos 1600x236

2
  • It is unclear to me which line generates the error. So the command "script 2> script.errors" will probably not show us which line. So let try this: there are 5 lines. At the end of each line add: 2> lineX.error where X is 1, 2, 3, 4 or 5. Please report your findings.
    – user680858
    Apr 28, 2017 at 18:50
  • Am sorry but I didn't understand what to do exactly. Give me an example using any of the lines above
    – essana3
    Apr 29, 2017 at 13:38

1 Answer 1

0

In your script put these lines (note the 2> part):

xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync  2> line1.error
xrandr --addmode HDMI-1 1600x900_60.00  2> line2.error
xrandr --output HDMI-1 --mode 1600x900_60.00  2> line3.error
xrandr --output HDMI-1 --left-of eDP-1  2> line4.error
xrandr --output eDP-1 --pos 1600x236  2> line5.error

When you run the script, every time 5 files will be created. As you say the error occurs sometimes, so my intension is to capture the error in one of the five files. Your task is to check the files and if there is something in them, show us the content. Then we can analyze what is wrong and hopefully resolve it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .