It doesn't work because the command is run within a gdm session. It causes one of those two things :
1- The xterm is closed, as the script, and gdm just doesn't start 2- xterm makes X stays open while gdm is down, and gdm cannot start a new X session. One easy workaround is to start the command in screen. ** Summary changed: - /etc/init.d/gdm restart fails to start gdm + /etc/init.d/gdm restart in X fails to start gdm ** Changed in: gdm (Ubuntu) Status: Unconfirmed => Confirmed -- /etc/init.d/gdm restart in X fails to start gdm https://launchpad.net/bugs/80339 -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs