mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
[Translated]
tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop
This commit is contained in:
parent
ba9c32a223
commit
213db38fc7
@ -1,72 +0,0 @@
|
||||
Translating by ictlyh
|
||||
Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop
|
||||
================================================================================
|
||||
> **Question**: I often need to change system proxy settings on Ubuntu desktop, but I do not want to go through a chain of GUI menus: "System Settings" -> "Network" -> "Network proxy", which is cumbersome. Is there a more convenient way to change desktop's proxy settings from the command line?
|
||||
|
||||
In Ubuntu desktop, its desktop environment settings, including system proxy settings, are stored in DConf database, which is a simple key/value store. If you modify any desktop properties using System Settings menu, the changes are persisted in the DConf database backend. There are GUI-based or non-GUI-based ways to modify DConf database on Ubuntu. While System Settings or dconf-editor are graphical methods for accessing DConf database, gsettings or dconf are command-line tools that can modify the database.
|
||||
|
||||
Here is how to change system proxy settings from the command line using gsettings.
|
||||
|
||||
![](https://farm6.staticflickr.com/5460/17872782271_68e5267a4a_c.jpg)
|
||||
|
||||
The basic usage of gsettings for reading and writing a particular Dconf setting is as follows.
|
||||
|
||||
To modify a DConf setting:
|
||||
|
||||
$ gsettings set <schema> <key> <value>
|
||||
|
||||
To read a DConf setting:
|
||||
|
||||
$ gsettings get <schema> <key>
|
||||
|
||||
### Change System Proxy Setting to Manual from the Command Line ###
|
||||
|
||||
The following commands will change HTTP proxy setting to "my.proxy.com:8000" on Ubuntu desktop.
|
||||
|
||||
$ gsettings set org.gnome.system.proxy.http host 'my.proxy.com'
|
||||
$ gsettings set org.gnome.system.proxy.http port 8000
|
||||
$ gsettings set org.gnome.system.proxy mode 'manual'
|
||||
|
||||
If you want to change HTTPS/FTP proxy to manual as well, use these commands:
|
||||
|
||||
$ gsettings set org.gnome.system.proxy.https host 'my.proxy.com'
|
||||
$ gsettings set org.gnome.system.proxy.https port 8000
|
||||
$ gsettings set org.gnome.system.proxy.ftp host 'my.proxy.com'
|
||||
$ gsettings set org.gnome.system.proxy.ftp port 8000
|
||||
|
||||
To change Socks host settings to manual:
|
||||
|
||||
$ gsettings set org.gnome.system.proxy.socks host 'my.proxy.com'
|
||||
$ gsettings set org.gnome.system.proxy.socks port 8000
|
||||
|
||||
All these changes above are limited to the current Desktop user only. If you want to apply the proxy setting changes system-wide, prepend sudo to gsettings command. For example:
|
||||
|
||||
$ sudo gsettings set org.gnome.system.proxy.http host 'my.proxy.com'
|
||||
$ sudo gsettings set org.gnome.system.proxy.http port 8000
|
||||
$ sudo gsettings set org.gnome.system.proxy mode 'manual'
|
||||
|
||||
### Change System Proxy Setting to Automatic from the Command Line ###
|
||||
|
||||
If you are using [proxy auto configuration][1] (PAC), type the following commands to switch to PAC.
|
||||
|
||||
$ gsettings set org.gnome.system.proxy mode 'auto'
|
||||
$ gsettings set org.gnome.system.proxy autoconfig-url http://my.proxy.com/autoproxy.pac
|
||||
|
||||
### Clear System Proxy Setting from the Command Line ###
|
||||
|
||||
Finally, to remove manual/automatic proxy setting, and revert to no-proxy setting:
|
||||
|
||||
$ gsettings set org.gnome.system.proxy mode 'none'
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/change-system-proxy-settings-command-line-ubuntu-desktop.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://ask.xmodulo.com/author/nanni
|
||||
[1]:http://xmodulo.com/how-to-set-up-proxy-auto-config-on-ubuntu-desktop.html
|
@ -1,43 +0,0 @@
|
||||
Translating by ictlyh
|
||||
Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop
|
||||
================================================================================
|
||||
> **Question**: I am trying to customize fresh Ubuntu desktop that I just installed. For that, I want to use Unity Tweak Tool. How can I install Unity Tweak Tool on Ubuntu?
|
||||
|
||||
[Unity Tweak Tool][1] is a popular Unity desktop customization tool. As the name implies, this tool is applicable to Ubuntu's default desktop environment only (i.e., Unity-based GNOME desktop). This versatile tool allows you to customize a wide variety of Unity desktop features and configurations via extremely intuitive and easy-to-use GUI. Its menu looks similar to Ubuntu's official System Settings, but its desktop customization capabilities far exceed those of the default System Settings. Using Unity Tweak Tool, you can customize appearance, behaviors and configurations for a plethora of desktop components, such as workspace, windows, icons, themes, cursors, fonts, scrolling, hot corners, etc. If you are a Unity desktop user, Unity Tweak Tool is definitely a must-have app.
|
||||
|
||||
![](https://farm6.staticflickr.com/5463/17684020389_25dc7f0db2_b.jpg)
|
||||
|
||||
While Unity Tweak Tool is an essential tool for Ubuntu desktop, it does not come pre-installed on stock Ubuntu desktop. For those of you to customize Unity desktop, here is how to install Unity Tweak Tool on Ubuntu desktop.
|
||||
|
||||
### Install Unity Tweak Tool on Ubuntu 13.04 and higher ###
|
||||
|
||||
Starting with Ubuntu 13.04, Unity Tweak Tool is available in the Ubuntu's base repositories. So its installation is as straightforward as:
|
||||
|
||||
$ sudo apt-get install unity-tweak-tool
|
||||
|
||||
To launch Unity Tweak Tool:
|
||||
|
||||
$ unity-tweak-tool
|
||||
|
||||
If you want to try the latest version of Unity Tweak Tool, you can install it from its daily PPA (as describe below).
|
||||
|
||||
### Install Unity Tweak Tool on Ubuntu 12.10 ###
|
||||
|
||||
Note that Unity Tweak Tool works on Ubuntu 12.10 and higher. If you want to install it on Ubuntu 12.10, you can use its PPA repository as follows. This PPA repository is also useful when you want to test the latest developments of the tool.
|
||||
|
||||
$ sudo add-apt-repository ppa:freyja-dev/unity-tweak-tool-daily
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install unity-tweak-tool
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/install-unity-tweak-tool-ubuntu-desktop.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://ask.xmodulo.com/author/nanni
|
||||
[1]:https://launchpad.net/unity-tweak-tool
|
@ -0,0 +1,71 @@
|
||||
Linux 有问必答--如何在桌面版 Ubuntu 中用命令行更改系统代理设置
|
||||
================================================================================
|
||||
> **问题**: 我经常需要在桌面版 Ubuntu 中更改系统代理设置,但我不想通过繁琐的 GUI 菜单链:"系统设置" -> "网络" -> "网络代理"。在命令行中有更方便的方法更改桌面版的代理设置吗?
|
||||
|
||||
在桌面版 Ubuntu 中,它的桌面环境设置,包括系统代理设置,都存储在 DConf 数据库,这是简单的键值对存储。如果你想通过系统设置菜单修改桌面属性,更改会持久保存在后端的 DConf 数据库。在 Ubuntu 中更改 DConf 数据库有基于图像用户界面和非图形用户界面的两种方式。系统设置或者 dconf-editor 是访问 DConf 数据库的图形方法,而 gsettings 或 dconf 就是能更改数据库的命令行工具。
|
||||
|
||||
下面介绍如何用 gsettings 从命令行更改系统代理设置。
|
||||
|
||||
![](https://farm6.staticflickr.com/5460/17872782271_68e5267a4a_c.jpg)
|
||||
|
||||
gsetting 读写特定 Dconf 设置的基本用法如下:
|
||||
|
||||
更改 DConf 设置:
|
||||
|
||||
$ gsettings set <schema> <key> <value>
|
||||
|
||||
读取 DConf 设置:
|
||||
|
||||
$ gsettings get <schema> <key>
|
||||
|
||||
### 通过命令行更改系统代理设置为手动 ###
|
||||
|
||||
桌面版 Ubuntu 中下面的命令会更改 HTTP 代理设置为 "my.proxy.com:8000"。
|
||||
|
||||
$ gsettings set org.gnome.system.proxy.http host 'my.proxy.com'
|
||||
$ gsettings set org.gnome.system.proxy.http port 8000
|
||||
$ gsettings set org.gnome.system.proxy mode 'manual'
|
||||
|
||||
如果你还想更改 HTTPS/FTP 代理为手动,用这些命令:
|
||||
|
||||
$ gsettings set org.gnome.system.proxy.https host 'my.proxy.com'
|
||||
$ gsettings set org.gnome.system.proxy.https port 8000
|
||||
$ gsettings set org.gnome.system.proxy.ftp host 'my.proxy.com'
|
||||
$ gsettings set org.gnome.system.proxy.ftp port 8000
|
||||
|
||||
更改套接字主机设置为手动:
|
||||
|
||||
$ gsettings set org.gnome.system.proxy.socks host 'my.proxy.com'
|
||||
$ gsettings set org.gnome.system.proxy.socks port 8000
|
||||
|
||||
上面的更改都只适用于当前的桌面用户。如果你想在系统范围内使用代理设置更改,在 gsettings 命令面前添加 sudo。例如:
|
||||
|
||||
$ sudo gsettings set org.gnome.system.proxy.http host 'my.proxy.com'
|
||||
$ sudo gsettings set org.gnome.system.proxy.http port 8000
|
||||
$ sudo gsettings set org.gnome.system.proxy mode 'manual'
|
||||
|
||||
### 在命令行中更改系统代理设置为自动 ###
|
||||
|
||||
如果你正在使用 [自动配置代理][1] (proxy auto configuration,PAC),输入以下命令更改为 PAC。
|
||||
|
||||
$ gsettings set org.gnome.system.proxy mode 'auto'
|
||||
$ gsettings set org.gnome.system.proxy autoconfig-url http://my.proxy.com/autoproxy.pac
|
||||
|
||||
### 在命令行中清除系统代理设置 ###
|
||||
|
||||
最后,清除所有 手动/自动 代理设置,还原为无代理设置:
|
||||
|
||||
$ gsettings set org.gnome.system.proxy mode 'none'
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/change-system-proxy-settings-command-line-ubuntu-desktop.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[ictlyh](https://github.com/ictlyh)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://ask.xmodulo.com/author/nanni
|
||||
[1]:http://xmodulo.com/how-to-set-up-proxy-auto-config-on-ubuntu-desktop.html
|
@ -0,0 +1,42 @@
|
||||
Linux 有问必答--如何在桌面版 Ubuntu 中安装 Unity Tweak Tool
|
||||
================================================================================
|
||||
> **问题**: 我试着给刚安装的桌面版 Ubuntu 自定制桌面。我想使用 Unity Tweak Tool。我怎样才能在 Ubuntu 上安装 Unity Tweak Tool 呢?
|
||||
|
||||
[Unity Tweak Tool][1] 是个流行的 Unity 桌面自定制工具。顾名思义,该工具只适用于 Ubuntu 的默认桌面环境(例如,基于 Unity 的 GNOME 桌面)。这个多功能的工具允许你通过非常直观和简单易用的图形用户界面自定义多种 Unity 桌面特性。它的菜单看起来类似于 Ubuntu 的官方系统设置,但它的桌面自定制能力远远超过默认的系统设置。通过使用 Unity Tweak Tool,你可以自定制外观、行为以及很多桌面组件的配置,例如工作区、窗口、图标、主题、光标、字体、滑动、热键等等。如果你是 Unity 桌面用户,Unity Tweak Tool 一定是个必不可少的应用程序。
|
||||
|
||||
![](https://farm6.staticflickr.com/5463/17684020389_25dc7f0db2_b.jpg)
|
||||
|
||||
尽管 Unity Tweak Tool 是桌面版 Ubuntu 的重要工具,并没有在桌面版 Ubuntu 中预安装。为了能自定制 Unity 桌面,下面介绍一下如何在桌面版 Ubuntu 中安装 Unity Tweak Tool。
|
||||
|
||||
### 在 Ubuntu 13.04 或更高版本中安装 Unity Tweak Tool ###
|
||||
|
||||
从 Ubuntu 13.04 开始, Ubuntu 的基础库中就有 Unity Tweak Tool 了。因此它的安装非常简单:
|
||||
|
||||
$ sudo apt-get install unity-tweak-tool
|
||||
|
||||
启动 Unity Tweak Tool:
|
||||
|
||||
$ unity-tweak-tool
|
||||
|
||||
如果你想使用最新版本的 Unity Tweak Tool,你可以从它的 PPA 中安装(如下所述)。
|
||||
|
||||
### 在 Ubuntu 12.10 中安装 Unity Tweak Tool ###
|
||||
|
||||
注意,Unity Tweak Tool 要求 Ubuntu 12.10 或更高的版本。如果你想着 Ubuntu 上安装它,你可以安装下面方法使用 PPA。当你想测试最新的开发版的时候这个 PPA 库也非常有用。
|
||||
|
||||
$ sudo add-apt-repository ppa:freyja-dev/unity-tweak-tool-daily
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install unity-tweak-tool
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/install-unity-tweak-tool-ubuntu-desktop.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[ictlyh](https://github.com/ictlyh)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://ask.xmodulo.com/author/nanni
|
||||
[1]:https://launchpad.net/unity-tweak-tool
|
Loading…
Reference in New Issue
Block a user