![]() |
|
|||
![]()
This grew from a previous SimpleDesktop thread that built a lightweight Desktop Environment (DE) in OpenBSD. The older project relied on manually edited configuration scripts and menus. This iteration produces a fast, lightweight stacking desktop with a resting memory footprint around 170mb. When a user adds an application that has a freedesktop compliant *.desktop entry, it will automatically be added to the menu.
These instructions have been updated for version 6.8 and should be backwards compatible with 6.7. Changes for 6.8: None so far. Update 6.7 -> 6.8 went smooth and is working. New install also tested. Changes for 6.7: The Adwaita icon theme dropped the icons for /usr/local/share/desktop/directories/AudioVideo.directory, and was replaced by the more complete x11/paper-icon-theme. The x11/yad weather scripts are now included by the default install. printing/cups has been added to the recommended packages and setup instructions for audio/gimmix streamlined. The basic layout is similar to Mac OS/X interface. A bottom, one-click launcher for commonly used applications. A full menu is accessed by right-clicking on a blank area of the desktop or hitting the "Menu" key. Even though the ability to customize the DE has been simplified, users still need to be familiar with the OpenBSD FAQ, man pages, package management and text editing. A Base OpenBSD install provides vi, mg, ed and xedit. editors/leafpad is from the LXDE project, is available in ports and is a good fit for newbies who want a simple gtk based editor. The project has 2 levels. The first level provides just the base install + bare desktop. The experienced open source user then adds their favorite applications. The next, optional level is a list of commonly used packages that have freedesktop compliant menu entries and are well supported in OpenBSD. The project essentially chooses web browsers, email clients and office suites using criteria described later. After adding the additional packages, the DE is functionally the same as the older SimpleDesktop project. NCurses applications can be given *.desktop menu entries - mail/abook, productivity/calcurse and audio/ncmpc have examples in following posts. To get started, click the link to download. Extract the following tarball and the README should take you the rest of the way. If you are working from a new OpenBSD install, without a browser, this base ftp command should download: Code:
ftp -o BareGUI.tar.gz http://www.daemonforums.org/attachment.php?attachmentid=958&d=1592676088 If you find this to be time saving and useful, consider supporting the OpenBSD project. OpenBSD Donations Last edited by shep; 22nd October 2020 at 12:56 AM. Reason: Updated for 6.8 |
|
|||
![]()
Adding Freedesktop compliant *.desktop entries
OpenBSD has some useful base applications that do not have menu entries. I have provided ~/.local/share/applications/*.desktop entries for xterm and xcalc along with an expanded ~/.Xdefaults. The ~/.Xdefaults file sets background color, foreground color, font, scrollbar for xterm. A classic Ti80 calculator look for xcalc is included. You can look at the examples and reference this Arch Linux wiki in order to generate additional *.desktop entries: Desktop Entries - ArchWiki The Arch wiki also details how to avoid duplicate desktop entries in case there are duplicates in /usr/local/share/applications and ~/.local/share/applications. Just append Code:
NoDisplay=true Another source of *desktop entries is Debian. Debian has a policy of adding *.desktop files that are not provided upstream. Here is a link to Debian xterm.desktop file Debian xterm sources Last edited by shep; 20th November 2019 at 01:25 PM. |
|
|||
![]()
Scripting and adding *.desktop entries for ncurses apps
For those new to scripts, they need to be executable. Executable permissions can be lost during archive/compression and if they do not function, chmod +x the script. Ncurses applications are lightweight, responsive applications that run in a terminal. One issue is that the terminal may need to be resized to fully display the application. I do this by running a shell script that sets the xterm size and then executes the Ncurses application. The shell script is then executed by the *.desktop entry. When setting the geometry initially, you can mouse drag the corner of the xterm, running the ncurses app, and adjust. The changes in the geometry are displayed in a pop-up as long as the mouse button remains depressed. Note the geometry when it looks good and enter it after the xterm -g flag. Calcurse ~/scripts/calcurse_start.sh Code:
#!/bin/sh xterm -g 65x30 +sb -T "Calcurse Calendar" -e calcurse ~/.local/share/applications/calcurse.desktop Code:
[Desktop Entry] Name=Calcurse GenericName=Calendar Comment=Calendar Exec=/home/YOUR_USER/scripts/calcurse_start.sh Terminal=false Type=Application Encoding=UTF-8 Icon=x-office-calendar Categories=Office;Calendar; ~/scripts/ncmpc_start.sh Code:
#!/bin/sh xterm -g 110x22 +sb -T "NcMpc Music" -e ncmpc -f ~/.config/ncmpc/ncmpcrc Code:
[Desktop Entry] Type=Application Encoding=UTF-8 Name=NcMPC GenericName=MPD Comment=MPD Frontend Exec=/home/YOUR_USER/scripts/ncmpc_start.sh Icon=audio-x-generic Categories=AudioVideo;Audio; Terminal=false Last edited by shep; 31st December 2019 at 06:01 PM. |
|
|||
![]()
x11/yad Tricks - scripting tint2/clock/calendars and abook sub-menu entries.
Tint2 does not provide a popup calendar but does have the capability to launch one. Most of the Linux based Openbox/tint2 distributions use productivity/gsimplecal which was just ported to OpenBSD. The project continues to use x11/yad to generate a calendar largely because BareGUI tries to avoid redundant applications. Yad is utilized for additional scripts. The ~/scripts/calendar.sh script positions the calendar under the panel clock The code to run the calendar script is in the clock section of ~/.config/tint2/tint2rc. Sylpheed comes with a functional address book but if you use mutt/neomutt/alpine, mail/abook is good for contact management. One challenge was that I like separate address books. It made bulk emails easier although I still have to manually copy/paste the recipients to Bcc:. Here is the yad script that itemizes my abook addressbooks: ~/scripts/yad_abook.sh Code:
#!/bin/sh GTK_THEME=Adwaita:dark \ yad --form --width=256 --text="Choose an Addressbook:" --title="Abook" \ --field="AirPark":fbtn 'xterm +sb -g 72x26 -T "Airpark AddressBook" -e abook --datafile /home/YOUR_USER/.abook/airparkaddress' \ --field="BlockWatch":fbtn 'xterm +sb -g 72x44 -T "Block AddressBook" -e abook --datafile /home/YOUR_USER/.abook/blockaddress' \ --field="Business":fbtn 'xterm +sb -g 72x44 -T "Business AddressBook" -e abook --datafile /home/YOUR_USER/.abook/bizaddress' \ --field="Family":fbtn 'xterm +sb -g 72x20 -T "Family AddressBook" -e abook --datafile /home/YOUR_USER/.abook/familyaddress' \ --field="Friends":fbtn 'xterm +sb -g 72x22 -T "Friends AddressBook" -e abook --datafile /home/YOUR_USER/.abook/friendsaddress' \ --window-icon=contact-new --button=gtk-cancel:6 ~/.local/share/applications/abook.desktop Code:
[Desktop Entry] Name=Abook GenericName=Contacts Comment=Manage Contacts Exec=/home/YOUR_USER/scripts/yad_abook.sh Icon=x-office-address-book Terminal=false Type=Application StartupNotify=false Categories=Office;ContactManagement; Last edited by shep; 31st December 2019 at 06:02 PM. |
|
|||
![]()
Basis for package recommendations in OpenBSD 6.6
Web Browsers In OpenBSD, the major browsers can be categorized by security updates and pledged, privilege separation. Landry Bueil provides Mozilla builds for www/mozilla-firefox and www/firefox-esr. As of December, 2019, an update of www/chromium is being provided. These updates are now hosted by the main project. Previously, only firefox-esr made it through the 6/12month support cycles without dependency issues. Iridium and Chromium are reported to provide better privilege separation. Chromium provides both security updates and privilege separation at the expense of Google's tracking. Iridium has the same Chromium privilege separation without Google tracking but no security updates as yet. Firefox-esr provides security updates. Email Clients Email clients fall into 3 categories. In the first category, inline html, OpenBSD has mail/evolution and mail/mozilla-thunderbird. Evolution pulls many Gnome3 dependencies leaving Thunderbird. Html emails are generally frowned upon as click prompts can be disguised to run scripts or take you to a spoofed website. It is reported that this is how the GRU gained access to the DNC's email server. Evolution and Thunderbird have an option to display emails as text. The second category has text based email clients with GUI's. mail/sylpheed, mail/claws-mail and mail/trojita are available. Claws-mail, forked from Sylpheed, provides plugins but 6.6stable has no html plugins. Previously claws-mail html plugins were discontinued in OpenBSD due to security problems. Trojita is Qt5 based, only supports imap. I recommend Sylpheed in this category. [Update:] In -current, Claws-mail just gained a new, more secure html plugin. The last group are keyboard driven, text clients like mail/mutt, mutts' feature enhanced fork: mail/neomutt and mail/alpine. If you have to frequently work through large numbers of emails, setting up and learning the keystokes for mutt/neomutt is worthwhile. OpenBSD also comes with a simple MUA, mail, that can be used with opensmptd. Office The most popular office suite is editors/libreoffice. It is an active, widely utilized suite that has good compatibility with MSOffice. It is large and resource heavy but is well implemented in OpenBSD. Lighter office utilities are editors/abiword, math/gnumeric. productivity/siag and editors/calligra. Calligra is Qt5 based, Abiword is currently broken and Siag has been dropped. Libreoffice is recommended. Last edited by shep; 8th September 2020 at 07:06 PM. |
|
|||
![]()
Time and Weather
NTP, x11/yad, graphics/ImageMagick and net/curl based Weather scripts. Note: In OpenBSD, it is possible to use the base ftp command to pull the *.txt files from https:// sites. I used curl so the same scripts will run in Debian as #!/bin/bash scripts. If you are an OpenBSD purist, you can easily modify the scripts to use the base ftp command. The base distribution utilizes openntpd to synch the computer clock on startup. man ntpd. My father was a USN trained pilot/navigator who compulsively sync'd his watch to the National Institute of Standards and closely monitored the weather. These weather scripts are helpful in scheduling outdoor activities and IMHO are better than the Gnome/XFCE4/KDE weather applications for US users. They do not constantly poll saving CPU cycles and bandwidth. The data is from US sources rather than interpolated data from Scandinavia. The following scripts will pull METAR (MEteorological Terminal Area Report) and METAF (MEteorological Terminal Area Forecast) from a nearby U.S. airport. These are free aviation weather products which are updated hourly. There are examples for pulling *.txt files and animated gif's. You should be able to paste in the url for your local product. ~/scripts/weather.sh Code:
#!/bin/sh xterm -g 75x17-1+39 -T "Yakima, WA Weather" -hold -e \ curl -sk https://tgftp.nws.noaa.gov/data/observations/metar/decoded/KYKM.TXT Code:
#!/bin/sh # This is a simple script that downloads current weather conditions and zone # forecast from the National Weather Service to /tmp and displays them. # # To change the forecast zone, replace wa/waz027 with another forecast zone. # See <https://weather.noaa.gov/pub/data/forecasts/zone/> for a list. # xterm -g 75x50-1+39 -T "Yakima, WA Forecast" -hold -e \ curl -sk https://tgftp.nws.noaa.gov/data/forecasts/zone/wa/waz027.txt ~/scripts/weather_radar.sh Code:
#!/bin/sh # This is a simple script that downloads a composite radar image for the NW from # the National Weather Service # The script is configured for the Northwest. # # You can browse "https://radar.weather.gov/Conus/Loop/" for your area curl https://radar.weather.gov/Conus/Loop/pacnorthwest_loop.gif | \ animate -immutable -loop 0 -title "NorthWest Radar Loop" I use a yad --form to group all my weather products ~/scripts/yad_weather.sh Code:
#!/bin/sh GTK_THEME=Adwaita:dark \ yad --form --width=256 --text="Weather Menu:" --title="Weather" \ --field="KYKM Current":fbtn 'sh /home/YOUR_USER/scripts/weather.sh' \ --field="KYKM Forecast":fbtn 'sh /home/YOUR_USER/scripts/weather_forecast.sh' \ --field="KYKM TAF":fbtn 'sh /home/YOUR_USER/scripts/terminal_forecast.sh' \ --field="PDT Radar":fbtn 'sh /home/YOUR_USER/scripts/pdt_radar.sh' \ --field="NW Satellite":fbtn 'sh /home/YOUR_USER/scripts/noaa_nw_radar.sh' \ --field="NW Composite Radar":fbtn 'sh /home/YOUR_USER/scripts/weather_radar.sh' \ --field="CONUS Radar":fbtn 'sh /home/YOUR_USER/scripts/conus_radar.sh' \ --window-icon=weather-overcast --button=yad-cancel:6 and call the yad_weather.sh script with a tint2 button ~/.config/tint2/tint2rc Code:
#------------------------------------- # Button 1 button = new button_icon = /usr/local/share/icons/gnome/32x32/status/weather-overcast.png button_text = button_tooltip = "Yakima, WA Weather" button_lclick_command = ~/scripts/yad_weather.sh button_rclick_command = ~/scripts/yad_weather.sh button_mclick_command = button_uwheel_command = button_dwheel_command = button_font_color = #000000 100 button_padding = 6 3 button_background_id = 0 button_centered = 0 button_max_icon_size = 32 #------------------------------------- Code:
#------------------------------------- # Panel panel_items = TSC panel_size = 100% 38 Code:
#------------------------------------- # Panel panel_items = TSPC panel_size = 100% 38 Last edited by shep; 22nd September 2020 at 08:16 AM. Reason: updated for yad |
|
|||
![]()
Tint2 executor to display current wifi connection data.
This project tries to use OpenBSD tools whenever possible and recently the project has implemented a feature which can connect to multiple networks provided they are listed in your /etc/hostname.if file. The following script lets the user know, with a single click, which of the possible networks is being used. OpenBSD gains Wi-Fi "auto-join". The script is still a little rough. One issue is that ifconfig line that is parsed for connection data can lead off with "nwid" or "ieee80211". The script currently uses "grep ieee80211". If you do not use the join command your can either replace ieee80211 with nwid in the script or add "join" to your /etc/hostname.if. Some spacing issues in the yad output lead to the addition of non-printable \t "tab". obsd_wifi_tint2.sh Code:
#!/bin/sh TEST="$(nc -dzw1 8.8.8.8 443 2>&1)" if echo $TEST | grep '^Connect' >/dev/null ; then # IFS; Inter Field Separator (see man ksh) # to preserve newlines,save and set IFS to space only OLD_IFS="${IFS}" IFS=" " # capture 'ifconfig' output once and reuse .... IFCONFIG=$(ifconfig) #echo ${IFCONFIG} NWID="$(echo ${IFCONFIG} | grep ieee80211 | awk '{print $3}')" CHAN="$(echo ${IFCONFIG} | grep ieee80211 | awk '{print $5}')" BSSID="$(echo ${IFCONFIG} | grep ieee80211 | awk '{print $7}')" SN="$(echo ${IFCONFIG} | grep ieee80211 | awk '{print $8}')" IP="$(echo ${IFCONFIG} | grep inet | tail -n1 | awk '{print $2}')" cat <<END -------------------------------------- Current WiFi Connection -------------------------------------- NWID \t: $NWID CHAN \t: $CHAN BSSID \t: $BSSID S/N \t: $SN IP \t: $IP END else cat <<END -------------------------------------- Currently Connection as tested by nc google.com 443 is Down -------------------------------------- END fi Code:
#!/bin/sh yad --posx=-1 --posy=39 \ --text="$(sh /home/jsh/scripts/obsd_wifi_tint2.sh 2>&1)" \ --undecorated --button=yad-close:6 Code:
#------------------------------------- # Panel panel_items = TSPPC panel_size = 100% 38 ----- #------------------------------------- # Button 1 button = new button_icon = /usr/local/share/icons/gnome/32x32/status/weather-overcast.png button_tooltip = "Yakima, WA Weather" button_padding = 6 3 0 button_max_icon_size = 24 button_lclick_command = sh ~/scripts/yad_weather.sh button_mclick_command = button_rclick_command = sh ~/scripts/yad_weather.sh # Button 2 button = new button_icon = /usr/local/share/icons/gnome/32x32/devices/network-wireless.png button_tooltip = "Wireless Connection" button_padding = 6 3 0 button_max_icon_size = 24 button_lclick_command = sh ~/scripts/yad_wifi.sh button_mclick_command = button_rclick_command = sh ~/scripts/yad_wifi.sh yad Notification Options yad Notification This is the output positioned under the wireless icon in the tint2 panel Last edited by shep; 25th December 2019 at 05:29 PM. Reason: updated for yad gtk3 |
|
|||
![]()
audio/mpd Setup
The setup is described in this thread: Music Player Daemon (MPD OpenBSD Howto In ~/.config/openbox/autostart uncomment Code:
# Start local instance of mpd #(sleep 2.0 && mpd ~/.config/mpd/mpd.conf) & ~/.config/mpd/socket. Last edited by shep; 12th November 2019 at 08:12 PM. |
|
|||
![]()
sysutils/xorriso-tcktl
This details the setup of a CD/DVD/Blueray user interface based on libisoburn. sysutils/xorriso-tcltk does not include a wrapper application that is needed to run the interface. It is provided by www/tk, version 8.5. The needed packages are Code:
# pkg_add libisoburn xorriso-tcltk tk Add your user to the operator group and add group rw permission for /dev/rcd0*. The interface also provides for copying from one drive to another, so if you have several drives, adjust your permission to include group rw for both drives. For a freedesktop compliant menu entry, create ~/.local/share/applications/xorriso.desktop with the following content Code:
[Desktop Entry] Encoding=UTF-8 Name=Xorriso GenericName=Disk Burner Comment=Optical Disk GUI X-GNOME-FullName=Openbox Menu Exec=xorriso-tcltk Terminal=false X-MultipleArgs=false Type=Application Icon=drive-removable-media Categories=Utility; MimeType= StartupNotify=true Last edited by shep; 31st December 2019 at 05:33 PM. Reason: added sharper screenshot |
|
|||
![]() Quote:
Under consideration: 1. Sylpheed to Claws-mail. Claws-mail offers more flexibility in regards to plugins although the older html plugins had security issues. The newer html plugin is webkitgtk4 based which is getting security updates. 2. A section on vimb/webkitgtk4. On my setup, vimb opens a page of commonly visited links. My morning routine is news, weather, markets and forums. In vimb, I can hit all of my routine sites without touching the mouse. Would be open to any EU weather input under time and weather section. I'm building my own jgmenu and running it. Upstream now has a "C" coded menu generator that does not meed menu-cache. Upstream still includes a python3 based menu and the menu-cache option which I'm hoping will be phased out. The "C" coded menu generator lighter, faster and has less dependencies. |
|
||||
![]()
Ok thank you.
https://www.bbc.com/weather |
|
|||
![]()
Thanks for the report. I'm still getting my own devices up to date and have not yet tried to do a new BareGui configuration in 6.7. I'm not aware of any major changes that need to be made.
On your BBC weather link, do you pull any animated gifs or *.txt files? If so, could you edit your post and point out the urls? |
|
||||
![]()
The BBC weather service isn't very good any more, they switched from https://www.metoffice.gov.uk/ to the rather rubbish MeteoGroup to save money when the licence fee was frozen.
For a text-based weather service see http://www.wttr.in/ It's not as good as the Met Office forecast but it can be viewed in a terminal or from the TTY: Code:
curl wttr.in
__________________
Linux is for people who hate Windows. BSD is for people who love UNIX. |
|
||||
![]()
I just changed in the script of weather.sh:
Code:
#!/bin/sh xterm -g 125x40-1+39 -T "City's Weather" -hold -e \ curl -sk http://www.wttr.in/ Code:
#------------------------------------- # Button 1 button = new button_icon = /home/ripe/pictures/sun_weather.png button_text = button_tooltip = "City's Weather" button_lclick_command = ~/scripts/weather.sh button_rclick_command = ~/scripts/weather_radar.sh button_mclick_command = ~/scripts/weather_forecast.sh button_uwheel_command = button_dwheel_command = button_font_color = #000000 100 button_padding = 6 3 button_background_id = 0 button_centered = 0 button_max_icon_size = 32 Code:
./weather.sh |
|
|||
![]()
tint2 buttons support 3 mouse options: right click, left click and middle click.
I kept adding weather sources and exceeded the 3 options. My solution was to use ~/scripts/yad_weather.sh. You can add as many options to the yad scripts as you want and I had a wttr.in option with weather_forecast.sh. You should be able to return weather.sh to your local value and edit ~/scripts/weather_forecast.sh for the wttr.in source. I recommend reading the wttr.in documentation as it will allow you to pick forcasts more accurately. https://wttr.in/:help Last edited by shep; 22nd September 2020 at 08:19 AM. |
![]() |
Thread Tools | |
Display Modes | |
|
|