LinHES Forums
http://forum.linhes.org/

HOWTO: R6 and XBMC
http://forum.linhes.org/viewtopic.php?f=11&t=19863
Page 2 of 4

Author:  nharris [ Fri Jun 19, 2009 6:43 am ]
Post subject:  Re: Switching?

Ozdemon wrote:
How do you switch into and out of xbmc in R6?
I just exit the frontend and run xbmc from a shell. But, you will need to add a menu option to your xml file if you want to do it via remote from the frontend.

Author:  Ozdemon [ Sat Jun 20, 2009 12:09 am ]
Post subject:  Couldn't d/l xbmc

I just tried to download xbmc. I got the following error message:
Code:
error: could not prepare transaction
error: failed to commit transaction (conflicting files)
libmikmod: /usr/info/dir exists in filesystem
Errors occurred, no packages were upgraded.

Can anyone suggest a workaround?

Author:  Daved [ Mon Jun 22, 2009 3:27 pm ]
Post subject:  Re: Couldn't d/l xbmc

Ozdemon wrote:
I just tried to download xbmc. I got the following error message:
Code:
error: could not prepare transaction
error: failed to commit transaction (conflicting files)
libmikmod: /usr/info/dir exists in filesystem
Errors occurred, no packages were upgraded.

Can anyone suggest a workaround?


Code:
rm /usr/info/dir


Worked for me

Author:  Ozdemon [ Mon Jun 22, 2009 3:30 pm ]
Post subject:  Re: Couldn't d/l xbmc

Daved wrote:
Code:
rm /usr/info/dir


Worked for me


Thanks, I will give it a try. :idea:

Author:  nharris [ Mon Jun 22, 2009 3:32 pm ]
Post subject:  Re: Couldn't d/l xbmc

Daved wrote:
Code:
rm /usr/info/dir


Worked for me

Or try
Code:
pacman -Sf xbmc-svn

Author:  Ozdemon [ Wed Jun 24, 2009 4:03 am ]
Post subject:  Re: Couldn't d/l xbmc

Daved wrote:
Code:
rm /usr/info/dir


Worked for me


Worked for me too! Thanks. (I actually read the file and it was just info).

Author:  nharris [ Mon Aug 03, 2009 1:44 pm ]
Post subject: 

An updated package has been pushed. Do a "pacman -Syu" to update. It seems to be running smoothly on my test system.

Author:  graysky [ Tue Sep 01, 2009 2:01 pm ]
Post subject: 

@nharris - is this the package in the AUR?

EDIT: nevermind...

Author:  nharris [ Tue Nov 10, 2009 7:46 am ]
Post subject: 

Updated xbmc-svn package available. The Arch xbmc maintainers claim that this one is very good/stable. Since xbmc is headed for a release real soon, this is probably a good one to try out.

Author:  RacerX [ Sun Nov 22, 2009 12:14 pm ]
Post subject: 

On R6 01.00 to get the XBMC package to work

Code:
rm /usr/info/dir


Code:
pacman -S xbmc-svn


Now that R6 works with my Snapstream Firefly remote out of the box :lol: , it would be super if the remote also just worked with XBMC.

R6
Code:
/usr/Mythvantage/templates/remotes/snapstream_firefly/lircrc-snapstrm.txt


XBMC - Edited this file using the Mythvantage Template as an guide to create a snapstream firefly remote.

Code:
/usr/share/xbmc/system/Lircmap.xml


I'm not clear what is required for sharing Lirc - XBMC-XML and R6-txt

Code:
/etc/Lircrc

Author:  graysky [ Fri Nov 27, 2009 3:45 am ]
Post subject: 

@racerx - did you get your remote to work with xbmc? If so, please share. I've been trying without success: http://knoppmyth.net/phpBB2/viewtopic.php?t=20591

Author:  RacerX [ Fri Nov 27, 2009 10:45 am ]
Post subject: 

Graysky

So far I have not yet found answer about how share xml data with txt. However, I did come across this script which gets at the broader thought between XBMC and Mythfrontend (ie sharing the remote).


http://code.google.com/p/yatvgrabber/wiki/XbmcMythtvRemote

Code:
Details

    * add this to ~/.lircrc

      include ~/.lirc/irexec

    * create or add/modify this file ~/.lirc/irexec

      begin
           prog = irexec
           button = LiveTV
           config = ~/scripts/appswitch.pl
      end

    * create this script file ~/scripts/appswitch.pl and make it executable

      #!/usr/bin/perl -w
      ###############################################################################################################################
      ## Name: appswitch.pl
      ##
      ## Purpose: Executed by irexec this script will cycle between mythtv and xbmc using a single button.
      ##     
      ## (C)opyright 2008 Arksoft.
      ##                                                                                                 
      ## Author: Arkay
      ##
      ## Ver 1.0: 4-08-2008.  Initial version.
      ##
      ###############################################################################################################################
      # Require and Use Clauses.
      ###############################################################################################################################

      use strict;                             #Keeps code neat.
      use Getopt::Std;                        #Getopt module for option preprocessing.
      use vars qw/ $opt_d $opt_h /;           #Option Processing vars.
      use POSIX qw(strftime);                 #Time routine we need.

      ###############################################################################################################################
      # Prototype definitions
      ###############################################################################################################################

      sub logmsg(@);          #Message logger so we can track what's been going on.
      sub process_opts();     #Option processing.. Nothing exiting for this script.
      sub do_command($);      #Execute a shell command for lazy perl programmers :)
      sub check_proc($);      #Check if a process is running.
      sub startproc($);

      ###############################################################################################################################
      # Constant Definitions.
      ###############################################################################################################################

      my ($TRUE) = 1;
      my ($FALSE) = 0;

      ###############################################################################################################################
      # Global vars, paths, commands to call.
      ###############################################################################################################################

      my ($LOG) = "~/scripts/appswitch.log";          #Log location.
      my ($LOGSIZE) = 1024;                           #Maximum log size in kbytes, self pruning.
      my ($DEBUG) = $FALSE;                           #Debugging default is off.
      my ($BASENAME) = $0;                            #How was the program called?

      my ($MYTHTV)="/usr/bin/mythfrontend";           #Process name to start
      my ($XBMC)="/usr/share/xbmc/xbmc.bin -fs";      #Process name to start
      my ($KMYTHTV)="mythfrontend.real";              #Process name to use with killall
      my ($KXBMC)="xbmc.bin";                         #Process name to use with killall
      my ($KMPLAYER)="mplayer";                       #Also kill any external players
      my ($KILLALL)="/usr/bin/killall";               #kill command.
      my ($AUDIOHACK)="/usr/bin/iecset audio on";     #Shitty Alsa hack with intel HDA

      ###############################################################################################################################
      # The Mainline.
      ###############################################################################################################################
      MAIN:
      {
              my ($command);
              process_opts();

              logmsg "$BASENAME started : PID($$)";

              my ($myth)=check_proc($MYTHTV);
              my ($xbmc)=check_proc($XBMC);

              SWITCH:
              {
                      if (($myth == $TRUE ) && ($xbmc == $TRUE))
                      {
                              logmsg "Killing $XBMC and $MYTHTV";
                              $command="$KILLALL $KMYTHTV"; do_command($command);
                              $command="$KILLALL $KMPLAYER"; do_command($command);
                              $command="$KILLALL $KXBMC"; do_command($command);
                              sleep(2);

                              $myth=check_proc($MYTHTV);
                              if ($myth == $TRUE)
                              {
                                      logmsg "Killing $MYTHTV (forced)";
                                      $command="$KILLALL -9 $KMYTHTV"; do_command($command);
                                      $command="$KILLALL -9 $KMPLAYER"; do_command($command);
                              }

                              $xbmc=check_proc($XBMC);
                              if ($xbmc == $TRUE)
                              {
                                      logmsg "Killing $XBMC (forced)";
                                      $command="$KILLALL -9 $KXBMC"; do_command($command);
                              }
                              do_command($AUDIOHACK);
                              startproc("export XBMC_PLATFORM_MODE=1 ; $XBMC");
                              last SWITCH;
                      }
                                     
                      if ($myth == $TRUE)
                      {
                              logmsg "Killing $MYTHTV";
                              $command="$KILLALL $KMYTHTV"; do_command($command);
                              $command="$KILLALL $KMPLAYER"; do_command($command);
                              sleep(2);
                              $myth=check_proc($MYTHTV);
                              if ($myth == $TRUE)
                              {
                                      logmsg "Killing $MYTHTV (forced)";
                                      $command="$KILLALL -9 $KMYTHTV"; do_command($command);
                                      $command="$KILLALL -9 $KMPLAYER"; do_command($command);
                              }
                              do_command($AUDIOHACK);
                              startproc("export XBMC_PLATFORM_MODE=1 ; $XBMC");
                              last SWITCH;
                      }

                      if ($xbmc)
                      {
                              logmsg "Killing $XBMC";
                              $command="$KILLALL $KXBMC"; do_command($command);
                              sleep(2);
                              $xbmc=check_proc($XBMC);
                              if ($xbmc == $TRUE)
                              {
                                      logmsg "Killing $XBMC (forced)";
                                      $command="$KILLALL -9 $KXBMC"; do_command($command);
                              }
                              do_command($AUDIOHACK);
                              startproc($MYTHTV);
                              last SWITCH;
                      }
                      do_command($AUDIOHACK);
                      startproc("export XBMC_PLATFORM_MODE=1 ; $XBMC");
              }

              logmsg "$BASENAME Completed.";
      }

      ###############################################################################################################################
      # startproc()
      # Execute a given command.
      ###############################################################################################################################
      sub startproc($)
      {
              my ($proc)=@_;
              logmsg "Starting $proc";
              exec("export DISPLAY=:0; $proc &");
      }

      ###############################################################################################################################
      # check_proc($)
      # Check if processes are running that should stop shutdown from occuring.
      ###############################################################################################################################
      sub check_proc($)
      {
              my ($proc)=@_;
              my (@output);
              my ($command);
              my ($count)=0;
              my ($running)=$FALSE;

              logmsg "Checking for active process $proc.";

              $command="ps -ef | grep \"$proc\" | grep -v grep |wc -l";       
              @output=do_command($command);

              if (@output)
              {
                      $count=$output[0];
                      chomp ($count);
              }

              if ($count > 0)
              {
                      logmsg "Found active process : $proc ($count running).";
                      $running=$TRUE;
              }
              return($running);
      }

      ###############################################################################################################################
      # logmsg
      # Little routine to write to the log file.
      # Rotates around $LOGSIZE bytes.
      ###############################################################################################################################
      sub logmsg(@)
      {
              my ($string)=@_;
              my $time=scalar localtime;
              my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks);
              my (@lines,$line);

              ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks)=stat("$LOG");

              if (defined($size))
              {
                      $size=$size/1024;                               #size in kbyte

                      if ($size >= $LOGSIZE)
                      {
                              unlink ("$LOG.old") if (-e("$LOG.old"));
                              rename ($LOG,"$LOG.old");
                      }
              }

              print "$time : $string\n" if ($DEBUG==$TRUE);

              if (open (LOG,">>$LOG"))
              {
                      if ($string =~ /\n/)
                      {
                              @lines=split(/\n/,$string);
                              foreach $line (@lines)
                              {
                                      print LOG "$time : $line\n";
                              }
                      }
                      else
                      {
                                      print LOG "$time : $string\n";
                      }
                      close (LOG);
              }
              else
              {
                      print "Unable to open LOG $LOG : $!";
              }
      }

      ###############################################################################################################################
      # process_opts()
      # Set Global option flags dependant on command line input.
      ###############################################################################################################################
      sub process_opts()
      {
              getopts('dh');

              $DEBUG=$TRUE if ($opt_d);       
              exit(usage(1)) if ($opt_h);
      }

      ###############################################################################################################################
      # usage()
      # Output Relevant Usage strings if incorrect opts are given.
      ###############################################################################################################################
      sub usage()
      {
              my($ucode)=@_;

              if ($ucode == 1)
              {
                      print "Usage: $BASENAME [-dh]\n";
                      return(0);
              }
      }

      ###############################################################################################################################
      # sub do_command($)
      # use system call to execute command. Returns output of command in array.
      ###############################################################################################################################
      sub do_command($)
      {
          my ($command)=@_;
          my (@output);
          my ($exit_value)=0;

          logmsg "Executing $command" if ($DEBUG == $TRUE);

          @output=`$command`;

          $exit_value = $? >> 8;

          if ($exit_value != 0)
          {
              logmsg "Error executing $command : $!";
          }
          return(@output);
      }


XBMC UI is :wink:

Author:  iscraigh [ Fri Nov 27, 2009 7:42 pm ]
Post subject: 

I changed the video button in mythtv to launch xbmc for watching movies. I think XBMC has a much better way of displaying movies and its grabber seems to get almost all of my files correct. I then exit xbmc and myth is still running, I may play with the above script.

Author:  ceenvee703 [ Tue Dec 08, 2009 11:56 am ]
Post subject: 

I followed these directions to load xbmc-svn onto my R6 system, tried to start up xbmc from a terminal, and it crashes before starting. Crash log has these two errors:

Code:
02:26:08 T:3043522448 M:1879744512   ERROR: GLX: Same window as before, refreshing context


and then at the end of the crash log there is

Code:
02:26:09 T:3043522448 M:1871839232   ERROR:  DS: Failed to connect to the D-Bus session daemon: dbus-launch failed to autolaunch D-Bus session: Failed to waitpid() for babysitter intermediate process: No child processes


Anyone else see this? One note is this was post-0.22 upgrade.

Author:  RacerX [ Wed Dec 09, 2009 2:29 pm ]
Post subject: 

I have not seen this error before on R6 01.00, it works fine for me. Could you try this?

Code:
dbus-launch xbmc

Page 2 of 4 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/