GNOME Shell Fix the Open in Terminal Option: Difference between revisions

From WikiMLT
mNo edit summary
mNo edit summary
Line 3: Line 3:
I'm writing this guide in the time [[Kali Linux Desktop PC Initial Setup|setting up Kali Linux as my primary desktop operating system]], but this happens to me also with other distributions which have multiple desktop environments.  
I'm writing this guide in the time [[Kali Linux Desktop PC Initial Setup|setting up Kali Linux as my primary desktop operating system]], but this happens to me also with other distributions which have multiple desktop environments.  


The issue is that:  
The issue is that: When I want to open a terminal window from the context menu of the desktop within GNOME nothing happening.


{{Media
== Debug the Issue ==
Open a terminal window run the following command inside and keep it open, then use the option Open in Terminal - {{Media-cite|f|1}}.<syntaxhighlight lang="shell" line="1">
sudo journalctl /usr/bin/gnome-shell -f -o cat
</syntaxhighlight><syntaxhighlight lang="shell-session">
DING: x-terminal-emulator: unrecognized option '--working-directory=/home/<user>/Desktop'
DING: QTerminal 0.16.1
DING: Usage: qterminal [OPTION]...
DING:  -d,  --drop              Start in "dropdown mode" (like Yakuake or Tilda)
DING:  -e,  --execute <command>  Execute command instead of shell
DING:  -h,  --help              Print this help
DING:  -p,  --profile            Load qterminal with specific options
DING:  -v,  --version            Prints application version and exits
DING:  -w,  --workdir <dir>      Start session with specified work directory
 
</syntaxhighlight>{{Media
| n = 1
| n = 1
| img = Gnome debug Open in Terminal does not work.png
| img = Gnome debug Open in Terminal does not work.png
Line 11: Line 25:
| pos = center
| pos = center
| label = f
| label = f
}}
}}The output of the command shown above lead me to the assumption the default Gnome's extension [https://gitlab.com/rastersoft/desktop-icons-ng Desktop Icons NG], which generates the context menu, doesn't handle my default terminal application correctly and in the same time this application isn't GNOME Terminal.
 
== The Solution ==
The solution that I've applied in this certain case was to switch my default terminal emulator application to GNOME Terminal.<syntaxhighlight lang="shell" line="1">
sudo update-alternatives --config x-terminal-emulator
</syntaxhighlight><syntaxhighlight lang="shell-session">
There are 2 choices for the alternative x-terminal-emulator (providing /usr/bin/x-terminal-emulator).


== References ==
  Selection    Path                            Priority  Status
------------------------------------------------------------
* 0            /usr/bin/qterminal                40        auto mode
  1            /usr/bin/gnome-terminal.wrapper  40        manual mode
  2            /usr/bin/qterminal                40        manual mode


* ...
Press <enter> to keep the current choice[*], or type selection number: 1 [Press Enter]
</syntaxhighlight>


* ...
== References ==


== Section 1 ==
* It's FOSS: [https://itsfoss.com/change-default-terminal-ubuntu/ How to Change the Default Terminal in Ubuntu]
...
* Stack Overflow: [https://stackoverflow.com/questions/16808231/how-do-i-set-default-terminal-to-terminator How do I set default terminal to Terminator?]
* Desktop Icons NG Issue at GitLab: [https://gitlab.com/rastersoft/desktop-icons-ng/-/issues/218 Desktop icons randomly break and can't open folders located on the desktop].


<noinclude>
<noinclude><div id='devStage'>
<div id='devStage'>
{{devStage  
{{devStage  
  | Прндл  = Linux Desktop
  | Прндл  = Linux Desktop

Revision as of 21:17, 19 August 2022

I'm writ­ing this guide in the time set­ting up Kali Lin­ux as my pri­ma­ry desk­top op­er­at­ing sys­tem, but this hap­pens to me al­so with oth­er dis­tri­b­u­tions which have mul­ti­ple desk­top en­vi­ron­ments.

The is­sue is that: When I want to open a ter­mi­nal win­dow from the con­text menu of the desk­top with­in GNOME noth­ing hap­pen­ing.

De­bug the Is­sue

Open a ter­mi­nal win­dow run the fol­low­ing com­mand in­side and keep it open, then use the op­tion Open in Ter­mi­nal – Fig­ure 1.

sudo journalctl /usr/bin/gnome-shell -f -o cat
DING: x-terminal-emulator: unrecognized option '--working-directory=/home/<user>/Desktop'
DING: QTerminal 0.16.1
DING: Usage: qterminal [OPTION]...
DING:   -d,  --drop               Start in "dropdown mode" (like Yakuake or Tilda)
DING:   -e,  --execute <command>  Execute command instead of shell
DING:   -h,  --help               Print this help
DING:   -p,  --profile            Load qterminal with specific options
DING:   -v,  --version            Prints application version and exits
DING:   -w,  --workdir <dir>      Start session with specified work directory
Figure 1. GNOME Shell de­bug why Open in Ter­mi­nal does not work at the desk­top.

The out­put of the com­mand shown above lead me to the as­sump­tion the de­fault Gnome's ex­ten­sion Desk­top Icons NG, which gen­er­ates the con­text menu, doesn't han­dle my de­fault ter­mi­nal ap­pli­ca­tion cor­rect­ly and in the same time this ap­pli­ca­tion isn't GNOME Ter­mi­nal.

The So­lu­tion

The so­lu­tion that I've ap­plied in this cer­tain case was to switch my de­fault ter­mi­nal em­u­la­tor ap­pli­ca­tion to GNOME Ter­mi­nal.

sudo update-alternatives --config x-terminal-emulator
There are 2 choices for the alternative x-terminal-emulator (providing /usr/bin/x-terminal-emulator).

  Selection    Path                             Priority   Status
------------------------------------------------------------
* 0            /usr/bin/qterminal                40        auto mode
  1            /usr/bin/gnome-terminal.wrapper   40        manual mode
  2            /usr/bin/qterminal                40        manual mode

Press <enter> to keep the current choice[*], or type selection number: 1 [Press Enter]

Ref­er­ences