Linux - HOW-TO make XBMC for Linux auto start on Ubuntu

  Thread Rating:
  • 5 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
PainToad Offline
Senior Member
Posts: 217
Joined: Aug 2008
Reputation: 0
Post: #46
If I do this, can I use CONTROL+ALT+1 and then so a startx to open a gnome session?
find quote
Morgyn Offline
Junior Member
Posts: 3
Joined: Nov 2008
Reputation: 0
Post: #47
With regards to the PolicyKit.conf and shutting down dbus errors

I added this section to the conf:

Quote: <match user="xbmc">
<match action="org.freedesktop.hal.power-management.shutdown-multiple-sessions">
<return result="yes"/>
</match>
</match>

xmbc in the above is the user I invoke xmbc with
find quote
PainToad Offline
Senior Member
Posts: 217
Joined: Aug 2008
Reputation: 0
Post: #48
$ sudo rcconf

<select gdm>

Prototype mismatch: sub main::__LONG_MAX__ () vs none at /usr/lib/perl/5.10/_h2ph_pre.ph line 291.
Constant subroutine __LONG_MAX__ redefined at /usr/lib/perl/5.10/_h2ph_pre.ph line 291.
find quote
zyxbox Offline
Junior Member
Posts: 5
Joined: Oct 2008
Reputation: 0
Location: Sweden
Post: #49
Hi, anyone got this working on Intrepid?
It boots up to :

kinit: no resume image, doing normal boot...

and hangs there..
find quote
PainToad Offline
Senior Member
Posts: 217
Joined: Aug 2008
Reputation: 0
Post: #50
zyxbox Wrote:Hi, anyone got this working on Intrepid?
It boots up to :

kinit: no resume image, doing normal boot...

and hangs there..

Got it working, but didn't like it. Reverted straight back. No idea what i wrong with your's sorry
find quote
IG82 Offline
Junior Member
Posts: 5
Joined: Jul 2008
Reputation: 0
Post: #51
zyxbox Wrote:Hi, anyone got this working on Intrepid?
It boots up to :

kinit: no resume image, doing normal boot...

and hangs there..

I'm getting the same problem, Ubuntu 8.10 running on one of the first Core Duo Mac Minis. I think it is a problem with hibernate which was not working correctly before trying to get XBMC to autoboot.

Going to undo my steps and try and get hibernate working correctly first.
find quote
IG82 Offline
Junior Member
Posts: 5
Joined: Jul 2008
Reputation: 0
Post: #52
zyxbox, worked out the issue on mine - user error!

Can you check your /etc/events.d/tty1 file?

MrCerulean's instructions say edit to:

Code:
exec /sbin/mingetty --autologin uname tty1

I had just edited the autologin parameters and not changed from getty to mingetty. Now I have corrected this small error all seems good!

Thanks for the HOWTO MrCerulean!
find quote
zyxbox Offline
Junior Member
Posts: 5
Joined: Oct 2008
Reputation: 0
Location: Sweden
Post: #53
Aah, as the windows user I am I never thought the double hyphen (--) was supposed to be spelled out,
I only used a single hyphen..

Hope this helps someone else ..
(This post was last modified: 2008-11-24 23:00 by zyxbox.)
find quote
oldnemesis Offline
Team-XBMC Developer
Posts: 157
Joined: Nov 2008
Reputation: 0
Post: #54
If you use openSuSE:

- The service you need to shutdown might be either gdm, kdm or xdm depending on whether you chose Gnome, KDE or XFCE;
- mingetty already installed and is in /etc/inittab, so you do not need to install it;
- no need to install rcconf, as the services are configured using chkconfig. Just type:

Code:
chkconfig xdm off

I also changed .bashrc so it doesn't try to start x when I connect to the box using ssh:

Code:
xpid=`pidof X`
if [ -z "$xpid" ]; then
        startx
fi

make sure your distro has pidof utility.

Other SuSE-specific tweaks:
1. It prints too much during kernel boot, which delays boot process for couple of seconds. Edit /boot/grub/menu.lst file, remove "showopts" and add "quiet" option.

2. It starts too many servers. Even in minimal installation I had to stop portmap and postfix. You could always stop postfix unless you want to read mail from your crond. If you're not going to mount NFS shares, you could stop portmap as well.

3. Yast2 -> Network services -> NTP configuration and enable NTP server. Will take care of your time. Make sure the timezone is set properly.

4. Do not enable automatic update, you risk to get a broken box three hours before the party at your house when kernel gets updated but your ATI or Nvidia driver is not Smile

Just my 5c.
find quote
Gurney Offline
Member
Posts: 58
Joined: Jul 2008
Reputation: 0
Location: Thionville, France
Post: #55
Hi guys,

First thank you for the howto, works like a charm on my Intrepid/780G box (I also applied the modification proposed by AlTheKiller).

I have a question. I know it is a bit off-topic, though it might be useful for people who want to start additional stuff along XBMC.

My .xinitrc looks like this:
Code:
#!/bin/sh
xmodmap ~/.xmodmap
xbmc --standalone

When I start the HTPC, everything runs smoothly except that the xmodmap line doesn't work. If I exit XBMC (back to tty), and then startx from the command line, it will work correctly, the .xmodmap file will be loaded.

Any clue on what is going on?
Thanks a lot!
Gurney
find quote
gilgongo Offline
Member
Posts: 59
Joined: Aug 2008
Reputation: 0
Post: #56
Gurney Wrote:Hi guys,

My .xinitrc looks like this:
Code:
#!/bin/sh
xmodmap ~/.xmodmap
xbmc --standalone

When I start the HTPC, everything runs smoothly except that the xmodmap line doesn't work. If I exit XBMC (back to tty), and then startx from the command line, it will work correctly, the .xmodmap file will be loaded.

Any clue on what is going on?
Thanks a lot!
Gurney

That's exactly my problem as well.

When I try the ~/.xmodmap call in .xinitrc, I see there's an error where xmodmap doesn't know what display to attach to. I've tried adding "-display 0:0" but that doesn't seem to make any difference (maybe the display syntax is wrong? Can't see any errors though).

Here's what I've also tried so far, none of which has worked:

1. Adding a call to ~/.xmodmap in /etc/X11/Xsession

2. Adding the same call to a file in /etc/X11/Xsession.d/

3. Trawling through the logs looking for any clues

4. Taking all my clothes off, covering myself in chocolate, then begging.

No

______________________

Acer Revo 1600 | SpeedLink SL-6399 | XMBCbuntu :nerd:
find quote
delneet Offline
Junior Member
Posts: 2
Joined: Jan 2009
Reputation: 0
Question   
Post: #57
ohickmott Wrote:Is anybody aware of a way to use the standalone method of booting into XBMC without gnome running and still be able to use wireless networking?

Any help is much appreciated!

Cheers
Olly

Has anybody found a solution to this problem yet?
I am also using the --standalone way explained in the howto...

Excellent howto for a n00b like me btw.

I'm using a pcmcia-card (SMC) which is autodetected by KDE4, but when I boot up in standalone mode, I have no wireless anymore...
find quote
hitman Offline
Donor
Posts: 59
Joined: Jan 2008
Reputation: 4
Location: London
Post: #58
After using the beginning of this post to implement autostarting without a Window Manager the only problem I had was shutting down, I was getting the dreaded dbus permission denied errors.

I tried the various solutions in this thread but they did not work for me. I decided to delve into things a bit more and found a solution that worked for me.

Use the following command to find out which actions are available to the user that runs xbmc (replace <xbmc_user> with the user you autologin and run xbmc with):
Code:
polkit-auth --user <xbmc_user>
I found that I had none on Hardy so and empty list was returned (Intrepid had 1 item not related to power). I then added actions as follows :

Code:
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.shutdown

Running polkit-auth --user <xbmc_user> now lists the action, and allows xbmc to shutdown the system. This was persistent across reboots.

I also added the following as I thought they would be useful, unfortunately I couldn't figure out how to add the whole lot so just did them individually:

Code:
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.shutdown-multiple-sessions
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.reboot
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.reboot-multiple-sessions
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.set-powersave
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.suspend
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.hibernate

I also tested the above in Intrepid in a VM and it worked for me there too.

EDIT: In Hardy I also had to comment out a line under "default" policy in /etc/dbus-1/system.d/hal.conf as follows:
Code:
<!--    <deny send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/> -->
and also changed the policy user from "0" to "<xbmc_user>" in the last section.

Hope this helps.

Hitman
(This post was last modified: 2009-01-05 12:45 by hitman.)
find quote
rodercot Offline
Donor
Posts: 796
Joined: Feb 2008
Reputation: 25
Location: Ottawa, Canada
Post: #59
hitman Wrote:After using the beginning of this post to implement autostarting without a Window Manager the only problem I had was shutting down, I was getting the dreaded dbus permission denied errors.

I tried the various solutions in this thread but they did not work for me. I decided to delve into things a bit more and found a solution that worked for me.

Use the following command to find out which actions are available to the user that runs xbmc (replace <xbmc_user> with the user you autologin and run xbmc with):
Code:
polkit-auth --user <xbmc_user>
I found that I had none on Hardy so and empty list was returned (Intrepid had 1 item not related to power). I then added actions as follows :

Code:
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.shutdown

Running polkit-auth --user <xbmc_user> now lists the action, and allows xbmc to shutdown the system. This was persistent across reboots.

I also added the following as I thought they would be useful, unfortunately I couldn't figure out how to add the whole lot so just did them individually:

Code:
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.shutdown-multiple-sessions
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.reboot
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.reboot-multiple-sessions
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.set-powersave
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.suspend
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.hibernate

I also tested the above in Intrepid in a VM and it worked for me there too.

EDIT: In Hardy I also had to comment out a line under "default" policy in /etc/dbus-1/system.d/hal.conf as follows:
Code:
<!--    <deny send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/> -->
and also changed the policy user from "0" to "<xbmc_user>" in the last section.

Hope this helps.

Hitman

Hitman,

Did you place these lines in the PolicyKit.conf file?

Thanks,

Dave
find quote
hitman Offline
Donor
Posts: 59
Joined: Jan 2008
Reputation: 4
Location: London
Post: #60
rodercot Wrote:Hitman,

Did you place these lines in the PolicyKit.conf file?

The first 4 blocks of code are commands to be run at the shell. The last code block is a file edit as specified.

I put up another post which has code to implement the whole process here.
find quote
Post Reply