1. 程式人生 > >ubuntu16.04解除安裝firefox,然後再次安裝firefox

ubuntu16.04解除安裝firefox,然後再次安裝firefox

因為出現了下面的問題

Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.

然而沒有解決這個問題,然後想著直接解除安裝吧,然後安裝一箇中文版的firefox

解除安裝firefox

首先檢視有哪些需要解除安裝的

dpkg --get-selections |grep firefox

然後直接解除安裝這三個檔案

sudo apt-get purge firefox unity-scope-firefoxbookmarks firefox-locale-en firefox-locale-zh-hans

當然可以再次檢視是否解除安裝乾淨

安裝firefox

我下載的是中文64位的

將下載好的壓縮包解壓,解壓出的資料夾名為firefox,將其移動到/opt目錄下,輸入指令:

sudo mv firefox /opt

ubuntu所有的快捷方式都在/usr/share/applications目錄下。進入到這個目錄, 在root賬戶下,建立一個檔案,命名為firefox.desktop,輸入的指令:

cd /usr/share/applications/
sudo touch firefox.desktop

開啟新建立的檔案

sudo gedit firefox.desktop

直接輸入,可能地址會有不同,具體指的是Icon

[Desktop Entry]
Name=firefox
Name[zh_CN]=火狐瀏覽器
Comment=火狐瀏覽器
Exec=/opt/firefox/firefox
Icon=/opt/firefox/browser/chrome/icons/default/default128.png
Terminal=false
Type=Application
Categories=Application
Encoding=UTF-8
StartupNotify=true

然後sudo reboot重啟一下就可以了,點開左邊最上面那個圖示,然後搜尋到firefox,最好在lock from Launcher。