Unexpected multiple terminal windows when launching Mutt via .desktop after switching to Ptyxis in Debian

Marcelo Laia <[email protected]> Thu, 4 Dec 2025 06:27:33 -0300
Newsgroups gmane.mail.mutt.user
Organization nonononono
Message-ID <aTFUBXCvB-BtLZP5@marcelo>
Hello everyone,

I’m using Debian Testing and recently switched my default terminal emulator to Ptyxis. Since then, launching mutt through its .desktop entry has been opening multiple terminal windows.

The default mutt.desktop file shipped with Debian contains the following:

[Desktop Entry]
Categories=Office;Network;Email;
Comment=Simple text-based Mail User Agent
Comment[de]=Einfaches, Text-basiertes Mailprogramm
Exec=mutt %u
Icon=mutt
Name=mutt
Name[de]=Mutt
MimeType=x-scheme-handler/mailto;
NoDisplay=false
Terminal=true
Type=Application

This used to work normally with other terminal emulators.
However, after switching to Ptyxis, launching mutt from the menu results in two Ptyxis windows:

     one window with mutt running;

     another empty Ptyxis window.

Trying to adjust the .desktop file produces even stranger behavior. For example:

Exec=ptyxis -x "mutt %u"
Terminal=false

opens three windows.

Using:

Exec=ptyxis -- mutt %u
Terminal=false

still results in two windows.

Interestingly, running directly from a shell:

It seems that when launched from a .desktop file, the DE opens a Ptyxis instance (because of the terminal requirement), and then Ptyxis opens an additional window for the executed command.

Has anyone else encountered this interaction between mutt’s .desktop entry and Ptyxis on Debian Testing?
Is there a recommended Exec= style that prevents multiple windows when mutt is launched through desktop entries?

Any guidance or working examples would be greatly appreciated.

Thank you very much.

-- 
Marcelo