Firefox and telnet in Linux

I have been using the HTML5 profile of the EVE-NG and copy and paste is getting a bit annoying in Guacamole mode. It would be easier I can use a terminal. I am using Xubuntu and unfortunately, by default, the url telnet://<ip-addr>:<port> does not automatically open the built-in terminal and Firefox by default would just bark in error cannot open.

Open a new tab in Firefox and go to about:config as shown in Figure 1. Click on the Acept the Risk and Continue.

Figure 1

Enter the network.protocol-handler.expose.telnet to the field and make sure Boolean is selected then click the “+” button on the far right as shown in Figure 2.

Figure 2

Once added, change the Boolean from true to false as shown in Figure 3. Quit Firefox.

Figure 3

Copy or modify based on your preferred terminal the script below and save it in /bin/ or /usr/bin/.

sudo vim /bin/fftelnet
#!/bin/sh

address=`echo ${*##telnet://} | sed 's/:/ /g'`
 
# Adjust the terminal to your liking.
#xterm --tab -e "telnet $address"
#gnome-terminal --tab -e "telnet $address"
xfce4-terminal --tab -e "telnet $address"

Make the script executable

sudo chmod 755 /bin/fftelnet

Open Firefox again and trigger that telnet request again. In my case, it is from EVE-NG. You should get a prompt similar to Figure 4. Click on Choose button and locate the script from earlier.

Figure 4

Don’t forget to mark the Remember my choice for telnet links then click on Open link. At this point, every telnet link will open xfce4-terminal. Hope you’ll find this helpful.

Cheers!

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
WordPress Appliance - Powered by TurnKey Linux