OpenBSD is perfect for desktop too
Posted on 2016-11-27 23:14:00 from Vincent in OpenBSD Desktop
Some persons are amazed to see that OpenBSD is a perfect OS for desktops and laptops. This post will show you how simple it is to install desktop's application on top of OpenBSD
I'll briefly talk about the Hardware requirements and after I'll present the required steps to have a perfect desktop environment.
Hardware requirements
OpenBSD is able to run on more than 10 different platforms.
But here we will just focus on i386 and amd64 platforms because it represent the big majority of desktops and laptops.
As for each OS, drivers are required to interact correctly with your different peaces of hardware.
In OpenBSD most of the drivers are opensource; but not all. If you want to see which drivers are not opensource in OpenBSD, please check here.
Why am I talking about drivers ? Simply because, you first have to verify if your machine is compatible with OpenBSD. It could happen that some components are not supported. This happens mainly with brand new devices.
Based on different tests I did since few years, the most tricky part is the video driver and the wifi driver. For the wifi, usb connectors could be a workaround. But here, too, please read the man page before buying one.
How to find what you are using ?
If you run Linux, please check the output of dmesg.
If you are using windows, you can use the tool called "dxdiag".
Try to find in this mass of information try to find which hardware you are using and verify if it is present in OpenBSD by checking the man pages. For example, if your network driver is a "realtek", just type realtek in the box of the man page and click on "A propos". This will list you all man pages where this vendor is listed. Now you still have to see if the model you are using is well described and supported.
An another option would be to verify if someone has reported your machine in the dmesg's database of nycbug
If you want more details, here a nice article written by Ted Unangst: http://www.tedunangst.com/flak/post/openbsd-laptops.
Softwares
I'll not go into the details to install OpenBSD it self, there are enough on that topics on internet :-).
Usually you just have to follow the standard recommendation of the installation process available here
Once done, reboot and login as root in order to perform the following tasks:
1) add some packages: pkg_add lumina libreoffice iridium smplayer gimp
2) create a user by using adduser
. Here too, the standard parameters are perfect. Except for one !!!!! Add your user to the "wheel" group if you want to switch to root from that user.
And add him to "operator" group if you want to be able to shutdown and reboot directly from the Lumina gui.
obsd60:~# adduser
Use option ``-silent'' if you don't want to see all warnings and questions.
Reading /etc/shells
Check /etc/master.passwd
Check /etc/group
Ok, let's go.
Don't worry about mistakes. There will be a chance later to correct any input.
Enter username []: mam
Enter full name []: mam
Enter shell bash csh ksh nologin sh [ksh]:
Uid [1000]:
Login group mam [mam]:
Login group is ``mam''. Invite mam into other groups: guest no
[no]: wheel operator
Login class authpf bgpd daemon default pbuild staff unbound
[default]:
Enter password []:
Enter password again []:
Name: mam
Password: ****
Fullname: mam
Uid: 1000
Gid: 1000 (mam)
Groups: mam wheel operator
Login Class: default
HOME: /home/mam
Shell: /bin/ksh
OK? (y/n) [y]: y
3) Still one file to adapt !!!! Indeed, because Iridium (but some other applications too) is consuming lot of resources, edit your "/etc/login.conf" file. In the "default" part, modify the 2 "datasize" parameters to have, for example, 3G instead of 512M.
default:\
:path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin:\
:umask=022:\
:datasize-max=3072M:\
:datasize-cur=3072M:\
:maxproc-max=256:\
4) Logout from root and login in your user's account to perform the final steps.
5) The first step will be to edit (or create) the file called ".xinitrc" (in your home folder) and add into it "exec Lumina-DE
" (Since we have installed lumina as desktop application). This will explain to the command startx
which graphical environment you want to have.
6) Now, after typing startx
, you will will have your graphical environment called "Lumina".
Simple tips
Simplify the login procedure
The idea is that the user just type his credentials and the window manager will be triggered immediately for him. It's like "xdm
", but much simpler.
For that, I've just added few line in the ".profile" of my users:
if [ "`tty`" = "/dev/ttyC0" ]; then
startx
fi
What those simple command do are:
- if the TTY used by the user is the default one (ttyC0), then we launch "
startx
". - if this an another TTY, we do nothing. Indeed, in case of troubles, it's interesting to select an anther TTY (for example Ctrl-Alt-F2) and not launch
startx
.
Assign dedicated action to extra keyboard's keys
I just forward you to a previous post: here
Conclusion
Here again OpenBSD rocks !!! It's very simple to install his own desktop system. The main applications are available via the package's system.
In next posts, I'll explain how we can improve this setup in order to have nicer features.