Score:2

Unable to execute command in `Alt' + `F2'

ng flag

I want to set a shortcut for my tor browser. My tor folder is in my $HOME directory. In order to execute it, I should run: start-tor-browser when I'm in ~/tor-browser-linux64-8.5.3_en-US/tor-browser_en-US/Browser.

I added the directory to my ~/.bashrc and ran source ~/.bashrc. Now,I can run start-tor-browser from everywhere in my terminal, but it doesn't work in my Alt+F2 box. Besides when I set a shortcut, using the start-tor-browser command, it doesn't work. I'd like to know:

  • Why does it work in terminal and not in Alt+F2?

  • How can I solve this problem and set a shortcut?

Score:1
my flag

Alt + F2 does not use the bash shell ($), it uses the GNOME shell or the shell used by the desktop environment (for example:- GNOME and XFCE). You can only run the desktop's shell commands in it (for eg:- running r in the GNOME shell will restart the shell, whereas running r in a terminal window will not do anything).

Alias added to ~/.bashrc will only work in $ bash shell terminals. GNOME shell or any desktop's shell does not support bash commands.

You cannot run shell commands or aliases in the GNOME shell ( Alt + F2 ) or another shell other than bash. If the application is installed then running its package name will launch the application. (For example:- Running firefox will launch the Firefox application).

You can define your commands in ~/.profile instead. GNOME and XFCE definitely reads and understand the commands defined in ~/.profile.

See Ubuntu Wiki.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.