|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
||||
I don't use XFCE, but I noticed that the pkg-readme for the XFCE meta package says:
Quote:
|
|
||||
Thanks for the reply. I read the link you provided. I tried adding --with to my .xsession file and locked myself out of my system until I logged in as root and reverted back to the previous state.
Tried this and locked myself out. Code:
exec --with-ck-launch-session startxfce4 This is what I'm using now. Code:
exec ck-launch-session startxfce4
__________________
hitest Last edited by hitest; 25th April 2019 at 04:09 PM. Reason: typo |
|
||||
Read the text you suggested. I do have messagebus running. However, the suggested edits for .xsession and or /etc/rc.conf.local are very vague. I don't understand what they're talking about. Heh.
If you're an XFCE user please clarify this. Thank you kindly.
__________________
hitest |
|
|||
Quote:
Code:
/usr/local/bin/startxfce4 --with-ck-launch polkit(8) sets rules in /etc/polkit-1/rules.d/50-default.rules. My /etc/polkit-1/rules.d/50-default.rules Code:
/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */ // DO NOT EDIT THIS FILE, it will be overwritten on update // // Default rules for polkit // // See the polkit(8) man page for more information // about configuring polkit. polkit.addAdminRule(function(action, subject) { return ["unix-group:wheel"]; }); There is also a /usr/local/share/polkit-1/rules.d/10-openbsd-consolekit.rules. The 10-openbsd-consolekit.rules specifically address user shutdown, reboot, hibernation for users in the wheel group I'm not sure they are active - have not seen any code that references them. Classically, 10-openbsd-consolekit.rules would need to be in /etc/polkit-1/rules.d/. Last edited by shep; 25th April 2019 at 10:15 PM. |
|
||||
Okay made the suggested edits to .xsession and XFCE starts up normally. Checked my /etc/polkit-1/rules.d/50-default.rules and they are the same as yours.
I am still unable to shutdown from the upper right XFCE menu.
__________________
hitest |
|
|||
I used to use XFCE (it was with OpenBSD 5.4).
By the time, to shutdown the computer from XFCE I added one of these two lines to /etc/sudoers: Code:
username ALL=NOPASSWD: /usr/local/lib/xfce4/session/xfsm-shutdown-helper Code:
%users ALL=NOPASSWD: /usr/local/lib/xfce4/session/xfsm-shutdown-helper For the 2nd one, you need to belong to the user group. If xfsm-shutdown-helper still exists, maybe the same thing can be achieved with doas. |
|
||||
I'm pleased to report a solution to my problem. Landry said that something changed in the consolekit/policykit rules a bit before 6.5, and that might be related.
He suggested that I put myself in the operator group. That worked. I can now shut down my box using the XFCE shut down menu. Here's a snippet of my /etc/group. Code:
bsd$ cat /etc/group wheel:*:0:root,hitest daemon:*:1:daemon kmem:*:2:root sys:*:3:root tty:*:4:root operator:*:5:root,hitest
__________________
hitest |
|
|||
As wheel user, I'm unable to shutdown from Xfce. When clicking on my name, Shutdown and Restart are greyed out.
I can logout from xfce to the xenodm login screen, but I can only shutdown or reboot from a console as root. I was able to shutdown from xfce in 6.4. Here's how I took my machine from 6.4 to 6.5: - Wiped drive dedicated to OpenBSD - Did a clean install, from install65.fs (6.4 was installed from install64.iso) - Did full drive encryption as https://www.openbsd.org/faq/faq14.html#softraid (did not encrypt in 6.4) - After installation: - As root Code:
# pkg_add xfce xfce-extras consolekit2 polkit nano Code:
$ nano .xsession exec startxfce4 --with-ck-launch This is my /etc/rc.conf.local Code:
sshd_flags=NO xenodm_flags= pkg_scripts="messagebus" - I think polkit is included in an OpenBSD installation. Could having run pkg_add polkit have broken something? - Could full disk encryption affect this? Thanks, TKS Last edited by TheTKS; 8th May 2019 at 11:24 AM. Reason: Edited for clarity and accuracy |
|
|||
I use terminal commands for shutdown and reboot
Shutdown: doas -u root shutdown -p now Reboot: doas -u root shutdown -r now of course /etc/doas.conf must contain this line following by an empty line at the end of file: permit setenv { -ENV PS1=$DOAS_PS1 SSH_AUTH_SOCK } :wheel Don't forget the empty line at the end of file or doas will be returning syntax error. Also your user should be a member of a wheel group. To watch current groups of a user: groups your_user_name to add user to a wheel group: usermod -G wheel your_user_name Quote:
Put these lines inside it: pkg_scripts="dbus_daemon avahi_daemon messagebus" dbus_enable you can also enable avahi if you want Then open your ~/.xinitrc exec startxfce4 --with-ck-launch that's should do it. Last edited by victorvas; 11th May 2019 at 11:36 AM. |
|
||||
Users who wish to shutdown with consolekit / polkit now need to be in the operator group.
https://www.reddit.com/r/openbsd/com...ut_openbsd_65/ |
|
|||
I am finally able to shutdown and reboot from Xfce as wheel and non-wheel users. I left root with the default fvwm.
After reading earlier posts and doing what I wrote in my note above, then spending way more time on this than I should have, and then not getting shutdown and reboot to work, and then reading /usr/local/share/doc/pkg-readmes/xfce, I decided that I should also read through avahi, dbus and consolekit2 in the same directory. After reading /usr/local/share/doc/pkg-readmes/avahi and seeing these notes there... Quote:
Quote:
Ran Code:
# rcctl enable avahi_daemon Code:
/usr/local/bin/startxfce4 --with-ck-launch Code:
multicast=YES pkg_scripts=messagebus avahi_daemon sshd_flags=NO xenodm_flags= After getting this working, I played with .xsession and with /etc/rc.conf.local, broke things and learned a few things, and came back to this .xsession and rc.conf.local, so I'm sticking with these for now. If I stick with Xfce, I think learning more about messagebus, dbus, avahi, consolekit2 and polkit might be helpful. Thanks hitest, shep and jggimi Edit: After reading more about avahi, I didn't see a need for it for what I do, and couldn't understand how it could affect this, so I removed two terms and am able to shutdown and restart from Xfce with just this in /etc/rc.conf.local: Code:
pkg_scripts=messagebus sshd_flags=NO xenodm_flags= Last edited by TheTKS; 13th May 2019 at 11:23 PM. Reason: Update |
|
||||
Yes avahi is unrelated. If you had functioning shutdown/reboot, etc before upgrading, you should only need to add your user to the operator group.
~/.xsession Code:
exec ck-launch-session startxfce4 Code:
exec startxfce4 --with-ck-launch Code:
pkg_scripts=messagebus Refer to: /usr/local/share/doc/pkg-readmes/xfce |
|
|||
Quote:
I was able to shutdown & restart from Xfce in 6.4 with the same terms in rc.conf.local as I have ended up with in 6.5 (possibly in a different order, though - I kept a copy, but I'm not posting from that machine.) I didn't upgrade, though, I wiped and did a clean installation. Which is why I was puzzled why, with those same terms at one point in my 6.5 rc.conf.local (again, possibly in a different order), but with updated .xsession and user added to the operator group, I wasn't able to shutdown & restart from Xfce. In the end, after... - reading the posts here and on other forums and websites, and - reading /usr/local/share/doc/pkg-readmes/xfce (and a few other pkg readmes) - all more than once... I tried a bunch of things and eventually got it to work. Not a pretty process, but I think I got the setup correct and as compact as it should be, and I learned a couple of things along the way. I'm declaring victory, with help from forum friendlies here and elsewhere, and from Landry Breuil via hitest. TKS |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to properly shut down OpenBSD? | rain1 | OpenBSD General | 8 | 28th October 2018 01:05 PM |
xen 45 issue | philo_neo71 | NetBSD General | 1 | 9th November 2015 11:05 AM |
Secrets, lies and Snowden's email: why I was forced to shut down Lavabit | J65nko | News | 1 | 22nd May 2014 01:08 AM |
FTP issue? | desreguard | OpenBSD General | 14 | 29th August 2011 04:21 PM |
Possible SMP Issue? | MetalHead | OpenBSD General | 1 | 25th November 2008 03:52 AM |