Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:32 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : mmedit on Debian 12 problems.

Author Message
Dinosaur

Guru

Joined: 12/08/2011
Location: Australia
Posts: 311
Posted: 01:16am 17 Nov 2023
Copy link to clipboard 
Print this post

Hi All

One final issue before I can settle down and code my project.
Running Linux debian 12 (Bookworm)
For some obscure reason Debian decided we should'nt have desktop icons  anymore.
In other words only a pretty picture on the screen and you have to move either to active corners
and/or find the next screen to click on your application.

To use it:
You have to create a .desktop file in
/usr/share/applications/mmedit.desktop as per below
[Desktop Entry]
Name=mmedit
Type=Application
Terminal=true
Exec=/home/dinosaur/Documents/RpiPico/MMedit5/mmedit
Icon=/home/dinosaur/Documents/RpiPico/MMedit5/mmedit.ico
Path=/home/dinosaur/Documents/RpiPico/MMedit5
Comment=
StartupNotify=true

I have copied the mmedit and mmcc executables to /usr/local/bin
and made sure the permissions are set correctly.
Normally this results in the icon appearing on one of the pages, but it doesn't.

If I execute from the cli (which uses the /usr/local/bin/mmedit) I get errors like
dinosaur@Desktop:~$ sudo mmedit
[sudo] password for dinosaur:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::end: Painter not active, aborted
Segmentation fault
dinosaur@Desktop:~$
However if I change directories to where mmedit was extracted to, it runs but still has errors.
dinosaur@Desktop:~/Documents/RpiPico/MMedit5$ ./mmedit
QSocketNotifier: Can only be used with threads started with QThread
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::end: Painter not active, aborted
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()


So, I can't simply click on an icon and open mmedit or mmcc.
I open the file manager, browse to the correct directory, open a cli in that directory
then type in ./mmedit.

Bloody long winded.
Has anyone got this working correctly on Debian 12 ?
Would love to hear how.
Regards
Hervey Bay Qld.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6099
Posted: 03:08am 17 Nov 2023
Copy link to clipboard 
Print this post

Start by keeping the directory structure that is in the download. The exe has to be in the main folder with the data subfolder intact.

I am not sure why you copied the exes to /usr/local/bin

Think like a portable installation. I wouldn't leave it in the documents folder but it is up to you.

For the desktop icon start with the files supplied in the installation folder.
They look something like this
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name[en_AU]=MMEdit
Exec=/home/jim/MMedit5/MMEdit
Icon=/home/jim/MMedit5/mme.ico
Name=MMEdit


The rest is up to you.

Jim
VK7JH
MMedit   MMBasic Help
 
Dinosaur

Guru

Joined: 12/08/2011
Location: Australia
Posts: 311
Posted: 04:05am 17 Nov 2023
Copy link to clipboard 
Print this post

Hi All

Thanks Jim, will give the different directory structure a go.
Normally Debian uses /usr/loc/bin as the first place to look for an application.

If I don't succeed with that, then I will write a script that calls the console and then runs mmedit.

EDIT: That worked, also keeping the Ucase/LCase correct in the names helps.
Although originally I just changed the executables to all lower case.
Once again thank you.
Edited 2023-11-17 14:15 by Dinosaur
Regards
Hervey Bay Qld.
 
Andy-g0poy
Regular Member

Joined: 07/03/2023
Location: United Kingdom
Posts: 58
Posted: 04:58am 17 Nov 2023
Copy link to clipboard 
Print this post

Desktop Icons...

What desktop are you using?

On KDE you just use the Appliocation menu. Add the app wherever you want it in the tree, point ther application source at MMedit, point the icon to the MMedit icon That's it all done.

If you want to, you can drag the newly created icon to the application launcher favs sidebar, the working bar at the bottom of the screen, or onto the desktop

My very common apps are on the bottom bar, and I leave the less common on the launcher. However there are 100's of ways to set this up, it's down to your choice.

Andy
 
Dinosaur

Guru

Joined: 12/08/2011
Location: Australia
Posts: 311
Posted: 06:03am 17 Nov 2023
Copy link to clipboard 
Print this post

Hi All

I am using Gnome desktop and the method you mentioned does not appear to be available in that.

I do keep my common apps on the bottom bar as well.
But as you said, there are hundreds of ways to set this up and for some reason Debian
has gone to the preferred method of housing the local installed executables in /usr/local/bin.

I guess the advantage is that typing the name in a cli anywhere will find it first up.

So, I managed to stick to the Debian method of .desktop file but pointing to /home/dinosaur/mmedit5 for the executable.

Thanks for all the help and suggestions to all.
Regards
Hervey Bay Qld.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024