![我無法在 Kubuntu 16.04 LTS 中下載新的 Plasma 小部件和 Plasma 主題](https://rvso.com/image/1087133/%E6%88%91%E7%84%A1%E6%B3%95%E5%9C%A8%20Kubuntu%2016.04%20LTS%20%E4%B8%AD%E4%B8%8B%E8%BC%89%E6%96%B0%E7%9A%84%20Plasma%20%E5%B0%8F%E9%83%A8%E4%BB%B6%E5%92%8C%20Plasma%20%E4%B8%BB%E9%A1%8C.png)
答案1
我在 /etc/xdg/ 中發現了大約 20 個文件,全部引用
ProvidersUrl=http://download.kde.org/ocs/providers.xml
我認為 download.kde 伺服器目前發送重定向到
https://autoconfig.kde.org/ocs/providers.xml
但我猜它沒有被遵循。
答案2
我認為這個 python 程式碼會幫助你..
import os
os.chdir("/etc/xdg")
file_list=os.listdir("/etc/xdg")
home=os.getenv("HOME")
os.mkdir(home+'/.kde/share/apps/providers')
provider="""<providers>
<provider>
<id>api.kde-look.org</id>
<location>https://api.kde-look.org/ocs/v1/</location>
<name>api.kde-look.org</name>
<termsofuse>https://api.kde-look.org/content/terms</termsofuse>
<register>https://api.kde-look.org/register</register>
<services>
<person ocsversion="1.6"/>
<content ocsversion="1.6"/>
</services>
</provider>
</providers>"""
prov=open(home+'/.kde/share/apps/providers/providers.xml', 'w')
prov.write(provider)
prov.close()
s_add="ProvidersUrl="+home+"/.kde/share/apps/providers.xml\n"
for i in range(len(file_list)):
try:
with open(file_list[i]) as t:
new=""""""
x=1
for line in t:
if "ProvidersUrl=http://download.kde.org/ocs/providers.xml" in line:
new=new+s_add
print file_list[i] + "====> is changed"
else:
new=new+line
t.close()
with open(file_list[i],'w') as f:
f.write(new)
f.close()
except IOError:
pass
如果我的程式碼不好,很抱歉!
答案3
對我來說這有效:
cd /etc/xdg
khotnewstuff4 plasmoids.knsrc
我從這裡改編了這個https://bugs.launchpad.net/ubuntu/+source/kde-runtime/+bug/1610665。該錯誤也在這裡討論http://defrances.co/post/kdelook/。
答案4
類型https://autoconfig.kde.org/ocs/providers.xml在瀏覽器中。
複製內容。
建立一個providers.xml 檔案並將它們貼到其中。
轉到/etc/xdg/
改變這一行
ProvidersUrl=http://download.kde.org/ocs/providers.xml
到
ProvidersUrl=file:///path/to/your/custom/xml/file/providers.xml
在所有包含它的檔案中。
我確信您可以使用終端命令在所有文件中執行此操作,但我不知道那是什麼。也許有人可以改進這個答案。我建議首先在單個文件上更改它,然後先測試相應的應用程式。與提到的等離子附加安裝程序相對應的檔案應該有一個非常明顯合適的名稱。
我在本指南中找到了訊息,並自己按照它進行操作,發現了另一個錯誤: https://bugs.launchpad.net/ubuntu/+source/kde-runtime/+bug/1610665
我不知道為什麼只是將線路更改為
ProvidersUrl=https://autoconfig.kde.org/ocs/providers.xml
行不通的。我無法測試這一點,因為我沒有問題的錯誤。
或者為什麼該指南使用的本地路徑 url 似乎對我不起作用......我在這裡發布了對我有用的內容。