DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

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

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 22nd August 2017
handy handy is offline
Port Guard
 
Join Date: Aug 2017
Posts: 17
Default Please point me to where I can find info' on autostarting X?

Hi all, first post.

I've recently migrated (not quite finished) from Linux to OpenBSD. I've setup my system to be pretty much how I want it to be (still refinements to be made as I learn how of course).

I'm running Openbox/Tint2 & the Worker filemanager for my user interface.

Anyway, my question is, can someone point me to where I can find out how to have X autostart (auto login) without using a GDM? (I've searched the OpenBSD site, this forum & the web, but I've had no luck...)

I can do this on Linux with systemd (yuk!) or OpenRC:-

https://wiki.manjaro.org/index.php?t...RC_%26_SystemD

but I can't quite work out how to do this with OpenBSD?

Thanks in advance for your help.
Reply With Quote
  #2   (View Single Post)  
Old 22nd August 2017
blackhole's Avatar
blackhole blackhole is offline
Spam Deminer
 
Join Date: Mar 2014
Posts: 316
Default

Not sure why anyone would want to do that, but you are dealing two different things: automatically logging in a user and starting X automatically on login. The first is not so straightforward, the second is simple enough. (usually a case of calling xinit with the right options from ~/.profile ).

Or you could just install a suitable display manager from ports and set that to automaticaly start and login the user.
Reply With Quote
  #3   (View Single Post)  
Old 22nd August 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Hello, and welcome!

OpenBSD includes the xenodm(1) display manager, based on X.Org's xdm(1). According to the man page, it has an AutoLogin capability.

Last edited by jggimi; 22nd August 2017 at 01:06 PM. Reason: clarity
Reply With Quote
  #4   (View Single Post)  
Old 22nd August 2017
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Use x11/slim.
Reply With Quote
  #5   (View Single Post)  
Old 22nd August 2017
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 408
Default

Hello and welcome.
__________________
ThinkPad W500 P8700 6GB HD3650 - faultry
ThinkStation P700 2x2620v3 32GB 1050ti 3xSSD 1xHDD
Reply With Quote
  #6   (View Single Post)  
Old 23rd August 2017
handy handy is offline
Port Guard
 
Join Date: Aug 2017
Posts: 17
Default

Thanks for your replies.

OK, first, to the respondent that doesn't know why I would want to do that? I am a home user, living in a safe environment (just my wife & I, few visitors...) & I've been used to being able to start my Linux boxes over the past 12-13 years in such a fashion. Admittedly in the early days I was using a GDM, but since I went to ArchLinux 10 years ago I have not used a GDM.

Yes, so xenodm, slim & the other GDM's are not the way that I want to do it. If using a GDM is the only way, then I'll continue to login & startx manually.

If there is a way via providing the appropriate code to ~/.profile (or anywhere else) then I'd really like to be pointed to a page where I can read how to do this (or of course to be given instructions here), as I'm sure that this must be possible?
Reply With Quote
  #7   (View Single Post)  
Old 23rd August 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

"GDM" is the Gnome Display Manager. While I don't understand your dislike of it, or of any of the other display managers, using xenodm(1) remains my recommendation.
  • No software needs to be added or installed, OpenBSD comes with xenodm(1) as part of the xbase fileset you installed.
  • It is based on XDM, as I noted above, but has all of the external networking features (and complexities) removed, in order to be smaller, simpler, and more secure.
In this "how to" below, commands that start with $ are executed as your unprivileged user, and commands that start with # are executed as the superuser.

  1. Change to your home directory, and link your .xinitrc file to .xsession, which is the individual user's startup file used by xenodm(1). $ cd && ln .xinitrc .xsession
  2. Change your working directory to /etc/X11/xenodm. $ cd /etc/X11/xenodm
  3. Back up the xenodm-config configuration file provided by OpenBSD. # cp -p xenodm-config{,.orig}
  4. As the superuser, Edit the xenodm-config file, and add a line to the bottom setting the resource DisplayManager.*.autoLogin to your userid. Note the syntax requires a colon after the resource name. Use the editor of your choice. Note that the file is read-only. Here is an example of the added line:
    Code:
    DisplayManager.*.autoLogin:     handy
  5. Enable xenodm at startup. # rcctl enable xenodm
For more information, please refer to the xenodm(1) and rcctl(8) man pages.

Last edited by jggimi; 23rd August 2017 at 09:39 AM. Reason: typos
Reply With Quote
  #8   (View Single Post)  
Old 23rd August 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I'll add the following guidance as an adjunct to the "how to."

If you decide to test and then use xenodm(1) for automatic login, you need to be aware that this configuration file will be overlayed during any OS upgrade. You can either edit the file again after upgrading, or, you can can create an alternate configuration file, and instruct xenodm(1) to be started with the option "-config /path/to/your/personal/xenodm-config" by setting this string as the xenodm flags variable with rcctl(8).
Reply With Quote
  #9   (View Single Post)  
Old 23rd August 2017
blackhole's Avatar
blackhole blackhole is offline
Spam Deminer
 
Join Date: Mar 2014
Posts: 316
Default

Has been discussed on the misc mailing list also: https://marc.info/?l=openbsd-misc&m=149257347105470
Reply With Quote
Old 24th August 2017
handy handy is offline
Port Guard
 
Join Date: Aug 2017
Posts: 17
Default

OK, thanks for your help guys.

[edit:] Looks like I'll continue to manually login & then enter startx @ the prompt.

Last edited by handy; 28th August 2017 at 01:10 AM. Reason: Trialed solution does not meet my needs - unsatisfactory.
Reply With Quote
Old 29th August 2017
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 136
Default

Quote:
Originally Posted by handy View Post
[edit:] Looks like I'll continue to manually login & then enter startx @ the prompt.
Why? What’s unsatisfactory about xenodm’s autologin?
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems.
Reply With Quote
Old 29th August 2017
handy handy is offline
Port Guard
 
Join Date: Aug 2017
Posts: 17
Default

Personal preference. (my problem I know... )
Reply With Quote
Old 29th August 2017
blackhole's Avatar
blackhole blackhole is offline
Spam Deminer
 
Join Date: Mar 2014
Posts: 316
Default

You should probably try it before passing judgement...

I gave it a go a few days ago and it works fine. You don't see the "greeter" / login screen. It just loads straight to your window manager / desktop.

xenodm also has the advantage of being in the base system.
Reply With Quote
Reply

Tags
autologin, autostartx, no gdm, openbox

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
VirtualBox late info sharris FreeBSD General 4 31st October 2010 09:15 PM
Using a LiveCD to gather info phreud FreeBSD Installation and Upgrading 9 15th November 2008 12:43 AM
port info sniper007 FreeBSD General 6 14th November 2008 11:46 AM
Point-to-Point VPN + Firewall + Router (sorta) - What should I use? Bruco FreeBSD General 6 5th July 2008 11:09 PM


All times are GMT. The time now is 12:27 AM.


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