[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#993910: aqemu: Custom icons for the virtual machines don't work



Package: aqemu
Version: 0.9.2-3
Severity: minor
Tags: patch
X-Debbugs-Cc: programingfrik@gmail.com

Dear Maintainer,

Aqemu lets you set a custom icon for your virtual machines. You can do this
through the menu that shows when you click on the virtual machine and select
the "Change Icon" option. The dialog that gets shown offers 5 different radio
button options, the last of which is "Custom Icon". If you select some valid
image through the browse button or write the correct image path directly to the
text box and press the ok button, the virtual machine's icon changes
accordingly. Then you can use your virtual machine and everything is fine. You
close aqemu. If you open it again, you will see that the icon you just set is
not shown, just the name of the virtual machine you put your custom icon to.
The machine is fine, it still works, but the icon is not persisting from one
session to the next.

If you go again to "Change Icon" and then to the "Custom Icon" setting again,
you will see that the program has added "/usr/share/aqemu/" to the beginning of
the path of your custom image. If you delete this prefix part and press ok the
image shows again. The expected behaviour would be that the path to my custom
image is not modified and it is shown every time that I open aqemu without
the need for editing it every time.

I know a thing or two about programming and because I thought that only a small
change would be needed to repair this, I downloaded the source package and did
some tests. I was hoping that I only had to find where the program was adding
the "/usr/share/aqemu/" part and erase that, and everything would be fine. It
was a bit more complicated than that, but I did solve it in the end. So here is
a little patch that solves this problem for me:

diff --git a/src/VM.cpp b/src/VM.cpp
index a75951c..ac5fde1 100644
--- a/src/VM.cpp
+++ b/src/VM.cpp
@@ -3637,7 +3637,7 @@ bool Virtual_Machine::Load_VM( const QString &file_name )
                     }
                 }

-                if ( ! abs_found )
+                if ( ! abs_found && ! Icon_Path.startsWith("/") )
                 {
                     Icon_Path = settings.value(
"AQEMU_Data_Folder","").toString() + Icon_Path;
                 }


-- System Information:
Debian Release: 11.0
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-8-amd64 (SMP w/8 CPU threads)
Locale: LANG=es_DO.UTF-8, LC_CTYPE=es_DO.UTF-8 (charmap=UTF-8),
LANGUAGE=es_DO:es
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages aqemu depends on:
ii  libc6                       2.31-13
ii  libgcc-s1                   10.2.1-6
ii  libqt5core5a                5.15.2+dfsg-9
ii  libqt5dbus5                 5.15.2+dfsg-9
ii  libqt5gui5                  5.15.2+dfsg-9
ii  libqt5network5              5.15.2+dfsg-9
ii  libqt5widgets5              5.15.2+dfsg-9
ii  libstdc++6                  10.2.1-6
ii  libvncclient1               0.9.13+dfsg-2
ii  qemu-system-x86 [qemu-kvm]  1:5.2+dfsg-11

aqemu recommends no packages.

aqemu suggests no packages.


Reply to: