DaemonForums  

Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 15th November 2016
shep shep is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 962
Default Simple Desktop for OpenBSD 6.0

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, polkit, compositing 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-esr. 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
Code:
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.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 in 6.0 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:

OpenBSD60_SimpleDE.tar.gz

The download will be named as a "php" file. Rename the file OpenBSD60_SimpleDE.tar.gz with
$ mv attachment.php OpenBSD60_SimpleDE.tar.gz

Extract with
$ tar xvzf OpenBSD60_SimpleDE.tar.gz

Then change into the OpenBSD60_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:  screenshot.png
Views: 623
Size:  63.2 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; 24th November 2016 at 10:50 PM.
Reply With Quote
  #2   (View Single Post)  
Old 15th November 2016
shep shep is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 962
Default

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
Code:
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 2016 at 09:19 PM.
Reply With Quote
  #3   (View Single Post)  
Old 15th November 2016
shep shep is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 962
Default

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
Code:
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:
Code:
# 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) &
Edit: Corrected .fehbg for feh > 2.16

Last edited by shep; 30th January 2017 at 12:08 AM.
Reply With Quote
  #4   (View Single Post)  
Old 22nd January 2017
frcc frcc is offline
Don't Worry Be Happy!
 
Join Date: Jul 2011
Location: hot,dry,dusty,rainy,windy,straight winds, tornado,puts the fear of God in you-Texas
Posts: 105
Default

Shep
Are you using lpd or cups (combo) to print in your systems?
Have been reading your guide and look to give it a try soon.

Last edited by frcc; 23rd January 2017 at 01:03 AM. Reason: add more questions
Reply With Quote
  #5   (View Single Post)  
Old 24th January 2017
shep shep is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 962
Default

I personally use lpr but the default package list in the guide provides cups. There is a comment about selecting install packages in the README. Just delete cups from the package list if you wnat lpr.
Reply With Quote
  #6   (View Single Post)  
Old 29th January 2017
e1-531g e1-531g is offline
Spam Deminer
 
Join Date: Mar 2014
Posts: 281
Default

My wallpaper is randomly selected from set of wallpapers indexed from 1 to "ILOSC_TAPET" inclusively.
Wallpapers are meant to be found inside "/home/open/tapety/z_logo/" directory.
Variable "losowa_liczba" is meant to store random integer number from 1 to "ILOSC_TAPET".
Not impressive, but makes system look slightly less monotonous.

Code:
#!/bin/ksh

typeset -i ILOSC_TAPET=4
typeset -i losowa_liczba=$(( ( RANDOM % ${ILOSC_TAPET} ) + 1 ))
/usr/local/bin/feh --bg-scale /home/open/tapety/z_logo/${losowa_liczba}.jpg
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote
  #7   (View Single Post)  
Old 29th January 2017
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Port Guard
 
Join Date: Dec 2015
Location: London
Posts: 25
Default

Quote:
Originally Posted by e1-531g View Post
Code:
#!/bin/ksh

typeset -i ILOSC_TAPET=4
typeset -i losowa_liczba=$(( ( RANDOM % ${ILOSC_TAPET} ) + 1 ))
/usr/local/bin/feh --bg-scale /home/open/tapety/z_logo/${losowa_liczba}.jpg
This works as well:
Code:
/usr/local/bin/feh --bg-scale --randomize /home/open/tapety/z_logo/*.jpg


EDIT: also, rather than:
Code:
eval `cat $HOME/.fehbg`
This can be used instead:
Code:
sh "$HOME/.fehbg"
Thanks for the guide shep, it is very useful

Last edited by Head_on_a_Stick; 29th January 2017 at 05:32 PM. Reason: added /*.jpg then added actual EDIT
Reply With Quote
  #8   (View Single Post)  
Old 30th January 2017
shep shep is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 962
Default

Thanks for spotting the error. I had changed the ~/.config/openbox/autostart entry for the wallpaper to
Code:
 # Load feh Wallpaper
(sleep 0.5 && ~/.fehbg) &
but overlooked changing the forum guide.

I will correct the forum guide above.

Last edited by shep; 30th January 2017 at 12:11 AM.
Reply With Quote
Reply

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 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 Environment for OpenBSD 5.6 shep Guides 2 15th November 2014 06:04 PM
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


All times are GMT. The time now is 01:30 PM.


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