How to change the default terminal for executing .desktop files?


Wangchi

I've been trying to execute vim with alacritty as default. I have alacritty set as my default terminal emulator already and my vim.desktop I exec=vim %Fuse instead exec=alacritty -e vim %F. The problem is that when I open the file, it first executes the command in the gnome terminal and then starts vim the right way, the problem is that the gnome terminal stays open. I have also tried creating the script:

#!/bin/bash
alacritty -e vim & disown | exit

This doesn't work at all. I don't know what to do and can't find anything online. Thanks in advance!

Is it possible to change the default terminal for running Exec=commands ? This way, it works just fine just by writingExec=vim %F

Wangchi

Teacher helped me figure out what was going on, thanks! The problem is my .desktop file:

[Desktop Entry]
Name=Vim
GenericName=Text Editor
Comment=Edit text files
Comment[es]=Edita archivos de texto
TryExec=vim
Exec=alacritty -e vim %F
Terminal=true
Type=Application
Keywords=Text;editor;
Icon=gvim
Categories=Utility;TextEditor;
StartupNotify=false
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;

There are arguments Terminal=true. This is because it executes the command Exec=in the terminal and then opens the terminal to execute the command. If Terminal=falsethis option is set, it will prevent any terminal from being opened, and only execute the command without opening the terminal.

Related


How to Change the Default Terminal Icon

dark I know this seems like a duplicate, but I can't find anything specifically related to terminal icons. What I've tried so far: Modify /usr/share/applications/gnome-terminal.desktop icon has no change I copied this file to ~/.local/share/applications so cre

How to change terminal style to default?

PppppppPpppppp I have a problem changing the terminal style in my mac. I want to change it back to the default but I don't know how. I'm going to remove the heart (as you can see from the screenshot). Thanks! (This style is from Flatiron School's free online q

How to change the default terminal directory?

Marcio Carroso When I press CtrlAltt, the terminal opens in the $HOME directory. I want to open it /tmp. therefore: CtrlAltt Terminal is open at/tmp Is it possible? How can I configure it? Sylvester By adding cd /tmpto your .bashrcbash will go /tmpdirectly aft

How to change terminal style to default?

PppppppPpppppp I have a problem changing the terminal style in my mac. I want to change it back to the default but I don't know how. I'm going to remove the heart (as you can see from the screenshot). Thanks! (This style is from Flatiron School's free online q

Change the default path to run Python files in the terminal

Walid How can I change the default path of Run Python File in Terminal to the drive where my code is located in VSCode v1.60.1 ? Currently it always starts at c:\users\my_username and all my code is on drive d: Ishan Bass The path to the terminal depends on wh

How to change desktop wallpaper from terminal?

username I want to change xmonad's wallpaper from the command line. How can I do this? Matthew Locke You can use feh : feh --bg-scale /path/to/wallpaper You can also set up a bash script to change the wallpaper to a random wallpaper every X minutes (which I u

How to change desktop wallpaper from terminal?

username I want to change xmonad's wallpaper from the command line. How can I do this? Matthew Locke You can use feh : feh --bg-scale /path/to/wallpaper You can also set up a bash script to change the wallpaper to a random wallpaper every X minutes (which I u

How to change desktop wallpaper from terminal?

username I want to change xmonad's wallpaper from the command line. How can I do this? Matthew Locke You can use feh : feh --bg-scale /path/to/wallpaper You can also set up a bash script to change the wallpaper to a random wallpaper every X minutes (which I u

How to change the default desktop manager in debian?

mugil I'm using Debian 6 with two desktop managers (Gnome and KDE). During installation, I chose KDE as the default desktop. However, now I want to change the default desktop to Gnome. How can I change it? mugil I found the solution by editing the files defaul

How to change the default file manager of the Cinnamon desktop?

febLey I'm running an Arch Linux machine with the cinnamon-git desktop in the Arch user repository. The default file manager is Nautilus, is there any way to change the default file manager to thunar? Thomas To change the default file manager you can edit the

How to change the default port for Remote Desktop (VNC)?

Bryan Denny Suppose I've been to: System > Preferences > Remote Desktop and enable Remote Desktop. Now, let's say I have a computer on the network that is also running a VNC server. I want to VNC into my network from the outside, but I need each VNC server t

How to change the default desktop manager in debian?

mugil I'm using Debian 6 with two desktop managers (Gnome and KDE). During installation, I chose KDE as the default desktop. However, now I want to change the default desktop to Gnome. How can I change it? mugil I found the solution by editing the files defaul

How to change the default desktop manager in debian?

mugil I'm using Debian 6 with two desktop managers (Gnome and KDE). During installation, I chose KDE as the default desktop. However, now I want to change the default desktop to Gnome. How can I change it? mugil I found the solution by editing the files defaul

How to change the default port for Remote Desktop (VNC)?

Bryan Denny Suppose I've been to: System > Preferences > Remote Desktop and enable Remote Desktop. Now, let's say I have a computer on the network that is also running a VNC server. I want to VNC into my network from the outside, but I need each VNC server t

How to change the default file manager of the Cinnamon desktop?

febLey I'm running an Arch Linux machine with the cinnamon-git desktop in the Arch user repository. The default file manager is Nautilus, is there any way to change the default file manager to thunar? Thomas To change the default file manager you can edit the

Script variables for executing the default terminal

hm11 How to open default terminal emulator in bash script ? For example, I would like my wine game to launch in whatever terminal emulator is set as default, thus giving me a debugging interface. My script is as follows: cd "/path/to/wine game's dir/ WINEPREFI

How to change Lubuntu's default terminal?

aliens from afar I am trying to change the terminal by using the GUI: Preferences -> LXQT Settings -> Session Settings -> Default Applications -> Terminal Emulation or use terminal with the following code: sudo update-alternatives --config x-terminal-emulator

How to Change Default Terminal to rxvt in Ubuntu

Guillermo How to set rxvt as default terminal in Ubuntu? judge Install rxvt on your system and run it sudo update-alternatives --config x-terminal-emulator. Then select rxvt, and you're done.

How to change the default terminal emulator on Windows (cmd)?

Alexander Urme Is it possible to change the default terminal emulator on Windows (especially 7 and 8) from Console to Console2 or ConEmu? Essentially, I want all command line tools (whether run by double-click, launched from "Run" or via another process) to us

how to change default terminal in ubuntu budgie

hac_ticc Ubuntu Budgie comes with tilix by default, which may not be suitable for many people. When I tried to replace it with xfce4-terminal, I found that almost most answers included one of the two steps I mentioned below, editing dconf or updating the alter

How to change the default terminal emulator on Windows (cmd)?

Alexander Urme Is it possible to change the default terminal emulator on Windows (especially 7 and 8) from Console to Console2 or ConEmu? Essentially, I want all command line tools (whether run by double-click, launched from "Run" or via another process) to us

How to Change Default Terminal to rxvt in Ubuntu

Guillermo How to set rxvt as default terminal in Ubuntu? judge Install rxvt on your system and run it sudo update-alternatives --config x-terminal-emulator. Then select rxvt, and you're done.

How to change the default font for terminal and gedit?

new user I also want to change the font stylein terminaland default values gedit. So how to change it font type in Ubuntu 12.04? Any help and advice will be appreciated. abybaddi009 Install gnome-tweak-tool : sudo apt-get install gnome-tweak-tool In Fonts, yo

VSCode change default terminal

Abhijeetps: I am using Visual Studio Code on a Windows 10 PC. I want to change the default terminal from Windows PowerShell to Bash on Ubuntu (on Windows). How can I do this? Levi Fuller: You can also select the default terminal by pressing F1VS Code and typin

VSCode change default terminal

Abhijeetps: I am using Visual Studio Code on a Windows 10 PC. I want to change the default terminal from Windows PowerShell to Bash on Ubuntu (on Windows). How can I do this? Levi Fuller: You can also select the default terminal by pressing F1VS Code and typin

Change the default size of the terminal

Aland Running uBuntu 14.04 LTS. When I run terminal it always starts in 80x24 mode. If you move the mouse over the title bar, a series of menu options appear. In the Terminal options, I can change to any of the following: * 80x24 * 80x43 * 132x24 * 132x43 How

VSCode change default terminal

Abhijeetps: I am using Visual Studio Code on a Windows 10 PC. I want to change the default terminal from Windows PowerShell to Bash on Ubuntu (on Windows). How can I do this? Levi Fuller: You can also select the default terminal by pressing F1VS Code and typin