VGA port, really useful way to display through big Monitor or TV your tiny videos instead of watching them on your little notebook’s display :-)
Are you bored to have to restart X every time you want to connect your VGA cable?
Don’t you want to use gnome-display-etc-etc-manager to only configure a stupid VGA Monitor?
Don’t worry, you can use a little bash script (linked to some buttons on you panels), to manage your VGA connection.
I works like a switch, the script will enable the output choiced if this is disabled and viceversa it will disable the output if this is enabled.
But stop speaking (/writing) and watch it now:
# This script was created to manage an external output for notebook
# The script only needs a bit of configuration to set the default output, mode, rate and extra options,
# It works like a switch, the script will enable the output choiced if this is disabled and viceversa it will disable
# the output if this is enabled.
# It can be used on various acpi script linking it to your notebook’s fn+key.
# Made by: Alessandro Arrichiello <firstname.lastname@example.org>
# Configuration starts here:
xrandr_cmd=“xrandr –output ”$output" –mode “$mode” –rate “$rate” “$extra_options
# END of Configuration
if [ `echo $xrandr_output|grep -c disconnected` == "1” ]; then
echo “Cable for ”$output" not connected.“
if [ `echo $xrandr_output|grep -c connected` == "1” ]; then
if [ `echo $xrandr_output|grep -c $mode` == “1” ]; then
echo “Putting off: ”$output
xrandr –output $output –off
echo “Putting on: ”$output
echo “Output not found check your configuration.”
Remember to set the right permissions (chmod +x vga.sh),