DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 16th October 2008
rex rex is offline
Real Name: Nikhil Rathod
Shell Scout
 
Join Date: May 2008
Location: Chicago
Posts: 114
Thanked 2 Times in 2 Posts
Default enable shutdown/reboot xfce4

How can I enable shutdown reboot option of xfce4?
Reply With Quote
  #2   (View Single Post)  
Old 16th October 2008
bigb89 bigb89 is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 69
Thanked 1 Time in 1 Post
Default

I was reading the documentation and one of the ways that I "think" (please read the docs and make sure that I'm correct) you can enable shutdown, is that you edit your sudoers file (if you have sudo installed).

xfce has a file called "xfsm-shutdown-helper". In FreeBSD, this file should be located under: /usr/local/libexec/xfsm-shutdown-helper

You then edit the sudoers file and add the following to it (replace myuser and myhost with your user and host):

Code:
myuser myhost=/usr/local/libexec/xfsm-shutdown-helper
Now, I believe that above way, will prompt the user for a password everytime that the user wants to shutdown. So if you don't want to be prompted for a password everytime that you try to shutdown, you can add the following to your sudoers file instead:

Code:
myuser ALL = NOPASSWD: /usr/local/libexec/xfsm-shutdown-helper
That will allow your user to execute the command /usr/local/libexec/xfsm-shutdown-helper without being prompted for a password (if you choose the second option).
Reply With Quote
  #3   (View Single Post)  
Old 16th October 2008
rex rex is offline
Real Name: Nikhil Rathod
Shell Scout
 
Join Date: May 2008
Location: Chicago
Posts: 114
Thanked 2 Times in 2 Posts
Default

Thanks bigb89, unfortunately I don't use sudo. Isn't there a way other then this. A way which do not require sudo installed.
Reply With Quote
  #4   (View Single Post)  
Old 16th October 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
formerly killasmurf86
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 588
Thanked 29 Times in 26 Posts
Default

chmod +s /path/to/prog

However, that can be security risk in some cases.....
It's probably safe for home
Reply With Quote
  #5   (View Single Post)  
Old 16th October 2008
bigb89 bigb89 is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 69
Thanked 1 Time in 1 Post
Default

Like killasmurf86 said, I guess you can try changing permissions on /usr/local/libexec/xfsm-shutdown-helper so that other users will have permission to run that command. (But keep in mind the security risks).

Let us know how it goes.
Reply With Quote
  #6   (View Single Post)  
Old 16th October 2008
rex rex is offline
Real Name: Nikhil Rathod
Shell Scout
 
Join Date: May 2008
Location: Chicago
Posts: 114
Thanked 2 Times in 2 Posts
Default

What should be the permissions for /usr/local/libexec/xfsm-shutdown-helper file.

Right now the permission for the file is -r-xxr-xr-x, but it didn't work
I also tried setting the permisions to 777 event then it didn't worked.
Reply With Quote
  #7   (View Single Post)  
Old 16th October 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
formerly killasmurf86
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 588
Thanked 29 Times in 26 Posts
Default

do chmod +s /usr/local/libexec/xfsm-shutdown-helper
as root
Reply With Quote
  #8   (View Single Post)  
Old 16th October 2008
rex rex is offline
Real Name: Nikhil Rathod
Shell Scout
 
Join Date: May 2008
Location: Chicago
Posts: 114
Thanked 2 Times in 2 Posts
Default

I did, I didn't worked for me .
Reply With Quote
  #9   (View Single Post)  
Old 16th October 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
formerly killasmurf86
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 588
Thanked 29 Times in 26 Posts
Default

show results of
ls -l /usr/local/libexec/xfsm-shutdown-helper
[That's l, like lion]


it should look something like this
-r-sr-xr-x

Last edited by graudeejs; 16th October 2008 at 06:54 PM.
Reply With Quote
Old 16th October 2008
rex rex is offline
Real Name: Nikhil Rathod
Shell Scout
 
Join Date: May 2008
Location: Chicago
Posts: 114
Thanked 2 Times in 2 Posts
Default

Code:
# ls -l /usr/local/libexec/xfsm-shutdown-helper
-r-sr-sr-x 1 root wheel   4712  Oct 16 09:13  /usr/local/libexec/xfsm-shutdown-helper
Reply With Quote
Old 16th October 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
formerly killasmurf86
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 588
Thanked 29 Times in 26 Posts
Default

Ok, simple thing how to fix for sure is:
chmod uog+rxs /usr/local/libexec/xfsm-shutdown-helper
Now it that won't work i have another way, that will involve /sbin/shutdonw (basically the same thing, but you'll need to edit menu, and add shutdown)
Reply With Quote
Old 16th October 2008
rex rex is offline
Real Name: Nikhil Rathod
Shell Scout
 
Join Date: May 2008
Location: Chicago
Posts: 114
Thanked 2 Times in 2 Posts
Default

After executing this, permissions stayed the same.
Code:
chmod uog+rxs /usr/local/libexec/xfsm-shutdown-helper
It didn't work either.
Reply With Quote
Old 16th October 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
formerly killasmurf86
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 588
Thanked 29 Times in 26 Posts
Default

wtf.....
try doing the same to /sbin/shutdown (that's what i'm doing on my pc)
grrr. i'm confused....
Reply With Quote
Old 16th October 2008
rex rex is offline
Real Name: Nikhil Rathod
Shell Scout
 
Join Date: May 2008
Location: Chicago
Posts: 114
Thanked 2 Times in 2 Posts
Default

no luck. For Now I've addes a special entry in the menu to let me shutit down.

By the way is this a bug or it is designed in such a strange way?
Reply With Quote
Old 16th October 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
formerly killasmurf86
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 588
Thanked 29 Times in 26 Posts
Default

idk [i think my signature explains it. j/k]
Reply With Quote
Old 17th October 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 699
Thanked 90 Times in 81 Posts
Default

Add your user to the operator group. They can then execute shutdown as per normal. No need to mess around with permissions. Then just tell xfce to use shutdown with the appropriate option (-h, -r, or -p).
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Old 17th October 2008
rex rex is offline
Real Name: Nikhil Rathod
Shell Scout
 
Join Date: May 2008
Location: Chicago
Posts: 114
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by phoenix View Post
Add your user to the operator group. They can then execute shutdown as per normal. No need to mess around with permissions. Then just tell xfce to use shutdown with the appropriate option (-h, -r, or -p).
I'm already member a member of wheel and operator. As I mentioned above I've added a custom entry in xfce4 menu to use shutdown command.

anyways I didn't like xfce4 too much. moving back to wm2 , where one need not to worry about all these things (even if one wants to).
Reply With Quote
Reply

Tags
reboot, shutdown, xfce4

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenBSD xfce4 kaschei OpenBSD General 5 28th June 2009 08:45 PM
Xorg + Xfce4 resolution problem sniper007 FreeBSD General 4 30th April 2009 04:38 PM
shutdown message Mr-Biscuit FreeBSD General 1 16th November 2008 11:59 PM
Shutdown problems radtek FreeBSD General 11 13th September 2008 12:42 AM
XFCE4 on 7.0 TMD3 FreeBSD Ports and Packages 3 26th July 2008 03:22 AM


All times are GMT. The time now is 09:20 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick