home |  electronics |  toolbox |  science club |  tuxtalk |  photos |  e-cards |  online-shop

Disable URL recognition in xfce terminal

disable url recognition in xfce terminal
disable url recognition in xfce terminal

Xfce is a great desktop environment and I love it but the xfce4-terminal has a big problem: It can recognize URLs and it opens them in the browser when you click the middle mouse button. However the middle mouse button is normally used to paste text.

It might sound like a cool feature but it is a disaster when you use an editor, such as vim, that runs in the terminal. Envision this: you are editing a file and vim's own insertion cursor is near the bottom of the page. Text scrolls up as you type and you happen to edit a text page with URLs in it. Your mouse pointer keeps the focus on the terminal window but is somewhere in the upper parts of the window. Now you want to past some text with the middle mouse button (Linux uses left mouse highlighting to copy and a middle mouse button click to paste). You did not even notice a URL scrolling under the mouse cursor while you were typing more text. You are focused on your text and the vim insertion cursor near the bottom of the window. Now you press middle mouse to past and you expect to paste it text. What happens instead is a: Disaster! Your browser will pop-up, block your view of the terminal and open a page.

You would think that such a feature could easily be disabled somewhere in the preference menu of xfce terminal. No, no such option. It took a lot of detective work to figure it out. Fortunately there is a config parameter but you have to know where to change it. Here is how to do it:
edit the file ~/.config/xfce4/terminal/terminalrc :
vim  ~/.config/xfce4/terminal/terminalrc
change MiscHighlightUrls to false: MiscHighlightUrls=FALSE

diff -u ~/.config/xfce4/terminal/terminalrc.org ~/.config/xfce4/terminal/terminalrc
--- /home/guido/.config/xfce4/terminal/terminalrc.org	2018-04-08 13:02:50.706725559 -0400
+++ /home/guido/.config/xfce4/terminal/terminalrc	2018-09-22 11:25:34.384858600 -0400
@@ -17,7 +17,7 @@

Enjoy using vim in the xfce4-terminal without the idiotic URL recognition feature!

Back to: "No preservatives added"

Copyright © 2004-2018 Guido Socher