*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
@hitest I know that you are also on Slackware. I also have read a couple of articles about the difference of Linux vs Unix. I'm wondering if you find one Linux distribution more similar to OpenBSD in command structure and file structure to ease in moving between the two?
Also, have you run into any Linux programs that don't run on UNIX with the Linux integration of OpenBSD? Cheers.
@hitest I know that you are also on Slackware. I also have read a couple of articles about the difference of Linux vs Unix. I'm wondering if you find one Linux distribution more similar to OpenBSD in command structure and file structure to ease in moving between the two?
Also, have you run into any Linux programs that don't run on UNIX with the Linux integration of OpenBSD? Cheers.
Slackware is a very unix-like version of Linux. I find moving between Slackware and the BSDs to be comfortable.
There is no such thing. You may be thinking of compat_linux(8), which is no longer available. This was a Linux syscall(2) emulation layer that could be used with select Linux ELF binary files.
Not all syscalls were emulated, it was available for only one architecture (32-bit Intel), and required the admin to manually install most necessary libraries. It had been unmaintained for some years and was eventually removed from the OS.
I've adjusted the config to have both the tray (stalonetray) and desktop pager contained within the fvwm buttons. Stalonetray has a nice little scrollbar when (in my setup) more than 3 items are within the tray.
Some icons when iconified were larger than others, I've also corrected that and have the entire bottom of screen set as where icons appear (I opened and iconified xcalc a number of times just for the purposes of creating the image below)
Nice now. Full screen window and double click its titlebar and the fvwm button are revealed and ready to be clicked/used. The first three icons in the top are the tray, osmo (right click presents its various notes, calendar, tasks ..etc drop down), radiotray (click that to select the radio stations I've set), and the third is libre quickstart (drop down showing choice of word processor, spreadsheet, draw ...etc.).
~/.fvwmrc
Code:
#################################################################
#
# A configuration file for FVWM.
#
#################################################################
IconPath $HOME/.fvwm/icons
PixmapPath /usr/X11R6/include/X11/pixmaps/:$HOME/.fvwm
ImagePath $HOME/.fvwm/icons
##############################################################################
# FvwmButtons
# start FvwmButtons and restart them
AddToFunc "InitFunction" "I" Module FvwmButtons
# Pager
+ "I" Module FvwmPager 0 0
+ "I" Next [!iconic CurrentScreen xterm] Focus
+ "I" CursorMove 30 40
AddToFunc "RestartFunction" "I" Module FvwmButtons
+ "I" Module FvwmPager 0 0
+ "I" Next [!iconic CurrentScreen xterm] Focus
+ "I" CursorMove 30 40
*FvwmButtonsFore White
*FvwmButtonsBack SteelBlue4
*FvwmButtonsFont -*-lucida-medium-r-*-*-18-*-*-*-*-*-*-*
*FvwmButtonsGeometry 1075x70+80+3
*FvwmButtonsRows 1
*FvwmButtons(3x1 Frame 0 Swallow (NoClose,UseOld) "stalonetray")
*FvwmButtons "" xfe.xpm exec xfe
*FvwmButtons "" firefox-esr.xpm exec firefox-esr
*FvwmButtons "" terminal.xpm exec $HOME/bin/xterm.mine
*FvwmButtons "" xfw.xpm exec xfw
*FvwmButtons "" paint.xpm exec mtpaint
*FvwmButtons "" calculator.xpm exec xcalc
*FvwmButtons Snap xterm-sol.xpm exec sleep 3;mtpaint -s
*FvwmButtons Move arrows2.xpm Move
*FvwmButtons "vol" arrup2w.xpm exec mixerctl outputs.master=+12
*FvwmButtons "vol" arrdown2w.xpm exec mixerctl outputs.master=-12
*FvwmButtons(Swallow XClock 'Exec xclock -padding 0 -fg white -bg SteelBlue4 -hd white -hl white &')
*FvwmButtons(Swallow(UseOld,NoKill) "xload" `Exec xload -title xload -bg SteelBlue4 -fg white -update 3 -nolabel &`)
*FvwmButtons(1x1 Frame 1 Swallow(UseOld) "FvwmPager" "Module FvwmPager 0 1")
##############################################################################
# Mouse menus
#
## This is the command menu for the left mouse button
AddToMenu CommandMenu "Menu" Title
+ "Volume Control" Popup VolumeMenu
+ "Utilities" Popup Utilities
+ "" Nop
# Restart doesn't reload stalonetray, as we use xenodm and autologin logoff is a reload
# and that does correctly reload stalonetray
#+ "Restart Fvwm" Restart fvwm
#+ "Start cwm" Restart cwm
+ "Lock Screen" exec xlock &
+ "Logout" Quit
# Window operations for the centre mouse button
AddToMenu Global-Window-Ops "Window Ops" Title
+ "Move" Move-or-Raise2
+ "Resize" Resize-or-Raise2
+ "Raise" Raise
+ "Lower" Lower
+ "(De)Iconify" Iconify
+ "(Un)Stick" Stick
+ "(Un)Maximize" maximize_func
+ "" Nop
+ "Delete" Delete
+ "Close" Close
+ "Destroy" Destroy
+ "" Nop
+ "Refresh Screen" Refresh
# Window Ops for the top left of every window
AddToMenu Window-Ops "Move" Move-or-Raise
+ "Resize" Resize-or-Raise
+ "Raise/Lower" RaiseLower
+ "Iconify" Iconify
+ "(Un)Stick" Stick
+ "" Nop
+ "Delete" Delete
+ "Close" Close
+ "Destroy" Destroy
AddToMenu VolumeMenu "Volume Control" Title
+ "Volume 100%%" exec mixerctl -q outputs.master=255
+ "Volume 90%%" exec mixerctl -q outputs.master=230
+ "Volume 80%%" exec mixerctl -q outputs.master=205
+ "Volume 70%%" exec mixerctl -q outputs.master=180
+ "Volume 60%%" exec mixerctl -q outputs.master=155
+ "Volume 50%%" exec mixerctl -q outputs.master=130
+ "Volume 40%%" exec mixerctl -q outputs.master=105
+ "Volume 30%%" exec mixerctl -q outputs.master=80
+ "Volume 20%%" exec mixerctl -q outputs.master=55
+ "Volume 10%%" exec mixerctl -q outputs.master=20
+ "Volume 0%%" exec mixerctl -q outputs.master=0
# This menu will fire up some often used programs
AddToMenu Utilities "Choose one:" Title
+ "Identify" Module FvwmIdent
+ "xfontsel" Exec exec xfontsel
+ "xMan" Exec exec xman -notopbox -geometry +150+102 &
+ "xloaD" Exec exec xload -geometry =136x136+0+0 &
+ "xclipboard" Exec exec xclipboard &
+ "Destroy" Destroy
############################################################################
# menus and mouse actions
#
AddToFunc Move-or-Raise "I" Raise
+ "M" Move
+ "D" Lower
AddToFunc Move-or-Raise2 "M" Raise
+ "M" Move
+ "D" Lower
AddToFunc Maximize-Func "C" Maximize 100 100
AddToFunc Move-or-Iconify "I" Raise
+ "M" Move
+ "D" Iconify
AddToFunc Resize-or-Raise "I" Raise
+ "M" Resize
+ "D" Lower
AddToFunc Resize-or-Raise2 "M" Raise
+ "M" Resize
+ "D" Lower
AddToFunc Iconify-and-Raise "I" Iconify
+ "I" Raise
############################################################################
# MOUSE Setup
#
# root window:
# - Left Mouse Button brings up the Command Menu
# - Centre Mouse Button is the window operations list
# - Right Mouse Button is a window list
# Button Context Modifi Function
Mouse 1 R A Menu CommandMenu Nop
Mouse 2 R A Menu Global-Window-Ops Nop
Mouse 3 R A WindowList
# Now, title bar buttons
# Left is menu, right is minimise, maximise, close
# Button Context Modifi Function
Mouse 0 1 A Menu Window-Ops Close
Mouse 0 2 A Close
Mouse 0 4 A Maximize-Func
Mouse 0 6 A Iconify
# Button 1 in Frame or Sides is a resize-or-raise, in Icons is a move or
# de-iconify, and on Top does a move-or-raise
# Button Context Modifi Function
Mouse 1 FS A Resize-or-Raise
Mouse 1 I A Iconify
Mouse 1 T A Move-or-Raise
# Button 2 in an Icon is de-iconify, in Corners/Sides/Titlebar gets Ops Menu
# Button Context Modifi Function
Mouse 2 I A Move-or-Iconify
############################################################################
# COLORS and FONTS and Styles
#
# window in focus
HilightColor linen SteelBlue3
# all other windows
Style "*" Color linen/SteelBlue4
# fonts for title bar and icon label
WindowFont -*-lucida-medium-r-*-*-20-*-*-*-*-*-*-*
IconFont -*-lucida-medium-r-*-*-17-*-*-*-*-*-*-*
MenuStyle black grey90 grey20 -*-lucida-medium-r-*-*-20-*-*-*-*-*-*-* fvwm
MenuStyle * background #455561, ActiveFore #ccfcf0, ForeGround white
MenuStyle * popupoffset 0 100
MenuStyle * MenuFace HGradient 64 1 #758591 100 #102030, Animation
# icons go in bottom left (left top right bottom)
Style "*" IconBox 0 1030 -1 -1
# Adjust window decorations for certain programs
Style "Eterm*" NoTitle, Sticky, WindowListSkip, NoHandles
Style "stalonetray*" NoTitle, Sticky, WindowListSkip, NoHandles
Style "gkrellm-cpu*" NoTitle, Sticky, WindowListSkip, NoHandles
Style "gkrellm-clock*" NoTitle, Sticky, WindowListSkip, NoHandles
# Keep the last focus while in root window
Style "*" SloppyFocus
# windows auto-raise after these many milliseconds
Module FvwmAuto 300
# down and up in less than these milliseconds to be considered a click
ClickTime 250
# opaque moves
OpaqueMoveSize 100
# Suppress the pager
DeskTopSize 2 1
# window placement
Style "*" SmartPlacement
Style "*" RandomPlacement
# window styles
Style "Fvwm*" NoTitle, Sticky, WindowListSkip, NoHandles, BorderWidth 0
# close button, top right
AddButtonStyle 2 16 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1
# maximise button, to the left of close button
AddButtonStyle 4 Vector 4 50x25@1 75x75@0 25x75@0 50x25@1
# minimise button, to the left of the maximise button
AddButtonStyle 6 Vector 4 50x75@1 25x25@1 75x25@1 50x75@0
############################################################################
# STYLE Flag Setup
#
# (decorations and window options)
# Note: Order is important!! If compatible styles are set, styles are ORed
# together. If conflicting styles are set, the last one specified is used.
# If you knock your mouse out of the xterm, it keeps focus while in root window
#Style "*term" SloppyFocus
# change the default width, set a global icon, and give borders to popups
Style "*" BorderWidth 7, HandleWidth 7, Icon x.xpm, DecorateTransient
Style "Fvwm*" NoTitle, Sticky, WindowListSkip
Style "*lock" NoTitle, Sticky, WindowListSkip
Style "xbiff" NoTitle, Sticky, WindowListSkip
Style "xload" NoTitle, Sticky, WindowListSkip, ClickToFocus
Style "xsession" NoTitle, Sticky, WindowListSkip, ClickToFocus
Style "xconsole" NoTitle, Sticky, WindowListSkip, ClickToFocus
Style "xfsm" NoTitle, Sticky, WindowListSkip, ClickToFocus
Style "xdaliclock" NoTitle, Sticky, WindowListSkip, ClickToFocus
Style "FvwmButtons" ClickToFocus
Style "Time 3D" NoTitle, Sticky
Style "xbiff" Icon mail1.xpm
Style "xman" Icon xman.xpm
Style "Demineur" Icon jolifond.xpm
Style "xneko" Icon xnekocat.xpm
Style "emacs" NoPPosition
Style "Mosaic" NoPPosition
Style "xmh" Icon mail2.xpm StartsOnDesk 2
# allocate programs to specific xpm icons
Style "Firefox" Icon firefox-esr.xpm
Style "libreoffice-calc" Icon office-calc.xpm
Style "libreoffice-writer" Icon office-writer.xpm
Style "libreoffice-draw" Icon office-draw.xpm
#Style "leafpad" Icon leafpad.xpm
Style "mtpaint" Icon paint.xpm
Style "xcalc" Icon calculator.xpm
Style "*term" Icon terminal.xpm
############################################################################
# FvwmPager
#
*FvwmPagerBack #687884
*FvwmPagerFore black
*FvwmPagerFont -adobe-helvetica-bold-r-*-*-20-*-*-*-*-*-*-*
*FvwmPagerHilight #C1C1C1
*FvwmPagerGeometry -1+2
*FvwmPagerLabel 0 "Desktops"
# Setting the font to 0x0 or nil2 results in no text
#*FvwmPagerSmallFont 0x0
*FvwmPagerSmallFont 5x8
############################################################################
# Screen Edges
# flip by whole pages on the edge of the screen, but delay for a half second
# 0 0 turns off
EdgeScroll 100 100
EdgeResistance 500 20
~/.stalonetrayrc
Code:
transparent false
dockapp_mode none
geometry 3x1
max_geometry 3x1
background "#36648B"
kludges force_icons_size
grow_gravity W
icon_gravity W
icon_size 48
sticky true
#window_strut none
window_type dock
window_layer bottom
no_shrink true
skip_taskbar true
scrollbars horizontal
scrollbars_highlight blue
I've been trying out different fonts under fvwm for X programs, but they're rather jagged. gtk2 and browser etc fonts are all fine, just can't seen to get nicer fonts for X programs such as xman, xedit ...etc. https://s1.postimg.org/3xfc6ywovz/image.png
cwm seems more for laptops where its easier to use the keyboard than the touchpad mouse.
fvwm is great for configurability, but you become more engrossed with changing things than just using the system
twm is elegantly simple, (like fvwm) more better suited for where you predominately use the mouse (like me) and where you're much less inclined to spend hours changing things. twm is Unix philosophy at its purest, does one thing (window management) very well.
I'm currently trying out the "portable" version of cwm on Slackware in preference to dwm which I've been using for a while now, and I find it very nice to use. The only thing I find is missing is support for layering so that I can force the gimp toolbox windows to remain above its image window.
twm doesn't handle _NET_WM_STATE_FULLSCREEN, and dwm also has problems with some programs when they enter fullscreen mode which is what prompted me to try cwm.
So far I really like it. It may not do everything I could wish, but what it does do, it does very well. And yes, it's very keyboard centric: but I like that.
I find still having the title bar when "full screen" is nice. You can always drag/drop the window a little higher so that most if not all of the titlebar is off screen.
I've been using Xfe with OpenBSD/twm, however I've previously used pcmanfm as my filemanager and that also supports desktop icon management i.e. by running pcmanfm --desktop &
With that desktop loaded as a window rather than full screen you can move it so that most of the title is off screen at the top and perhaps leave just a 1 pixel wide edge at the left screen edge
The first attached image is my twm screen, the second is the pcmanfm desktop screen and the third is where pcmanfm desktop screen is lowered (middle mouse button click of the pcmanfm desktop titlebar does that for me). From there you can click the icons to launch programs such as firefox and its as though those icons were part of the twm desktop. The only thing is that twm mouse clicks on the desktop are directed to pcmanfm desktop, however with a 1 pixel wide left edge you can mouse button click over there to access the usual twm menus.
It would seem that setting the desktop wallpaper within pcmanfm also sets it for twm, which is one less other program to have to install such as xv or feh. I'm currently ditching xfe in favour of pcmanfm so that my full desktop set will be OpenBSD along with ...
$ pkg_info -mz
firefox-esr -- for browsing and PDF viewing
libreoffice -- full office suite
mpv -- for audio and video
mtpaint -- for image editing/converting
numlockx -- numlock key
osmo -- notes/task/calendar/diary
pcmanfm -- filemanager, desktop icons, wallpaper
stalonetray -- system tray
I've attached my really messy .twmrc (had to add a .txt suffix for it to be accepted as a upload). Within that you'll see how I've set twm mouse middle button click to present volume adjustment. I also have my UK keyboard set so that the WIN and MENU keys right of the spacebar have keybindings along with PrintScreen (Sysrq) invokes a time delayed screen snapshot using mtpaint and sleep i.e. calls a script that contains
Added this script to .xsession (I used xenodm so .xinitrc not used)
Code:
#!/bin/sh
# Rufwoof Nov 2017
#Using pcmanfm --desktop on top of OpenBSD twm, move the pcmanfm
# desktop title off screen
WIDTH=1280
HEIGHT=800
X=3
Y=-32
# id it i.e. pcmanfm here
ID=`xdotool search --onlyvisible --name pcmanfm`
while [ "$ID" == "" ]; do
sleep 1
ID=`xdotool search --onlyvisible --name pcmanfm`
done
# size it
xdotool windowsize $ID $WIDTH $HEIGHT
# move it
xdotool windowmove $ID $X $Y
... and its working great. At cold boot it boots to the desktop aligned as desired, and same if exit/restart X/twm.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.