
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.
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:
- Open the “Startup Applications Preferences” dialog. You can do this by searching for “Startup Applications” in the Dash.
- Click on the “Add” button to add a new startup program.
- In the “Name” field, enter
XBMC
. In the “Command” field, enter/usr/bin/xbmc
. - 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:
- Open the “System Settings” dialog. You can do this by searching for “System Settings” in the Dash.
- Click on “User Accounts”.
- Click on “Unlock” and enter your password.
- Turn on the “Automatic Login” switch.
- 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:
- Open a text editor and paste the above script.
- Save the script as
xbmcstartscript.sh
. - Open a terminal and navigate to the directory where you saved the script.
- Make the script executable using the command
chmod +x xbmcstartscript.sh
. - 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:
- Open the “Startup Applications Preferences” dialog.
- Click on the “Add” button to add a new startup program.
- In the “Name” field, enter
Kodi
. In the “Command” field, enter-d 5 --standalone -fs
. - 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.
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.
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.
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.
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.
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.
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.