Display MythTV documentation during setup
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
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Right, another problem: WINDOWS-F2 is specific to openbox. Anyways, here's the patch:
=== modified file 'debian/
--- debian/
+++ debian/
@@ -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:/
a0176fcf /usr/share/
+
+MYTHBROWSER_
+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_
+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/
+ sleep 10 | zenity --progress --pulsate --auto-close --text=
+ if [ $? == "0" ]; then
+ /usr/bin/
+ wmctrl -t 1 -r "mythbrowser" || true
+ fi
+elif [ -x /usr/bin/firefox ]; then
+ sleep 10 | zenity --progress --pulsate --auto-close --text=
+ 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
fi