
好的,選單列右上角的時鐘丟了。這是我所知道的:
我使用的是 2016 年 4 月 12 日建造的 16.04。
當我第一次安裝作業系統時,時鐘就出現了。即使它現在在我的用戶帳戶中消失了,它仍然存在於訪客帳戶和登入畫面中。
設定 -> 時間和日期中的時鐘設定選項呈現灰色,根本無法與之互動。
經過多次實驗,我發現這個問題可能與我安裝15.10中使用的應用程式有關。我編寫了 shell 腳本來恢復我擁有的一切。
單獨安裝項目並在每個項目後重新啟動以嘗試查看原因是什麼後,我證實了我的懷疑,這與我安裝的 PlexMediaServer 有關。我在下麵包含了為此安裝運行的 bash 腳本。
要安裝 Plex,我首先從網路取得安裝程式並運行它。然後,我從外部磁碟機複製備份的元資料並對其設定權限。然後,因為我的所有媒體都位於外部磁碟機上,所以我需要將其安裝在單獨的資料夾中,以便我可以更改權限,以便 Plex 可以看到它。
我覺得資料夾安裝最有可能是問題的根源,但我不確定。包括下面的 bash 腳本。任何意見,將不勝感激。
# Variables
MEDIA="MyPassport"
BACKUP="Seagate Expansion Drive"
EXTERNAL_PLEX="/media/craig/Seagate Expansion Drive/Plex Media Server"
INTERNAL_PLEX="/var/lib/plexmediaserver/Library/Application Support/"
LIST="/usr/share/gnome/applications/defaults.list"
MEDIA_DRIVE="/media/craig/MediaDrive"
# Special function for installing and configuring Plex.
function install_configure_plex {
# Install Plex Application
dpkg -i "$PLEX_FILE_NAME"
# Stop the service to configure its settings
service plexmediaserver stop
# Restore meta data from backup
echo "Copying Plex Media Server MetaData Backup. This may take some time."
rm -rf "$INTERNAL_PLEX/Plex Media Server/"
rsync -a --info=progress2 "$EXTERNAL_PLEX" "$INTERNAL_PLEX"
chown -R plex:plex "$INTERNAL_PLEX/Plex Media Server/"
rm "$PLEX_FILE_NAME"
# Setup the media Hard Drive so that Plex can read from it.
echo "Configuring Mount for Media Drive. Please wait."
DEV_DRIVE=$(sudo blkid -L "My Passport")
UUID=$(sudo blkid -o value -s UUID "$DEV_DRIVE")
umount "$DEV_DRIVE"
mkdir "$MEDIA_DRIVE"
echo "UUID=$UUID $MEDIA_DRIVE ntfs-3g defaults,nofail,permissions,auto 0 1" | sudo tee -a /etc/fstab
mount $MEDIA_DRIVE
chown -R craig:plex $MEDIA_DRIVE
# Start Plex
service plexmediaserver start
# Refresh Plex Libraries
echo "Refreshing Plex libraries"
export LD_LIBRARY_PATH=/usr/lib/plexmediaserver
wget http://127.0.0.1:32400/library/sections/2/refresh
wget http://127.0.0.1:32400/library/sections/1/refresh
# Add plex values to environment variables
echo "Adding Plex environment variables"
echo "export PLEX_HOME=/var/lib/plexmediaserver/Library/Application\ Support/PlexMediaServer" >> ~/.profile
echo "export LD_LIBRARY_PATH=/usr/lib/plexmediaserver" >> ~/.profile
return 0
}
echo "Downloading Plex Media Server"
cd ~
PLEX_DL_URL=$(curl -s https://plex.tv/downloads | grep Ubuntu64 | cut -d\" -f2)
PLEX_ERROR=$(wget "$PLEX_DL_URL" --no-check-certificate 2>&1 >/dev/null)
PLEX_FILE_NAME="${PLEX_DL_URL##*/}"
# Verify that the Plex file downloaded properly before proceeding
if [ -f "$PLEX_FILE_NAME" ]
then
echo "Installing Plex Media Server"
PLEX_DL_STATUS="success"
install_configure_plex
else
printf "${RED}Error! Plex Media Server failed to download{NC}\n"
printf "${RED}$ERROR${NC}\n"
PLEX_DL_STATUS="fail"
fi