Disable "find" shortcut (CTRL-SHIFT-F) in gnome terminal - terminal

I'm currently running ubuntu 14.04 (with compiz window manager) and have difficulty disabling a shortcut while gnome-terminal is in focus. It's regarding the (annoying and useless) "find" window which pops up after hitting Ctrl+Shift+F.
This keybinding is not mentioned in:
1) ccsm -> general options -> keybindings
2) ccsm -> commands -> keybindings
2) gconf-editor -> /apps/gnome-terminal/keybindings
4) dconf-editor -> /org/gnome/terminal <-- entry does not exist
5) gnome-terminal -> edit -> keyboard shortcuts
6) system settings -> keyboard -> shortcuts -> [all entries]
I have tried without success:
Setting ctrl-shift-F as a shortcut explicitly with different behaviour,
e.g. switch tab, in gnome terminal
Editing /home/USER/.gtkrc, .gtkrc-2.0 and .gtkrc-3.0 to:
binding "CustomNoSearch"
{
unbind "<ctrl><shift>f"
}
class "*" binding "CustomNoSearch"
Editing /home/USER/.config/gtk-2.0/gtk-keys.css and ../git-3.0/gtk-keys.css:
#binding-set custom-no-search
{
unbind "<ctrl><shift>f";
}
GtkEntry {
gtk-key-bindings: custom-no-search;
}
Changing keyboard input method system from IBUS to None (system settings->language support->keyboard input method system) disables everything, including ctrl-shift-F, but this is too much.
At this point I have run out of ideas. Where is this behaviour defined?
Any help is much appreciated!

You can just disable it in the preferences of GNOME Terminal.
Click on the entry under the Shortcut Key column and, when you’re prompted for a new key binding (“New Accelerator...”), press Backspace to disable the shortcut.

I was able to disable this by emptying the contents of
/usr/share/gnome-terminal/find-dialog.ui
While this is kind of a kludge way to do it, it works without causing any other problems.
It is obviously a good idea to back the file up before emptying it, but it probably isn't anything sudo apt-get install gnome-terminal --reinstall couldn't fix..
So, in short :
# cd /usr/share/gnome-terminal/
# cp find-dialog.ui ~
# >find-dialog.ui
And no more find dialog...

Related

iTerm2 click to open selected path

➜ ~ brew remove proxifier
==> Uninstalling Cask proxifier
Error: It seems there is already an App at '/usr/local/Caskroom/proxifier/2.22/Proxifier.app'.
Here's a common log, which contains a path and iTerm2 recognizes it, we can quickly open that path by holding down the Command key and clicking on it.
But what I want to ask is if there is a way to quickly open a selected part of the path. For example, when I use the cursor to select /usr/local/Caskroom/proxifier, is there any built-in way to quickly open it in the Finder in iTerm. For example, open it by clicking on it with Option + Command. I know this can be done with Automator, but before do that I'd like to know if there is a built-in way to fix it.
Hold the command (⌘) key on your keyboard and click on a filename or a path, it tries to open it. This can be enabled or disabled in iTerm2 Preferences

Change default terminal app in Visual Studio Code on Mac

I want to change the default terminal app used by Visual Studio Code for Mac. I am thinking it is part of preferences or settings json, but unsure.
Here's an example of how to make another terminal the default for VSCode, in this example I've downloaded iTerm2 and copied iTerm2 to Applications.
Code (Menu) > Preferences > User Settings
Edit settings.json "terminal.external.osxExec": "iTerm.app" and "terminal.explorerKind": "external"
Open in Terminal
iTerm is now default terminal launched from VSCode
For those that want to change the default integrated terminal NOT just the external, and add custom themes, show which git branch you are on, and whether or not files need to be staged or committed for example.
Follow these short steps:
Make sure you have these installed:
iTerm2, oh-my-zsh
Install a powerline font (I am using Menlo which is a nice looking and very popular font).
Go here and click on download
Open the file
Click on install font
(Note: without this, vscode integrated terminal will not render themes correctly)
Open the .zshrc file by running this command:
cd ~ ; code .zshrc
Change iTerm's theme to agnoster:
Press ⌘f to open search in the .zshrc file
Type ZSH_THEME
Search until you find the live code, NOT the commented out code :)
Edit the code it so it looks like ZSH_THEME="agnoster"
Save the file
Open vscode settings using shortcut:
⌘,
Inside of vscode settings, you will see two panels. On the right panel paste this:
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.shell.osx": "/bin/zsh",
"terminal.integrated.fontFamily": "Menlo for Powerline"
Assuming the settings were empty before, it should now look like this:
{
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.shell.osx": "/bin/zsh",
"terminal.integrated.fontFamily": "Menlo for Powerline"
}
Finished! Enjoy your new pimped out terminal
-(Optional customization)-
If you want your prompt to display something other than your username such as a thunder bolt, like in mine or anything you want
Open agnoster theme by runnning this command:
cd ~/.oh-my-zsh/themes/ ; code agnoster.zsh-theme
Open search by pressing:
⌘f
Paste this in search bar:
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER#%m"
To change your what your prompt displays, edit ONLY this part:
$USER#%m
DO NOT CHANGE this part:
prompt_segment black default "%(!.%{%F{yellow}%}.)
In conclusion, the code should now look something like this:
prompt_segment black default "%(!.%{%F{yellow}%}.) Insert here whatever your heart desires"
(Note: Technically you can change everything about your terminal prompt, but for the sake of keeping this short, and simple we only edited the username part)
None of these answers fully worked for me. Here is what I changed to get it to work:
Select the default shell as zsh:
CMD + SHIFT + P to open up the command palette. Then type Terminal: Select Default Shell. You can then select zsh.
Change the terminal to use iTerm
Change the font family to use Powerlevel10k
Result
I recently changed my terminal in VSCode to ozh, its just 1 step and 1 line.
Open Command Palette using View > Command Palette
( or simply Command + Shift + P )
add the following line to the user settings.
"terminal.integrated.shell.osx": "zsh"
well I know it's so late, but you could just change it by running command
Terminal: Select Default Shell
its so much easier
From visual studio code blog:
// 64-bit cmd it available, otherwise 32-bit
"terminal.integrated.shell.windows":"C:\\Windows\\sysnative\\cmd.exe"
// 64-bit PowerShell if available, otherwise 32-bit
"terminal.integrated.shell.windows":"C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"
// Git Bash
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
// Bash on Ubuntu (on Windows)
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe"
Reference: Integrated Terminal
In vscode settings.json add:
"terminal.integrated.profiles.osx": {
"zsh": null
},
No. But you can vote for this feature here: https://visualstudio.uservoice.com/forums/293070-visual-studio-code

Pass parameters to gvim while launching from a pop-up menu

I am using gvim on Windows. Is it possible to pass my favorite options to gvim while launching it from the "Edit with Vim" entry of the right-clicked pop-up menu?
BR,Ruochen
Following the instructions at Adding Vim to MS-Windows File Explorer Menu, you can add / change the Windows registry to pass arbitrary commands to gvim.exe on startup. Vim takes both --cmd {command} (necessary when setting configuration variables to be considered in your ~/.vimrc) and -c {command} (only evaluated after plugins have been loaded).
You can either directly change the settings (e.g. gvim.exe -c "set list" "%1"), or just set a flag (let g:isPopupLaunch = 1) and check that in your ~/.vimrc.
An alternative solution may be easier, which is adding Vim to the Send To menu. For that you just create a shortcut which passes the desired options, and place it in your shell:sendto folder.

With terminal on Macbook pro why can't I use the "delete button" to remove text on 'nled' command

I'm kind of confuse a little bit, I just got my Macbook Pro today and trying to do the C language programming through terminal and I use to use PC [Windows] and the "delete button" working as a backspace for Windows
now I'm on terminal before get into nled it was working normal but after nled command the delete button isn't effect anymore
is there a way to remove the text in nled ?? I even tried with fn+delete and isnot working still
Terminal has a preference setting to have the Delete key send Control-H instead of the usual delete character (ASCII DEL 0x7F):
Terminal > Preferences > Settings > [profile] > Advanced > Delete sends Ctrl-H
If you're going to be using nled often, you can create a custom settings profile just for running nled. Select an existing profile (e.g., Basic) and choose Duplicate Settings from the action menu (the gear icon at the bottom of the profile list). Customize the "Delete" preference, and then put the nled command in:
Terminal > Preferences > Settings > [profile] > Shell > Run command
Enable the "Run command" checkbox, and possibly also "Run inside shell". Now you can just choose this new profile from the Shell > New Tab/Window submenus and it will create a new terminal and run the nled command with the customized Delete behavior.

Keymap issues with NX from Mac OS X Lion to Ubuntu

I have issues with the keymap of my NX session being garbled.
I have a Macbook Air running OS X Lion. I use OpenNX to start a session with an Ubuntu server running FreeNX. The session type is Gnome.
My keymap is very off (eg. w gives =, delete gives ",", t gives w). I tried:
xmodmap -pke > nxclient.xmodmap
on the client and,
xmodmap nxclient.xmodmap
on the server and I recover many of my keys, but it is still unusable. I tried the Gnome keyboard layouts but none worked. The problem also occurs with an XFCE session.
I would appreciate any tips. x2go worked on client and server using Gnome with no issues. Unfortunately, it does not work on Mac OS X Lion currently.
I found a surprisingly simple solution: disconnect the X2Go session and reconnect. This fixes the Mac keyboard issue for me (which seems to persist beyond OS X Lion).
I wanted to provide a complete practical solution. I was experiencing the same problem on some Fedora FC20 machines. That's the complete how-to that should work copying and pasting.
username is your username to connect remotely using ssh to the machine you need to run x2go on and machine is the hostname of that machine.
NOTE: If you have custom keymappings on the target machine they tend to mess up with x2go. To make this work I needed to reset the keymappings and set a bare English (US). I was using International English (US) with Dead keys and it was not working...
Has been tested on Mac Book Pro Mid 2010, 2011 and 2013. New Retina machines seem to not be affected by this bug.
Create a keymap definition file using xmodmap on your local machine (the client machine), XQuartz might be necessary for having this command available. It's also necessary to use x2go by the way.
xmodmap -pke > osx-keymap
If xmodmap is not found that means it's not in the PATH, if you installed XQuartz the command should be placed in /usr/X11/bin/xmodmap so instead of using just xmodmap prepend to it the full path.
Append some modifiers to the file (as from the ato answer)
echo '! Now reset all the modifiers too
!
clear shift
clear lock
clear control
clear mod1
clear mod2
clear mod3
clear mod4
clear mod5
add shift = Shift_L Shift_R
add lock = Caps_Lock
add control = Control_L Control_R
add mod1 = Alt_L Alt_R
add mod2 = Meta_L Meta_R' >> osx-keymap
Load the file on the machine (username is your username to login on the machines. Change it!)
scp osx-keymap username#machine:~/.Xmodmap
Create a script on the Desktop that can be run just using the mouse if the keyboard does not work
ssh username#machine <<"STR"
echo '#/usr/bin/env bash
xmodmap ~/.Xmodmap;'>~/Desktop/fix_keyboard.sh; chmod +x ~/Desktop/fix_keyboard.sh
STR
Connect with x2go. Basically it should work.
If it still does not work try to:
disconnect and reconnect with x2go
click on the run_keyboard.sh on the desktop with the mouse and select Run.
as before but then disconnect and reconnect with x2go
Unfortunately is not a complete solution. Some computers are reported to not work with it
Append this to the end of your nxclient.xmodmap generated by xmodmap -pke to get a usable layout:
!
! Now reset all the modifiers too
!
clear shift
clear lock
clear control
clear mod1
clear mod2
clear mod3
clear mod4
clear mod5
add shift = Shift_L Shift_R
add lock = Caps_Lock
add control = Control_L Control_R
add mod1 = Alt_L Alt_R
add mod2 = Meta_L Meta_R
This answer was given by #Simon in the comments of the question and works for me (x2go / Xquartz):
On OSX do:
xmodmap -pke > keymap-x2go-osx.xmodmap
echo "xmodmap ~/keymap-x2go-osx.xmodmap" > x2go-xinit
Edit keymap-x2go-osx.xmodmap and add modifier reset from #ato’s answer, then copy it to the VM:
scp keymap-x2go-osx.xmodmap -P your_port your_ip:/home/your_user/
scp x2go-xinit -P your_port your_ip:/home/your_user/.xinit
What has worked for me has been going to the system menu -> keyboard -> Layouts tab -> keyboard model -> apple -> Macintosh old. However, there are issues. I can't seem to use Control+C, Control+V, or the arrow keys. If your arrow keys do work I would be grateful if you told me what your .nxs keyboard options look like.
We had the same problem, though running xfce, which is similiar to gnome2 though. I just found a solution (running Mac OSX 10.9.1):
Download the newest x2go client (4.0.1.3 at time of posting)
Setup your x2go-session to "automatically detect keyboard settings"
Connect and realize that e.g. tabulator is only working when you are additionally pressing the control key.
Solution: Edit the keyboard shortcuts in "~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml" (on the server) and delete the entry which is set up to "Super + Tab"
Enjoy your functional keyboard
Credits go to goofrider.
Try to change your Shell from tcsh to bash. Tcsh cause keyboard problem.
You can simply fix by changing one setting in Xquarts. To fix:
Open Xquarts
Go to preferences
Check follow system keyboard layout.
Done!

Resources