site  contact  subhomenews

Zarfy fixed in OE

December 29, 2020 — BarryK

Zarfy is a GUI for libxrandr, in particular for handling multiple monitors. Easy Buster has version 0.1.0, which works, however, Easy Dunfell has version 0.1.1, which is broken. In 0.1.1, the "-l" option, to load a configuration file, doesn't work.

Version 0.1.1 is not an official release, it is a fork of of the "official" project. The official zarfy is 0.1.0 and this is the project page:

https://sourceforge.net/projects/zarfy/

The fork is here:

https://github.com/rbtylee/zarfy/

Installation is broken in both of them, and in OE I had to resort to a manual install. Slackware has two patches to supposedly fix the makefiles, so that installation uses the $DESTDIR variable, so I used them in OE, but it does not work -- some files still got installed to the host system.

james (jamesbond in the forums) is maintaining his own fork of Zarfy:

http://chiselapp.com/user/jamesbond/repository/zarfy/home

I have redone the recipe in OE, based on the 0.1.0 version, with the slackware patches and I resolved Jame's patches down to just two. The latest recipe is in the "20201229" OE tarball:

http://distro.ibiblio.org/easyos/project/oe/dunfell/

The recipe is still doing a manual install. This is file meta-quirky/recipes-quirky/zarfy/zarfy_0.1.0.bb:

LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

SRC_URI = "https://downloads.sourceforge.net/project/zarfy/zarfy/zarfy%20${PV}/zarfy-${PV}.tar.gz \
file://010-fix-makefiles-install.patch \
file://020-increase-maxctrc.patch \
file://030-add-m-option-and-fixes.patch"
SRC_URI[md5sum] = "34e6356c0adf8026fb8dcebaade2b4f8"
SRC_URI[sha1sum] = "c09bc65d035f9cbe3a74dd886bea9e915e97cb29"
SRC_URI[sha256sum] = "5e79bfa9f2abbe161b016530ede3fbaf90d9f3810a3da05a6b1dd991d7276b40"
SRC_URI[sha384sum] = "0b614a2a2780c01a3049dc4caec9c387cb08445c4a2ff77899d7229f66dfd498feb303be3340bdacc0df9b5195271ad0"
SRC_URI[sha512sum] = "8fd99440874714bcc5f8a8260049040ac6347c33bf9d27587bf4ef5a3d84ee5d05851ddfee240921867135605dd7dd606a109c2ae7f04aa804e91596956e8d35"

DEPENDS = "gtk+ libx11 gdk-pixbuf libglade libxrandr libxml2"

inherit pkgconfig autotools gettext

EXTRA_OECONF = ""

do_configure_prepend() {
touch README
}

do_compile_prepend() {
sed -i -e 's%lXrandr%lXrandr -lX11 -lm%' ${B}/src/Makefile
sed -i -e 's%lXrandr%lXrandr -lX11 -lm%' ${B}/Makefile
}

#stuff is getting installed to the host system! (despite the slackware patch)...
do_install() {
#oe_runmake install DESTDIR=${D}
install -d ${D}/usr/bin
install -m755 ${B}/src/zarfy ${D}/usr/bin/
install -d ${D}/usr/share/zarfy
install -m644 ${S}/data/dvi.png ${D}/usr/share/zarfy/
install -m644 ${S}/data/lcd.png ${D}/usr/share/zarfy/
install -m644 ${S}/data/monitor_d.png ${D}/usr/share/zarfy/
install -m644 ${S}/data/monitor.png ${D}/usr/share/zarfy/
install -m644 ${S}/data/monitor_s.png ${D}/usr/share/zarfy/
install -m644 ${S}/data/tv.png ${D}/usr/share/zarfy/
install -m644 ${S}/data/vga.png ${D}/usr/share/zarfy/
install -m644 ${S}/data/zarfy.glade ${D}/usr/share/zarfy/
install -m644 ${S}/data/zarfy.png ${D}/usr/share/zarfy/
}

HOMEPAGE = "https://sourceforge.net/projects/zarfy/"
SUMMARY = "A gui to libxrandr. Presents a visual representation of displays"

Tested it, the "-l" option now works.

Zarfy can be used to change the screen resolution, however that is not the best way to do it, as it will happen after the desktop has started. So, you get the desktop, then it goes black and then the desktop reappears at the new resolution -- and some icons may be either off the screen or in a wrong place on the screen.

If you just want to change the resolution, it is better to use QuickSetup (in the Setup menu category). Or, in a terminal, type "xrandrshell", which will run just the video part of Quicksetup. Actually, xrandrshell can also be launched via the menu "Setup -> Xorg Video Wizard -> Resolution changer".

What QuickSetup/xrandrshell will do, is modify /etc/X11/xorg.conf, so the desired resolution is specified before X starts. So you won't get the flicker after the desktop is started, and the icons will all be in the right places. 

Tags: easy