Software & AppsOperating SystemLinux

How To Autostart XBMC on Ubuntu Boot

Ubuntu 18

In this comprehensive guide, we will explore how to autostart XBMC (now known as Kodi) on Ubuntu boot. This is a common requirement for many users who want to have their media center ready as soon as their system starts. We will cover different methods to achieve this, providing step-by-step instructions for each.

Quick Answer

To autostart XBMC (now known as Kodi) on Ubuntu boot, you can use the Startup Applications Preferences dialog, enable the auto login feature and choose the XBMC session, create a startup script that waits before launching XBMC, or use Ubuntu’s Startup Application tool with the command -d 5 --standalone -fs.

Understanding XBMC/Kodi

XBMC, or Kodi as it is now known, is a free and open-source media player software application developed by the XBMC Foundation. It allows users to play and view most streaming media, such as videos, music, podcasts, and videos from the internet, as well as all common digital media files from local and network storage media.

Method 1: Using Startup Applications Preferences

One of the simplest ways to autostart XBMC on Ubuntu boot is to use the “Startup Applications Preferences” dialog. However, just adding the command /usr/bin/xbmc to the startup applications list may not always work.

Here’s a step-by-step guide on how to do it:

  1. Open the “Startup Applications Preferences” dialog. You can do this by searching for “Startup Applications” in the Dash.
  2. Click on the “Add” button to add a new startup program.
  3. In the “Name” field, enter XBMC. In the “Command” field, enter /usr/bin/xbmc.
  4. Click on the “Add” button to save the changes.

If this method doesn’t work, don’t worry. We have other solutions for you.

Method 2: Using Auto Login Feature

Another solution is to use the auto login feature and choose the XBMC session that is created when you install XBMC. This will automatically launch XBMC when you log in.

Here’s how you can do it:

  1. Open the “System Settings” dialog. You can do this by searching for “System Settings” in the Dash.
  2. Click on “User Accounts”.
  3. Click on “Unlock” and enter your password.
  4. Turn on the “Automatic Login” switch.
  5. Select the XBMC session as the default.

Method 3: Creating a Startup Script

If the above methods don’t work, you can create a small script that waits for a few seconds before launching XBMC. This can help resolve any conflicts or race conditions that may occur when XBMC starts before Unity finishes loading.

Here’s an example of the script:

#!/bin/bash
/bin/sleep 5
/usr/bin/xbmc -fs

In this script, /bin/sleep 5 makes the script wait for 5 seconds before executing the next command. /usr/bin/xbmc -fs launches XBMC in full-screen mode.

Here’s how you can create and use this script:

  1. Open a text editor and paste the above script.
  2. Save the script as xbmcstartscript.sh.
  3. Open a terminal and navigate to the directory where you saved the script.
  4. Make the script executable using the command chmod +x xbmcstartscript.sh.
  5. Add this script to the startup applications list instead of directly pointing to XBMC.

Method 4: Using Ubuntu’s Startup Application Tool

Another option is to use Ubuntu’s Startup Application tool to start Kodi as standalone. In the name field, enter the name of the startup (e.g., Kodi), and in the command field, enter -d 5 --standalone -fs. This will launch Kodi automatically at boot.

Here’s how you can do it:

  1. Open the “Startup Applications Preferences” dialog.
  2. Click on the “Add” button to add a new startup program.
  3. In the “Name” field, enter Kodi. In the “Command” field, enter -d 5 --standalone -fs.
  4. Click on the “Add” button to save the changes.

In the command -d 5 --standalone -fs, -d 5 makes Kodi wait for 5 seconds before launching, --standalone makes Kodi run as a standalone application, and -fs makes Kodi run in full-screen mode.

Conclusion

In this article, we covered different methods to autostart XBMC on Ubuntu boot. We hope this guide was helpful and you were able to set up XBMC to autostart on your Ubuntu system. If you have any questions or need further assistance, feel free to leave a comment below.

Can I use these methods to autostart Kodi on other Linux distributions?

Yes, these methods should work on other Linux distributions as well, as long as you have Kodi installed and the necessary startup applications or user account settings available.

How can I check if Kodi is already installed on my Ubuntu system?

You can check if Kodi is already installed on your Ubuntu system by opening a terminal and running the command which kodi. If Kodi is installed, it will display the path to the Kodi executable. If it is not installed, the command will not return any output.

Can I customize the delay time before Kodi launches using the startup script method?

Yes, you can customize the delay time by modifying the value in the line /bin/sleep 5 in the startup script. Simply change the number 5 to the desired number of seconds you want the script to wait before launching Kodi.

How can I remove Kodi from the autostart list?

To remove Kodi from the autostart list, you can open the "Startup Applications Preferences" dialog, locate the entry for Kodi, and click on the "Remove" button. This will remove Kodi from the list, and it will no longer launch automatically on system boot.

Can I use these methods to autostart other applications on Ubuntu?

Yes, you can use similar methods to autostart other applications on Ubuntu. The "Startup Applications Preferences" dialog and the startup script method can be used for any application by simply replacing the command with the desired application’s executable path or command.

Are there any risks or downsides to autostarting Kodi on Ubuntu boot?

Autostarting Kodi on Ubuntu boot should not pose any significant risks or downsides. However, it’s important to note that autostarting any application on system boot may slightly increase the time it takes for your system to fully start up. Additionally, if you have limited system resources, autostarting Kodi may consume some of those resources, potentially affecting the performance of other applications.

Leave a Comment

Your email address will not be published. Required fields are marked *