Display MythTV documentation during setup

Registered by laga

So this probably makes sense to offer during ubiquity. Once ubiquity gets slideshow support we'll jump in on it.
-

---------------------

It might be beneficial if the user could easily acess the documentation while configuring MythTV.

I'll attach a small patch which opens a window (mythbrowser or firefox) on the second virtual desktop where the MythTV documentation and the Ubuntu MythTV Howto are displayed.

Problems:
* zenity does not yet support dialogs with timeouts. This is planned for the next GNOME release AFAIK, but I'm not sure if it'll be implemented. This patch contains an ugly work-around where mythtv-setup will be started 10s later even if you close the dialog window.
* How does the user switch to the second virtual desktop if they only have a remote?
* superm1 plans on running mythtv-setup as "mythtv" user - right now, you have to login in to a separate session to run mythtv-setup. In the current patch, the browser window is not automatically closed if mythtv-setup is closed.
* Probably more :)

This patch was also discussed on IRC, you might want to refer to the logs.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Discussion
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Right, another problem: WINDOWS-F2 is specific to openbox. Anyways, here's the patch:

=== modified file 'debian/mythtv-setup.sh'
--- debian/mythtv-setup.sh 2007-06-02 22:33:40 +0000
+++ debian/mythtv-setup.sh 2007-08-12 21:30:46 +0000
@@ -12,7 +12,45 @@
 #check that we are in the mythtv group
 check_groups

+show_docs()
+{
+
+# $SITES is a list of URLS separated by spaces
+SITES="https://help.ubuntu.com/community/MythTV_Feisty_Backend#head-c1d59df49644c5c6e19daf5e094821a3
a0176fcf /usr/share/doc/mythtv-doc/mythtv-HOWTO-singlehtml.html"
+
+MYTHBROWSER_MESSAGE="We'll now open the MythTV documentation for you. \n\
+Please press WINDOWS+F2 on your keyboard to switch to mythbrowser. \n\
+Hint: In Mythbrowser, use the \"menu\" key \(\"m\"\) to switch tabs and adjust the zoom level. \n\
+Scrolling is possible using the arrow keys.\n\n\
+This window will close in 10s. Hit \"abort\" if you don't want to open the documentation."
+
+FIREFOX_MESSAGE="We'll now open the MythTV documentation for you. \n\
+Please press WINDOWS+F2 on your keyboard to switch to Firefox.\n\n\
+This window will close in 10s. Hit \"abort\" if you don't want to open the documentation."
+
+# we prefer mythbrowser since it supports LIRC
+# FIXME: how do you switch to virtual desktop 2 if you're using LIRC?
+# FIXME: mythbrowser --zoom can be used to set the zoom factor - we can use this if users
+# complain about text/site being too large
+if [ -x /usr/bin/mythbrowser ]; then
+ sleep 10 | zenity --progress --pulsate --auto-close --text="${MYTHBROWSER_MESSAGE}" && \
+ if [ $? == "0" ]; then
+ /usr/bin/mythbrowser $SITES &
+ wmctrl -t 1 -r "mythbrowser" || true
+ fi
+elif [ -x /usr/bin/firefox ]; then
+ sleep 10 | zenity --progress --pulsate --auto-close --text="${FIREFOX_MESSAGE}" && \
+ if [ $? == "0" ]; then
+ /usr/bin/firefox $SITES &
+ wmctrl -t 1 -r "Mozilla Firefox" || true
+ fi
+else
+ echo "No suitable browser found. Can't show documentation."
+fi
+}
+
 #if group membership is okay, go ahead and launch
 if [ "$IGNORE_NOT" = "0" ]; then
+ show_docs
        /usr/bin/mythtv-setup.real "$@"
 fi

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.