Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Thread Tools Display Modes
  #1   (View Single Post)  
Old 4th April 2018
shep shep is offline
Rc.conf Instructor
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,136
Default Simple Desktop for OpenBSD 6.3

This is a relatively simple project that I have been tweaking for several years. The resultant desktop was based on a post in the freebsd forums which I would encourage you to peruse. This differs from the FreeBSD howto by using the OpenBSD base and binary packages. At the present time, I plan on maintaining this guide after trialing xll/lumina in OpenBSD. Lumina utilizes 2x the ram, is not nearly as responsive and routinely left a fluxbox.core file at login.

The project has several Goals:

The first was to have a desktop that would function in a basic BSD environment; no wrappers or other cludges for pulseaudio, udev, hal, systemd, etc. System configuration files are manually edited. System configuration is read once at start up rather than constantly polling to see if any changes have been made. Consequently, the system is fast and responsive and a good fit for older hardware.

Secondly, it was to try out a new paradigm for a desktop. In contrast to projects that build from Debian, Fedora, FreeBSD, Arch... and then are packaged up as installation images, this project stays within the OpenBSD sphere. The desktop is built using OpenBSD tools and packages. When you are done installing, you still have an OpenBSD desktop.

Next, an efficient user interface that is similar to Apple's OS/X . The most frequent tasks that are effected by a desktop are web browsing and email. In Unix, a terminal is also frequently implemented and each of these tasks can be started by a single click on a large, animated icon.

Fourth, this desktop includes some resource intensive applications such as editors/libreoffice and www/firefox. The mix of a lightweight desktop with heavy applications attempts to apportion your available resources to the application. On my system, the base desktop consumes the following
Memory: Real: 123M/454M act/tot Free: 3507M Cache: 195M Swap: 0K/4336M
Finally, I hoped that it would also serve as a newbie introduction to OpenBSD and walk the user through the installation.

What this is not. It is not a substitute for the OpenBSD FAQ and the man pages. Although I tried to structure the README file to describe the commands that were used; time and space contraints prevented going into detail. The flash plugin is not available although *.flv/*.swf content is accessible.

New for 6.3

1) Lanundry Brueil now provides bug and security updates for www/firefox. Now using www/firefox as the main browser.

2) audio/mpd is more difficult to set as an individual user. audio/deadbeef is provided as a replacement music player.

3) The cloud icon in the tint2 panel now provides:
L_click=Current conditions (METAR)
M_click=Weather forecasts from wttr.in. Configurable for non-US
R_click=looping gif animation of Nearby weather radar

New for 6.2

1) Iridium is the main browser. It is essentially the same 58 version as chromium but disables much of data that Google likes to collect. I did have an issue where Iridium would always prompt to be the default browser. I'm not sure what solved this but the prompt eventually went away (took several tries) with the following:
$ mkdir -p ~/.local/share/applications
$ ln -s ~/.config/mimeapps.list ~/.local/share/applications/
$ cp /usr/local/share/applications/iridium-browser.desktop ~/.local/share/applications/

2) For laptop users who have ever tried to find an airport access point quickly, a wifi applet is now availble in the openbox autostart file. Just uncomment it and set your doas.conf file per Wiconn

3) Added a vertical gradient to the tint2 theme that matches the Onyx theme.

4) Changed ~/scripts/weather_map.sh to use imagemagick to play an animated gif of a specified US National Weather radar station.

New for 6.1

1) Firefox-esr was replaced by Chromium. On my low end Atom 330 with 2GB memory Chromium was noticebly more responsive.

2) Replaced osmo with a yad - calendar script and calcurse.

3) Removed uxterm entries in ~/.Xdefaults

4) Changed mpd to use a unix socket in the users home directory

5) Migrated xdm settings to xenodm

6) Added Adwaita theme and set the users gtk-3.0 defaults to prefer "dark".
Provided an openbox environment entry for the same theme in gtk-2.0 applications

7) Added dvd+rw-tools

8) Changed the OpenBox theme to Onyx.

9) Added xclipboard hotkey ctl-alt-x

10) Fixed many typos

New for 6.0
1) OpenBox menu entries for shutdown/reboot by user now call doas(1)

2) The U.S. weather service moved the file location of both current conditions and the forecast. The shell script entries were updated.

3) Clicking the tint2 clock will position the Osmo Calendar under the clock. Enabled using obxprop.

4) rxvt-unicode was removed. The base xterm was configured via .Xdefaults to have a scrollbar consistent with most Desktop Environment Terminals. xterm uses the Bitstream Vera Sans Mono fonts.

New for 5,8

1) security/sudo is no longer part of the base install. The openbox menu entries were modified to enable shutdown/reboot by users who are part of the operator group.

2) Desktop fonts were changed from Liberation Sans to Cantarell.

3) The openup menu entry was removed. Instructions to run openup from a terminal are provided.

4) graphics/feh was updated and now produces an executable ~/.fehbg. The openbox/autostart entry to load a wallpaper was modified.

5) The default xdm was changed to be more "gnome-like". I found the pale text foreground to be hard to read. A modified /etc/X11/xdm/Xresources is provided with black text foreground.

6) Terminus fonts were added and .Xdefaults now provides terminus fonts for both rxvt-unicode and xterm.

7) The US Weather service altered availability of radar images. The script to display a radar image in feh was modified.

Once OpenBSD 6.0 is installed, I recommended that the packages be installed prior to reviewing and copying the configuration files. The configuration files take about 20 to 40 minutes and are accompanied by copy/paste commands in the README. Although it would be possible to extract user and root tar.gz files for all configurations, I elected keep the various sections separate so that the users would have some knowledge of location of the configuration files in the event they wish to further customize their installation.

To start, download the following attachment:


Then change into the OpenBSD63_SimpleDE directory and open the README with your preferred pager. The README should take you the rest of the way. If you use the default fvwm window manager, one xterm can be used for the README and a second xterm for the commands.

When you're done you should have something that looks like this:

Name:  OpenBSD63_screenshot.jpg
Views: 5108
Size:  20.1 KB

Please reply to this thread for any errors.

If you find this to be of use and a time saver, please consider supporting the OpenBSD project.

Last edited by shep; 22nd July 2018 at 07:28 PM. Reason: Corrected Local weather menu entry and removed mimapps.list
Reply With Quote
  #2   (View Single Post)  
Old 4th April 2018
shep shep is offline
Rc.conf Instructor
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,136

Customizing the Wbar Launch Bar
Note that a customized wbar is included with the default SimpleDE install. The following information is for those who wish to change the dark-blue background in the default install or want to change the dock image.

Although often referred to as a "Dock" x11/wbar, does not offer the ability to "drag" and "dock" an application. Applications with that functionality, such as Cairo-dock or Avant Window Manager, are much larger and require compositing. Wbar is significantly smaller and less resource intensive than a true dock.

What x11/wbar does offer is a means to launch commonly used applications with a single mouse click. Correct positioning of the mouse cursor is enhanced by a "zoomf" factor where the icon enlarges when the cursor is over the icon. Additionally, the icon "bounces" on mouse click, providing visual confirmation that large applications with some startup latency have been truely started.

In OpenBSD x11/wbar lacks the ability to customize the dock appearence with a graphical interface (the gui had partial functionality so it was not included). What follows is a simple method to produce a custom x11/wbar dock.

The default background dock for wbar is /usr/local/share/pixmaps/wbar/dock.png. It is essentially a 1014x70 pixel png background with slightly rounded corners..

The custom dock image in SimpleDE was made in gimp using the following commands:

In graphics/gimp: File -> New. In the "Create a New Image" window select a width of 1014 pixels and a height of 70 pixels. The default resolution of 72 dpi is fine. Open the "color selection dialog" by clicking on the foregound and background colors icon in the Toolbox. What you want to end up with is a 6 character color X11_color_names in the HTML notation box that matches the desktop background color. In the default SimpleDE_local_configs, the background is set in ~/.config/openbox/autostart with the entry
xsetroot -solid "#172636"
Once you have settled on a color, enter the code in the HTML notation box and click "OK".

In your presently "*Untitled image" select Tools -> Paint Tools -> Bucket Fill. A cursor bucket icon will appear which is positioned over the image followed by another L mouse click to fill the background with the selected color.

Now we will paste a bar image into our background image. A google dock png search will provide a wide selection. Download your choice and open it in a new Gimp window with File -> Open.

The next step is to resize both the dock icon and the canvas size to 1014x70 pixels. First scale the icon with Tools -> Transform Tools -> Scale. In the dialog box, make sure "px" is selected for pixels and that the "chain" that retains maintains the original width/height proportions is uncoupled. Enter the Width 1014 and Height 70 and click Scale. Now match the canvas size to 1014x70 with Image -> Canvas Size...

Copy "visible" part of the icon into the buffer with Edit -> Copy Visible. Paste the buffer into your original and Untitled image with Edit -> Paste Into. Anchor the bar into the backgound with Layer -> Anchor Layer.

Note that if you move Wbar from the bottom of the desktop to the left or top of the desktop you may need to rotate the icon. This can be done with Tools -> Transform Tools -> Rotate.

Export the combined background/dock icon image to the *png format to retain the ability to adjust transparency. File -> Export. Choose a new title (something other than dock), for example dock_blue.png, and click Export.

Finally, copy the new dock icon to /usr/local/share/pixmaps/wbar/ as root. Edit your wbar configuration file, for SimpleDE ~/.config/wbar/wbarrc to utilize the new icon.

Last edited by shep; 4th April 2018 at 08:17 PM.
Reply With Quote
  #3   (View Single Post)  
Old 4th April 2018
shep shep is offline
Rc.conf Instructor
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,136

This is a walk through to make a simple wallpaper that will function with wbar. The main objective is to have the x11 background color in wbar match the wallpaper background color as wbar does not readily support transparency. Transparency is available if the optional compositing is enabled

The wallpaper can be generated quickly and easily in graphics/gimp using the following procedure.

For the purpose of brevity, I will use "->" to indicate menu selections.

File -> New. In the Width and Height boxes enter in the values for your screen display. For example 1280x1024 or 1440x900. The default resolution of 72dpi is fine.

Click on the background foreground colors icon in the Toolbox to open the color selection dialog. In the HTML notation box enter the same x11 color code that was used in the wbar example. I used 172636 for the default wbar icon that was provided in the OpenBSD_SimpleDE60 configuration. After entering the code select OK. The background icon in the Toolbox should have changed to the selected color.

Next Tools -> Paint Tools -> Bucket Fill. The mouse icon should appear as a bucket. Position the "bucket" over your new image and click. Depending on your system speed, the entire display should fill with the new background color.

Now click File -> Open and browse to the logo you wish to paste into the wallpaper. I provided a logo from the OpenBSD site in OpenBSD_SimpleDE60/wallpaper/

In the logo window Edit -> Copy Visable. Then go back to the initial background window and Edit -> Paste Into. This should center the logo in a new layer. Merge the layers with Layer -> Anchor Layer.

If you are happy with the image, export the layer to either a *png or *jpg image format.
File -> Export. Name the file, eg wallpaper.png, and save it in your hope directory

Now you can close all Gimp windows and open a user terminal in your home directory.

Issue the command
feh --bg-fill wallpaper.png
and you should generate a ~/.fehbg file.

The last configuration is to edit ~/.config/openbox/autostart Comment out (prefix with #) the line xsetroot and delete the # in front of "(xcompmgr -n) &". The -n flag for xcompmgr just provides simple compositing, anything more than that tends to make my head throb . Lastly remove the # in front of "(sleep 0.5 && ~/.fehbg) &". Your ~/.config/openbox/autostart should now look like this:
# Set Background color
# xsetroot -solid "#172636"
# Start xcompmgr
(xcompmgr -n) &
# Load feh Wallpaper
(sleep 0.5 &&  ~/.fehbg) &
# Start Tint2
(sleep 1 && tint2) &
# Start Wbar
(sleep 1.5 && wbar --config ~/.config/wbar/wbarrc) & 
# Start tray-app volume control
(sleep 2 && /usr/local/libexec/tray-app/sound) &
# Start weather system tray applet
(sleep 2 && yad --notification --image=weather-overcast \
 --text="Yakima, WA Weather" --no-middle \
 --command='xterm -g 78x16-0+38 \
 -T "Yakima, WA Weather" \
 -e "/home/your-user-directory-here/scripts/weather.sh"') &
# Start volume system tray applet
(sleep 2.5 && /usr/local/libexec/tray-app/sound) &

Last edited by shep; 4th April 2018 at 08:18 PM.
Reply With Quote
  #4   (View Single Post)  
Old 24th April 2018
ripe's Avatar
ripe ripe is offline
Port Guard
Join Date: Feb 2013
Posts: 26

Thank you!
Reply With Quote

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
Simple Desktop for OpenbSD 6.2 shep Guides 3 26th October 2017 02:58 PM
Simple Desktop for OpenBSD 6.0 shep Guides 7 30th January 2017 12:05 AM
Simple Desktop for OpenBSD 5.8 shep Guides 2 12th November 2015 03:07 PM
Simple Desktop for OpenBSD 5.7 shep Guides 16 30th July 2015 04:15 PM
Simple Desktop for OpenBSD 5.5 shep Guides 8 28th July 2014 06:32 PM

All times are GMT. The time now is 06:01 AM.

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