I have been working on a dark theme, See some pics. dark theme
I also have some more changes in the works, like a fully integrated button mapper, more Firefox customizations, and some options on install.
This is a set of scripts and custom LIRC file to decently integrated Netflix with Mythfrontend on a Mythtv system.
The scripts will only work right if there is no other instances of Firefox running at the same time.
All of these steps must be performed as the same user that runs Mythfrontend
These are instruction for a Mythbuntu 12.04 install. I did get it to also work just fine on an Xubuntu 14.04 install.
if you are using a dual monitor setup you may want to read write-mouse-position and set the x= and y= to just one of your monitors
Version 07 is extremely different than earlier versions.
If you want to upgrade:
- note any change you may have made to your .lirrc file
- delete your mythnetflix folder
- rm -rf ~/mythnetflix
- install unclutter
- sudo apt-get unstall unclutter
- follow the easy install instructions
- re-edit mythnetflix.lircrc
first thing, access the desktop by exiting out of Mythfrontend completely
Install Extra Software
- lirc-x -- provides irxevent
- xautomation -- provides xte
sudo apt-get install lirc-x xdotool xautomation unclutter
- The first thing you need to do is install the Pipelight plugin and enable Sliverlight -- scroll down a little bit for the enable instructions
- Close firefox if you are running it
- Start Firefox and wait for the Pipelight/Silverlight plugin to install
- Go to the test page to make sure Pipelight/Silverlight plugin is working
- Close Firefox
Mythnetflix Easy Install
open a terminal
- download the installer
- make the installer executable
- run the installer
- run mythnetflix -- make sure that there are no running Firefox windows
- login to netflix.
- make sure remote works right, if the buttons on the player window aren't working right see button-mapper
- exit mythnetflix with either the remote or hitting Ctrl-q
chmod +x mythnetflix-install07.sh
To add a menu button for your theme you need to go to ~/.mythtv/themes/'the theme your using'/
note: I have been using the MythMediaStream theme
Open mainmenu.xml and add the following lines somewhere that you think fits (I put it below the videos section)
<description>Watch videos on</description>
Now when you restart your Mythfrontend the Netflix option should show up
the included LIRC file is a whole bunch of mouse position and click commands. you may need to edit it. I set it up to work with the remote I have but it should give you a good starting point to make it work. I will post some more advanced LIRC and xdtool stuff when I get a chance.
Navigating with the remote
When in the Netflix choose video screen
- UP, DOWN, LEFT, RIGHT -- large button move, hold down enabled
- 2, 8, 4, 6 -- small button move, hold down enabled
- OK -- mouse click I use it to select profile and start videos
- Channel UP, DOWN -- scroll the page up or down
- (left arrow) -- exit Netflix, returns you to mythfrontend
- 1 -- zooms-in
- 7 -- zooms-out
When watching a video:
the UP, DOWN, LEFT, RIGHT, 2, 8, 4, 6, OK buttons do all the same thing and are to be used if needed.
Volume keys -- I added a control, but I don't use system volume controls YMMV
- PLAY, PAUSE -- both buttons will play or pause the video
- STOP -- sends you back to the Netflix video chooser screen
- FF, REW -- will put the mouse on the position bar in the middle-- bar will disappear but if you use the buttons to move along it it will re-appear, OK selects
- DVD -- puts the mouse on the audio menu -- my remote it's the little button to the right of the mute button
- RecTV -- puts the mouse on the HD button -- my remote it's the button to the left of the mute button
- GREEN BUTTON -- centers the mouse on the menu bar -- kinda worthless I think
- * -- Kills Silverlight plugin if mis-behaving. only use if necessary!
About: The LIRC File
I had to write a bunch of mouse position and mouse click commands for this file.
I also have it only set up for a MCEUSB remote.
Only 1 thing may need changing if at all in the mythnetflix.lircrc file.
If you want to change your exit Firefox/Mythnetflix button:
starts at line 48
#!!!!if you change any of the buttons make sure the button = KEY_BACK line is commented out!!!!#
remote = mceusb
prog = irexec
## to use "info" button uncomment
#button = More
##to use "power" button uncomment
#button = KEY_POWER
button = KEY_BACK
config = ~/mythnetflix/lirc/exit-firefox.sh
repeat = 0
delay = 0
About: Mythnetflix Scripts
If you need to edit the scripts I tried to make it relatively fool proof.
they can all be found in /home/'user'/mythnetflix
- mythnetflix.sh -- found in /home/'user'/mythnetflix This is the mythnetflix script
- write-mouse-position.sh -- found in /home/'user'/mythnetflix/build-lirc This script attempts to find current screen resolution and calculate the proper position of the buttons for use with LIRC. for more information see write-mouse-position for how to use and how to manually set screen resolution
- mythnetflix-map.sh -- found in /home/'users'/mythnetflix/button-mapper This script allows you to easy set the button positions if they were not properly set by write-mouse-position.sh see button-mapper for how to use
Problems I Have Ran Into
Everything works fine when I launch the script from the command line but when I launch it from the Mythfrontend Silverlight always crashes.
This one took a while for me to figure out how to make it work, it's not a fix per say more of a workaround.
- from the terminal make sure you can ssh back into your mythtv box ssh 'email@example.com where user is the user running Mythfrontend.
- exit out of the ssh session
- set the ssh server to allow you to login over ssh without a password ssh-copy-id 'firstname.lastname@example.org
- try logging in again ssh 'email@example.com
- edit your mainmenu.xml <action> to look like this. Insert username where it says user:
<action>EXEC ssh firstname.lastname@example.org 'env DISPLAY=:0 ~/mythnetflix/mythnetflix.sh'</action>
this is all the scripts and files I have written and created to get Firefox, Netflix, and Lirc playing well together. Some won't work right as they are but could be a good starting point for similar projects
in no particular order.
- the Mythtv project -- inspired to say the least
- the Mythtv Wiki -- for ideas and inspiration
- Mythbuntu -- for making Mythtv way easier than it was when I first started playing with it
- Pipelight -- wouldn't have made this if Silverlight didn't work on Linux
- Mozilla -- Firefox is a great browser with so many features
- Netflix -- for being a pain in the ass but having a bunch of videos to watch
- Everyone who encouraged me to do it on the Mythtv users mailing list
- Linux -- and all the other software in the public domain which we use every day