Okay, so now I am able to start openbox when I type startx
But if I add tint2 and feh to the script as well, I can see that openbox and wallpaper starts, and then I get kicked out back to the console... :/

Mounsier

I'm no expert but I have successfully installed and used OpenBSD on a T420 and T430s, so I'll try my best to help.

Are you logging in via xdm or the console? If it's xdm you need to edit .xsession not .xinitrc.

In your xsession (or xinitrc) you should only need:

feh --bg-scale /path/to/image
exec openbox
exec tint2&

I don't have a good explanation about your browser issue, sorry. Which browser is it?

The official OpenBSD FAQ and the man pages are always up to date. They have pretty much all the info you need to get up and running:

https://www.openbsd.org/faq/index.html

Here's a couple of blogs I always go to that should answer your questions. For OBSD official documentation is recommended, but I can vouch for these two sites:

https://www.c0ffee.net/blog/openbsd-on-a-laptop/ This blog hasn't been updated, but the info is still good. Also has relevant info about configuration on a laptop specifcially

https://sohcahtoa.org.uk/openbsd.html This one is updated with each new release

For wifi, as mentioned in the FAQs and the above blogs:

You need to create a file based on what type of wifi device you have. Since it's a thinkpad, it's most likely iwn0. Create /etc/hostname.iwn0 and add:

join "YOUR_SSID" wpakey "YOUR_PASSPHRASE"
dhcp
inet6 autoconf
up powersave

Then run the following commands:

ifconfig em0 down
ifconfig iwn0 down
pkill dhclient
sh /etc/netstart

Wifi should connect automatically now.

For powersaving maybe apm is what you are looking for:

https://man.openbsd.org/man8/apm.8

Hope I was of some help

    nortonham You need to create a file based on what type of wifi device you have. Since it's a thinkpad, it's most likely iwn0. Create /etc/hostname.iwn0 and add:

    join "YOUR_SSID" wpakey "YOUR_PASSPHRASE"
    dhcp
    inet6 autoconf
    up powersave

    Umm, dhcp??
    I haven't got that installed.
    Do I need to download dhcpcd?

      Mounsier

      If you just did a basic install (installed all of the sets) it should be there as far as I know

      Mounsier

      I would really suggest reading all the way through the links I sent you to those two blogs before doing anything else. They both explain everything about installing and setting up OpenBSD in a clear way

      Thank you very much.

      I can say from what I have been reading about openBSD, that most of the stuff needs to be configured by myself, and knowledge of programming language helps.
      I think that is exciting.

      Time to learn how to write a few scripts for a system. OpenBSD doesn't use bash, does it?

      My network interface is athn0 by the way.

      I get this:

      las# rcctl start dhcpd 
      /etc/rc.d/dhcpd: need -f to force start since dhcpd_flags=NO
      

        By the way, I have downloaded jdk, how can I use it?
        Cuz when I type java I get this:

        las# java
        ksh: java: not found

        This is what I have got installed:

        las# pkg_info -Q jdk   
        debug-jdk-1.8.0.322.b06.1v0 debug-jdk-11.0.14.9.1p0v0 debug-jdk-17.0.2.8.1v0 jdk-1.8.0.322.b06.1v0 (installed) jdk-11.0.14.9.1p0v0 jdk-17.0.2.8.1v0 (installed)

        I'd like to run a RuneLite client, from runelite.net. It's old school runescape.
        I read on web that it is possible to run it, but it doesn't play any sound. That's not a problem to me anyway, cuz I play this game with no headphones.

          Mounsier

          So for your wireless device edit /etc/hostname.athn0

          edit the hostname file, then run the commands I listed above.

          I can't stress enough reading through those links in my earlier post. They should explain everything clearly; they helped me get started.

          The default shell is ksh, not bash.

          Since you installed, have you run syspatch? What about fw_update?

          nortonham
          Nah, it's cool.
          Thank you very much
          Yeah, I am able to connect to my network automatically now :D.
          Thank you for those links, I have read some of them before.

          My only issue now, is configuring openbox to start with tint2 and feh automatically, when I type startx
          It startx openbox, but no tint2 or feh...

          Apart from that, everything is great.
          I love openBSD. To be fair, I am glad that something like this exists, because I have used Windows my whole life, then got into Linux, but I have became tired of the community. Well the first were the people who were opposing systemd... I realised systemd is just millions lines of mess code, and I do not want to waste my time for it.
          Then you have got loads of people who think systemd is great. Then u have minority of people , who think systemd is crap... That's why I decided to delete Linux, and try openBSD. At least code here is clean and nice.
          Not going to bother with linux or windows again, like ever, in my life.

            Mounsier Copy the default openbox config file hosted at ${PREFIX}/share/examples/openbox/autostart so you have a copy in ~/.config/openbox/autostart

            Edit the autostart file to your liking and add something like,

            feh --bg-scale /path/to/image.file
            (sleep 1 && tint2) &

            Bonus, some cool openbox themes and some tint2 themes

            Hope it helps

            • Jay likes this.

            Mounsier

            Glad I could be of some help.

            To start tint2 add this to your .xinitrc (.xsession if you logging in via xdm)

            exec tint&

            I just tried this in obsd 7.1 VM and it worked as it should.

            Openbox is great; I'm a huge fan of CWM, which is one of the default options in OpenBSD.

            What are you trying to do with feh? Load a wallpaper ?

            just add feh --bg-scale /path/to/image to the xinitrc

            I have mixed feelings about systemd and the direction linux is going. That being said, I still used debian a lot, and I really all BSD a lot too. OpenBSD is a great OS. Each BSD has it's own strengths and weaknesses. NetBSD has a friendly community as you can see on this site

            • Jay likes this.

            I had to create autostart file, and have got xinitrc edited, but it still doesn't start feh and feh
            This is part of my xinitrc, which is at /etc/X11/xinit/xinitrc

            # start some nice programs
            exec /usr/local/bin/openbox
            feh --bg-scale /home/fifi/Downloads/uu.jpg
            exec tint2&
            • pin replied to this.

              Mounsier There should be nothing more after exec openbox.
              Either edit your .xinitrc to read,

              feh --bg-scale /home/fifi/Downloads/uu.jpg &
              sleep 1 && tint2 &
              exec openbox

              or as suggested above add feh and tint2 to the autostart file and have only exec openbox in .xinitrc. See, https://wiki.archlinux.org/title/tint2

              Okay, that config has done trick, thank you :)
              edit: okay, last problem
              Sometimes my wi fi card likes to hang up
              When I type dmesg it usually says: athn0: device timeout

              That's annoying, cuz I am trying to download some files from the web, but sometimes my internet just disconnects for like 15 seconds, and then reconnects :/

              • pin replied to this.

                Mounsier Glad it worked.

                Mounsier last problem
                Sometimes my wi fi card likes to hang up
                When I type dmesg it usually says: athn0: device timeout

                I don't use OpenBSD, so I'll have to pass on that one. Hopefully someone else can help.

                I asked on #openBSD and they said I probably need to install firmware.