Howto autologin & autostartx (desktop)

  • Platform information:
    • Hardware: raspberry Pi 3 Model B+
    • OS: openhabian-pi-raspios32-v1.6.2b

Hello to openHab forum !

I have a problem and would like to ask you for help / ideas.
Even after many hours of investigation on the Net, I could not solve it:

  • Autologin (user) and autostartx (desktop)
    Yes, it sounds to be pritty simple, I thought this as well in the begining.

Why I want this?
My raspberry is equipped with the original 7" touchscreen.
After booting, I don’t want that my wife or anyone needs to login and startx to operate the system.

I don’t want to use rasbian, so I have no “raspi-config” tool where you could configure autologin and autostart of desktop. I use openhabian instead. It has a configuration tool as well “openhabian-config”, but there is no autostart option included in the tool. Why not ?

I need a desktop running on my raspberry, because the interaction with openhab will be done via the touchscreen. Just a simple desktop without any further application than browser, file-manager, a light panel and of course openhab, mosquitto, …
So my decision was to use openhabian and add openbox as desktop and tint2 as panel.

In the meantime I succeded to autologin the user, but openbox only starts after typing “startx”.

Any ideas ? Please help.
Is my idea totally wrong to use openhabian and add a desktop of my choice ?

Have a look at How To Change Default runlevel in Debian 10 / Debian 9 | ITzGeek

There is also a recommendation about graphical user interface…: openHABian | openHAB

Beyond what Wolfgang_S has suggested I’d suggest your best bet is to look and post to a general Linux forum. None of this has anything to do with openHAB.

Note though that openHABian is Raspbian with some configurations to install and configure openHAB and other useful third party services. So if you need something from raspi-config, install it. Just be aware that what you are talking about doing is a deviation from the openHABian base and you are liable to break something and if you do we won’t be able to help much. But anything you read about that applies to Raspbian should apply to openHABian.

Memory is pretty tight on an RPi 3 running openHAB without a full desktop environment. I imagine you might run into swapping and other low memory issues running X and even the lightest weight window manager along side OH and other related services.

Yes good suggestion. Most of my investigation I did on the Internet during the last days were related with Debian (Buster), as raspian is Debian for the raspberry :slight_smile:

Debian (Xubuntu and arch) is the operating system on all my ThinkPads since more than 15 years. But… you will not find a lot of information about my questions there.
Nobody really needs to do this:

  • You install Debian with a desktop (XFCE, Gnome, KDE, …) than during the install you could choose automatic login.
  • Or you use Debian without any desktop as a server for example than you don’t need a desktop autostart.

Here on openHAB I thought there might be more user like me which like to use openhabian with a desktop.

But honestly, has really no one here openhabian installed with a desktop and made a complete autologin sequence.
It seems to me the most natural thing in the world, if the raspberry has a touchscreen.

1 Like

Two threads that do not seem to use openhabian but made a screen available:

Hi Wolfgang_S !
Thanks so much for these two links. Seems to be exactly what I am trying to realize.
I will check them now. :slight_smile:

1 Like