XBMC for Linux - Tips and Tricks - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52) +---- Thread: XBMC for Linux - Tips and Tricks (/showthread.php?tid=30230) |
XBMC for Linux - Tips and Tricks - rodalpho - 2007-12-22 Here are some simple shell scripts that you may find useful. I'm not a particularly strong scripter, so I'm sure these can be greatly improved. Start/Kill XBMC with the remote control If you don't have a wireless keyboard, it can be useful to start XBMC with the remote control. XBMC is still in beta, so it can lock up occasionally. When it does, you can SSH in and kill the process, get out that keyboard again and ctrl-alt-backspace, or use the remote to kill the process. The remote is the way to go. === 1 Install LIRC, the daemon that receives IR signals from the remote control. In the terminal: Code: sudo apt-get install lirc lirc-x liblircclient0 === 2 To determine what should be placed in the "button" lines in your .lircrc, referenced in section 3: 1) Run "irw" from the terminal. It should appear to hang. If it doesn't, or you get an error message, your LIRC is setup incorrectly. 2) Point your remote at the receiver and press the button you want to assign. The buttons I've used are on the windows MCE remote and unused by XBMC. 3) Hit CTRL-C to exit irw. === 3 Put the following in your ~/.lircrc file, replacing the "button" arguments as you like. Create the file if it does not already exist. Code: # Start XBMC === 4 This script will start the IR daemons. Create it as "/home/youruser/scripts/startIRexec.sh": Code: #!/bin/bash === 5 To automatically start the IRXevent and IRexec daemons when you login to the desktop, go to the SYSTEM, PREFERENCES, SESSIONS menu. Click "Add", and fill in the following: Name: Start IR Daemons Command: /home/youruser/scripts/startIRexec.sh Comment: whatever you want Click OK, then the checkbox so it's enabled. This will run the startIRexec.sh script every time you log on to the desktop. === 6 Create the following scripts. These actually start and kill XBMC. /home/youruser/scripts/startXBMC.sh: (replace "youruser" with your user name) Code: #!/bin/bash /home/youruser/scripts/killXBMC.sh: Code: #!/bin/bash === 7 Make the scripts executable. Code: chmod +x /home/youruser/scripts/*.sh === 8 Log out of the desktop, then log back in. You should be set! 1) Press the button you set to start XBMC (Recorded TV if you used my suggestion). XBMC should start. Start playing a video. 2) Press the button you set to kill XBMC (DVD if you used my suggestion). XBMC should gracefully exit. Your mouse should still work in X windows, if you have one plugged in. 3) Start XBMC back up, start playing a video, then make XBMC lock up. The easiest way is to play a video, go to the video options, and change the interlacing method a couple of notches. Then press the kill button again-- it should hard kill XBMC, instantaneously taking you back to the desktop. Your mouse will likely be inoperable; to fix it just start and stop XBMC again. Hope this helps, and please post any other tips you've hacked together! - rodalpho - 2007-12-23 I started using FreeNX (a much faster remote desktop than VNC) and the remote stopped working. FreeNX actually starts a separate instance of X windows, which re-runs startIRexec.sh. I believe this associates the execution to the freeNX instance, which of course doesn't work. To fix this, remove the kill statements from the beginning of the script. If you stick with VNC (the built in vino stuff in Ubuntu) use the old script. The preliminary kill is a good thing. /home/youruser/scripts/startIRexec.sh: Code: #!/bin/bash XBMC Gnome Icon - rodalpho - 2007-12-26 Obviously ripped from PM3, but it looks pretty good. I created my launcher with just a space (" ") as the name, since the icon is fairly descriptive. restartXBMC.sh - gfairbanks - 2008-01-30 This is a small variant on the above scripts that start and stop XBMC. This script can be bound to one key to start (or restart) XBMC. You'll want to edit the "export USER=elvis" line to set it to your username. #!/bin/bash export USER=elvis export XBMC_HOME=/home/$USER/XBMC/BUILD export LOG=$XBMC_HOME/restart.log # Test to see if XBMC is still running if ps -ef|grep -v grep|grep -i XboxMediaCenter then # Send gentle kill signal killall XboxMediaCenter echo `date` "Killed XBMC! (soft)" >> $LOG # takes a second or two to die with the soft kill sleep 2 # still running? Send hard kill signal if ps -ef|grep -v grep|grep -i XboxMediaCenter then # If it's still around, kill it -9 killall -9 XboxMediaCenter echo `date` "Killed XBMC! (hard)" >> $LOG fi fi echo date "Starting XBMC" >> $LOG export DISPLAY=:0.0 cd $XBMC_HOME ./XboxMediaCenter -fs & HOWTO: Suspend with binary nVidia driver - gfairbanks - 2008-02-01 If you have the binary nVidia driver installed, as you need to for XBMC to work, suspend probably does not work for your machine. Here is how to get suspend working. These instructions are from here, but cleaned up a bit. They worked for me. Resume takes about 8 seconds. 1. Add an "Option "NvAGP" "1" in /etc/X11/xorg.conf Edit existing "Device" section to add Option "NvAGP" "1": Section "Device" Identifier ...
EndSectionDriver "nvidia" Boardname "nv" ... Option "NvAGP" "1" 2. Disable the agpgart module in /etc/modprobe.d/blacklist Add the following lines to your /etc/modprobe.d/blacklist file: blacklist intel_agp blacklist agpgart 3. Two edits to /etc/default/acpi-support 3a. Disable warm-booting the video hardware Edit /etc/default/acpi-support to set POST_VIDEO=false 3b. Disable SAVE_VBE_STATE option Edit /etc/default/acpi-support to set SAVE_VBE_STATE=false 4. Disable compiz VBLANK sync Run this from the command line: gconftool --set /apps/compiz/general/screen0/options/sync_to_vblank 0 --type bool XBMC Troubleshooting Steps - rodalpho - 2008-02-12 If you're having problems with the SVN releases, follow this procedure before posting to the forums. 1) Back up your Userdata directory just in case. Code: cd ~ 2) Delete the entire SVN code tree and uninstall XBMC Code: cd ~/XBMC 3) Re-download the entire SVN code tree from SVN. Code: cd ~ 4) Check the README.linux and copy/paste the entire apt-get line to ensure that you have the required dependencies. Note that this line does change as new dependencies are added for various features. 5) Rebuild and reinstall XBMC. Code: cd ~/XBMC If you want to post a debug log, do not configure with the --disable-debug flag. If you don't have a multicore CPU, don't build with the -j2 flag. HOWTO: Submit a tracefile on crash - rodalpho - 2008-03-06 1) Compile XBMC with debugging enabled. 2) Start it up in windowed mode under the debugger via Code: export XBMC_PLATFORM_MODE=1 3) At the prompt startup XBMC Code: (gdb) run 3) At this point XBMC will start up. Then make the program crash, recreating your issue. 4) Once it crashes, you'll end up back at the (gdb) prompt. Type Code: (gdb) backtrace 5) Copy all the text from your console from when you started gdb, including the backtrace, and post it at http://pastebin.com/ 6) Post the pastebin link to the forums. Install XBMC on Ubuntu via the XBMC PPA - wattazoum - 2008-03-31 Gutsy PPA packages available . Just add the gutsy team-xbmc PPA to your repositories and install xbmc Use the steps described in the Ubuntu documentation with the following repositories . You might not need to add the deb-src one . Code: deb [url]http://ppa.launchpad.net/team-xbmc/ubuntu[/url] gutsy main The code level is SVN rev 12195 , compile with --nodebug and there isn't MythTV support (the option wasn't add on compile time and isn't there by default). The label is 2.1a1-gutsy2 If you want me to update the package with some other compile options please request it. The label will be changed to 2.1a1-gutsy3. If you want the build from another SVN revision then the label should be changed to 2.1XY-gutsyZ where :
https://answers.edge.launchpad.net/xbmc/+faq/80 If you have some comments and modification, please let me know . Next step is to ask and create the package for gutsy. If it's done right now, I'll update and upload the source to the PPA. - odinb - 2008-05-01 Hi! Tried this under Hardy, but could not find XBMC in the packet manager. Is this still valid, or is there a "trick" to it? /n00b... - wattazoum - 2008-05-01 This was only for Gusty. Hardy is not officially supported yet. But I have created a package for Hardy (which is highly instable) . For this, use the same trick with the information at: https://edge.launchpad.net/~team-xbmc-hardy/+archive/ - odinb - 2008-05-02 Thanks for the response! Still cannot see xbmc in adept.... Have added repositiories before (i.e. for Skype), but cannot get this one to work.. - MrDohnuts - 2008-05-02 odinb Wrote:Hi! I've had XBMC running in Hardy for about a week - seems very stable. I'm watching HD and SD content, browsing for share on the LAN etc. It's all good. Just build from source using the tips in README.LINUX - cornbell - 2008-05-02 I couldn't get it through synaptic when i tried about a week ago. like MrDohnuts I built it from source and it is very stable. the only problem I had was that setting resoultion to match desktop wouldn't save on reboot which was fived by going into userdata (in the BUILD folder of course) and deleting guisettings.xml. Next time you set the resoultion settings the file will be regenerated and the settings will stick. Make sure you set it from Appearance in settings and not Video in settings. (thanks Jezz_X for this tip). Building from source is actually easier than it sounds too. (for beginners like me) Code: # sudo apt-get install subversion Install Ubuntu 8.04 Hardy Heron required dependencies forund in README.linux which subversion just downloaded or can be found HERE. Just run this to install. Code: #sudo apt-get install make g++-4.1 gcc-4.1 libsdl1.2-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libsdl-sound1.2-dev libsdl-stretch-dev libfribidi0 libfribidi-dev liblzo1 liblzo-dev libfreetype6 libfreetype6-dev libsqlite3-0 libsqlite3-dev libogg-dev libasound2-dev python2.4-dev python2.4 python-sqlite libglew1.5 libglew1.5-dev libcurl3-dev g++ gawk x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmms-dev pmount libmad0-dev libtre-dev libogg-dev libvorbis-dev libmysqlclient15-dev libhal1 libhal-dev libhal-storage1 libhal-storage-dev libpcre3-dev subversion libjasper1 next just BUILD by running these codes. Code: # cd $HOME finally to launch xbmc just make sure you're in the right directory and launch app. Code: # cd BUILD press they "/" key to view in full screen. Set resolution in appearance settings to match desktop for full screen. I say xbmc is ready for prime time and all we need is a self install 700mb.iso that uses whatever method ubuntu uses to detect and install drivers but instead without gnome desktop and other uneccessary bloat but just gdm for auto launch. I'm not a dev and wouldn't know how to do this but just my two cents. -As usual good job to the xbmc-linux community for building the best media center out there hands down. - cornbell - 2008-05-02 sorry i think it's "\" key to toggle full screen off and on. could not find an edit button. - odinb - 2008-05-02 Thanks guys! Will try this later this weekend. Going to a concert now....(Roger Waters) |