how to shutdown ?

Need support for GhostBSD. Ask here if your question does not fit elsewhere.
Post Reply
stroudmw
Posts: 15
Joined: Thu Aug 01, 2019 6:47 am

how to shutdown ?

Post by stroudmw »

Hi,

I'm new to BSD, although I used Linux (DG/UX) back in the late 1980s, and have been using Linux (mostly Debian) for about 5 years.

I've just installed the latest (XFCE) version of GhostBSD. I've managed to install the Nvidia and Broadcomm drivers for this very old Dell Vostro 1719 laptop.

The main problem I've got right now is that the Shutdown and Restart buttons don't work: they just log me out. I need to go to the command prompt and type either

Code: Select all

sudo reboot
, or

Code: Select all

poweroff
(poweroff doesn't need "sudo").

What I have done so far:

I used visudo to include the line

Code: Select all

mike ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot, /sbin/shutdown
in my sudoers file, thinking that it might be a permissions problem.

I've made sure that I'm in the "wheel" group

I even included the line

Code: Select all

hw.usb.no_shutdown_wait=1
in my /etc/sysctl.conf file. That was grasping at straws, and was a solution that I found here in the forum. But it didn't work.

Vital statistics:

Code: Select all

System:    Host: stuka Kernel: 13.0-CURRENT amd64 (64 bit)
           Desktop: Xfce 4.12.4 OS: FreeBSD 13.0-CURRENT
Thank you.
stroudmw
Posts: 15
Joined: Thu Aug 01, 2019 6:47 am

Re: how to shutdown ?

Post by stroudmw »

What I ended up doing was to create a fish shell script with "sudo poweroff" in it. I made it executable, and then created a shortcut to the desktop. So, I click on it to shutdown.

But there must be a more elegant solution...
aht0
Posts: 7
Joined: Thu Apr 25, 2019 1:25 pm

Re: how to shutdown ?

Post by aht0 »

One way.. Install doas (utility like sudo but derived from OpenBSD). IMHO more convenient to configure issuing such commands on user-level.

Then edit /usr/local/etc/doas.conf file. Nano or ee text editors are fine for it. Use vi if you happen to be comfortable with it. Doesn't matter much, which.

Add

Code: Select all

permit persist :wheel #assuming your user is in 'wheel' group 
permit nopass yourusername as root cmd reboot 
permit nopass yourusername as root cmd shutdown 
All there is to it.
stroudmw
Posts: 15
Joined: Thu Aug 01, 2019 6:47 am

Re: how to shutdown ?

Post by stroudmw »

Thanks for getting back to me. I'll give that a try!
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: how to shutdown ?

Post by ericbsd »

@stroudmw to fix you issue with the UI restart and shutdown do this in a terminal console.

Code: Select all

sh
for i in "/usr/local/lib/ConsoleKit/scripts/ck-"*; do sudo cp -v "${i}" "${i%.sample}"; done
dismas
Posts: 20
Joined: Mon Jan 14, 2019 9:17 am

Re: how to shutdown ?

Post by dismas »

Hello Eric,
I don't know scripting very much but the above seems to copy all files whose names begin with "ck-" and add a ".sample" extension.
But don't we need the opposite (i.e. make a copy of ck-*.sample removing the ".sample" extension) ?
Regards.
:arrow: Sorry for my bad English : I'm French
Post Reply