linuxmuster / linuxmuster-linbo

Linbo imaging system for linuxmuster.net
23 stars 22 forks source link

New linbo_gui #154

Closed dorianim closed 3 years ago

dorianim commented 3 years ago

Hi everyone,

I recently set up a linuxmuster.net network and really like the features of Linbo. What really bothered me though, is its old UI. It can be confusing for some users and, in my opinion, just doesn't look good. So I took some time and started to develop an entirely new GUI. This is what I've come up with so far: Choosing an OS: choose Performing a long action (eg. syncing OS): long Starting an OS: start Autostarting an OS: autostart An error occurred: error Imaging: imaging

As of now, I have only recreated the "start"-Tab. All the "imaging" tab does is still handled with the old interface, but I am planning to redo that as well. Furthermore, I am planning to migrate to Qt5, I have not dealt with that yet though. This is definitely not perfect yet, and there is room for improvement. But in my opinion, it is already a lot more user-friendly and looks better than the current GUI.

Is there any interest in merging this into the official Linbo? :) Do you have any suggestions on what else should be changed?

Regards Dorian.

kiarn commented 3 years ago

Hello @CodeCrafter912,

Pretty good work and it looks amazing ! I think we all have interest in this, but let's wait what the main dev of this repo thinks about it.

Cheers,

Arnaud

HappyBasher commented 3 years ago

Hi @CodeCrafter912 ! Looks awsome! Sure we are interested. Regards, Thomas

fschuett commented 3 years ago

Hi, if you are interested in a qt5 port of the old gui than take a look into https://github.com/linuxmuster/linuxmuster-linbo/tree/merge-oss-lmn. In this branch, there exists a qt5 port already. Look into linbo-gui-2.0. You could start your development from there. I did this port quite some time ago.

Frank

dorianim commented 3 years ago

Hi all, Thanks for the nice feedback :) @fschuett That's really cool, I'll check that out tomorrow Dorian

dorianim commented 3 years ago

@fschuett Did you get your Qt 5 code to run on an actual Linbo instance? I can't find a build_qt script in there?

dorianim commented 3 years ago

Just for the records: I also opened a thread on the Linuxmuster.net forum on this topic: https://ask.linuxmuster.net/t/neues-linbo-gui/6586

HappyBasher commented 3 years ago

@CodeCrafter912 So should I create a repository linuxmuster-linbo-gui where you can host your code?

dorianim commented 3 years ago

@HappyBasher Yes, that would be rellay nice :)

HappyBasher commented 3 years ago

@CodeCrafter912 You're invited. :)

dorianim commented 3 years ago

@HappyBasher Thanks :) Should I just create the repo then, or will you do it?

HappyBasher commented 3 years ago

Welcome to the team and the linuxmuster-linbo-gui repo, @CodeCrafter912! On good teamwork!

dorianim commented 3 years ago

I am happy that I can help :) On good teamwork!

fschuett commented 3 years ago

@fschuett Did you get your Qt 5 code to run on an actual Linbo instance? I do run it for years.

I can't find a build_qt script in there?

@CodeCrafter912 , please have a look into rpm/oss-linbo.spec around line 174 for the build command. It basically calls a small Makefile which calls buildroot. That does all the hard work to build linbo, so I do not need to care for the details. If you need specific files, I can extract them from the build process (f.ex. qtbase.pro) and mail them to you.

dorianim commented 3 years ago

@fschuett Ohh, alright, this branch is using buildroot, I didn't realize that. The current Linbo is not built using buildroot however (or is it?), so I am currently working on another approach: Building the linbo_gui as a statically linked binary. I have compiled Qt5 statically, as it was done with Qt4 before. Right now, the framebuffer works and its runs but the input is kind of laggy. I'm using the qevdevmouseplugin to handle the input and I'm not sure whether I'm doing something wrong

fschuett commented 3 years ago

@CodeCrafter912 I used libinput and the linuxfb plugin, that worked quite well. I do not experience any lag.

A lot of libs can be dropped: rm -fvr "${TARGET_DIR}"/usr/lib/qt/plugins/bearer/ rm -fvr "${TARGET_DIR}"/usr/lib/qt/plugins/imageformats/ rm -fv "${TARGET_DIR}"/usr/lib/qt/generic/!(libqlibinputplugin.so) rm -fv "${TARGET_DIR}"/usr/lib/qt/plugins/platforms/!(libqlinuxfb.so) rm -fv "${TARGET_DIR}"/usr/lib/libQt5Network.so rm -fv "${TARGET_DIR}"/usr/lib/libQt5PrintSupport.so rm -fv "${TARGET_DIR}"/usr/lib/libQt5Sql.so rm -fv "${TARGET_DIR}"/usr/lib/libQt5Test.so rm -fv "${TARGET_DIR}"/usr/lib/libQt5Xml.so*

I guess if you link statically, that can become quite big.

dorianim commented 3 years ago

@fschuett I also tried using libinput, but its share libraries are not present in linbo and I do not know how to install them. Would it be a problem/difficult to install them? Ldd output is:

~ # ldd /usr/bin/linbo_gui 
    linux-vdso.so.1 (0x00007ffc43596000)
    libmtdev.so.1 => not found
    libinput.so.10 => not found
    libudev.so.1 => /lib/libudev.so.1 (0x00007f279a652000)
    libxkbcommon.so.0 => not found
    libdl.so.2 => /lib/libdl.so.2 (0x00007f279a44e000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x00007f279a22f000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f2799ea6000)
    libm.so.6 => /lib/libm.so.6 (0x00007f2799b08000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f27998f0000)
    libc.so.6 => /lib/libc.so.6 (0x00007f27994ff000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f279b8ef000)
    librt.so.1 => /lib/librt.so.1 (0x00007f27992f7000)
dorianim commented 3 years ago

@fschuett And you're right about removing some libs, I am skipping them during configuration:

 -skip qtdeclarative \
 -skip qtlocation \
 -skip qtmultimedia \
 -skip qtquickcontrols \
 -skip qtsensors \
 -skip qtwebsockets \
 -skip qtwinextras \
 -skip qtwebchannel \
 -skip qtwebengine \
 -skip qttools
fschuett commented 3 years ago

@CodeCrafter912 Skipping is prettier than removing them afterwards. I'll copy that. I include libinput in my buildroot config. If I remember correct, the lib needs to be in build dependency of linbo and included in conf/initramfs(64).conf to be copied into the linbo image. For testing you can unpack the linbofs64.lz and put the libs in the needed dirs and pack linbofs64.lz. I guess you know how to.

dorianim commented 3 years ago

@fschuett Ok, then I will copy the libs manually for now and open another issue for them to be included permanently.

dorianim commented 3 years ago

@fschuett Got it working like that, now I have a normal cursor :)) How should I proceed now to get the libs added to Linbo? The currently missing libs are (Ubuntu 18.04):

/usr/lib/x86_64-linux-gnu/libmtdev.so.1.0.0
/usr/lib/x86_64-linux-gnu/libmtdev.so
/usr/lib/x86_64-linux-gnu/libmtdev.so.1
/usr/lib/x86_64-linux-gnu/libinput.so
/usr/lib/x86_64-linux-gnu/libinput.so.10.13.0
/usr/lib/x86_64-linux-gnu/libinput.so.10
/usr/lib/x86_64-linux-gnu/libxkbcommon.so
/usr/lib/x86_64-linux-gnu/libxkbcommon.so.0.0.0
/usr/lib/x86_64-linux-gnu/libxkbcommon.so.0
/usr/lib/x86_64-linux-gnu/libevdev.so.2
/usr/lib/x86_64-linux-gnu/libevdev.so
/usr/lib/x86_64-linux-gnu/libevdev.so.2.1.20
/usr/lib/x86_64-linux-gnu/libwacom.so
/usr/lib/x86_64-linux-gnu/libwacom.so.2.6.1
/usr/lib/x86_64-linux-gnu/libwacom.so.2
/usr/lib/x86_64-linux-gnu/libgudev-1.0.so.0.2.0
/usr/lib/x86_64-linux-gnu/libgudev-1.0.so.0
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.5600.4
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.4
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
/usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
/usr/lib/x86_64-linux-gnu/libffi.so.6
fschuett commented 3 years ago

@CodeCrafter912 it's been long since I worked with integrating libs. Please ask Thomas, the main developer ob linuxmuster-iinbo for how to proceed for integrating the libs.

@HappyBasher Thomas?

HappyBasher commented 3 years ago

Sure we can integrate the libs in linbo, this is the legacy way. But at the moment I work on slimming the linbofs file to shorten the boot time and to make buggy nic firmware able to boot it as the current size is a problem (see #149). So I prefer the follwing way:

If desired I can contribute the debian package part.

dorianim commented 3 years ago

Alright, that makes sense. How are you planning to handle 64 and 32 bit versions? With separate linbo_gui7.tar.lz files? It would be nice if you could do the Debain package part :) I will prepare a build script that outputs the static binaries within the next few days.

dorianim commented 3 years ago

@HappyBasher I have added the build scripts :) Running

./build_qt
./build_gui

should build everything and place the static binary in linbofs/usr/bin. Everything else needed is also included in the linbofs folder. Once deployed to a Linbo install, it should be able to run the GUI by doing:

export XKB_DEFAULT_LAYOUT=de
/usr/bin/linbo_gui -platform linuxfb
dorianim commented 3 years ago

By the way, I started to create the backend, my current concept looks like this: ezgif com-video-to-gif

HappyBasher commented 3 years ago

How are you planning to handle 64 and 32 bit versions?

Should be discussed. Perhaps 32bit version is not needed anymore.

dorianim commented 3 years ago

I gues I'll look into it and check if I am able to get it running on 32 bit. Alternatively we could just leave the old GUI for 32 bit.

dorianim commented 3 years ago

Alright, so I jut got the new GUI running on a 32 bit system. However, I am having problems with libinput again, the Qt configurator cannot find the libinput-dev:i386 package even though I have it installed on my host.

dorianim commented 3 years ago

The problem seems to be related to Qt's configure script, it checks for the 64 bit version of libinput, which apt removes when installing the 32 bit version, and then fails as it can't find it. If I reinstall the 64 bit version (which removes the 32 bit version) the configure script finds it but fails when trying to link to it (obviously) ... Does anyone have an idea on how to solve this?

dorianim commented 3 years ago

I just figured it out: I had to add the correct path for 32 bit to the PKG_CONFIG_PATH env value: export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig Now it works, so we can support 32 bit :)

dorianim commented 3 years ago

@HappyBasher I created some new buildscripts. The script build.sh basically does everything. It builds for 64 and 32 bit and places the binaries in build/linbofs and build/linbofs64. If you want, you can integrate the package building into the script build/build_Qt_and_Gui_generic. It is modified accordingly by the main build.sh to work for 32 and 64 bits. (more info at the top of the script) Everything seems to work fine now on 64 and 32 bit :)

HappyBasher commented 3 years ago

I'll take a look at it tomorrow.

HappyBasher commented 3 years ago

It builds ... waiting ... One please: provide a version/tag git tag <version> So we can refer to a specific version of the gui, which is published in the package.

HappyBasher commented 3 years ago

linbo.sh will download, unpack and start the new gui archive linbo_gui<32|64>_7.tar.lz if present on the server.

dorianim commented 3 years ago

Happy to hear that :) But please note: The current version if the GUI ist not fully usable yet. I think it will be ready in a few days though. (see: https://github.com/linuxmuster/linuxmuster-linbo-gui/issues/1 )

HappyBasher commented 3 years ago

I know. A debian package will come soon, so testers can have a look at it. It will have an experimental status, not for production use, of course.