Hi All,
Thanks for your help and support with this. The MATE community found the problem which is actually with the 4kvideodownloader.sh file and have provided a workaround which is:
sudo sed -i ‘s/^ //’ /usr/lib/4kvideodownloader/4kvideodownloader.sh
in case anyone else has this problem. I’ve informed the 4kvideo support team.
Their full response is below FYI:
- Analysis
I can confirm that it does not start from Advanced MATE Menu, but starts normally from Brisk Menu, Main Menu and Menu Bar applets and from Panel and Desktop launchers.
We can locate and investigate its desktop-file:
$ which 4kvideodownloader
/usr/bin/4kvideodownloader
$ file /usr/bin/4kvideodownloader
/usr/bin/4kvideodownloader: symbolic link to /usr/lib/4kvideodownloader/4kvideodownloader.sh
$ ls -al /usr/bin/4kvideodownloader
lrwxrwxrwx 1 root root 47 июл 18 20:39 /usr/bin/4kvideodownloader → /usr/lib/4kvideodownloader/4kvideodownloader.sh
$ dpkg -L 4kvideodownloader | grep desktop$
/usr/share/applications/4kvideodownloader.desktop
$ cat /usr/share/applications/4kvideodownloader.desktop
[Desktop Entry]
Name=4K Video Downloader
GenericName=4K Video Downloader
Comment=Download online video
Exec=4kvideodownloader
Terminal=false
Type=Application
Icon=4kvideodownloader.png
Categories=Network;Qt;
What is strange - they have leading space in the executable file:
$ cat /usr/lib/4kvideodownloader/4kvideodownloader.sh
#!/bin/sh
LD_LIBRARY_PATH=/usr/lib/4kvideodownloader
export LD_LIBRARY_PATH
/usr/lib/4kvideodownloader/4kvideodownloader-bin $*
Its icon is always shown, it is shown in correct place. But Exec line is fails only for advanced menu.
From /var/log/syslog we can see the error message produced after clicking on menu:
tail -f /var/log/syslog
Jul 18 21:00:30 bionic org.mate.panel.applet.MateMenuAppletFactory[1305]: message repeated 20 times: [ TypeError: Couldn’t find foreign struct converter for ‘cairo.Context’]
Jul 18 21:00:35 bionic org.mate.panel.applet.MateMenuAppletFactory[1305]: 4kvideodownloader
Jul 18 21:00:35 bionic org.mate.panel.applet.MateMenuAppletFactory[1305]: [Errno 8] Exec format error
Jul 18 21:00:35 bionic org.mate.panel.applet.MateMenuAppletFactory[1305]: TypeError: Couldn’t find foreign struct converter for ‘cairo.Context’
I can remove error messages about cairo.Context by installing related python-packages:
sudo apt-get install python-cairo python-gi-cairo
But it does not help.
2. Solution
The real problem is leading spaces in shell file.
If we remove spaces, then program will start normally:
sudo sed -i ‘s/^ //’ /usr/lib/4kvideodownloader/4kvideodownloader.sh
You should contact the 4kdownload’s software developers directly to inform them about their error.
Regards,
Tony