You are not logged in.
(Sorry for the long subject!)
I currently use gnome 2.6.1 and gdm 2.6. My gdm is allowed to shut down the system, but I need to logout of gnome before. Is there a chance to shutdown the system directly out of gnome?
BTW: I'm not able to configure the gdm out of gnome (the link at the startmenue doesn't work. If I remember correctly it says: no gdm running/found)
Regards,
Moritz
Offline
You could just open a terminal su then type shutdown -h 0 that will shut your system down
Offline
Well, that could work (right are not set, so it currently doesn't), but I want to create a gnome-box for a friend with no idea about computers... best would be a gnome-integrated button.
Offline
Hi Moritz,
I have setup this on my ArchLinux box some time ago.
You may have remarked that, when you exit from a gnome session for the root login, 3 options are proposed (end of session, reboot, shutdown). I had seen on other distros that single users (not only root) can be proposed these 3 choices.
This is not the case on ArchLinux, to my knowledge it is a rather undocumented feature. I had to dig in the source code to find how to do it.
From what i remember, if you want to allow a login (say 'joecool') to shutdown/reboot your host, there are 2 steps:
1) enable joecool to halt your computer. He must be able to properly execute the 'poweroff' and 'reboot' commands, which in Arch are symlinks to /sbin/halt'. If you are in a hurry:
chmod a+s /sbin/halt
However, if you need more security, you could do things more properly.
2) type as root:
mkdir -p /var/lock/console/joecool
After that, joecool will be proposed the three choices (close session, reboot, shutdown) at the end of his gnome session.
To be complete, i guessed this from the code of logout.c in the gnome-session package.
I hope that i forgot nothing (i did this weeks ago), and that it did not change in gnome 2.6.1 (i am sticking with 2.6.0 at the moment).
Happy gnoming!
Offline
2) type as root:
mkdir -p /var/lock/console/joecool
Woops, 1 line was too short . What i really did on my PC was:
mkdir -p /var/lock/console
touch joecool
Sorry
Offline
I did this way:
chmod +s /sbin/halt
mkdir /var/run/console
cd /var/run/console
touch yourusername
I don't know why it's a little different with previous one, but it works.
Offline
chmod +s /sbin/halt
mkdir /var/run/console
cd /var/run/console
touch yourusername
The point is to create either /var/run/console/yourusername or /var/lock/console/yourusername, both work
Offline
hmm... I wonder why, but I still can't choose it:
[moritz@axis moritz]$ ls -l /var/lock/console/
insgesamt 0
-rw-r--r-- 1 root root 0 2004-05-07 11:45 moritz
[moritz@axis moritz]$ ls -l /var/run/console/
insgesamt 0
-rw-r--r-- 1 root root 0 2004-05-06 23:22 moritz
[moritz@axis moritz]$ ls -l /sbin/halt
-rwsr-sr-x 1 root root 8920 2003-09-29 18:51 /sbin/halt
Offline
I notice you login as moritz, but under /var/lock/console there is "insgesam". What if you login as insgesam?
Offline
Oooopps... :oops:
Insgesamt means "total".
[root@axis root]# ls -al /var/lock/console/moritz
-rw-r--r-- 1 root root 0 May 7 11:45 /var/lock/console/moritz
[root@axis root]# ls -al /var/run/console/moritz
-rw-r--r-- 1 moritz users 0 May 6 23:22 /var/run/console/moritz
[root@axis root]# ls -al /sbin/halt
-rwsr-sr-x 1 root root 8920 Sep 29 2003 /sbin/halt
This should be better... sorry
Offline
Sorry Moritz, it have no more hint on why you can't shutdown on your host.
However, regarding the following point:
BTW: I'm not able to configure the gdm out of gnome (the link at the startmenue doesn't work. If I remember correctly it says: no gdm running/found)
i have had the same problem, when the package erroneously overwrote the /var/run/gdm.pid.
You should check if /var/run/gdm.pid is properly generated by the gdm daemon. On my setup it gives:
[zezaz@archie downloads]$ ls -l /var/run/gdm.pid
-rw-r--r-- 1 root root 4 2004-05-10 20:55 /var/run/gdm.pid
[zezaz@archie downloads]$ cat /var/run/gdm.pid
401
401 being the process id of your gdm daemon.
If gdm.pid is not properly written by gdm, no app can dialog with the daemon, so you can't configure it with windowed applications.
Offline