And the following will tell you if the greeter is currently up:
sudo -u phablet -i gdbus call --session --dest=com.canonical.UnityGreeter --object-path=/ --method=org.freedesktop.DBus.Properties.Get com.canonical.UnityGreeter IsActive
And the following will tell you if the greeter is currently up:
sudo -u phablet -i gdbus call --session --dest= com.canonical. UnityGreeter --object-path=/ --method= org.freedesktop .DBus.Propertie s.Get com.canonical. UnityGreeter IsActive