Project

General

Profile

Separated users on one Server....how?

Added by Hans Olo about 11 years ago

Heyho,

I use THV since many years very successful, currently tvheadend_3.5.243 on a debian server with XBMC as frontends.

What I like to do now:

I'd like to provide one "instance" to another XBMC client that is separated from the others.

This does not have to be a "secure" setup. The only neccessity is, that users on Client 1 cannot see what the other Clientgroup watches or what is sceduled for recording (and vice versa).

Setting different users in TVH does not suffice as still everyone sees every recording.

Starting two seperate instances of TVH with different ports on my server would suffice, but Adam Sutton stated not long ago somewhere on XBMC that this is highly inefficient and XBMC cannot cope with it anyway.

A second server is something I try not to do.
A VM-Setup is out of question.
Cards don't need to be shared ( I can dedicate one to each).

Any ideas to reach that goal with the least amount of work and maintenance?

Thanks!


Replies (9)

RE: Separated users on one Server....how? - Added by jody gugelhop about 11 years ago

hm only thing that would come to my mind, next to the things that you exclude would be to manipulate the webinterface coding somehow e.g. create subsites that extracts info on a user level from the regular webinterface and "pump" that info into another e.g. apache site and give those site urls to users, but not sure if that would be possible and would probably require a lot of coding

RE: Separated users on one Server....how? - Added by Hans Olo about 11 years ago

I don't need the webinterface.

I only need XBMC behaving like a "single" client. Not showing what the other is watching or recording.

Oh, and I don't want to rewrite code. First: I can't and second: I'd like to have an easy way of upgrading, without repatching, testing, fixing.

I don't mind however to bend the debian underneath my TVH in any way possible.

RE: Separated users on one Server....how? - Added by Tony Pilborg about 11 years ago

Hans Olo wrote:

Starting two seperate instances of TVH with different ports on my server would suffice, but Adam Sutton stated not long ago somewhere on XBMC that this is highly inefficient and XBMC cannot cope with it anyway.

A second server is something I try not to do.
A VM-Setup is out of question.
Cards don't need to be shared ( I can dedicate one to each).

Any ideas to reach that goal with the least amount of work and maintenance?

Thanks!

I would go for the just compiling 2 different versions (change port numbers for HTTP and HTSP) - and rename to ensure no confusion with regards to service starting etc... Be sure to also change dirs for configs, so perhaps the "normal" service stays in .hts/tvheadend, and the new one could be in .hts2/tvheadend. Then use 1 tv-card in one instance (one service) - could be the regular instance on port 9981/9982 - and then assign another tv-card to the other service (i.e. running on port 19981/19982 - and the executable named TVH2)..

Insufficient - Yes
Confusing - not really (except when you setup tuners, but nothing problematic, you just need to do it twice..
XBMC problems - Not at all. On "Client1" you run just one XBMC client talking to port 19981 and 19982 - it will not "cope" with anything strange.. All other XBMC clients also just see one server (regular port 9981-9982)..

Only thing to be aware of - nothing is shared (well you could share XMLTV files and recording - but you probably won't), this is conceptually just as if you choose the 2 server approach.. Except physically the 2 services (tvheadend and TVH2) both run on the same server...

- I haven't tried this myself, something could be a problem, but I fail to see what it should be... There is nothing relying on net broadcasts, so controlling ports, config dirs and ensuring that you select a tv-card only for one of the servers should enough..

-TOP

RE: Separated users on one Server....how? - Added by jody gugelhop about 11 years ago

i didn't understand what you meant, sorry, honestly still don't get it completely, i just use separate xbmc clients and they don't show me what the other one is watching

RE: Separated users on one Server....how? - Added by Hans Olo about 11 years ago

Thanks for your ideas! :)

@Tony Pilborg

That was, what I initially tried to do, but I stumbled over this post by adamsutton in May http://forum.xbmc.org/showthread.php?tid=165017 and he sais that XBMC is not able to handle it "without hacking". However he does not say why and where issues arise. I guess more than the 2 ports available in setup are needed for full conversation. I haven't yet had the urge to try anyways as I lack the time at the moment and I guess adam knows what he's talking about ;) But maybe I understood him incorrectly (as the Question in that thread differed from my issue) and might try it anyway as soon as I find the time.

@jody gugelhop
In my tests with XBMC on Openelec every client, no matter what TVH-user is used for authentication, gets a popup saying "XY is scheduled for recording" when starting up and also the notifications when someone schedules something new. Additionally when you check the EPG you see what is scheduled and of course everyone can cancel recordings of other people.

This is mostly a matter of privacy, not security. I don't need a temper-proof design. I just need something that does not show what someone else is doing.

RE: Separated users on one Server....how? - Added by Tony Pilborg about 11 years ago

Hans Olo wrote:

Thanks for your ideas! :)

@Tony Pilborg

That was, what I initially tried to do, but I stumbled over this post by adamsutton in May http://forum.xbmc.org/showthread.php?tid=165017 and he sais that XBMC is not able to handle it "without hacking". However he does not say why and where issues arise. I guess more than the 2 ports available in setup are needed for full conversation. I haven't yet had the urge to try anyways as I lack the time at the moment and I guess adam knows what he's talking about ;) But maybe I understood him incorrectly (as the Question in that thread differed from my issue) and might try it anyway as soon as I find the time.

@jody gugelhop
In my tests with XBMC on Openelec every client, no matter what TVH-user is used for authentication, gets a popup saying "XY is scheduled for recording" when starting up and also the notifications when someone schedules something new. Additionally when you check the EPG you see what is scheduled and of course everyone can cancel recordings of other people.

This is mostly a matter of privacy, not security. I don't need a temper-proof design. I just need something that does not show what someone else is doing.

For your usage what I outlined will work. The thread concerns two issues not in play for you:
1. That it should not be possible to change the port TVH listens to.. Only true when using a precompiled package - there it is not possible to change.. But you can change it via compiling options.
2. XBMC is not built to talk to two TVH servers... But this is not a problem, since you specifically want your clients only to talk with either one or the other of the two "servers"...

Should be a breeze - good luck :-)

-Tony

RE: Separated users on one Server....how? - Added by Adam Sutton about 11 years ago

I've only skimmed the thread and not read it properly so apologies if I answer the wrong questions:

1. You can easily run TVH on a sep. port, I do this a lot for debug purposes (I have 1 tuner dedicated to by dev instance for example). Use --htsp_port X and --http_port Y options. These are both part of 3.4.

$ tvheadend --help

is your friend.

2. The comments regarding XBMC relate to its inability to communicate with multiple TVH servers. Not something most people need to do, but some do for various reasons.

If however you're trying to create entirely independent setups. I.e. with each XBMC instance tied to just one TVH server then you're fine. Just change the XBMC configure port numbers (in the addon config).

Again this is what I currently do as I'm running the new DVB rewrite code on my server on ports 19981/19982 and have pointed my bedroom XBMC box at this instance.

Adam

RE: Separated users on one Server....how? - Added by Hans Olo about 11 years ago

Thanks Tony and Adam :)

Skimming the thread was sufficient ;) I'm quite happy that I simply misunderstood the thread. I'll go for the second server then. Hopefully my little Via Eden will handle it ;)

Thanks alot for your quick help and all the work you put in TV headend, I'll report back and will place a donation in the THV PP account :)

RE: Separated users on one Server....how? - Added by Anton Bungin over 9 years ago

I'm planning to compile the second instance (4.0 vs. existing 3.4) on the same machine.
In .../tvheadend(version)/debian/tvheadend.default I have to change these lines:
TVH_USER="hts" > TVH_USER="hts2"
TVH_HTTP_PORT="" > TVH_HTTP_PORT="19981"
TVH_HTSP_PORT="" > TVH_HTSP_PORT="19982"

What else must I change and where so that files won't be overwritten?
As far as I understand, these paths should differ for two instances after installation:
/usr/bin/tvheadend
/usr/bin/tv_grab_*
/usr/share/tvheadend/
/etc/default/tvheadend

    (1-9/9)