Ubuntu – How to pass a terminal-title to a terminal opened via desktop shortcut (.desktop)

command linedesktop

Is there a way to set a title to a terminal that is opend via desktop shortcut?

The perfect solution would be if the [Desktop Entry] Name=myTitle could be displayed in the title. Does anyone know if this is possible?

See also (approach here didn't work): desktop shortcut to terminal-app of another user possible?

based on this: Can no longer set terminal title in Ubuntu 16 (gnome-terminal)

Best Answer

Simplest solution I can think of based on my previous answers, would be to spawn terminal with command that sets title + spawns interactive shell of your choice. Specifically, I would make the Exec= part of the .desktop file as so:

Exec=gnome-terminal -e "bash -c 'printf \"\033]0;TEST1\007\";bash'"
Related Question