tricks.telex
07-04-2016, 02:27 PM
I use Ubuntu 16.04.
I could configure Displaylink monitor settings manually.
xrandr --newmode 1366x768_60 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync
xrandr --addmode DVI-I-1 1366x768_60
xrandr --output DVI-I-1 --mode 1366x768_60
I want to config at startup. I writed above code at rc.local but this attempt is not success.
Next, I created my systemd service as thinkvision.service.
* thinkvision.service
[Unit]
Description=ThinkVision Settings
After=displaylink.service
[Service]
Type=oneshot
ExecStart=/opt/bin/thinkvision.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
*thinkvision.sh
#!/bin/bash
xrandr --newmode 1366x768_60 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync
xrandr --addmode DVI-I-1 1366x768_60
xrandr --output DVI-I-1 --mode 1366x768_60
exit 0
this attempt is also failure..
Please tell me where to write above code.
I could configure Displaylink monitor settings manually.
xrandr --newmode 1366x768_60 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync
xrandr --addmode DVI-I-1 1366x768_60
xrandr --output DVI-I-1 --mode 1366x768_60
I want to config at startup. I writed above code at rc.local but this attempt is not success.
Next, I created my systemd service as thinkvision.service.
* thinkvision.service
[Unit]
Description=ThinkVision Settings
After=displaylink.service
[Service]
Type=oneshot
ExecStart=/opt/bin/thinkvision.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
*thinkvision.sh
#!/bin/bash
xrandr --newmode 1366x768_60 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync
xrandr --addmode DVI-I-1 1366x768_60
xrandr --output DVI-I-1 --mode 1366x768_60
exit 0
this attempt is also failure..
Please tell me where to write above code.