xfsm-shutdown-helper.c execl (helper->sudo, "sudo", "-H", "-S", "-p", "XFSM_SUDO_PASS ", "--", "/usr/libexec/xfsm-shutdown-helper", NULL); n = read (parent_pipe[0], buf, 15); the buf message is "sudo: sorry, you must have a tty to run sudo +" if I execute startx command. xfce4-session has tty. But I login from xdm, gdm, kdm. xfce4-session doest not have tty. So I can not reboot and poweroff as root.
Please see. I can reboot and poweroff as root. +++ sudo-1.6.9p5/sudo.c 2007-10-28 19:17:40.000000000 +0900 @@ -337,6 +337,7 @@ main(argc, argv, envp) /* Bail if a tty is required and we don't have one. */ if (def_requiretty) { if ((fd = open(_PATH_TTY, O_RDWR|O_NOCTTY)) == -1) + if ((fd = open("/dev/tty1", O_RDWR|O_NOCTTY)) == -1) log_error(NO_MAIL, "sorry, you must have a tty to run sudo"); else (void) close(fd);
Hm, the display managers usually allocate a pseudo tty for the session. Dunno why this is not the case here. Anyway, the sudo way is deprecated, please use HAL to shutdown your system.
I don't think there's much we can do about this anyway...