您的位置:首页 > 编程语言 > Go语言

Debian Google Chrome

2013-10-28 12:49 357 查看
vi /etc/apt/sources.list.d/google-chrome.list

deb http://dl.google.com/linux/deb/ stable main

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

apt-get update

apt-get install google-chrome-stable

Google Chrome can not be run as root

mkdir /home/chrome

chmod 777 /home/chrome

vi /usr/share/applications/google-chrome.desktop

[Desktop Entry]

Exec=/opt/google/chrome/google-chrome %U --user-data-dir=/home/chrome

Applications Menu - Settings - Preferred Applications, select google-chrome

vi ~/.local/share/xfce4/helpers/custom-WebBrowser.desktop

X-XFCE-Commands=/opt/google/chrome/google-chrome --user-data-dir=/home/chrome

Google Chrome isn't your default browser. Don't ask again.

I saw in my programs properties they have a "%u" in the end of the command, what does this do?

e.g. My Chrome have the command: /opt/google/chrome/google-chrome %U for what this %u is used here?

When you associate a file with a command, you can call this command with several arguments. %u simply means that the file name should go there. It is useful so you can put arguments after the filename. There are several other flags you can use.

http://superuser.com/questions/138433/what-is-the-u-command-in-all-my-programs-command
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: