There is a typo on the cp line: /etc/X11/xorg_conf should be /etc/X11/xorg.conf .
Also, this will cause xorg.conf to be overwritten with an empty file if the user hits Esc at the zenity prompt. The last two lines should be replaced with
zenity --text-info --editable --filename=/etc/X11/xorg.conf --width=640 --height=480 > "$xorg_conf_tmp" && \
mv "$xorg_conf_tmp" /etc/X11/xorg.conf
Finally, are you SURE that a malicious user can’t gain any kind of unauthorized access by editing xorg.conf?
edit_config() { xorg_conf || return 1
backup_
xorg_ conf_tmp= $(mktmp "/tmp/xorg. conf.XXXXXXXX" ) ${xorg_ conf_tmp} --width=640 --height=480 > "/etc/X11/ xorg.conf"
cp /etc/X11/xorg_conf ${xorg_conf_tmp}
zenity --text-info --editable --filename=
}
There is a typo on the cp line: /etc/X11/xorg_conf should be /etc/X11/xorg.conf .
Also, this will cause xorg.conf to be overwritten with an empty file if the user hits Esc at the zenity prompt. The last two lines should be replaced with /etc/X11/ xorg.conf --width=640 --height=480 > "$xorg_conf_tmp" && \
zenity --text-info --editable --filename=
mv "$xorg_conf_tmp" /etc/X11/xorg.conf
Finally, are you SURE that a malicious user can’t gain any kind of unauthorized access by editing xorg.conf?