Ubuntu – XTerm instead of Terminal in .desktop

bashcommand linedesktopxterm

I have this .desktop file set to update my software:

[Desktop Entry]
Version=1.0
Type=Application
Name=Update Software
Comment=Application
Exec=/home/david/Update_Script.sh
Icon=/home/david/Downloads/upgrade.jpg
Categories=Application;
Terminal=true

HOWEVER, It launches Terminal, where I would prefer XTerm. So do not mark this as a duplicate of this. I want file to open XTerm and then close Xterm when done. Here is what the shell file looks like currently:

sudo apt-get upgrade
sudo apt-get update
sudo apt-get install -f
sudo apt-get clean

Would I add something to the .desktop file or to the shell to make it open the Xterm (and close it when done)?

Best Answer

  • .desktop and the Ctrl-Alt-T shortcut all launch x-terminal-emulator , which is a symlink to /etc/alternatives/x-terminal-emulator , which in turn is a symlink to /usr/bin/gnome-terminal.wrapper. In short, gnome-terminal aka Terminal is the default terminal emulator on Ubuntu.

    If you want to use xterm for just one .desktop file , follow muru's suggestion in the comments and use use

    Exec=xterm -e /path/to/script.sh
    

    If you want to globally change the terminal that the system launches by default, run

    sudo update-alternatives --config x-terminal-emulator
    
  • Related Question