Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Thread Tools Display Modes
  #1   (View Single Post)  
Old 15th November 2014
shep shep is offline
Fsck Surgeon
Join Date: May 2008
Location: Dry and Dusty
Posts: 673
Thanked 9 Times in 9 Posts
Default Simple Desktop Environment for OpenBSD 5.6

This is a relatively simple project that I have been tweaking for about a year. 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.

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, compositing etc.

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. Interestingly, this paradigm can be easily applied to any system where the package manager can be feed a list of packages. One can envision a web site where the user selects a base OS, DE, Browser, email client, etc which then generates an install list and an application menu. I have utilized this basic method to make a similiar desktop in Fedora20, Debian Squeeze and FreeBSD.

Third, a resource efficient interface. 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. Hotkeys; <Ctl+Alt+b> browser, <Ctl+Alt+e> email, <Ctl+Alt+t> terminal, and <Ctl+Alt+m> system menu, are configured in ~.config/openbox/rc.xml. The animated icons also include a file manager, a launcher for libreoffice and a music player. All applications can be accessed either the <Ctl+Alt+m> hotkey or by a right-click anywhere except the toolbar and the launcher.

Finally, I hoped that it would also serve as a newbie introduction to OpenBSD and walk the user through the installation.

Name:  SimpleDE_screenshot.png
Views: 864
Size:  21.0 KB

New to this version is sysutils/tray-app which provides a simple volume control applet in the x11/tint system tray. A battery applet for laptops and a mount icon are additionally available but not configured. x11/tint also provides a laptop battery indicator which can be enabled by un-#ing the appropriate section in ~/.config/tint2/tint2rc. In general, one application is provided for each task. The applications were chosen on the basis of their stability and newbie friendliness The exception is the file manager. Both x11/xfe and misc/mc were provided. Midnight commander is the only file manager in OpenBSD that supports 2 panel ftp. x11/pcmanfm crashed attempting to establish an ftp connection. x11/xfe supports "drop and drag". Lastly, the implementation of a simple OpenBSD wallpaper, seen in the screen shot with compositing is an option that is described in a 3rd post below.

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.

To get this desktop installed you will need:

1) A base OpenBSD install with a working internet connection.
2) Knowledge of basic editing commands and familarity with file paths/permissions.

What you should end up with:

1) A light, responsive desktop that at idle occupies less than 90mb of RAM.
2) The base security of OpenBSD and the option to use M:tier package updates
3) A user interface that will quickly launch frequently used applications.
4) Unix neophytes will be guided through the basic commands to install and configure.

Although it would be possible to extract the configuration file to the appropriate directories, I elected to extract to a working directory where the user can review and tweak the file.

Copy/Paste commands for setup are in the README file.

To start, download the following attachment


to the users home directory of your new OpenBSD 5.6 install and extract with

$ tar xvzf OpenBSD54_SimpleDE.tar.gz. Then change into the OpenBSD56_SimpleDE directory and open the README with your preferred pager. The README should take you the rest of the way.

$ cd ~/OpenBSD56_SimpleDE

$ less README

I have trialed this several times and believe I have most of the typos/spelling/grammer fixed. I will put two place holder posts following this post and will gladly accept suggestions/pointers/corrections to the original post. If you find this to be of use and a time saver, please consider supporting the OpenBSD project.

Last edited by shep; 15th November 2014 at 09:20 PM. Reason: TNC: to numerous to count
Reply With Quote
  #2   (View Single Post)  
Old 15th November 2014
shep shep is offline
Fsck Surgeon
Join Date: May 2008
Location: Dry and Dusty
Posts: 673
Thanked 9 Times in 9 Posts

Customizing the Wbar Launch Bar

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; 15th November 2014 at 07:13 PM.
Reply With Quote
  #3   (View Single Post)  
Old 15th November 2014
shep shep is offline
Fsck Surgeon
Join Date: May 2008
Location: Dry and Dusty
Posts: 673
Thanked 9 Times in 9 Posts

This is a walk through to make a simple wallpaper that will function with wbar. The main task is to have the x11 color in wbar match the wallpaper color as wbar does not readily support transparency.

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_SimpleDE56 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_SimpleDE56/wallpaper/puflogv300X195.gif

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 && eval `cat $HOME/.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 &&  eval `cat $HOME/.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) &

Last edited by shep; 15th November 2014 at 10:12 PM.
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
OpenBSD in virtualized environment jjstorm OpenBSD General 13 26th November 2014 06:04 AM
Simple Desktop for OpenBSD 5.5 shep Guides 8 28th July 2014 06:32 PM
Simple Desktop Environment for OpenBSD 5.4 shep Guides 4 27th January 2014 06:47 PM
Xfce 4.8.0 desktop environment released J65nko News 4 18th January 2011 05:23 PM
I. Treating 'iso-itis' in an OpenBSD environment with USBmediazine® J65nko Guides 3 31st July 2008 01:51 AM

All times are GMT. The time now is 06:23 PM.

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