How to get Plex HTPC to play fullscreen on ubuntu server 22.04

Server Version#: ubuntu server 22.04, Nvidia graphic driver ubuntu nvdia-driver-515, Intel core I5-6600 skylake, EVGA GeForce GTX 1060 SC, 32GB RAM
Player Version#: latest Plex HTPC snap

I installed Plex HTPC on ubuntu server 22.04 (not ubuntu desktop).

The steps I followed to start Plex HTPC on start up are as follows:

After installing Ubuntu server 22.04 on my main machine, installed following packages as follows:

sudo apt install xauth xorg xinit xserver-xorg-core xserver-xorg xserver-common alsa-utils -y

after installing the said packages, I installed Plex HTPC from the snapstore using the following command:

sudo snap install plex-htpc

after installing the Plex HTPC, I created a systemd startup script as follows:

sudo nano /etc/systemd/system/plex-htpc.service


[Unit]
Description = Starts an instance of Plex HTPC using xinit
After=remote-fs.target systemd-user-sessions.service network-online.target sound.target polkit.service upower.service
Wants=network-online.target polkit.service upower.service
Conflicts=getty@tty1.service

[Service]
User=plex
Group=plex
PAMName = login
TTYPath=/dev/tty1
Environment=WINDOWING=x11
ExecStart = /usr/bin/xinit /var/lib/snapd/desktop/applications/plex-htpc_plex-htpc.desktop – :0 -quiet -nolisten tcp vt1
Restart=on-abort
StandardInput=tty
StandardOutput=journal

[Install]
Alias=display-manager.service

Then enabled the systemd service to start on startup as follows:

sudo systemctl enable plex-htpc.service

On retsrating the machine, i get the Plex HTPC running on start up but in a windowed mode.

I tried using the built in setting inside the Plex HTPC to full screen, tried changing video zoom setting with no luck.

I installed kodi using the similar method which starts up in full screen.

I would appreciate any tips or tricks to help get Plex HTPC to open in full screen on startup.

Thank you.

Dumb question on my side hitting F11 does not help either?

Wish if it were that easy. Even if it worked, not an ideal solution for me, as I don’t want to use a keyboard in front of my tv. I’have been using the machine as an appliance to have kodi running flawlessly with a flirc remote.

Okay, well, this would have been too easy. I have also not found a command that forces fullscreen like it was in PlexMediaPlayer with --fullscreen.

You could install openbox as window manager, modify your autostart routine and try it that way. I used to use it like that with PMP and for a bit with Plex HTPC (fullscreen definitely worked).

Hmmm… I tried executing

env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/plex-htpc_plex-htpc.desktop /snap/bin/plex-htpc

from a terminal on my Ubuntu 22.04 desktop. It came up nicely in full-screen mode. Then I went to Settings and under general there was a Visibility setting set to Full Screen. Note I had to select Visibility and nothing happened. It would not allow me to change it. I hit ESC and tried Visibility again and now I could change it. Odd. Anyway, I changed it to Window, and Plex HTPC was in a windowed mode. I existed and execute the command above again. This time Plex HTPC came up in Windowed mode. So I changed it back to Full Screen and exited again. This time upon restart it came up in Full Screen mode.

Perhaps that’d work for you too. Temporarily hook up a keyboard, run Plex HTPC, set it to Full Screen, and exit. Maybe that setting will stick now.

I know I can use a WM to get plex HTPC running that way but that’s defeats the purpose of running Plex HTPC running as an appliance for me’. I didn’t not even like the few seconds of the desktop screen showing when I tried running Plex HTPC on normal Ubuntu Desktop with plex auto starting on startup.

I tried the .desktop file putting in /.config/ and /etc/xdg/autostart location with different parameters but could not get the Plex HTPC to autostart on Ubuntu server.

The old Pled media player (from GitHub) worked flawlessly for me using the above mentioned script.I borrowed the script from kodi-standalone-service and applied to my use case.
Unless plex team does some tweaking of the plex HTPC on Linux code to start in full screen on a machine with no WM/DM installed, I will have to keep using kodi with plexkodiconnect plug-in

I’m confused. How does this defeat the purpose of running Plex HTPC as an appliance? I’m suggesting that temporarily you hook it up so you can run Plex HTPC in windowed mode, switch it to full-screen mode (i.e. a one-time tweak), and thereafter it should come up in full-screen mode.

May be the solution you proposed would work on Ubuntu desktop. I’m not using Ubuntu desktop. I’m using Ubuntu server which doesn’t have a window manager/desktop manager. I had to install an X11 window system to help plex htpc run on it. However, plex htpc is designed to take to ‘full screen’ if chosen full screen inside the settings when ran on Ubuntu desktop, or ‘maximise’ or ‘windowed’ mode when chosen accordingly. However, on a system designed to run with minimal Linux or JEOS( just enough operating system) for example librelec, the main application should run full screen. There was an attempt by the plex team in the past to have plex running as an embedded system which was abandoned. Then they concentrated on making plex player available for different streaming sticks/tvs. Plex htpc in my opinion was an afterthought. They introduced plex htpc for desktop for the power users. Plex htpc for Linux was last on their priority list. And I think to let plex htpc run on JEOS system would be not even on their list.

You installed several X components. Install a window manager. The problem is solved no? Don’t let the adherence to JEOS keep you from getting the task done.

¯_(ツ)_/¯

I know I can install a full Ubuntu desktop and call it a day or MS Windows for that matter. I just like the idea of JEOS for running a media player. Hopefully, plex team would do something to help!

It doesn’t seem to me that you need a “full Ubuntu desktop” rather you just need to install a window manager. You already installed X, how much additional space/worry is just installing a window manager? Looks like you are allowing the perfect to be the enemy of the “well at least it works”.

Granted, I understand you’d like to have it be as minimal as possible, but I thought you wanted to get it working. Forgive me if the latter is not a consideration for you.

Try using “ratpoison” wm. This is borderless WM. Put this to $HOME/.xinitrc then run startx:
#!/bin/bash
/usr/bin/ratpoison &
exec /snap/bin/plex-htpc

Of course you will need to add the given user (no, not root) to given groups (tty, input, etc).
Edit: the “ratpoison” is available in Ubuntu, i tried it in 22.04, but for me the Plex-HTPC still crashes, so have to check it why.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.