DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 21st May 2021
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 375
Default startx

Greetings,

I'm attempting to get X running on OpenBSD 6.9 and I'm getting mixed results with xenodm. Will OpenBSD 6.9 work with the startx command?
I was thinking about editing .xsession in the following way for XFCE. Are there any other modifications that I should do?

Code:
exec startxfce4 --with-ck-launch
Any and all replies are appreciated. Thank you.
__________________
hitest
Reply With Quote
  #2   (View Single Post)  
Old 21st May 2021
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

What does "getting mixed results with xenodm" mean?
Code:
$ doas rcctl enable xenodm
$ echo "exec startxfce4 --with-ck-launch" > ~/.xsession
Should be all you need.
Reply With Quote
  #3   (View Single Post)  
Old 21st May 2021
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 375
Default

Quote:
Originally Posted by ibara View Post
What does "getting mixed results with xenodm" mean?
Code:
$ doas rcctl enable xenodm
$ echo "exec startxfce4 --with-ck-launch" > ~/.xsession
Should be all you need.
Thanks for the reply, ibara. Much appreciated.
The last install with xenodm enabled resulted in a log-in screen that didn't work. When I entered my log-in credentials it would just bounce me back to the xenodm log-in screen, that is, XFCE wouldn't launch. I'll try your suggestions today and see what happens.
__________________
hitest
Reply With Quote
  #4   (View Single Post)  
Old 22nd May 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Failure to log on through xenodm(1) will usually be a provisioning error in the .xsession script.
Reply With Quote
  #5   (View Single Post)  
Old 22nd May 2021
sacerdos_daemonis's Avatar
sacerdos_daemonis sacerdos_daemonis is offline
Real Name: Will forever be a secret.
Spam Deminer
 
Join Date: Sep 2014
Posts: 283
Default

Quote:
Originally Posted by hitest View Post
Will OpenBSD 6.9 work with the startx command?
I was thinking about editing .xsession in the following way for XFCE.
To use startx add
Code:
exec name_of_GUI
to the
Code:
# start some nice programs
section of .xinitrc (not .xsession). At least that is how I understand and use it.
Reply With Quote
  #6   (View Single Post)  
Old 22nd May 2021
victorvas victorvas is offline
Real Name: Victor
Linux
 
Join Date: May 2019
Posts: 148
Thumbs up

Quote:
Originally Posted by hitest View Post
When I entered my log-in credentials it would just bounce me back to the xenodm log-in screen, that is, XFCE wouldn't launch.
I had this problem before, in my case it was caused because some files in my home directory were owned by root user. After I used chown to change ownership of all contents of /home/victor to victor:victor, the problem was resolved.
Reply With Quote
  #7   (View Single Post)  
Old 23rd May 2021
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 375
Default

Thank you for all of your kind replies. As always I appreciate your help a lot. I've also had weird errors where the ISO failed to successfully install the base install. I did not have these errors with 6.8. I used a similar .xsession script.. I've probably made some mistakes which is obvious.
I've switched to FreeBSD 13.0 and MATE. All is well.
__________________
hitest
Reply With Quote
  #8   (View Single Post)  
Old 24th May 2021
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default

In 6.9, I had the same issue w/ openbox. My ~/.xsession-errors indicated that consolekit2 was not installed for the --with-ck-launch command.
Reply With Quote
  #9   (View Single Post)  
Old 24th May 2021
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 375
Default

Quote:
Originally Posted by shep View Post
In 6.9, I had the same issue w/ openbox. My ~/.xsession-errors indicated that consolekit2 was not installed for the --with-ck-launch command.
Many thanks, shep! I forgot about consolekit2, and I feel like an idiot. Installed consolekit2 and now I can log-in with XFCE4.

Code:
puffy$ uname -a
OpenBSD puffy.darkstar.home 6.9 GENERIC#2 amd64
__________________
hitest
Reply With Quote
Old 25th May 2021
ctac ctac is offline
New User
 
Join Date: Feb 2020
Posts: 5
Default

XFCE4 do not need consolekit2 at all.
If your user is in the operator group, he can shutdown and reboot the system.
If your user is not in the operator group, there is a polkit action define in /usr/share/polkit-1/actions name org.xfce.session.policy to reboot and shutdown the system.
You must create a rule file in /usr/share/polkit-1/rules.d/ to allow your user to use this action.
Reply With Quote
Old 25th May 2021
CiotBSD CiotBSD is offline
c107:b5d::
 
Join Date: Jun 2019
Location: Under /
Posts: 175
Default

@ctac's right.

Since OpenBSD 6.6, you need to add the user to the group operator to execute shutdown or reboot, and on the group wheel to hibernate or suspend.
And normally, all run correctly with xenodm and XFCE
__________________
GPG:Fingerprint ed25519 : 072A 4DA2 8AFD 868D 74CF 9EA2 B85E 9ADA C377 5E8E
GPG:Fingerprint rsa4096 : 4E0D 4AF7 77F5 0FAE A35D 5B62 D0FF 7361 59BF 1733
Reply With Quote
Old 25th May 2021
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 375
Thumbs up

Quote:
Originally Posted by ctac View Post
XFCE4 do not need consolekit2 at all.
If your user is in the operator group, he can shutdown and reboot the system.
Thanks for the reply. However, my regular user *was* a member of the operator group. It's all good anyway I just did a clean install of 6.9 and all is well with XFCE.
__________________
hitest
Reply With Quote
Old 27th May 2021
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 375
Default

Interesting to note I did a clean install this morning of 6.9 using Fluxbox as my WM and xenodm. I didn't use consolekit2. No log-in problems noted. Fluxbox is light and fast. I chalk up this problem to PEBCAK. Many thanks as always for your kind assistance. This is my go to forum for all things BSD.
__________________
hitest
Reply With Quote
Old 27th May 2021
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default

I believe the issue was @hitest original invocation of ~/.xsession.
Code:
echo "exec startxfce4 --with-ck-launch" > ~/.xsession
"--with-ck-launch" is a consolekit2 command. In the absence of "--with-ck-launch", the ~/.xsession command will not execute and you will be sent back to the xenodm login screen.

You can start xfce4, openbox and fluxbox without "--with-ck-launch" but in xfce4 you will not have full functionality with features like notifications ...
Reply With Quote
Old 28th May 2021
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 375
Thumbs up

Quote:
Originally Posted by shep View Post
I believe the issue was @hitest original invocation of ~/.xsession.
Code:
echo "exec startxfce4 --with-ck-launch" > ~/.xsession
"--with-ck-launch" is a consolekit2 command. In the absence of "--with-ck-launch", the ~/.xsession command will not execute and you will be sent back to the xenodm login screen.

You can start xfce4, openbox and fluxbox without "--with-ck-launch" but in xfce4 you will not have full functionality with features like notifications ...
Thanks for the explanation, shep! It is appreciated.
__________________
hitest
Reply With Quote
Old 13th June 2021
TheTKS TheTKS is offline
Port Guard
 
Join Date: Sep 2018
Location: Canada
Posts: 43
Default

Quote:
Originally Posted by shep View Post
I believe the issue was @hitest original invocation of ~/.xsession.
Code:
echo "exec startxfce4 --with-ck-launch" > ~/.xsession
"--with-ck-launch" is a consolekit2 command. In the absence of "--with-ck-launch", the ~/.xsession command will not execute and you will be sent back to the xenodm login screen.

You can start xfce4, openbox and fluxbox without "--with-ck-launch" but in xfce4 you will not have full functionality with features like notifications ...
Thanks from me, too, Shep, for the explanation and detail.

I had a similar problem on my Raspberry Pi4 at first, on upgrading from 6.8 to 6.9. I will have to go look at my notes for what I did, if I kept notes, if I can add anything. (I'm working on my desktop in 6.8 as I write.)

TKS
Reply With Quote
Old 20th June 2021
TheTKS TheTKS is offline
Port Guard
 
Join Date: Sep 2018
Location: Canada
Posts: 43
Default

As I wrote above, I ran into the same problem hitest did, after upgrading from 6.8 to 6.9 including the followup steps that applied: "When I entered my log-in credentials it would just bounce me back to the xenodm log-in screen"

So this is what I did on my Raspberry Pi4 to work around this problem:

- Verified that user's .xsession was unchanged from how it was in 6.8, which worked with my setup then
Code:
exec startxfce4 --with-ck-launch
- I was sure user was in operator group, but I reran
Code:
# usermod -G operator [user]
- Same problem

- Checked user's .xsession-error
Code:
/usr/local/bin/startxfce4: X server already running on display :0

You have tried to start Xfce with consolekit support, but
ck-launch-session is not installed.
Aborted startup...
... a bunch of reading later...

- Looked at the text in /etc/xdg/xfce4/xinitrc
Code:
# check if we start xfce4-session with ck-launch-session. this is only
# required for starting from a console, not a login manager
if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
  if command -v ck-launch-session >/dev/null 2>&1; then
    exec ck-launch-session xfce4-session
  else
    echo
    echo "You have tried to start Xfce with consolekit support, but"
    echo "ck-launch-session is not installed."
    echo "Aborted startup..."
    echo
    exit 1
  fi
else
  # start xfce4-session normally
  exec xfce4-session
fi
- Replaced the line calling Xfce to start in user's .xsession with that from /etc/xdg/xfce4/xinitrc
Code:
# exec startxfce4 --with-ck-launch
exec xfce4-session
- Added user to wheel group (I don't remember now if that was for this to work or for some other reason, but that's only ok if you want your user to be in group wheel)
Code:
 # usermod -G wheel [user]
Now I can log my user in through xenodm into Xfce

TKS

Last edited by TheTKS; 20th June 2021 at 05:21 PM.
Reply With Quote
Old 20th July 2021
CiotBSD CiotBSD is offline
c107:b5d::
 
Join Date: Jun 2019
Location: Under /
Posts: 175
Default

Today, I test it on a new VM OpenBSD 6.9. (xfce 4.16)

In fact, without consolekit2, and my user into both groups operator and wheel:

⇒ I can stop and reboot
⇒ I cant suspend or hibernate

Consolekit2 seems not necessary ; good!
To hibernate or suspend, you need to activate and start ampd!

Code:
# rcctl enable apmd
# rcctl set apmd flags -A
# rcctl start apmd
Reboot, and start your Xfce session.
__________________
GPG:Fingerprint ed25519 : 072A 4DA2 8AFD 868D 74CF 9EA2 B85E 9ADA C377 5E8E
GPG:Fingerprint rsa4096 : 4E0D 4AF7 77F5 0FAE A35D 5B62 D0FF 7361 59BF 1733

Last edited by CiotBSD; 25th July 2021 at 04:09 PM. Reason: typo apmd
Reply With Quote
Old 25th July 2021
TheTKS TheTKS is offline
Port Guard
 
Join Date: Sep 2018
Location: Canada
Posts: 43
Default

Quote:
Originally Posted by CiotBSD View Post
Today, I test it on a new VM OpenBSD 6.9. (xfce 4.16)

In fact, without consolekit2, and my user into both groups operator and wheel:

⇒ I can stop and reboot
⇒ I cant suspend or hibernate

Consolekit2 seems not necessary ; good!
To hibernate or suspend, you need to activate and start ampd!

Code:
# rcctl enable ampd
# rcctl set apmd flags -A
# rcctl start apmd
Reboot, and start your Xfce session.
@CiotBSD, I think you have a spelling error in your text and your first line of code: apmd vs ampd

Thanks, enabling and running apmd might come in handy someday.

I didn’t mention that hibernate and suspend don’t work on mine (icons displayed but in grey and do nothing.)

I don’t hibernate or suspend on my desktop computer or my Raspberry Pi - when I’m finished, I always shut them down.

TKS
Reply With Quote
Old 25th July 2021
CiotBSD CiotBSD is offline
c107:b5d::
 
Join Date: Jun 2019
Location: Under /
Posts: 175
Default

@TheTKS: Ty! fixed!
__________________
GPG:Fingerprint ed25519 : 072A 4DA2 8AFD 868D 74CF 9EA2 B85E 9ADA C377 5E8E
GPG:Fingerprint rsa4096 : 4E0D 4AF7 77F5 0FAE A35D 5B62 D0FF 7361 59BF 1733
Reply With Quote
Reply


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
Problems with startx command Jovan NetBSD General 3 27th January 2020 08:31 PM
log in to console and startx in os x questionguy Other BSD and UNIX/UNIX-like 11 25th August 2009 05:27 AM
Startx executes as root, "startx:not found" as user Mr-Biscuit NetBSD Installation and Upgrading 4 27th May 2009 08:44 AM
Startx fails disappearedng FreeBSD General 11 19th July 2008 09:32 AM
User startx error . bsdnewbie999 OpenBSD General 3 19th June 2008 02:08 AM


All times are GMT. The time now is 08:41 PM.


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