Here we want to collect guides concerning TV-Viewer that may be of interest for other users.
Replacing included Tcl/Tk packages with ActiveTcl
With TV-Viewer >= 0.8.2b1 this method is outdated, please have a look at Using a precompiled Tclkit
If your distribution does not come with Tcl/Tk, the packages are outdated or there is a bug which the distributor does not fix, you can alternatively use ActiveTcl. They provide precompiled packages for 32bit and 64bit systems on their download page. So first step is to download the appropriate package and extract the files.
Now open a terminal and change directory to the one that was created.
Installation can be done by one command
% ./install.sh (you may need root privileges)
The graphical installer opens and leads you through the rest of the installation process. For this guide we assume you do not change the predefined directories (recommended). After some clicking on the "Next" button, Tcl/Tk should be installed and we can make for the final steps.
If you already installed Tcl/Tk via the package management there will be two symlinks on your system (/usr/bin/wish and /usr/bin/tclsh) that we need to change or have to create if ActiveTcl is your only installation of Tcl/Tk.
To change or create the symlinks use the ln command.
% ln -s -f /opt/ActiveTcl-8.5/bin/wish8.5 /usr/bin/wish (you may need root privileges) % ln -s -f /opt/ActiveTcl-8.5/bin/tclsh8.5 /usr/bin/tclsh (you may need root privileges)
If you are using K/X/Ubuntu you need to use a different command.
$ sudo update-alternatives --install /usr/bin/tclsh tclsh /opt/ActiveTcl-8.5/bin/tclsh8.5 100 $ sudo update-alternatives --set tclsh /opt/ActiveTcl-8.5/bin/tclsh8.5 $ sudo update-alternatives --install /usr/bin/wish wish /opt/ActiveTcl-8.5/bin/wish8.5 100 $ sudo update-alternatives --set wish /opt/ActiveTcl-8.5/bin/wish8.5
This is it, now your system uses ActiveTcl. From time to time you might want to update this installation.
% /opt/ActiveTcl-8.5/bin/teacup update-self (you may need root privileges) % /opt/ActiveTcl-8.5/bin/teacup update --only newer (you may need root privileges)
Using a precompiled Tclkit to run TV-Viewer
TV-Viewer >= 0.8.2b1 allows you to use a precompiled Tclkit. This allows you to run TV-Viewer without having to install Tcl/Tk and it guarantees a tested release of Tcl/tk, that will definitively work with TV-Viewer. This method replaces the installation of ActiveTcl
A Tclkit is is a compact, single file executable containing a complete scripting runtime, including Tcl, the GUI toolkit Tk, a powerful object system (IncrTcl), the Tcl Virtual File System (TclVFS), and an embedded high-performance database (Metakit). All our Tclkits are created with kitcreator.
You can download the Tclkit suitable for your copy of TV-Viewer here. Place the binary file in extensions/tclkit/ and configure TV-Viewer with the switch --enable-tclkit=yes
$ ./configure.tcl --enable-tclkit=yes % ./install.tcl
It is even possible to use the Tclkit to configure and install TV-Viewer.
$ extensions/tclkit/tclkit-8.5.9 ./configure.tcl --enable-tclkit=yes % extensions/tclkit/tclkit-8.5.9 ./install.tcl
Distribution specific guides
K/X/Ubuntu and other debian based systems
Dependencies can be installed using the following command:
$ sudo aptitude install tcl8.5 tk8.5 ivtv-utils libtk-img xdg-utils
Using TV-Browser to schedule recordings
TV-Browser is a digital TV guide. It gets the daily TV program from the internet and shows it clearly aranged - like a printed TV guide. The application comes with a set of different plugins. To schedule recordings we need the plugin Recording control. So first thing to do is to make sure the plugin is activated.
Once this is done we need to configure the plugin and open the tab "Devices". Now click on the button Import Device and select the TV-Viewer device file.
Now you should have a new device called TV-Viewer in the list. Now only one more thing is needed. Select the device TV-Viewer and click on the button Configure Device and open the tab Channels. You will see a list of all TV stations that you enabled in TV-Browser in the left column. The right column (external name) should be empty. Now you have to give every station an external name so TV-Viewer can make use of them. The name corresponds to the station number in TV-Viewer. So for example if station CNN is number 10 in TV-Viewer you would give this number as external name in TV-Browser and so on.
Be sure to apply your changes
After that you will be able to schedule recordings via the context menu of TV-Browser using the record button. These recordings may also be managed with the record wizard of TV-Viewer.
xbmc media center
Entry in the main menu:
<item id="2"> <label>Show TV</label> <onclick>XBMC.RunScript(/home/video-x/.xbmc/scripts/tvlaunch.py)</onclick> <visible>!Skin.HasSetting(nogames)</visible> </item>
Python script for starting:
# /usr/bin/python import subprocess import sys import os import xbmc import xbmcgui import xbmcplugin MyPlayer = xbmc.Player() pDialog = xbmcgui.DialogProgress() ret = pDialog.create("Show TV","") play = MyPlayer.isPlaying() if play: MyPlayer.stop() #subprocess.Popen(["/usr/bin/tv-viewer"], shell=False) subprocess.call(["/usr/bin/tv-viewer"], shell=False) pDialog.close()
Here you can find a how to guide with a script for powersaving: Suspend-howto