LinHES Forums http://forum.linhes.org/ |
|
Remotely Configure MythTV on a machine with no keyboard http://forum.linhes.org/viewtopic.php?f=3&t=8175 |
Page 1 of 1 |
Author: | HappyTalk [ Mon Jan 30, 2006 6:16 am ] |
Post subject: | Remotely Configure MythTV on a machine with no keyboard |
All machines (front and backend) store their setup settings in the database on the backend machine. If you have a frontend only machine like an xbox with no keyboard attached its hard to type stuff in on the setup dialogs. So the easiest way is to create an SQL command file and execute it to change the values directly. Here's how Remember to backup your database first on the backend machine, either via webmin or knoppmyth menu | Backup. Here's the main settings that I needed to change. Create a local file mythtv_setup.sql, copy and paste the SQL lines below and add any others you may need (most others can easily be done with the remote). Search and replace xebian% with the hostname you wish to modify (the % means any chars, if you use exact hostname change LIKE to =). Then replace the Set Data part of each line with the data pertinent to your system within quotes. Go into Webmin | Servers | mythconverg | Execute SQL. Goto 'Select an SQL commands file to execute on database mythconverg' and select 'From Uploaded file'. Press Choose and select mythtv_setup.sql. Then Execute. Code: UPDATE settings SET data = '/myth/music' WHERE value = 'MusicLocation' and hostname LIKE 'xebian%'; UPDATE settings SET data = '/myth/video' WHERE value = 'VideoStartupDir' and hostname LIKE 'xebian%'; UPDATE settings SET data = '/myth/gallery' WHERE value = 'GalleryDir' and hostname LIKE 'xebian%'; UPDATE settings SET data = 'VideoArtworkDir' WHERE value = '/home/live/.mythtv/MythVideo' and hostname LIKE 'xebian%'; UPDATE settings SET data = '/mnt/cdrom:/mnt/camera' WHERE value = 'GalleryImportDirs' and hostname LIKE 'xebian%'; UPDATE settings SET data = '/dev/dsp' WHERE value = 'AudioDevice' and hostname LIKE 'xebian%'; UPDATE settings SET data = '/dev/dsp' WHERE value = 'AudioOutputDevice' and hostname LIKE 'xebian%'; UPDATE settings SET data = '/dev/dvd' WHERE value = 'DVDDeviceLocation' and hostname LIKE 'xebian%'; UPDATE settings SET data = 'mplayer dvd:// -dvd-device %d -fs -zoom -vo xv' WHERE value = 'DVDPlayerCommand' and hostname LIKE 'xebian%'; UPDATE settings SET data = '/dev/cdrom' WHERE value = 'CDDevice' and hostname LIKE 'xebian%'; UPDATE settings SET data = 'directory' WHERE value = 'TreeLevels' and hostname LIKE 'xebian%'; UPDATE settings SET data = 'ARTIST/ALBUM/TRACK_TITLE' WHERE value = 'NonID3FileNameFormat' and hostname LIKE 'xebian%'; UPDATE settings SET data = 'ARTIST/ALBUM/TRACK-TITLE' WHERE value = 'FilenameTemplate' and hostname LIKE 'xebian%'; UPDATE settings SET data = 'mplayer -fs -zoom -quiet -vo xv %s' WHERE value = 'VideoDefaultPlayer' and hostname LIKE 'xebian%'; UPDATE settings SET data = '640x480' WHERE value = 'TVVidModeResolution' and hostname LIKE 'xebian%'; UPDATE settings SET data = '0' WHERE value = 'AC3PassThru' and hostname LIKE 'xebian%'; UPDATE settings SET data = '100' WHERE value = 'MasterMixerVolume' and hostname LIKE 'xebian%'; UPDATE settings SET data = '100' WHERE value = 'PCMMixerVolume' and hostname LIKE 'xebian%'; UPDATE settings SET data = 'UKXX0215' WHERE value = 'locale' and hostname LIKE 'xebian%'; UPDATE settings SET data = 'YES' WHERE value = 'SIUnits' and hostname LIKE 'xebian%'; SELECT * FROM settings WHERE hostname LIKE 'xebian%'; If not running webmin then tsh using putty to the backend machine, login as root and do :- # mysql # mythconverg # update settings ... (copy/paste all lines from mythtv_setup) # quit # /etc/init.d/mysql restart You can always run just the SELECT line (last line) to check you got the hostname correct. ------------------------------------------------------------------ If you want to change any other settings here's a complete list Code: COMPLETE LIST OF FIELDS IN SETTINGS TABLE
value | data +---------------------------+------------- | Deinterlace | 0 | DeinterlaceFilter | linearblend | CustomFilters | | UseMPEG2Dec | 0 | RealtimePriority | 1 | UseVideoTimebase | 0 | DecodeExtraAudio | 1 | AspectOverride | 0 | PIPLocation | 0 | PlaybackExitPrompt | 0 | EndOfRecordingExitPrompt | 0 | ClearSavedPosition | 1 | AltClearSavedPosition | 1 | UseOutputPictureControls | 0 | CCBufferWarnings | 0 | UDPNotifyPort | 6948 | PlayBoxOrdering | 1 | PlayBoxEpisodeSort | Date | GeneratePreviewPixmaps | 0 | PlaybackPreview | 1 | PlaybackPreviewLowCPU | 0 | PlaybackBoxStartInTitle | 1 | ShowGroupInfo | 0 | DisplayRecGroup | All Programs | RememberRecGroup | 1 | UseCategoriesAsRecGroups | 0 | DispRecGroupAsAllProg | 0 | PVR350OutputEnable | 0 | PVR350VideoDev | /dev/video16 | PVR350EPGAlphaValue | 164 | PVR350InternalAudioOnly | 0 | FastForwardAmount | 30 | RewindAmount | 5 | SmartForward | 0 | StickyKeys | 0 | FFRewRepos | 1 | FFRewReverse | 1 | ExactSeeking | 0 | JumpAmount | 10 | AutoCommercialSkip | 0 | CommRewindAmount | 0 | CommNotifyAmount | 0 | TryUnflaggedSkip | 0 | VertScanPercentage | 0 | HorizScanPercentage | 0 | XScanDisplacement | 0 | YScanDisplacement | 0 | OSDTheme | blueosd | OSDDisplayTime | 3 | OSDFont | FreeMono.ttf | OSDCCFont | FreeMono.ttf | OSDThemeFontSizeType | default | CCBackground | 0 | DefaultCCMode | 0 | PersistentBrowseMode | 0 | ChannelOrdering | channum + 0 | SmartChannelChange | 0 | ChannelFormat | <num> <sign> | LongChannelFormat | <num> <name> | EPGFillType | 10 | EPGShowCategoryColors | 1 | EPGShowCategoryText | 1 | EPGScrollType | 1 | EPGShowChannelIcon | 1 | EPGShowFavorites | 0 | WatchTVGuide | 0 | chanPerPage | 5 | timePerPage | 4 | UnknownTitle | Unknown | UnknownCategory | Unknown | DefaultTVChannel | 3 | SelectChangesChannel | 0 | SelChangeRecThreshold | 16 | Theme | G.A.N.T. | Style | | ThemeFontSizeType | default | RandomTheme | 0 | MenuTheme | Default | GuiWidth | 0 | GuiHeight | 0 | GuiOffsetX | 0 | GuiOffsetY | 0 | GuiSizeForTV | 1 | HideMouseCursor | 1 | RunFrontendInWindow | 0 | UseVideoModes | 0 | GuiVidModeResolution | 640x480 | TVVidModeResolution | 640x480 | TVVidModeForceAspect | 0.0 | VidModeWidth0 | 0 | VidModeHeight0 | 0 | TVVidModeResolution0 | 320x240 | TVVidModeForceAspect0 | 0.0 | VidModeWidth1 | 0 | VidModeHeight1 | 0 | TVVidModeResolution1 | 320x240 | TVVidModeForceAspect1 | 0.0 | VidModeWidth2 | 0 | VidModeHeight2 | 0 | TVVidModeResolution2 | 320x240 | TVVidModeForceAspect2 | 0.0 | Language | EN | DateFormat | ddd MMM d | ShortDateFormat | M/d | TimeFormat | h:mm AP | QtFontSmall | 12 | QtFontMedium | 16 | QtFontBig | 25 | PlayBoxTransparency | 1 | PlayBoxShading | 0 | LCDEnable | 0 | LCDShowTime | 1 | LCDShowMenu | 1 | LCDShowMusic | 1 | LCDShowChannel | 1 | LCDShowVolume | 1 | LCDShowGeneric | 1 | LCDBacklightOn | 1 | LCDPopupTime | 5 | AudioOutputDevice | /dev/dsp | AC3PassThru | 0 | AggressiveSoundcardBuffer | 0 | MythControlsVolume | 1 | MixerDevice | /dev/mixer | MixerControl | PCM | MasterMixerVolume | 100 | PCMMixerVolume | 100 | IndividualMuteControl | 0 | AllowQuitShutdown | 4 | NoPromptOnExit | 1 | HaltCommand | halt | LircKeyPressedApp | | UseArrowAccels | 1 | SetupPinCodeRequired | 0 | MonitorDrives | 0 | EnableXbox | 0 | LogPrintLevel | 8 | LogCleanEnabled | 0 | LogCleanPeriod | 14 | LogCleanDays | 14 | LogCleanMax | 30 | LogMaxCount | 100 | TVVidModeRefreshRate | 0 | TVVidModeRefreshRate0 | 0 | TVVidModeRefreshRate1 | 0 | TVVidModeRefreshRate2 | 0 | DVDDeviceLocation | /dev/dvd | DVDOnInsertDVD | 2 | DVDPlayerCommand | mplayer dvd:// -dvd-device %d -fs -zoom -vo xv | GalleryDir | /myth/gallery | GalleryImportDirs | /mnt/cdrom:/mnt/camera | GalleryMoviePlayerCmd | mplayer -fs %s | SlideshowOpenGLTransition | none | SlideshowTransition | none | SlideshowBackground | | SlideshowDelay | 5 | MusicLocation | /myth/music | AudioDevice | /dev/dsp | CDDevice | /dev/cdrom | TreeLevels | directory | NonID3FileNameFormat | ARTIST/ALBUM/TRACK_TITLE | Ignore_ID3 | 1 | AutoLookupCD | 0 | KeyboardAccelerators | 1 | CDWriterEnabled | 1 | CDDiskSize | 1 | CDCreateDir | 0 | CDWriteSpeed | 0 | CDBlankType | fast | PlayMode | none | IntelliRatingWeight | 35 | IntelliPlayCountWeight | 25 | IntelliLastPlayWeight | 25 | IntelliRandomWeight | 15 | MusicShowRatings | 0 | ShowWholeTree | 1 | ListAsShuffled | 0 | VisualMode | Random | VisualCycleOnSongChange | 0 | VisualModeDelay | 0 | VisualScaleWidth | 1 | VisualScaleHeight | 1 | ParanoiaLevel | Full | FilenameTemplate | ARTIST/ALBUM/TRACK-TITLE | TagSeparator | - | NoWhitespace | 0 | PostCDRipScript | | EjectCDAfterRipping | 1 | EncoderType | ogg | DefaultRipQuality | 0 | Mp3UseVBR | 0 | VideoStartupDir | /myth/video | VideoArtworkDir | /home/live/.mythtv/MythVideo | VideoDefaultParentalLevel | 4 | VideoAggressivePC | 0 | VideoListUnknownFiletypes | 1 | VideoTreeNoDB | 0 | VideoNewBrowsable | 1 | Default MythVideo View | 1 | MovieListCommandLine | /usr/share/mythtv/mythvideo/scripts/imdb.pl -M tv=no;video=no | MoviePosterCommandLine | /usr/share/mythtv/mythvideo/scripts/imdb.pl -P | MovieDataCommandLine | /usr/share/mythtv/mythvideo/scripts/imdb.pl -D | VideoGalleryColsPerPage | 4 | VideoGalleryRowsPerPage | 3 | VideoGallerySubtitle | 1 | VideoGalleryAspectRatio | 1 | VideoDefaultPlayer | mplayer -fs -zoom -quiet -vo xv %s | locale | UKXX0215 | SIUnits | YES | WeatherAggressiveLvl | 1 | VideoDefaultView | 0 | RepeatMode | all | LastMusicPlaylistPush | 0 +---------------------------+----------------------------------- |
Author: | Fray [ Mon Jan 30, 2006 9:42 am ] |
Post subject: | |
Another way to get at the database is to install PHPMyAdmin. Code: apt-get install phpmyadmin
|
Author: | L0o0ky [ Wed Feb 01, 2006 4:26 pm ] |
Post subject: | Another way |
To suggest another way to control your mythtv box remotely is to use VNC. I will strongly suggest that this is for trusted networks only. Install VNC (I like tightvnc) with "apt-get install tightvncserver". Once that is installed, run "vncserver :2" (or any higher number for a display). It will ask for a password & confirmation. After that, just use the VNC viewer to connect to the display specified earlier (in my example it is display 2). One advantage is that VNC can be set up to tunnel through SSH for added security etc... From the vnc session, I can run mythtv-setup or even mythfrontend without disturbing the wife etc... who is watching TV--just don't expect to be able to watch TV over the VNC session; however, I have used it to edit the cutlist on some of my recordings. I haven't set it up to start VNC on a reboot since it's rare and it only takes a second or two to shell in and fire up the VNC session. I also have phpMyAdmin installed too--very handy. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |