16.04-菜单栏时钟缺失

16.04-菜单栏时钟缺失

好的,菜单栏右上角的时钟不见了。以下是我所知道的:

  1. 我使用的是 2016 年 4 月 12 日版本的 16.04。

  2. 我第一次安装操作系统时,时钟就出现了。即使现在我的用户帐户中没有了时钟,但它仍然存在于访客帐户和登录屏幕上。

  3. 设置->时间和日期中的时钟设置选项显示为灰色,根本无法与其交互。

经过多次试验,我发现问题可能与我在 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

相关内容