restart gdm under ubuntu

(defun next-good-buffer () "HWC" (interactive)
  (next-buffer)
  (while (and (not (string= (buffer-name) "*scratch*"))
          (equal (buffer-file-name) nil))
    (next-buffer)))
(defun previous-good-buffer () "HWC" (interactive)
  (previous-buffer)
  (while (and (not (string= (buffer-name) "*scratch*"))
          (equal (buffer-file-name) nil))
    (previous-buffer)))

(global-set-key [(control next)] 'next-good-buffer)
(global-set-key [(control prior)] 'previous-good-buffer)
(global-set-key [(control tab)] 'next-good-buffer)
(global-set-key [(control shift tab)] 'previous-good-buffer)
(global-set-key [(control iso-lefttab)] 'next-good-buffer)
(global-set-key [(control shift iso-lefttab)] 'previous-good-buffer)