Skip to content

Commit

Permalink
Fixed icewm configuration using setup from yast (#1931)
Browse files Browse the repository at this point in the history
## Problem

In running Agama installer user was able to open IceWM's main menu using
Win key

- [bsc#1235478](https://bugzilla.suse.com/show_bug.cgi?id=1235478)


## Solution

Taken
[preferences.yast2](https://github.com/yast/yast-theme/blob/master/theme/SLE/wmconfig/preferences.yast2)
from yast-theme package

Note: the Makefile patch was taken from @lslezak
https://github.com/agama-project/agama/compare/efi_locale?expand=1#diff-3814de00178ccbebe225da81ee5f56663518b579103d005782925a8b014491ca

## Notes

- The default IceWM shortcut for starting xterm is `Ctrl+Alt+T`
- Additionally fixed crashing xterm when displaying the xterm menu (via
Ctrl + click)

![agama-xterm](https://github.com/user-attachments/assets/0f4d6d13-9236-4082-b56c-70902ffa1ea2)
- I (@lslezak) have enabled some IceWM features in the config file.
Enable displaying the window title, the maximize/minimize buttons and
the window actions menu in the title bar.

YaST uses popup windows where these features are not wanted, but Agama
displays popups in the main browser window (so technically they are not
popups and we do not use any `alert()` or similar functions). And these
features might be useful when running xterm debug window. See the
screenshot above.

## Testing

- Tested manually

---------

Co-authored-by: Ladislav Slezák <lslezak@suse.com>
  • Loading branch information
mchf and lslezak authored Feb 6, 2025
1 parent 1e2df32 commit 000afa8
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 2 deletions.
7 changes: 5 additions & 2 deletions live/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ FLAVOR = openSUSE
# to use a different project run "make build OBS_PROJECT=<project>"
OBS_PROJECT = "systemsmanagement:Agama:Devel"
OBS_PACKAGE = "agama-installer"
# to use internal OBS add "OBS_API=https://api.suse.de"
OBS_API = "https://api.opensuse.org"

# files to copy from src/
COPY_FILES = $(patsubst $(SRCDIR)/%,$(DESTDIR)/%,$(wildcard $(SRCDIR)/*))
Expand Down Expand Up @@ -53,8 +55,9 @@ $(DESTDIR)/%.tar.xz: % $$(shell find % -type f,l)

# build the ISO locally
build: $(DESTDIR)
if [ ! -e $(DESTDIR)/.osc ]; then make clean; osc co -o $(DESTDIR) $(OBS_PROJECT) $(OBS_PACKAGE); fi
if [ ! -e $(DESTDIR)/.osc ]; then make clean; osc -A $(OBS_API) co -o $(DESTDIR) $(OBS_PROJECT) $(OBS_PACKAGE); fi
$(MAKE) all
(cd $(DESTDIR) && osc build -M $(FLAVOR) images)
# allow passing optional parameters to osc like "-p <dir>" or "-k <dir>"
(cd $(DESTDIR) && osc -A $(OBS_API) build -M $(FLAVOR) $(OSC_OPTS) images)

.PHONY: build all clean
104 changes: 104 additions & 0 deletions live/root/etc/icewm/preferences.yast2
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# IceWM configuration file for use during installation

# Hide taskbar
ShowTaskBar=0

# Enable Alt+Tab
QuickSwitch=1
KeySysSwitchNext="Alt+Tab"
KeySysSwitchLast="Alt+Shift+Tab"

# Disable Windows key
Win95Keys=0

# Borders
BorderSizeX=3
BorderSizeY=3
DlgBorderSizeX=3
DlgBorderSizeY=3

# Disable most shortcuts
# :r !grep -o '\<Key[^=]*' /etc/icewm/preferences | grep -v Switch | sed 's/$/=""/'
KeyWinRaise=""
KeyWinOccupyAll=""
KeyWinLower=""
KeyWinClose=""
KeyWinRestore=""
KeyWinPrev=""
KeyWinNext=""
KeyWinMove=""
KeyWinSize=""
KeyWinMinimize=""
KeyWinMaximize=""
KeyWinMaximizeVert=""
KeyWinMaximizeHoriz=""
KeyWinFullscreen=""
KeyWinHide=""
KeyWinRollup=""
KeyWinMenu=""
KeyWinArrangeN=""
KeyWinArrangeNE=""
KeyWinArrangeE=""
KeyWinArrangeSE=""
KeyWinArrangeS=""
KeyWinArrangeSW=""
KeyWinArrangeW=""
KeyWinArrangeNW=""
KeyWinArrangeC=""
KeySysWinNext=""
KeySysWinPrev=""
KeySysWinMenu=""
KeySysDialog=""
KeySysMenu=""
KeySysWindowList=""
KeySysWinListMenu=""
KeySysAddressBar=""
KeySysWorkspacePrev=""
KeySysWorkspaceNext=""
KeySysWorkspaceLast=""
KeySysWorkspacePrevTakeWin=""
KeySysWorkspaceNextTakeWin=""
KeySysWorkspaceLastTakeWin=""
KeySysWorkspace1=""
KeySysWorkspace2=""
KeySysWorkspace3=""
KeySysWorkspace4=""
KeySysWorkspace5=""
KeySysWorkspace6=""
KeySysWorkspace7=""
KeySysWorkspace8=""
KeySysWorkspace9=""
KeySysWorkspace10=""
KeySysWorkspace11=""
KeySysWorkspace12=""
KeySysWorkspace1TakeWin=""
KeySysWorkspace2TakeWin=""
KeySysWorkspace3TakeWin=""
KeySysWorkspace4TakeWin=""
KeySysWorkspace5TakeWin=""
KeySysWorkspace6TakeWin=""
KeySysWorkspace7TakeWin=""
KeySysWorkspace8TakeWin=""
KeySysWorkspace9TakeWin=""
KeySysWorkspace10TakeWin=""
KeySysWorkspace11TakeWin=""
KeySysWorkspace12TakeWin=""
KeySysTileVertical=""
KeySysTileHorizontal=""
KeySysCascade=""
KeySysArrange=""
KeySysArrangeIcons=""
KeySysMinimizeAll=""
KeySysHideAll=""
KeySysUndoArrange=""
KeySysShowDesktop=""
KeySysCollapseTaskBar=""

# Disable root window menus
# :r !grep -o '\<Desktop[^=]*Button=' /etc/icewm/preferences | sed 's/$/0/'
DesktopWinMenuButton=0
DesktopWinListButton=0
DesktopMenuButton=0

# Disable possibility to move the base window, BNC 466827
ClientWindowMouseActions=0
2 changes: 2 additions & 0 deletions live/root/root/.Xdefaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
! Use the default font also for the xterm menus (Ctrl + click)
XTerm*font: fixed
9 changes: 9 additions & 0 deletions live/src/agama-installer.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Feb 4 13:25:35 UTC 2025 - Ladislav Slezák <lslezak@suse.com>

- configure xterm to use the default fixed font also in the
configuration popup menu (Ctrl + click) to avoid crash
- bsc#1235478
- tuned IceWM setup to disable some desktop functionality like
opening main menu using the Win key (by mfilka@suse.com)

-------------------------------------------------------------------
Mon Feb 3 23:08:34 UTC 2025 - Eugenio Paolantonio <eugenio.paolantonio@suse.com>

Expand Down

0 comments on commit 000afa8

Please sign in to comment.