Author |
Message |
tjc
|
Posted: Mon Mar 06, 2006 7:43 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Things can get fairly ugly if you accidentally select a theme that doesn't work well with your display (say a wide theme on a normal TV) or your add in theme is missing after an upgrade. The following script will let you change the theme from a text console.
Code: #!/bin/bash
if [ $(id -u) -ne 0 ] ; then echo "You must run this script as root!" exit 1 fi
echo "Current GUI theme is:" mysql mythconverg -e "select * from settings where value = 'Theme'" echo
echo "Current OSD theme is:" mysql mythconverg -e "select * from settings where value = 'OSDTheme'" echo
THEMEDIR=/usr/share/mythtv/themes
THEMES=$(for i in $(ls $THEMEDIR) ; do [ -f $THEMEDIR/$i/theme.xml ] && echo "$i" done) echo "Select the number of the GUI theme you would like to use:" select THEME in $THEMES ; do echo ; break ; done
OSDTHEMES=$(for i in $(ls $THEMEDIR) ; do [ -f $THEMEDIR/$i/osd.xml ] && echo "$i" done) echo "Select the number of the OSD theme you would like to use:" select OSDTHEME in $OSDTHEMES ; do echo ; break ; done
echo echo "Setting Theme = '$THEME', OSDTheme = '$OSDTHEME'." echo mysql mythconverg <<EOF update settings set data = '$THEME' where value = 'Theme'; update settings set data = '$OSDTHEME' where value = 'OSDTheme'; EOF
pkill xinit
Edited to make the script work in modern systems which don't use gdm.
Last edited by tjc on Sun May 06, 2007 5:01 pm, edited 1 time in total.
|
|
Top |
|
![](images/spacer.gif) |
douw
|
Posted: Fri Oct 13, 2006 3:12 am |
|
Joined: Wed May 31, 2006 6:54 am
Posts: 52
Location:
Pretoria, South Africa
|
What if I inadvertently broke something in the appearance menu and now I cannot see the menus? LiveTv and playback still works.
|
|
Top |
|
![](images/spacer.gif) |
mrshark
|
Posted: Fri Oct 13, 2006 4:39 am |
|
Joined: Wed Aug 09, 2006 2:47 am
Posts: 21
|
am i the only that see all the phpbb bbcode tags in the forum posts? i see QUOTE, CODE, and so on, instead of their html translated couterparts... it's very annoying...
_________________ Mobo: Asus M2NPV-VM (Nvidia 430/6150 + HDTVout), bios 0405
CPU: Sempron 3GHz - 512MB Ram
TV: Asus MyCinema P7131H Hybrid + Ati Remote Wonder USB
KnoppMyth R5D1 upg. to MythTV 0.20
|
|
Top |
|
![](images/spacer.gif) |
tjc
|
Posted: Fri Oct 13, 2006 6:01 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
[url]http://mysettopbox.tv/phpBB2/viewtopic.php?t=12094[/url]
|
|
Top |
|
![](images/spacer.gif) |
frisco
|
Posted: Mon Dec 11, 2006 5:45 pm |
|
Joined: Tue Sep 26, 2006 11:03 am
Posts: 30
|
I'm getting an error running this with KM .20. It gives an error regarding incorrecto syntax with SQL. The reason I'm even trying to do this is to get my OSD Theme to match my GUI theme. Somehow they've become mismatched and I'm having trouble to switch them all back to Titivillus. Any suggestions?
|
|
Top |
|
![](images/spacer.gif) |
tjc
|
Posted: Mon Dec 11, 2006 6:39 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
I just tested it on my machine and it worked fine, so I'm guessing the something got botched in your cut & paste. I even snagged the source out of the page to be sure the versions match. You are running this as root, right?
|
|
Top |
|
![](images/spacer.gif) |
frisco
|
Posted: Tue Dec 12, 2006 9:33 am |
|
Joined: Tue Sep 26, 2006 11:03 am
Posts: 30
|
Ok I figured it out - I'm a script tard!! I was pasting the EOF and /etc/init.d/gdm restart into the script file itself. I'm pretty forgetful so what I did was added the a line to the script that says:
echo "Don't forget to restart gdm with: /etc/init.d/gdm restart"
Once again thanks for your help TJC!!
|
|
Top |
|
![](images/spacer.gif) |
tjc
|
Posted: Tue Dec 12, 2006 6:55 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
frisco wrote: I was pasting the EOF and /etc/init.d/gdm restart into the script file itself.
Those both ARE part of the script along with everything else in that "code" block. The EOF closes the "here" document (which starts with <<EOF) containing the SQL commands to update the settings. The GDM restart is there to bring the GUI back up with the new themes. I'm guessing you're hosing yourself with some kind of "invisible whitespace" corruption, which is not uncommon when folks monkey with Unix text files using MS-Windows. Here's what a normal run looks like:
Code: root@black2:~# pickATheme.sh Current GUI theme is: +-------+--------+----------+ | value | data | hostname | +-------+--------+----------+ | Theme | Iulius | black2 | +-------+--------+----------+
Current OSD theme is: +----------+---------+----------+ | value | data | hostname | +----------+---------+----------+ | OSDTheme | Isthmus | black2 | +----------+---------+----------+
Select the number of the GUI theme you would like to use: 1) G.A.N.T. 4) MythCenter 7) Titivillus 2) Iulius 5) MythCenter-wide 8) blue 3) Minimalist-wide 6) Retro 9) syth-blue-wide #? 2
Select the number of the OSD theme you would like to use: 1) Gray-OSD 3) Iulius-OSD 5) Titivillus-OSD 7) defaultosd 2) Isthmus 4) Retro-OSD 6) blueosd 8) isthmus #? 2
Setting Theme = 'Iulius', OSDTheme = 'Isthmus'.
Stopping GNOME Display Manager: gdm. Starting GNOME Display Manager: gdm.
|
|
Top |
|
![](images/spacer.gif) |
graysky
|
Posted: Sun Sep 30, 2007 2:13 pm |
|
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location:
/dev/null
|
As usual, great information, tjc. There is an alternative assuming the user has a windows-based box that's on his/her LAN.
Have a look at this thread. I have successfully used the an xsession (which differs from the built in vnc by thw way) to recover my mythbackend when I switched by painter from Qt to OpenGL. In that case, neither the localmachine nor vnc could save me!
The xsession can also be used to change a theme.
EDIT (02-Aug-2008): I came across the themepainter switch that also might work in a situation when you can't get back into your frontend due to the opengl issue.
Code: $ mythfrontend -O ThemePainter=qt
I haven't tried it, but I assume it would work. Maybe it'll help out someone some day.
_________________ Retired KM user (R4 - R6.04); friend to LH users.
|
|
Top |
|
![](images/spacer.gif) |
snaproll
|
Posted: Sun Feb 14, 2010 12:38 pm |
|
Joined: Sun Jul 24, 2005 4:16 pm
Posts: 508
Location:
Ft. Worth TX
|
Any updated instructions to get this to work for 6 ?
I seem to have stepped in it & can't change it back.... ![Embarassed :oops:](./images/smilies/icon_redface.gif)
|
|
Top |
|
![](images/spacer.gif) |
tjc
|
Posted: Sun Feb 14, 2010 1:58 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
I don't have a R6 system running at the moment but it should just be a matter of updating the THEMEDIR setting. You can run this command as root to look for the directory:
Code: find / -type d -name themes -print
|
|
Top |
|
![](images/spacer.gif) |
snaproll
|
Posted: Sun Feb 14, 2010 2:12 pm |
|
Joined: Sun Jul 24, 2005 4:16 pm
Posts: 508
Location:
Ft. Worth TX
|
Thanks TJC !
By the time I had read your reply I had tried attaching the machine to a widescreen TV- No dice- It still ended up at the desktop.
Then I renamed the new (inop) theme directory in /user/share/mythtv/themes/
Code: mv LCARS LCARSnoWork
Then I rebooted, and the system came back up defaulted to G.A.N.T. and I could again get into setup, appearance to change to a working theme. Edit: I tried your line, and it came up with KDE themes, not Mythtv themes.. Code: [greg@mythbox101 ~]$ su [root@mythbox101 greg]# find / -type d -name themes -print /opt/kde/share/apps/kstyle/themes [root@mythbox101 greg]# cd /opt/kde/share/apps/kstyle/themes [root@mythbox101 themes]# dir b3.themerc light-v2.themerc qtmotifplus.themerc default.themerc light-v3.themerc qtplatinum.themerc highcolor.themerc plastik.themerc qtsgi.themerc highcontrast.themerc qtcde.themerc qtwindows.themerc keramik.themerc qtmotif.themerc riscos.themerc
|
|
Top |
|
![](images/spacer.gif) |
mihanson
|
Posted: Sun Feb 14, 2010 4:07 pm |
|
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location:
Los Angeles
|
If you need to change the theme from the commandline in R6, you can use the following:
Code: $ mythfrontend -O Theme=<VAILD THEME> For example: Code: $ mythfrontend -O Theme=Terra This is a command does not permanently change your theme, but it will allow you to start up a frontend. This command is also compatable with mythtv-setup: Code: $ mythtv-setup -O Theme=<VAILD THEME>
mythfrontend --help or mythtv-setup --help for more info.
_________________ Mike
My Hardware Profile
|
|
Top |
|
![](images/spacer.gif) |
snaproll
|
Posted: Sun Feb 14, 2010 4:31 pm |
|
Joined: Sun Jul 24, 2005 4:16 pm
Posts: 508
Location:
Ft. Worth TX
|
Useful stuff to have (when the screen goes yellow... ![Laughing :lol:](./images/smilies/icon_lol.gif) )
Helps to have multiple ways to skin a cat....
I made a pointer thread to this answer in the LinHes Hints and Tips section... ![Very Happy :D](./images/smilies/icon_biggrin.gif)
|
|
Top |
|
![](images/spacer.gif) |