site  contact  subhomenews

Fix blurry JWM wallpaper

June 19, 2026 — BarryK

It might seem a little bit odd, but there are two layers of wallpapers in EasyOS. The JWM window manager loads a wallpaper, then when ROX-Filer starts it loads a wallpaper and desktop icons. So normally you only see the ROX wallpaper.

However, at shutdown, ROX gets killed and immediately after, there is a dialog asking if you want to save the session. At that point of time, you will be seeing the JWM wallpaper.

In the normal "rox-mode", it is the rox wallpaper that you see. Then there is the mode of no icons on the desktop, that we call "jwm-mode". In that mode, it is the JWM wallpaper that displays.

Here are some blog posts about the icon-free desktop mode:

"Experimental icon-free desktop"
https://bkhome.org/news/202202/experimental-icon-free-desktop.html

"Revisiting icon-free desktop mode"
https://bkhome.org/news/202408/revisiting-icon-free-desktop-mode.html

"Retain icons when switch rox to jwm"
https://bkhome.org/news/202409/retain-icons-when-switch-rox-to-jwm.html

"Icon free desktop tray icon fix"
https://bkhome.org/news/202409/icon-free-desktop-tray-icon-fix.html

The JWM wallpaper is specified in /root/.jwm/jwmrc-personal:

<Desktops width="3" height="1">
<Background type="image">/usr/share/backgrounds/default.jpg</Background>
</Desktops>

The problem is, if the image is bigger than the screen resolution, JWM will shrink it to fit, but in doing so the image will become blurry. This was reported, but has not been fixed:

https://github.com/joewing/jwm/issues/647

There is a partial fix in Easy; /usr/sbin/background_reshape is called from /root/.xinitrc when X is started, and this cuts the image vertically or horizontally to have the same proportions as the screen. So, there will be an image at /usr/share/backgrounds/160/default.jpg, where that "160" is the horizontal/vertical screen ratio, calculated in 'background_reshape'. This is in my Zenbook laptop, running at 1680x1050, so compute (1680/1050)*100 gives 160.

It is only a partial fix, because 'background_reshape' doesn't reduce the image to actual screen dimensions, only adjusts the proportions.

I found one problem, 'background_reshape' needs to test if file 'jwmrc-personal' is accessing the correctly-proportioned image. Inserted this at comment "#20260618":

 if [ "$UI_DESK_MANAGER" == "rox" ];then
grep -q "<backdrop.*/${ASPECTRATIO}/" /root/Choices/ROX-Filer/PuppyPin
if [ $? -ne 0 ];then
exit 11 #see /root/.xinitrc, will update /root/Choices/ROX-Filer/PuppyPin
fi
#20260618 although jwm wallpaper not used, it will show during shutdown after rox killed...
grep -q "<Background.*/${ASPECTRATIO}/" /root/.jwm/jwmrc-personal
if [ $? -ne 0 ];then
exit 11 #see /root/.xinitrc, will update /root/.jwm/jwmrc-personal
fi
fi

.../root/.xinitrc will detect the exit 11 and will fix 'jwmrc-personal'. However, if the image is bigger than the screen dimensions, it is still going to be blurry when JWM is rendering the wallpaper. The solution is to scale the image, and this is now done in 'background_reshape', using pamscale:

  #20260618 scale image to exact screen dimensions (using pamscale)...
$IMAGEPNM "/usr/share/backgrounds/$IMAGEBASE" | \
$PAMCUT -left=0 -top=$(( $CUTVERT / 2 )) -height=$NEWVERT | pamscale -width ${ROOTHORIZ} | \
$PNMIMAGE > /usr/share/backgrounds/${ASPECTRATIO}/${IMAGEBASE}

Haven't tested it yet, but theoretically looks good.   

Tags: easy