Can't set http port on 9.11
#1
I just upgraded to 9.11 (running on Ubuntu 9.1), and can not set the http port (for remote control via web browser) to anything other than the default of port 8080. Sad

Prior to this I was running XBMC (I believe 8.10) on Windows XP and had the port set to 80, so I did not need to enter a port number in my browser, which I liked. Wink

Any attempt to change it to anything other than 8080 results in it simply switching itself back to 8080 as soon as I leave the Settings screen. Port 80 is not in use on my system by anything else (verified via netstat -ln.) No error message is generated, it's like the Settings dialog just doesn't save the port number.

- Jeff
Reply
#2
Well, since port 80 is a privileged port and since XBMC runs as a non-root user on linux, you can't do that unless you are running XBMC as root (not recommended).

Sounds like a nice feature request though Smile

Post one on trac if one does not exist.

FYI, non privileged ports are > 1024.
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
Without being an absolute expert:

I don't think it's possible to code something that would actually allow XBMC to listen on port 80 without running as root - Linux simply won't allow it.
(end of speculation)

As for a possible solution:
Add lines in IPTABLES, which internally routes anything coming in on port 80 to port 8080.
ASRock ION 330, Lucid Lynx, XBMC Dharma (beta 2)
Reply
#4
That's not true. You can always start as root and then switch effective user after it starts listening. Look at apache for example. It doesn't run as root but can listen on port 80. It does that by starting as root and then after it starts to listen it switches to the non-root user.
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
There's a dialog in mainline IIRC. I didn't backport it 'cause the code was kinda intrusive.

I think given the fact we can change ports at runtime, going setuid just so people can use a port <1024 would be a more or less useless effort. Forward it in your firewall if you're that hard on to use 80.

EDIT: Just tested... http://img695.imageshack.us/img695/4451/...ot000c.jpg . It pops up after a second or two like the "change res" setting works, otherwise it's not tested until you leave the window and it feels pretty clunky.
Reply
#6
tslayer Wrote:Well, since port 80 is a privileged port and since XBMC runs as a non-root user on linux, you can't do that unless you are running XBMC as root (not recommended).

Doh! Of course. Confused I really, really should have realized that. I've been adminning Linux and other unix-like servers for years. I guess I was just having a brain fart! Big Grin

Since I upgraded XBMC at the same time as I moved the box from Windows to Linux, I just assumed it was a bug in the new version of XBMC. I tried several other ports and saw the same behavior, but again, wasn't thinking straight so all the ports I tried were still privileged ports.

I'll go crawl back in my cave now. :-)

Thanks for the responses.

p.s. For what it's worth, I wasn't getting the "invalid port" error dialog shown above, otherwise I probably would have clued in. Maybe it's because I'm using PMIII? I mean even if I stay on that screen for some time after entering the port, I still don't get any error dialog.

- Jeff
Reply
#7
as althekiller said it was not backported to camelot.
Reply
#8
spiff Wrote:as althekiller said it was not backported to camelot.

Ah, you're right, so he did... I read his post quickly and misinterpreted it, I thought he said there was setuid code (i.e. launch as root, fork, and keep a process running to do port binding sort of like say Apache) in mainline, but it was the actual dialog box he was talking about. My bad.

- Jeff
Reply

Logout Mark Read Team Forum Stats Members Help
Can't set http port on 9.110