Random Linux

Linux, video games and web hosting

It’s safe to say that I spend a lot of time on the command line, and really prefer to do as much as possible from there.  So, it only makes since to be able to control my DVR from the command line too.  So, I created dtv.py, the DirecTV command line remote.  As of now, you can operate almost all of the buttons that would be on the remote, as well as get information about different channels and see a scrolling list of what is on all of the channels



[wpdm_package id=’61561′]


You will need to edit the following line in the script to add the IP address of the DirecTV box to the script.


####### Put the IP of your DVR here! #######

boxip = ‘’

You can also set your favorite channels for the -f flag in the favorites section of the script.

## Put your favorite channels here, seperated by spaces ##

favs = ‘2 13 20 26 39 249’


Here are the different commands that you can run as of now.


usage: dtv.py [-h] [-v] [-i channel] [-c] [-t channel] [-a start,end]
[-b BUTTON] [-f] [--devlist]
optional arguments:

-h, –help show this help message and exit
-v, –version show program’s version number and exit
-i channel, –info channel
Shows info for a channel.
-c, –current Shows info for currently tuned channel
-t channel, –tune channel
Tune to a channel
-a start,end, –all start,end
Show a scrolling list what what’s on a range of
channels. Must specify a comma separated start and end
-b BUTTON, –button BUTTON
Press a button as you would on a physical remote. Can
use a comma to separate button presses
-f, –favs Show what is on your favorite channels
–devlist Show list of options available from the DVR. Only good
for development


There is more to come and feature requests are very welcome!

February 23rd, 2013

Posted In: How To

Tags: , , , , , ,

Leave a Comment

So you have downloaded a .deb file with a program that you would like to install. Most distros that are using a graphical interface will have a package manager that you can use to install these. But if you’re like me, you prefer to do it from the command line. To install it from there, you will need to use the dpkg command, using the -i flag, which does the install. In this example, I have dowloaded Google chrome for Linux from their website and am installing it on Ubuntu.

[email protected]:/home/user/Downloads# dpkg -i google-chrome-stable_current_i386.deb 

Selecting previously unselected package google-chrome-stable.
(Reading database ... 296976 files and directories currently installed.)
Unpacking google-chrome-stable (from google-chrome-stable_current_i386.deb) ...
Setting up google-chrome-stable (21.0.1180.79-r151411) ...
update-alternatives: using /usr/bin/google-chrome to provide /usr/bin/x-www-browser (x-www-browser) in auto mode.
update-alternatives: using /usr/bin/google-chrome to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode.
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for gnome-menus ...
Processing triggers for menu ...

If that finishes with no errors, then the package should be installed. In this case, I can now open Google Chrome though the Window manager’s menu or through the terminal.

August 17th, 2012

Posted In: How To

Tags: , , , , , ,

One Comment