3

How do i switch my video card output on Ubuntu Server 11.10? It has a video card with one DVI and one VGA. It's defaulting to the VGA. I want it to default to the DVI.

I only have ssh connection via the network and no monitor until i can switch to the DVI output.

What's the command or config file i have to mess with to switch to the DVI output on the Video Card?

2

You can try xrandr. With no commands it will list the different options you have. Then you can choose the one you need:

xrandr

xrandr --help

xrandr --output HDMI-0
| improve this answer | |
0

As an example of how to use xrandr for switching displays, here is a small script that I use to switch between my PC and TV monitor (the script enforces that only a single screen is active to avoid windows popping up on the wrong display).

#!/bin/bash

PC=DVI-I-1
TV=HDMI-0

SWITCH_TO_PC_ARGS="--output $PC --mode 1920x1080 --primary --output $TV --off"
SWITCH_TO_TV_ARGS="--output $TV --mode 1920x1080 --primary --output $PC --off"

if [ "$1" == "pc" ]; then
  echo "Switching to PC" >> /tmp/switch_screen.log
  xrandr $SWITCH_TO_PC_ARGS 2>&1 >> /tmp/switch_screen.log

elif [ "$1" == "tv" ]; then
  echo "Switching to TV" >> /tmp/switch_screen.log
  xrandr $SWITCH_TO_TV_ARGS 2>&1 >> /tmp/switch_screen.log

else
  echo "Usage `basename $0` [tv|pc]"
  exit 1
fi
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.