trolley
September 7, 2017, 11:39pm
1
I want to use the Plex Media Scanner from the command line but it won’t show me anything about my library:
trolley@mediaserver:~$ /usr/lib/plexmediaserver/Plex\ Media\ Scanner --list
trolley@mediaserver:~$
I have modifed the startup scripts so the server is running as my user, so I know that’s not the problem (I found that solution already):
trolley@mediaserver:~$ ps aux | grep "Plex Media Server"
trolley 1250 0.0 0.0 4496 716 ? Ss 19:16 0:00 /bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Server"
trolley 1257 0.1 2.3 444276 93064 ? Sl 19:16 0:01 /usr/lib/plexmediaserver/Plex Media Server
Is there something else I’m missing?
ChuckPa
September 7, 2017, 11:51pm
2
It’s username sensitive. It must be run as user plex
trolley
September 8, 2017, 12:04am
3
OK, thanks. It turns out changing which user PMS ran as wasn’t as simple as I thought since my changes got clobbered by a server upgrade.
I’ll have to figure out how to run my scripts as the plex user instead.
Why is there an option in /etc/defaults/plexmediaserver to change it then (which didn’t work on Ubuntu anyway)?
ChuckPa
September 8, 2017, 12:29am
4
Since Ubuntu 16.04, when systemd was implemented, /etc/defaults was obsoleted. It is provided in the package now for backward compatibility with Ubuntu 14 and 15 plus other init based systems.
I have a Linux Tip which shows you how to customize your Plex installation which will endure server upgrades.
Moving Plex’s metadata (Library) directory on systemd based systems This information is intended for those systems where cat /proc/1/comm returns systemd. If your system returns init, please see the next post in this thread. While you may change...
Reading time: 1 mins 🕑
Likes: 6 ❤
replace
/usr/lib/plexmediaserver/Plex\ Media\ Scanner --scan
with
su plex -c “/usr/lib/plexmediaserver/Plex\ Media\ Scanner --scan”
2 Likes