qpg

qpg

adventures in life, music & technology

Control I’m Here: GFI TakeControl For Linux

It’s no secret that I prefer to work in Linux. It’s where I am most comfortable. My staple tools are readily available and my habits are instinctual on that system. I use Max RemoteManagement on a regular basis and that platform uses its own version of TeamViewer known as TakeControl. If you are a Linux user and need remote desktop access, you may already know that TeamViewer runs on the Linux desktop. Unfortunately TeamViewer on Linux doesn’t know how to open TakeControl sessions from the Max Dashboard without a little help. Before discovering the modifications needed, I either had to reboot into Windows or connect to a Windows host running TeamViewer and launch TakeControl from there, adding an unnecessary layer of remote control.

I found a blog post that had a method for launching TakeControl from Linux. It was a step in the right direction. The method works by defining a .desktop file to call TeamViewer with the --control flag and a %f variable to pass the tvcontrol.tvc file to TeamViewer. By then associating that file type with the takecontrol.desktop file in your file manager, the TakeControl link will then open in TeamViewer. It requires saving the tvcontrol.tvc file and opening it after it downloads. Since tvcontrol.tvc files are just text files, this method also has the unwanted effect of associating all text files with the newly created takecontrol.desktop launcher.

I really want my text files to open in gvim by default, and I don’t want to have to manually save and open tvcontrol.tvc files every time I need to connect with TakeControl. This shortcoming can be resolved by creating a complementary application/x-tvc MIME type.

Fire up your favorite text editor (vim, right?), and create

~/.local/share/applications/takecontrol.desktop

containing the following:

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Take Control
MimeType=application/x-tvc;
Comment=TeamViewer Remote Control Application
Exec=teamviewer --control %f
Icon=/opt/teamviewer/tv_bin/desktop/teamviewer.png
Type=Application
Categories=Network;

Now add the new MIME type in

~/.local/share/mime/packages/Override.xml

with:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-tvc">
<comment>TakeControl session</comment>
<glob pattern="*.tvc"/>
</mime-type>
</mime-info>

Update the MIME database:

$ update-mime-database ~/.local/share/mime/

Now when you create the file association (as described in Step 4 of Jesse’s article), you won’t break the association for your text files, and you can enjoy the ability to launch remote sessions with TakeControl as the default application directly from Firefox.

For your listening pleasure, here is Dubfire‘s Jamrock Remix of Nitzer Ebb‘s classic, Control (I’m Here).