Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Plex Home Theater for Arch Linux

alucrydalucryd Posts: 30Members

There you go, PKGBUILDs for PHT are now in good shape and unofficial builds are rolling out!

 

Packages

 

plex-home-theater is available in the official [community] repository. There is also a git package in the AUR, nightly builds for this one are available in the unofficial repository below.

Unofficial repository

 

Add the following lines above official repos in '/etc/pacman.conf'.

[alucryd]
SigLevel = Optional
Server = http://pkgbuild.com/~alucryd/$repo/$arch

Edit: Nuked the git package, github is only updated all at once when there's a release, making it useless.

The bird of Hermes is my name, eating my wings to make me tame.

Tagged:
«134

Comments

  • RandomTask83RandomTask83 Posts: 81Members ✭✭
    You are just a hero, congrats and keep doing this good work!
  • ziggimonziggimon Plex Dev Team AarhusPosts: 2,444Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee
    FYI: I linked to this post from this thread in the official Plex Home theater forum: https://forums.plexapp.com/index.php/topic/87253-linux-builds/?p=505687


    - Mark
    Get you Plex guides here: Naming Guide, NAS Guide, NTFS on Linux Guide, Linux Permissions Guide, Logs & Library Maintenance Help, Plex Help Page.

    My Plex world:
    Primary PMS: NAS - 24 bay Inter-Tech 4324L, Xeon E3-1230v2, SuperMicro X9SCM-F, 800GB SSD, Enough Spinning Storage
    HTPC/EyeTV: Mid 2011 Mac Mini 4GB RAM 60GB Vertex SSD, 50" Kuro
    Clients: Hackintosh - i7 3770K, 27" CinemaDisplay, 15" rMBP, ATV4, Roku3, iPhone 6 64GB, iPhone 5 64GB, iPad 3 16GB, riPad mini 32GB, Intel NUC DN2820FYKH, Asus Chromebox, RPI2, RPi3
  • mkrusenmkrusen Posts: 7Members, Plex Pass Plex Pass

    Arch Linux is the best! Thanks for this!

  • mkrusenmkrusen Posts: 7Members, Plex Pass Plex Pass

    I was able to get my HTPC running plexhometheater standalone after installing just a base arch install + video drivers + xorg server + plex-home-theater-git.

    Edit /etc/X11/xinit/xinitrc to comment out default commands and add my own:

    vi /etc/X11/xinit/xinitrc
    #twm &
    #xclock -geometry 50x50-1+1 &
    #xterm -geometry 80x50+494+51 &
    #xterm -geometry 80x20+494-0 &
    #exec xterm -geometry 80x66+0+0 -name login
    export XBMC_HOME=/usr/share/plexhometheater
    exec plexhometheater --standalone
    
    Then create a new systemd service to startx at boot: 
    vi /usr/lib/systemd/system/plexhometheater.service
    [Unit]
    Description=Start X and plexhometheater --standalone
    
    [Install]
    WantedBy=multi-user.target
    
    [Service]
    Type=oneshot
    ExecStart=/usr/bin/startx
    
    systemctl enable plexhometheater.service
    

    May not be the best way to go about this, but it is working.

     
  • alucrydalucryd Posts: 30Members

    I'm doing that with slightly different .xinitrc and service files on my desktop, so that plex runs on tty2 on the TV screen, and I still can use my desktop for everything else :)

    The bird of Hermes is my name, eating my wings to make me tame.

  • RandomTask83RandomTask83 Posts: 81Members ✭✭
    alucryd wrote on November 26 2013, 9:24 AM: »

    I'm doing that with slightly different .xinitrc and service files on my desktop, so that plex runs on tty2 on the TV screen, and I still can use my desktop for everything else :)


    Please share if you don't mind
  • alucrydalucryd Posts: 30Members

    Here is the service file, you need to have a functional "systemctl --user" for this to work (see arch systemd wiki for this, you need to modify systemd-user.pam iirc). The service file then needs to be placed in "~/.config/systemd/user/plex@service", you can start plex by issuing "systemctl --user start plex@tty2" for example. Keep in mind that it is not meant for autostarting plex, rather it is a more convenient way of switching to tty2, logging as my user and launching startx or xinit on it.

    [Unit]
    Description=Launch Plex Home Theater on %I
    
    [Service]
    ExecStart=/usr/bin/xinit plex
    TTYPath=/dev/%I
    TTYReset=yes
    TTYVHangup=yes
    TTYVTDisallocate=yes
    

    As for .xinitrc, here is the plex part:

    #!/bin/sh
    
    if [ -d /etc/X11/xinit/xinitrc.d ]; then
      for f in /etc/X11/xinit/xinitrc.d/*; do
        [ -x "$f" ] && . "$f"
      done
      unset f
    fi
    
    if [[ $1 == plex ]]; then
      /usr/bin/xrandr --output DVI-I-1 --off --output HDMI-0 --auto
      export XBMC_HOME=/usr/share/plexhometheater
      exec /usr/bin/plexhometheater
    fi
    

    The bird of Hermes is my name, eating my wings to make me tame.

  • puithovepuithove Posts: 407Members, Plex Pass Plex Pass

    Would love to see PHT in the official Arch repos.

  • DrifterDaveDrifterDave Posts: 4Members, Plex Pass Plex Pass
    edited December 2013

    I got a differant .service file working. Also allows for running plex as plex instead of root.

    [Unit]
    Description=Start X and plexhometheater --standalone
    
    [Install]
    WantedBy=multi-user.target
    
    [Service]
    User=plex
    Group=plex
    Type=simple
    Environment="XBMC_HOME=/usr/share/plexhometheater"
    Restart=on-abort
    ExecStart=/usr/bin/xinit /usr/bin/plexhometheater --standalone -- :0 -nolisten tcp
    

    This of course requires the plex user to be added and given the correct groups:

    groupadd plex
    useradd -d /usr/share/plexhometheater -g plex -s /bin/nologin plex
    usermod -a -G plex,audio,video,power,network,optical,storage,disk,uucp,lock plex
    

    If you have already have pht set up, you will also need to move the .plexht folder from the home directory into the plex user home directory "/usr/share/plexhometheater"

  • DrifterDaveDrifterDave Posts: 4Members, Plex Pass Plex Pass
    DrifterDave wrote on December 31 2013, 10:48 PM: »

    I got a differant .service file working. Also allows for running plex as plex instead of root.

    [Unit]
    Description=Start X and plexhometheater --standalone
    
    [Install]
    WantedBy=multi-user.target
    
    [Service]
    User=plex
    Group=plex
    Type=simple
    Environment="XBMC_HOME=/usr/share/plexhometheater"
    Restart=on-abort
    ExecStart=/usr/bin/xinit /usr/bin/plexhometheater --standalone -- :0 -nolisten tcp
    

    This of course requires the plex user to be added and given the correct groups:

    groupadd plex
    useradd -d /usr/share/plexhometheater -g plex -s /bin/nologin plex
    usermod -a -G plex,audio,video,power,network,optical,storage,disk,uucp,lock plex
    

    If you have already have pht set up, you will also need to move the .plexht folder from the home directory into the plex user home directory "/usr/share/plexhometheater"

    Although... This doesnt allow for shuting the box off with the "Shut Down" option in the interface (or suspending for that matter). I am not sure how to acheive that.... Anyone with more experience with systemd have any ideas?

  • zAozAo Posts: 152Members, Plex Pass Plex Pass

    Thanks alucryd!

  • alucrydalucryd Posts: 30Members
    DrifterDave wrote on January 1 2014, 1:13 AM: »

    Although... This doesnt allow for shuting the box off with the "Shut Down" option in the interface (or suspending for that matter). I am not sure how to acheive that.... Anyone with more experience with systemd have any ideas?

    I don't believe pht uses systemd to handle this. I'll have a look at this later if it's within my abilities.

    zAo wrote on January 8 2014, 3:31 PM: »

    Thanks alucryd!

    My pleasure!

    The bird of Hermes is my name, eating my wings to make me tame.

  • brando56894brando56894 Posts: 49Members, Plex Pass Plex Pass

    Any chance that we could get an ARM build of this? I'd love to run it on my Odroid-u2 running Arch Linux ARM.

  • alucrydalucryd Posts: 30Members
    brando56894 wrote on January 17 2014, 5:02 AM: »

    Any chance that we could get an ARM build of this? I'd love to run it on my Odroid-u2 running Arch Linux ARM.

    Nope, you'll have to build it yourself. I have no ARM build machine.

    The bird of Hermes is my name, eating my wings to make me tame.

  • brando56894brando56894 Posts: 49Members, Plex Pass Plex Pass

    Ah ok, I'll have to wait until my motherboard comes in because I'll be damned if I'm compiling this on my Chromebook or my Odroid lol

  • RealfolkbluesRealfolkblues Posts: 29Members, Plex Pass Plex Pass
    DrifterDave wrote on January 1 2014, 1:13 AM: »

    Although... This doesnt allow for shuting the box off with the "Shut Down" option in the interface (or suspending for that matter). I am not sure how to acheive that.... Anyone with more experience with systemd have any ideas?

    useradd -m -g users -G power, -s /bin/bash plex

  • zAozAo Posts: 152Members, Plex Pass Plex Pass
    edited March 2014

    On both the stable and the git version I got this a lot (intel i915) and it takes forever to load. Do more people have this?

    00:09:29 T:140429429245696 WARNING: FillBuffer: Reconnect, (re)try 1
    00:11:06 T:140429420852992  NOTICE: Thread CFileCache start, auto delete: false
    00:11:06 T:140429446031104 WARNING: Read - waited for data but got none
  • alucrydalucryd Posts: 30Members
    zAo wrote on March 22 2014, 11:12 PM: »

    On both the stable and the git version I got this a lot (intel i915) and it takes forever to load. Do more people have this?

    00:09:29 T:140429429245696 WARNING: FillBuffer: Reconnect, (re)try 1
    00:11:06 T:140429420852992  NOTICE: Thread CFileCache start, auto delete: false
    00:11:06 T:140429446031104 WARNING: Read - waited for data but got none

    Can't reproduce here on my desktop and laptop, nvidia and intel, but the error message doesn't seem graphics related. Don't know what's hitting you unfortunately.

    In fact 1.0.12 is smoother than any earlier revision for me, so I pushed it in [community]. Ended up putting everything in /opt, even though I don't like it, we had another package like this added recently and it doesn't seem to be frowned upon that much.

    The bird of Hermes is my name, eating my wings to make me tame.

  • zAozAo Posts: 152Members, Plex Pass Plex Pass
    edited March 2014

    Hmm. Strange. All other clients can play from my PMS, except this one. It will try to buffer, but failes after ~20 seconds and quits to the menu.

    Complete log:

    16:45:18 T:139768568461056  NOTICE: Creating Demuxer
    16:45:18 T:139768517895936  NOTICE: Thread CFileCache start, auto delete: false
    16:45:36 T:139770156005120 WARNING: Read - waited for data but got none
    16:45:48 T:139768568461056 WARNING: Previous line repeats 2 times.
    16:45:48 T:139768568461056   ERROR: Open - Error, could not open file plexserver://332b469067bdc23b27845ff495f321a8407da74e/library/parts/1242/file.m4v
    16:45:48 T:139768568461056   ERROR: OpenDemuxStream - Error creating demuxer
    16:45:48 T:139768568461056  NOTICE: CDVDPlayer::OnExit()
    16:45:48 T:139768568461056  NOTICE: CDVDPlayer::OnExit() deleting input stream
    16:46:05 T:139768576853760  NOTICE: Thread Jobworker start, auto delete: true
    16:46:09 T:139770331019008 WARNING: Read - waited for data but got none
    16:46:15 T:139770339411712 WARNING: FillBuffer: curl [http://192.168.178.20:32400/library/arts?X-Plex-Token=SECRETSTUFF] failed with code 28
    16:46:15 T:139770339411712 WARNING: FillBuffer: Reconnect, (re)try 1
    16:46:16 T:139770172790528 WARNING: FillBuffer: curl [http://192.168.178.20:32400/library/sections/2/recentlyAdded?unwatched=1&X-Plex-Token=SECRETSTUFF] failed with code 28
    16:46:16 T:139770172790528 WARNING: FillBuffer: Reconnect, (re)try 1
    16:46:16 T:139770164397824 WARNING: FillBuffer: curl [http://192.168.178.20:32400/library/sections/2/onDeck?X-Plex-Token=SECRETSTUFF] failed with code 28
    16:46:16 T:139770164397824 WARNING: FillBuffer: Reconnect, (re)try 1
    16:46:16 T:139768797046528 WARNING: FillBuffer: curl [http://192.168.178.20:32400/library/sections/2/arts?X-Plex-Token=SECRETSTUFF] failed with code 28
    16:46:16 T:139768797046528 WARNING: FillBuffer: Reconnect, (re)try 1
    16:46:16 T:139768938604288 WARNING: FillBuffer: curl [http://192.168.178.20:32400/library/sections/1/recentlyAdded?unwatched=1&X-Plex-Token=SECRETSTUFF] failed with code 28
    16:46:16 T:139768938604288 WARNING: FillBuffer: Reconnect, (re)try 1
    16:46:16 T:139770164397824 WARNING: CPlexDirectory::ReadMediaContainer root name MediaContainer
    16:46:16 T:139770147612416 WARNING: Previous line repeats 1 times.
    16:46:16 T:139770147612416 WARNING: FillBuffer: curl [http://192.168.178.20:32400/library/arts?X-Plex-Token=SECRETSTUFF] failed with code 28
    16:46:16 T:139770147612416 WARNING: FillBuffer: Reconnect, (re)try 1
    16:46:16 T:139768788653824 WARNING: FillBuffer: curl [http://192.168.178.20:32400/photo/:/transcode?height=320&url=http://127.0.0.1:32400/:/plugins/com.plexapp.plugins.bringthepopcorn/resources/icon-default.png?t=1387342576&width=320&X-Plex-Token=SECRETSTUFF] failed with code 28
    16:46:16 T:139768788653824 WARNING: FillBuffer: Reconnect, (re)try 1
    

    Any ideas? Thanks alucryd

  • alucrydalucryd Posts: 30Members

    Well curl error 28 is a timeout, apparently pht can't access your pms. Is there anything that could be blocking network traffic? Can you open http://192.168.178.20:32400/ in a browser?

    The bird of Hermes is my name, eating my wings to make me tame.

«134
Sign In or Register to comment.