https://wiki.archlinux.org/api.php?action=feedcontributions&user=Dodo3773&feedformat=atomArchWiki - User contributions [en]2024-03-28T19:07:47ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:Citrix&diff=451647Talk:Citrix2016-09-23T00:38:09Z<p>Dodo3773: /* Description? What is citrix? */ new section</p>
<hr />
<div>== Citrix Manual install differences / notes ==<br />
<br />
Followed the manual instruction notes mostly. Some additional notes with my setup.<br />
Before starting the manual setup:<br />
<br />
Enable 'multilib' if you haven't done so. If you try to install the list of packages starting with lib32xxx and get package not found, you need to enable the multilib repositories. The link https://wiki.archlinux.org/index.php/multilib<br />
will go over how to do so.<br />
<br />
During install of USB functions, the install script from citrix fails in several places due to certain missing files. This occurred running as root.<br />
<br />
During this process, some of the 32 bit libs, there were several package conflicts with already loaded files. I kept my fingers crossed and followed the defaults of replacing them.<br />
<br />
After script completed and running firefox to launch citrix client, got 'error 61'. In my case it was a thawte certificate. Converting the firefox certs to pem and linking them to the default citrix keystore directory didn't work. Mozilla's certs had thawte in them. I ended up following the procedure at this link to get the cert from the web page directly: hintshop.ludvig.co.nz/show/citrix-certificate/ <br />
<br />
As noted in the web page, make sure you select the top level or 'root' cert before you export. After this the ctrix client loaded right up after I copied the exported cert to the default citrix keystore directory.<br />
<br />
If anyone knows how to configure the USB for arh linux, please reply.<br />
<br />
<br />
I am unable to use the super keys on the remote, if anybody has an answer please reply here or at http://unix.stackexchange.com/questions/254092/send-super-key-to-remote-citrix-session and I'll update the ArchLinux wiki with the instructions.<br />
<br />
== Description? What is citrix? ==<br />
<br />
Shouldn't there be a description at the top of the page as to what citrix is? Something like: <br />
<br />
<br />
Citrix<br />
<br />
"Citrix is a something that does something." <-- This is what I am referring to.<br />
<br />
<br />
Contents<br />
1 Install from AUR<br />
etc..etc...</div>Dodo3773https://wiki.archlinux.org/index.php?title=OpenSSH&diff=451646OpenSSH2016-09-23T00:00:17Z<p>Dodo3773: "yes" is no longer default. Default is not "prohibit-password". This is already covered once in this page. Perhaps it should be merged?</p>
<hr />
<div>[[Category:Secure Shell]]<br />
[[ar:Secure Shell]]<br />
[[de:SSH]]<br />
[[es:Secure Shell]]<br />
[[fr:ssh]]<br />
[[it:Secure Shell]]<br />
[[ja:Secure Shell]]<br />
[[ko:Secure Shell]]<br />
[[pl:Secure Shell]]<br />
[[pt:Secure Shell]]<br />
[[ru:Secure Shell]]<br />
[[sr:Secure Shell]]<br />
[[zh-cn:Secure Shell]]<br />
{{Related articles start}}<br />
{{Related|SSH keys}}<br />
{{Related|Pam abl}}<br />
{{Related|fail2ban}}<br />
{{Related|sshguard}}<br />
{{Related|Sshfs}}<br />
{{Related|Syslog-ng}}<br />
{{Related|SFTP chroot}}<br />
{{Related|SCP_and_SFTP}}<br />
{{Related articles end}}<br />
<br />
Secure Shell (SSH) is a network protocol that allows data to be exchanged over a secure channel between two computers. Encryption provides confidentiality and integrity of data. SSH uses public-key cryptography to authenticate the remote computer and allow the remote computer to authenticate the user, if necessary.<br />
<br />
SSH is typically used to log into a remote machine and execute commands, but it also supports tunneling, forwarding arbitrary TCP ports and X11 connections; file transfer can be accomplished using the associated SFTP or SCP protocols.<br />
<br />
An SSH server, by default, listens on the standard TCP port 22. An SSH client program is typically used for establishing connections to an ''sshd'' daemon accepting remote connections. Both are commonly present on most modern operating systems, including macOS, GNU/Linux, Solaris and OpenVMS. Proprietary, freeware and open source versions of various levels of complexity and completeness exist.<br />
<br />
== OpenSSH ==<br />
OpenSSH (OpenBSD Secure Shell) is a set of computer programs providing encrypted communication sessions over a computer network using the ssh protocol. It was created as an open source alternative to the proprietary Secure Shell software suite offered by SSH Communications Security. OpenSSH is developed as part of the OpenBSD project, which is led by Theo de Raadt.<br />
<br />
OpenSSH is occasionally confused with the similarly-named OpenSSL; however, the projects have different purposes and are developed by different teams, the similar name is drawn only from similar goals.<br />
<br />
=== Installation ===<br />
<br />
[[Install]] the {{Pkg|openssh}} package.<br />
<br />
=== Client usage ===<br />
<br />
To connect to a server, run:<br />
<br />
$ ssh -p ''port'' ''user''@''server-address''<br />
<br />
If the server only allows public-key authentication, follow [[SSH keys]].<br />
<br />
==== Configuration ====<br />
<br />
The client can be configured to store common options and hosts. All options can be declared globally or restricted to specific hosts. For example:<br />
<br />
{{hc|~/.ssh/config|# global options<br />
User user<br />
<br />
# host-specific options<br />
Host ''myserver''<br />
HostName ''server-address''<br />
Port ''port''}}<br />
<br />
With such a configuration, the following commands are equivalent<br />
<br />
$ ssh -p ''port'' ''user''@''server-address''<br />
$ ssh ''myserver''<br />
<br />
See {{man|5|ssh_config}} for more information.<br />
<br />
Some options do not have command line switch equivalents, but you can specify config options on the command line with {{ic|-o}}. For example {{ic|1=-oKexAlgorithms=+diffie-hellman-group1-sha1}}.<br />
<br />
=== Server usage ===<br />
<br />
==== Configuration ====<br />
<br />
The SSH daemon configuration file can be found and edited in {{ic|/etc/ssh/ssh'''d'''_config}}.<br />
<br />
To allow access only for some users add this line:<br />
AllowUsers ''user1 user2''<br />
<br />
To allow access only for some groups:<br />
AllowGroups ''group1 group2''<br />
<br />
To disable root login over SSH, change the PermitRootLogin line into this:<br />
PermitRootLogin no<br />
<br />
{{Note|1={{ic|PermitRootLogin prohibit-password}} is the default since version 7.0p1. See {{man|5|sshd_config}}.}}<br />
<br />
To add a nice welcome message (e.g. from the {{ic|/etc/issue}} file), configure the {{ic|Banner}} option:<br />
Banner /etc/issue<br />
<br />
Host keys will be generated automatically by the ''sshd'' [[#Daemon_management|service files]]. If you want sshd to use a particular key which you have provided, you can configure it manually:<br />
HostKey /etc/ssh/ssh_host_rsa_key<br />
<br />
If the server is to be exposed to the WAN, it is recommended to change the default port from 22 to a random higher one like this:<br />
Port 39901<br />
<br />
To help select a port review the [[Wikipedia:List of TCP and UDP port numbers|list of TCP and UDP port numbers]]. You can also find port information locally in {{ic|/etc/services}}. Select an alternative port that is '''not''' already assigned to a common service to prevent conflicts. A port change from default port 22 is recommended, because it will reduce the ''number'' of log entries caused by automated authentication attempts - not eliminate them. See [[Port knocking]] for related information. <br />
<br />
{{Note|OpenSSH can also listen on multiple ports simply by having multiple '''Port x''' lines in the config file.}}<br />
<br />
It is also recommended to disable password logins entirely. This will greatly increase security, see [[#Force public key authentication]] for more information.<br />
<br />
==== Daemon management ====<br />
<br />
{{Pkg|openssh}} comes with two kinds of [[systemd]] service files:<br />
#{{ic|sshd.service}}, which will keep the SSH daemon permanently active and fork for each incoming connection.[https://projects.archlinux.org/svntogit/packages.git/tree/trunk/sshd.service?h=packages/openssh#n16] It is especially suitable for systems with a large amount of SSH traffic.[https://projects.archlinux.org/svntogit/packages.git/tree/trunk/sshd.service?h=packages/openssh&id=4cadf5dff444e4b7265f8918652f4e6dff733812#n15] <br />
#{{ic|sshd.socket}} + {{ic|sshd@.service}}, which spawn on-demand instances of the SSH daemon per connection. Using it implies that ''systemd'' listens on the SSH socket and will only start the daemon process for an incoming connection. It is the recommended way to run {{ic|sshd}} in almost all cases.[https://projects.archlinux.org/svntogit/packages.git/tree/trunk/sshd.service?h=packages/openssh&id=4cadf5dff444e4b7265f8918652f4e6dff733812#n18][http://lists.freedesktop.org/archives/systemd-devel/2011-January/001107.html][http://0pointer.de/blog/projects/inetd.html]<br />
<br />
You can [[start]] and [[enable]] either {{ic|sshd.service}} '''or''' {{ic|sshd.socket}} to begin using the daemon.<br />
<br />
If using the socket service, you will need to [[systemd#Editing provided units|edit]] the unit file if you want it to listen on a port other than the default 22:<br />
<br />
{{hc|# systemctl edit sshd.socket|<nowiki><br />
[Socket]<br />
ListenStream=<br />
ListenStream=12345<br />
</nowiki>}}<br />
<br />
{{Warning|Using {{ic|sshd.socket}} negates the {{ic|ListenAddress}} setting, so it will allow connections over any address. To achieve the effect of setting {{ic|ListenAddress}}, you must specify the port ''and'' IP for {{ic|ListenStream}} (e.g. {{ic|1=ListenStream=192.168.1.100:22}}). You must also add {{ic|1=FreeBind=true}} under {{ic|[Socket]}} or else setting the IP address will have the same drawback as setting {{ic|ListenAddress}}: the socket will fail to start if the network is not up in time.}}<br />
<br />
{{Tip|When using socket activation neither {{ic|sshd.socket}} nor the daemon's regular {{ic|sshd.service}} allow to monitor connection attempts in the log, but executing {{ic|# journalctl /usr/bin/sshd}} does.}}<br />
<br />
==== Protection ====<br />
<br />
Allowing remote log-on through SSH is good for administrative purposes, but can pose a threat to your server's security. Often the target of brute force attacks, SSH access needs to be limited properly to prevent third parties gaining access to your server.<br />
<br />
Several other good guides are available on the topic, for example:<br />
*[https://wiki.mozilla.org/Security/Guidelines/OpenSSH Article by Mozilla Infosec Team]<br />
*[https://stribika.github.io/2015/01/04/secure-secure-shell.html Secure sshd]<br />
<br />
===== Force public key authentication =====<br />
<br />
If a client cannot authenticate through a public key, by default the SSH server falls back to password authentication, thus allowing a malicious user to attempt to gain access by [[#Protecting against brute force attacks|brute-forcing]] the password. One of the most effective ways to protect against this attack is to disable password logins entirely, and force the use of [[SSH keys]]. This can be accomplished by disabling the following options in {{ic|sshd_config}}:<br />
<br />
PasswordAuthentication no<br />
ChallengeResponseAuthentication no<br />
<br />
{{Warning|Before adding this to your configuration, make sure that all accounts which require SSH access have public-key authentication set up in the corresponding {{ic|authorized_keys}} files. See [[SSH keys#Copying the public key to the remote server]] for more information.}}<br />
<br />
===== Two-factor authentication and public keys =====<br />
<br />
Since OpenSSH 6.2, you can add your own chain to authenticate with using the {{ic|AuthenticationMethods}} option. This enables you to use public keys as well as a two-factor authorization.<br />
<br />
See [[Google Authenticator]] to set up Google Authenticator.<br />
<br />
To use [[PAM]] with OpenSSH, edit the following files:<br />
<br />
{{hc|/etc/ssh/sshd_config|<br />
ChallengeResponseAuthentication yes<br />
AuthenticationMethods publickey keyboard-interactive:pam<br />
}}<br />
<br />
Then you can log in with either a publickey '''or''' the user authentication as required by your PAM setup.<br />
<br />
If, on the other hand, you want to authenticate the user on both a publickey '''and''' the user authentication as required by your PAM setup, use a comma instead of a space to separate the AuthenticationMethods:<br />
<br />
{{hc|/etc/ssh/sshd_config|<br />
ChallengeResponseAuthentication yes<br />
AuthenticationMethods publickey,keyboard-interactive:pam<br />
}}<br />
<br />
===== Protecting against brute force attacks =====<br />
Brute forcing is a simple concept: One continuously tries to log in to a webpage or server log-in prompt like SSH with a high number of random username and password combinations.<br />
<br />
====== Using iptables ======<br />
<br />
{{Merge|Simple_stateful_firewall#Bruteforce_attacks|Out of scope, same technique as already described in the SSF.}}<br />
<br />
If you are already using iptables you can easily protect SSH against brute force attacks by using the following rules. <br />
<br />
{{note|In this example the SSH port was changed to port 42660 TCP.}}<br />
<br />
Before the following rules can be used we create a new rule chain to log and drop to many connection attempts:<br />
<br />
# iptables -N LOG_AND_DROP<br />
<br />
The first rule will be applied to packets that signal the start of new connections headed for TCP port 42660<br />
<br />
# iptables -A INPUT -p tcp -m tcp --dport 42660 -m state --state NEW -m recent --set --name DEFAULT --rsource<br />
<br />
The next rule tells iptables to look for packets that match the previous rule's parameters, and which also come from hosts already added to the watch list.<br />
<br />
# iptables -A INPUT -p tcp -m tcp --dport 42660 -m state --state NEW -m recent --update --seconds 90 --hitcount 4 --name DEFAULT --rsource -j LOG_AND_DROP<br />
<br />
Now iptables decides what to do with TCP traffic to port 42660 which does not match the previous rule.<br />
<br />
# iptables -A INPUT -p tcp -m tcp --dport 42660 -j ACCEPT<br />
<br />
We are appending this rule to the LOG_AND_DROP table, and we use the -j (jump) operator to pass the packet's information to the logging facility<br />
<br />
# iptables -A LOG_AND_DROP -j LOG --log-prefix "iptables deny: " --log-level 7<br />
<br />
After they are logged by the first rule, all packets are then dropped<br />
<br />
# iptables -A LOG_AND_DROP -j DROP<br />
<br />
====== Anti-brute-force tools ======<br />
<br />
You can protect yourself from brute force attacks by using an automated script that blocks anybody trying to brute force their way in, for example [[fail2ban]] or [[sshguard]].<br />
<br />
* Only allow incoming SSH connections from trusted locations<br />
* Use [[fail2ban]] or [[sshguard]] to automatically block IP addresses that fail password authentication too many times.<br />
* Use [https://github.com/jtniehof/pam_shield pam_shield] to block IP addresses that perform too many login attempts within a certain period of time. In contrast to [[fail2ban]] or [[sshguard]], this program does not take login success or failure into account.<br />
<br />
===== Limit root login =====<br />
It is generally considered bad practice to allow the root user to log in without restraint over SSH. There are two methods by which SSH root access can be restricted for increased security.<br />
<br />
====== Deny ======<br />
<br />
Sudo selectively provides root rights for actions requiring these without requiring authenticating against the root account. This allows locking the root account against access via SSH and potentially functions as a security measure against brute force attacks, since now an attacker must guess the account name in addition to the password.<br />
<br />
SSH can be configured to deny remote logins with the root user by editing the "Authentication" section in {{ic|/etc/ssh/sshd_config}}. Simply change {{ic|#PermitRootLogin prohibit-password}} to {{ic|no}} and uncomment the line:<br />
<br />
{{hc|/etc/ssh/sshd_config|<br />
PermitRootLogin no<br />
...<br />
}}<br />
<br />
Next, [[restart]] the SSH daemon.<br />
<br />
You will now be unable to log in through SSH under root, but will still be able to log in with your normal user and use [[su]] or [[sudo]] to do system administration.<br />
<br />
====== Restrict ======<br />
<br />
Some automated tasks such as remote, full-system backup require full root access. To allow these in a secure way, instead of disabling root login via SSH, it is possible to only allow root logins for selected commands. This can be achieved by editing {{ic|~root/.ssh/authorized_keys}}, by prefixing the desired key, e.g. as follows:<br />
<br />
command="/usr/lib/rsync/rrsync -ro /" ssh-rsa …<br />
<br />
This will allow any login with this specific key only to execute the command specified between the quotes.<br />
<br />
The increased attack surface created by exposing the root user name at login can be compensated by adding the following to {{ic|sshd_config}}:<br />
<br />
PermitRootLogin forced-commands-only<br />
<br />
This setting will not only restrict the commands which root may execute via SSH, but it will also disable the use of passwords, forcing use of public key authentication for the root account.<br />
<br />
A slightly less restrictive alternative will allow any command for root, but makes brute force attacks infeasible by enforcing public key authentication. For this option, set:<br />
<br />
PermitRootLogin without-password<br />
<br />
===== Securing the authorized_keys file =====<br />
<br />
For additional protection, you can prevent users from adding new public keys and connecting from them.<br />
<br />
In the server, make the {{ic|authorized_keys}} file read-only for the user and deny all other permissions:<br />
$ chmod 400 ~/.ssh/authorized_keys<br />
<br />
To keep the user from simply changing the permissions back, [[File permissions and attributes#chattr and lsattr|set the immutable bit]] on the {{ic|authorized_keys}} file. After that the user could rename the {{ic|~/.ssh}} directory to something else and create a new {{ic|~/.ssh}} directory and {{ic|authorized_keys}} file. To prevent this, set the immutable bit on the {{ic|~/.ssh}} directory too.<br />
<br />
{{Note|If you find yourself needing to add a new key, you will first have to remove the immutable bit from {{ic|authorized_keys}} and make it writable. Follow the steps above to secure it again.}}<br />
<br />
== Other SSH clients and servers ==<br />
Apart from OpenSSH, there are many SSH [[Wikipedia:Comparison of SSH clients|clients]] and [[Wikipedia:Comparison of SSH servers|servers]] available.<br />
<br />
=== Dropbear ===<br />
[[Wikipedia:Dropbear (software)|Dropbear]] is a SSH-2 client and server. {{Pkg|dropbear}} is available in the [[official repositories]].<br />
<br />
The command-line ssh client is named dbclient.<br />
<br />
=== Mosh ===<br />
From the Mosh [http://mosh.mit.edu/ website]:<br />
<br />
:Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes. Mosh is a replacement for SSH. It is more robust and responsive, especially over slow connections such as Wi-Fi, cellular, and long-distance.<br />
<br />
[[Install]] the {{Pkg|mosh}} package, or {{AUR|mosh-git}} for the latest revision.<br />
<br />
Mosh has an undocumented command line option {{ic|1=--predict=experimental}} which produces more aggressive echoing of local keystrokes. Users interested in low-latency visual confirmation of keyboard input may prefer this prediction mode.<br />
<br />
{{Note|Mosh by design does not let you access session history, consider installing a terminal multiplexer such as [[tmux]] or [[screen]].}}<br />
<br />
== Tips and tricks ==<br />
<br />
{{Accuracy|According to the current layout, this section seems rather generic, but in fact most of the offered tips work only in ''openssh''. For example ''dropbear'' (listed in [[#Other SSH clients and servers]]) does not support SOCKS proxy.[https://en.wikipedia.org/wiki/Comparison_of_SSH_clients#Technical]}}<br />
<br />
=== Encrypted SOCKS tunnel ===<br />
This is highly useful for laptop users connected to various unsafe wireless connections. The only thing you need is an SSH server running at a somewhat secure location, like your home or at work. It might be useful to use a dynamic DNS service like [http://www.dyndns.org/ DynDNS] so you do not have to remember your IP-address.<br />
<br />
==== Step 1: start the connection ====<br />
<br />
You only have to execute this single command to start the connection:<br />
<br />
$ ssh -TND 4711 ''user''@''host''<br />
<br />
where {{Ic|''user''}} is your username at the SSH server running at the {{Ic|''host''}}. It will ask for your password, and then you are connected! The {{Ic|N}} flag disables the interactive prompt, and the {{Ic|D}} flag specifies the local port on which to listen on (you can choose any port number if you want). The {{Ic|T}} flag disables pseudo-tty allocation.<br />
<br />
It is nice to add the verbose ({{Ic|-v}}) flag, because then you can verify that it is actually connected from that output.<br />
<br />
==== Step 2: configure your browser (or other programs) ====<br />
<br />
The above step is completely useless if you do not configure your web browser (or other programs) to use this newly created socks tunnel. Since the current version of SSH supports both SOCKS4 and SOCKS5, you can use either of them.<br />
<br />
* For Firefox: ''Edit > Preferences > Advanced > Network > Connection > Setting'': <br> Check the ''Manual proxy configuration'' radio button, and enter {{ic|localhost}} in the ''SOCKS host'' text field, and then enter your port number in the next text field ({{ic|4711}} in the example above).<br />
<br />
Firefox does not automatically make DNS requests through the socks tunnel. This potential privacy concern can be mitigated by the following steps:<br />
<br />
# Type about:config into the Firefox location bar.<br />
# Search for network.proxy.socks_remote_dns<br />
# Set the value to true.<br />
# Restart the browser.<br />
<br />
* For Chromium: You can set the SOCKS settings as environment variables or as command line options. I recommend to add one of the following functions to your {{ic|.bashrc}}:<br />
function secure_chromium {<br />
port=4711<br />
export SOCKS_SERVER=localhost:$port<br />
export SOCKS_VERSION=5<br />
chromium &<br />
exit<br />
}<br />
OR<br />
function secure_chromium {<br />
port=4711<br />
chromium --proxy-server="socks://localhost:$port" &<br />
exit<br />
}<br />
<br />
Now open a terminal and just do:<br />
$ secure_chromium<br />
<br />
Enjoy your secure tunnel!<br />
<br />
=== X11 forwarding ===<br />
X11 forwarding is a mechanism that allows graphical interfaces of X11 programs running on a remote system to be displayed on a local client machine. For X11 forwarding the remote host does not need to have a full X11 system installed, however it needs at least to have ''xauth'' installed. ''xauth'' is a utility that maintains {{ic|Xauthority}} configurations used by server and client for authentication of X11 session ([http://xmodulo.com/2012/11/how-to-enable-x11-forwarding-using-ssh.html source]).<br />
<br />
{{Warning|X11 forwarding has important security implications which should be at least acknowledged by reading relevant sections of {{man|1|ssh}}, {{man|5|sshd_config}}, and {{man|5|ssh_config}} manual pages. See also [https://security.stackexchange.com/questions/14815/security-concerns-with-x11-forwarding a short writeup]}}<br />
<br />
==== Setup ====<br />
<br />
On the remote system:<br />
<br />
*[[pacman#Installing specific packages|install]] {{Pkg|xorg-xauth}} and {{Pkg|xorg-xhost}} from the [[official repositories]]<br />
*in {{ic|/etc/ssh/ssh'''d'''_config}}:<br />
**verify that {{ic|AllowTcpForwarding}} and {{ic|X11UseLocalhost}} options are set to ''yes'', and that {{ic|X11DisplayOffset}} is set to ''10'' (those are the default values if nothing has been changed, see {{man|5|sshd_config}})<br />
**set {{ic|X11Forwarding}} to ''yes''<br />
* then [[restart]] the [[#Daemon management|''sshd'' daemon]]. <br />
<br />
On the client's side, enable the {{ic|ForwardX11}} option by either specifying the {{ic|-X}} switch on the command line for opportunistic connections, or by setting {{ic|ForwardX11}} to ''yes'' in the [[#Configuration|client's configuration]].<br />
<br />
{{Tip|You can enable the {{ic|ForwardX11Trusted}} option ({{ic|-Y}} switch on the command line) if GUI is drawing badly or you receive errors; this will prevent X11 forwardings from being subjected to the [http://www.x.org/wiki/Development/Documentation/Security/ X11 SECURITY extension] controls. Be sure you have read [[#X11 forwarding|the warning]] at the beginning of this section if you do so.}}<br />
<br />
==== Usage ====<br />
<br />
{{Accuracy|{{ic|xhost}} is [http://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-from-ubuntu-machine#comment-17148 generally not needed]}}<br />
<br />
Log on to the remote machine normally, specifying the {{ic|-X}} switch if ''ForwardX11'' was not enabled in the client's configuration file:<br />
$ ssh -X ''user@host''<br />
If you receive errors trying to run graphical applications, try ''ForwardX11Trusted'' instead:<br />
$ ssh -Y ''user@host''<br />
You can now start any X program on the remote server, the output will be forwarded to your local session:<br />
$ xclock<br />
<br />
If you get "Cannot open display" errors try the following command as the non root user:<br />
$ xhost +<br />
<br />
The above command will allow anybody to forward X11 applications. To restrict forwarding to a particular host type:<br />
$ xhost +hostname<br />
<br />
where hostname is the name of the particular host you want to forward to. See {{man|1|xhost|url=https://docs.oracle.com/cd/E36784_01/html/E36870/xhost-1.html}} for more details.<br />
<br />
Be careful with some applications as they check for a running instance on the local machine. [[Firefox]] is an example: either close the running Firefox instance or use the following start parameter to start a remote instance on the local machine:<br />
$ firefox --no-remote<br />
<br />
If you get "X11 forwarding request failed on channel 0" when you connect (and the server {{ic|/var/log/errors.log}} shows "Failed to allocate internet-domain X11 display socket"), make sure package {{Pkg|xorg-xauth}} is installed. If its installation is not working, try to either:<br />
<br />
* enable the {{ic|AddressFamily any}} option in {{ic|ssh'''d'''_config}} on the ''server'', or<br />
* set the {{ic|AddressFamily}} option in {{ic|ssh'''d'''_config}} on the ''server'' to inet.<br />
Setting it to inet may fix problems with Ubuntu clients on IPv4.<br />
<br />
For running X applications as other user on the SSH server you need to {{Ic|xauth add}} the authentication line taken from {{Ic|xauth list}} of the SSH logged in user.<br />
<br />
{{Tip|[http://unix.stackexchange.com/a/12772/29867 Here] are [http://unix.stackexchange.com/a/46748/29867 some] useful [http://superuser.com/a/805060/185665 links] for troubleshooting {{ic|X11 Forwarding}} issues.}}<br />
<br />
=== Forwarding other ports ===<br />
In addition to SSH's built-in support for X11, it can also be used to securely tunnel any TCP connection, by use of local forwarding or remote forwarding.<br />
<br />
Local forwarding opens a port on the local machine, connections to which will be forwarded to the remote host and from there on to a given destination. Very often, the forwarding destination will be the same as the remote host, thus providing a secure shell and, e.g. a secure VNC connection, to the same machine. Local forwarding is accomplished by means of the {{Ic|-L}} switch and it is accompanying forwarding specification in the form of {{Ic|<tunnel port>:<destination address>:<destination port>}}.<br />
<br />
Thus:<br />
<br />
$ ssh -L 1000:mail.google.com:25 192.168.0.100<br />
<br />
will use SSH to login to and open a shell on 192.168.0.100, and will also create a tunnel from the local machine's TCP port 1000 to mail.google.com on port 25. Once established, connections to localhost:1000 will connect to the Gmail SMTP port. To Google, it will appear that any such connection (though not necessarily the data conveyed over the connection) originated from 192.168.0.100, and such data will be secure as between the local machine and 192.168.0.100, but not between 192.168.0.100, unless other measures are taken.<br />
<br />
Similarly:<br />
<br />
$ ssh -L 2000:192.168.0.100:6001 192.168.0.100<br />
<br />
will allow connections to localhost:2000 which will be transparently sent to the remote host on port 6001. The preceding example is useful for VNC connections using the vncserver utility--part of the tightvnc package--which, though very useful, is explicit about its lack of security.<br />
<br />
Remote forwarding allows the remote host to connect to an arbitrary host via the SSH tunnel and the local machine, providing a functional reversal of local forwarding, and is useful for situations where, e.g., the remote host has limited connectivity due to firewalling. It is enabled with the {{Ic|-R}} switch and a forwarding specification in the form of {{Ic|<tunnel port>:<destination address>:<destination port>}}.<br />
<br />
Thus:<br />
<br />
$ ssh -R 3000:irc.freenode.net:6667 192.168.0.200<br />
<br />
will bring up a shell on 192.168.0.200, and connections from 192.168.0.200 to itself on port 3000 (remotely speaking, localhost:3000) will be sent over the tunnel to the local machine and then on to irc.freenode.net on port 6667, thus, in this example, allowing the use of IRC programs on the remote host to be used, even if port 6667 would normally be blocked to it.<br />
<br />
Both local and remote forwarding can be used to provide a secure "gateway," allowing other computers to take advantage of an SSH tunnel, without actually running SSH or the SSH daemon by providing a bind-address for the start of the tunnel as part of the forwarding specification, e.g. {{Ic|<tunnel address>:<tunnel port>:<destination address>:<destination port>}}. The {{Ic|<tunnel address>}} can be any address on the machine at the start of the tunnel, {{Ic|localhost}}, {{Ic|*}} (or blank), which, respectively, allow connections via the given address, via the loopback interface, or via any interface. By default, forwarding is limited to connections from the machine at the "beginning" of the tunnel, i.e. the {{Ic|<tunnel address>}} is set to {{Ic|localhost}}. Local forwarding requires no additional configuration, however remote forwarding is limited by the remote server's SSH daemon configuration. See the {{Ic|GatewayPorts}} option in {{Ic|sshd_config(5)}} for more information.<br />
<br />
=== Multiplexing ===<br />
<br />
The SSH daemon usually listens on port 22. However, it is common practice for many public internet hotspots to block all traffic that is not on the regular HTTP/S ports (80 and 443, respectively), thus effectively blocking SSH connections. The immediate solution for this is to have {{ic|sshd}} listen additionally on one of the whitelisted ports:<br />
<br />
{{hc|/etc/ssh/sshd_config|<br />
Port 22<br />
Port 443<br />
}}<br />
<br />
However, it is likely that port 443 is already in use by a web server serving HTTPS content, in which case it is possible to use a multiplexer, such as {{Pkg|sslh}}, which listens on the multiplexed port and can intelligently forward packets to many services.<br />
<br />
=== Speeding up SSH ===<br />
<br />
{{Tip|If you intend to use SSH for SFTP or SCP, installing {{AUR|openssh-hpn-git}} can significantly increase throughput.[https://www.psc.edu/index.php/hpn-ssh]}}<br />
<br />
There are several [[#Configuration|client configuration]] options which can speed up connections either globally or for specific hosts. See {{man|5|ssh_config}} for full descriptions of these options.<br />
<br />
You can make all sessions to the same host share a single connection using these options:<br />
ControlMaster auto<br />
ControlPersist yes<br />
ControlPath ~/.ssh/sockets/socket-%r@%h:%p<br />
<br />
where {{ic|~/.ssh/sockets}} can be any directory not writable by other users. <br />
<br />
Another option to improve speed is to enable compression with the {{ic|Compression yes}} option or the {{ic|-C}} flag.<br />
<br />
{{Warning|{{man|1|ssh}} states that "''Compression is desirable on modem lines and other slow connections, but will only slow down things on fast networks''". This tip might be counterproductive depending on your network configuration.}}<br />
<br />
Login time can be shortened by bypassing IPv6 lookup using the {{ic|AddressFamily inet}} option or {{ic|-4}} flag.<br />
<br />
=== Mounting a remote filesystem with SSHFS ===<br />
Please refer to the [[Sshfs]] article to use sshfs to mount a remote system - accessible via SSH - to a local folder, so you will be able to do any operation on the mounted files with any tool (copy, rename, edit with vim, etc.). Using sshfs instead of shfs is generally preferred as a new version of shfs has not been released since 2004.<br />
<br />
=== Keep alive ===<br />
Your ssh session will automatically log out if it is idle. To send a "keep alive" signal to the server every 120 seconds add the {{ic|ServerAliveInterval 120}} option to your [[#Configuration|client configuration]]. See also the {{ic|ServerAliveCountMax}} and {{ic|TCPKeepAlive}} options.<br />
<br />
Conversely, to keep incoming connections alive, set the {{ic|ClientAliveInterval}} option in your [[#Configuration_2|server configuration]].<br />
<br />
=== Automatically restart SSH tunnels with systemd ===<br />
<br />
[[systemd]] can automatically start SSH connections on boot/login ''and'' restart them when they fail. This makes it a useful tool for maintaining SSH tunnels.<br />
<br />
The following service can start an SSH tunnel on login using the connection settings in your [[#Saving connection data in ssh config|ssh config]]. If the connection closes for any reason, it waits 10 seconds before restarting it:<br />
<br />
{{hc|~/.config/systemd/user/tunnel.service|<nowiki><br />
[Unit]<br />
Description=SSH tunnel to myserver<br />
<br />
[Service]<br />
Type=simple<br />
Restart=always<br />
RestartSec=10<br />
ExecStart=/usr/bin/ssh -F %h/.ssh/config -N myserver<br />
</nowiki>}}<br />
<br />
Then [[enable]] and [[start]] the user service. See [[#Keep alive]] for how to prevent the tunnel from timing out. If you wish to start the tunnel on boot, you will need to rewrite the unit as a system service.<br />
<br />
=== Autossh - automatically restarts SSH sessions and tunnels ===<br />
<br />
When a session or tunnel cannot be kept alive, for example due to bad network conditions causing client disconnections, you can use {{Pkg|autossh}} to automatically restart them.<br />
<br />
Usage examples:<br />
$ autossh -M 0 -o "ServerAliveInterval 45" -o "ServerAliveCountMax 2" username@example.com<br />
<br />
Combined with [[sshfs]]:<br />
$ sshfs -o reconnect,compression=yes,transform_symlinks,ServerAliveInterval=45,ServerAliveCountMax=2,ssh_command='autossh -M 0' username@example.com: /mnt/example <br />
<br />
Connecting through a SOCKS-proxy set by [[Proxy settings]]:<br />
$ autossh -M 0 -o "ServerAliveInterval 45" -o "ServerAliveCountMax 2" -NCD 8080 username@example.com <br />
<br />
With the {{ic|-f}} option autossh can be made to run as a background process. Running it this way however means the passphrase cannot be entered interactively.<br />
<br />
The session will end once you type {{ic|exit}} in the session, or the autossh process receives a SIGTERM, SIGINT of SIGKILL signal.<br />
<br />
==== Run autossh automatically at boot via systemd ====<br />
<br />
If you want to automatically start autossh, you can create a systemd unit file:<br />
<br />
{{hc|/etc/systemd/system/autossh.service|2=<br />
[Unit]<br />
Description=AutoSSH service for port 2222<br />
After=network.target<br />
<br />
[Service]<br />
Environment="AUTOSSH_GATETIME=0"<br />
ExecStart=/usr/bin/autossh -M 0 -NL 2222:localhost:2222 -o TCPKeepAlive=yes foo@bar.com<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
Here {{ic|1=AUTOSSH_GATETIME=0}} is an environment variable specifying how long ssh must be up before autossh considers it a successful connection, setting it to 0 autossh also ignores the first run failure of ssh. This may be useful when running autossh at boot. Other environment variables are available on the manpage. Of course, you can make this unit more complex if necessary (see the systemd documentation for details), and obviously you can use your own options for autossh, but note that the {{ic|-f}} implying {{ic|1=AUTOSSH_GATETIME=0}} does not work with systemd. <br />
<br />
Remember to [[start]] and/or [[enable]] the service afterwards.<br />
<br />
You may also need to disable ControlMaster e.g.<br />
<br />
$ ExecStart=/usr/bin/autossh -M 0 -o ControlMaster=no -NL 2222:localhost:2222 -o TCPKeepAlive=yes foo@bar.com<br />
<br />
{{Tip|It is also easy to maintain several autossh processes, to keep several tunnels alive. Just create multiple service files with different names.}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Checklist ===<br />
<br />
Check these simple issues before you look any further.<br />
<br />
# The config directory {{ic|~/.ssh}} and its contents should be accessible only by your user (check this on both the client and the server): {{bc|<nowiki><br />
$ chmod 700 ~/.ssh<br />
$ chmod 600 ~/.ssh/*<br />
$ chown -R $USER ~/.ssh<br />
</nowiki>}}<br />
# Check that the client's public key (e.g. {{ic|id_rsa.pub}}) is in {{ic|~/.ssh/authorized_keys}} on the server.<br />
# Check that you did not limit SSH access with {{ic|AllowUsers}} or {{ic|AllowGroups}} in the [[#Configuration_2|server config]].<br />
# Check if the user has set a password. Sometimes new users who have not yet logged in to the server do not have a password.<br />
# [[Restart]] {{ic|sshd}} and logout/login on both client and server.<br />
<br />
=== SSH connection hangs after poweroff/reboot ===<br />
<br />
SSH connections hang after poweroff or reboot if systemd stops the network before sshd. To fix this, change the {{ic|After}} statement for user sessions:<br />
{{hc|# systemctl edit systemd-user-sessions.service|2=<br />
[Unit]<br />
After=network.target}}<br />
<br />
=== Connection refused or timeout problem ===<br />
<br />
==== Port forwarding ====<br />
<br />
If you are behind a NAT mode/router (which is likely unless you are on a VPS or publicly addressed host), make sure that your router is forwarding incoming ssh connections to your machine. Find the server's internal IP address with {{ic|$ ip addr}} and set up your router to forward TCP on your SSH port to that IP. [http://portforward.com portforward.com] can help with that.<br />
<br />
==== Is SSH running and listening? ====<br />
$ ss -tnlp<br />
<br />
If the above command do not show SSH port is open, SSH is NOT running. Check {{ic|/var/log/messages}} for errors etc.<br />
<br />
==== Are there firewall rules blocking the connection? ====<br />
<br />
[[Iptables]] may be blocking connections on port {{ic|22}}. Check this with:<br />
{{bc|# iptables -nvL}}<br />
and look for rules that might be dropping packets on the {{ic|INPUT}} chain. Then, if necessary, unblock the port with a command like: <br />
{{bc|<br />
# iptables -I INPUT 1 -p tcp --dport 22 -j ACCEPT<br />
}}<br />
For more help configuring firewalls, see [[firewalls]].<br />
<br />
==== Is the traffic even getting to your computer? ====<br />
Start a traffic dump on the computer you are having problems with:<br />
<br />
# tcpdump -lnn -i any port ssh and tcp-syn<br />
<br />
This should show some basic information, then wait for any matching traffic to happen before displaying it. Try your connection now. If you do not see any output when you attempt to connect, then something outside of your computer is blocking the traffic (e. g., hardware firewall, NAT router etc.).<br />
<br />
==== Your ISP or a third party blocking default port? ====<br />
{{Note|Try this step if you '''know''' you are not running any firewalls and you know you have configured the router for DMZ or have forwarded the port to your computer and it still does not work. Here you will find diagnostic steps and a possible solution.}}<br />
<br />
In some cases, your ISP might block the default port (SSH port 22) so whatever you try (opening ports, hardening the stack, defending against flood attacks, et al) ends up useless. To confirm this, create a server on all interfaces (0.0.0.0) and connect remotely. <br />
<br />
If you get an error message comparable to this:<br />
ssh: connect to host www.inet.hr port 22: Connection refused<br />
<br />
That means the port is '''not''' being blocked by the ISP, but the server does not run SSH on that port (See [[wikipedia:Security_through_obscurity|security through obscurity]]).<br />
<br />
However, if you get an error message comparable to this:<br />
ssh: connect to host 111.222.333.444 port 22: Operation timed out <br />
<br />
That means that something is rejecting your TCP traffic on port 22. Basically that port is stealth, either by your firewall or 3rd party intervention (like an ISP blocking and/or rejecting incoming traffic on port 22). If you know you are not running any firewall on your computer, and you know that Gremlins are not growing in your routers and switches, then your ISP is blocking the traffic.<br />
<br />
To double check, you can run Wireshark on your server and listen to traffic on port 22. Since Wireshark is a Layer 2 Packet Sniffing utility, and TCP/UDP are Layer 3 and above (see [[wikipedia:Internet protocol suite|IP Network stack]]), if you do not receive anything while connecting remotely, a third party is most likely to be blocking the traffic on that port to your server.<br />
<br />
===== Diagnosis =====<br />
<br />
[[Install]] either {{Pkg|tcpdump}} or Wireshark with the {{Pkg|wireshark-cli}} package.<br />
<br />
For tcpdump:<br />
<br />
# tcpdump -ni ''interface'' "port 22"<br />
<br />
For Wireshark:<br />
<br />
$ tshark -f "tcp port 22" -i ''interface''<br />
<br />
where {{ic|''interface''}} is the network interface for a WAN connection (see {{ic|ip a}} to check). If you are not receiving any packets while trying to connect remotely, you can be very sure that your ISP is blocking the incoming traffic on port 22.<br />
<br />
===== Possible solution =====<br />
The solution is just to use some other port that the ISP is not blocking. Open the {{ic|/etc/ssh/sshd_config}} and configure the file to use different ports. For example, add:<br />
<br />
Port 22<br />
Port 1234<br />
<br />
Also make sure that other "Port" configuration lines in the file are commented out. Just commenting "Port 22" and putting "Port 1234" will not solve the issue because then sshd will only listen on port 1234. Use both lines to run the SSH server on both ports. <br />
<br />
[[Restart]] the server {{ic|sshd.service}} and you are almost done. You still have to configure your client(s) to use the other port instead of the default port. There are numerous solutions to that problem, but let us cover two of them here.<br />
<br />
==== Read from socket failed: connection reset by peer ====<br />
<br />
Recent versions of openssh sometimes fail with the above error message when connecting to older ssh servers. This can be worked around by setting various [[#Configuration|client options]] for that host. See {{man|5|ssh_config}} for more information about the following options.<br />
<br />
The problem could be the {{ic|ecdsa-sha2-nistp*-cert-v01@openssh}} elliptical host key algorithms. These can be disabled by setting {{ic|HostKeyAlgorithms}} to a list excluding those algorithms.<br />
<br />
If that does not work, it could be that the list of ciphers is too long. Set the {{ic|Ciphers}} option to a shorter list (fewer than 80 characters should be enough). Similarly, you can also try shortening the list of {{ic|MACs}}.<br />
<br />
See also the [http://www.gossamer-threads.com/lists/openssh/dev/51339 discussion] on the openssh bug forum.<br />
<br />
=== "[your shell]: No such file or directory" / ssh_exchange_identification problem ===<br />
One possible cause for this is the need of certain SSH clients to find an absolute path (one returned by {{Ic|whereis -b [your shell]}}, for instance) in {{Ic|$SHELL}}, even if the shell's binary is located in one of the {{Ic|$PATH}} entries.<br />
<br />
==="Terminal unknown" or "Error opening terminal" error message===<br />
If you receive the above errors upon logging in, this means the server does not recognize your terminal. Ncurses applications like nano may fail with the message "Error opening terminal".<br />
<br />
The correct solution is to install the client terminal's terminfo file on the server. This tells console programs on the server how to correctly interact with your terminal. You can get info about current terminfo using {{ic|$ infocmp}} and then find out [[Pacman#Querying_package_databases|which package owns it]].<br />
<br />
If you cannot [[install]] it normally, you can copy your terminfo to your home directory on the server:<br />
<br />
$ ssh myserver mkdir -p ~/.terminfo/${TERM:0:1}<br />
$ scp /usr/share/terminfo/${TERM:0:1}/$TERM myserver:~/.terminfo/${TERM:0:1}/<br />
<br />
After logging in and out from the server the problem should be fixed.<br />
<br />
==== TERM hack ====<br />
<br />
{{warning|This should only be used as a last resort.}}<br />
<br />
Alternatively, you can simply set {{ic|1=TERM=xterm}} in your environment on the server (e.g. in {{ic|.bash_profile}}). This will silence the error and allow ncurses applications to run again, but you may experience strange behavior and graphical glitches unless your terminal's control sequences exactly match xterm's.<br />
<br />
=== Connection closed by x.x.x.x [preauth] ===<br />
If you are seeing this error in your sshd logs, make sure you have set a valid HostKey<br />
HostKey /etc/ssh/ssh_host_rsa_key<br />
<br />
=== id_dsa refused by OpenSSH 7.0 ===<br />
<br />
OpenSSH 7.0 deprecated DSA public keys for security reasons. If you absolutely must enable them, set the [[#Configuration|config]] option {{ic|PubkeyAcceptedKeyTypes +ssh-dss}} (http://www.openssh.com/legacy.html does not mention this).<br />
<br />
=== No matching key exchange method found by OpenSSH 7.0 ===<br />
<br />
OpenSSH 7.0 deprecated the diffie-hellman-group1-sha1 key algorithm because it is weak and within theoretical range of the so-called Logjam attack (see http://www.openssh.com/legacy.html). If the key algorithm is needed for a particular host, ssh will produce an error message like this:<br />
<br />
Unable to negotiate with 127.0.0.1: no matching key exchange method found.<br />
Their offer: diffie-hellman-group1-sha1<br />
<br />
The best resolution for these failures is to upgrade/configure the server to not use deprecated algorithms. If that is not possible, you can force the client to reenable the algorithm with the [[#Configuration|client option]] {{ic|KexAlgorithms +diffie-hellman-group1-sha1}}.<br />
<br />
== See also ==<br />
<br />
* [[Wikipedia:Secure Shell]]<br />
* [http://www.la-samhna.de/library/brutessh.html Defending against brute force ssh attacks]<br />
* [http://www.ibm.com/developerworks/library/l-keyc/index.html OpenSSH key management, Part 1] and [http://www.ibm.com/developerworks/library/l-keyc2 Part 2] on IBM developerWorks<br />
* [https://stribika.github.io/2015/01/04/secure-secure-shell.html Secure Secure Shell]</div>Dodo3773https://wiki.archlinux.org/index.php?title=Picom&diff=288393Picom2013-12-15T19:19:32Z<p>Dodo3773: /* Toubleshooting */ Spelling: *Troubeshooting</p>
<hr />
<div>[[Category:X Server]]<br />
[[Category:Eye candy]]<br />
Compton is a lightweight, standalone composite manager, suitable for use with [[Window Manager|window managers]] that do not natively provide compositing functionality. Compton itself is a fork of {{AUR|xcompmgr-dana}}, which in turn is a fork of {{pkg|xcompmgr}}. See the [https://github.com/chjj/compton compton github page] for further information.<br />
<br />
Compton in particular is notable for fixing numerous bugs found in its predecessors, and as such, is popular due to its relability and stability. Numerous additional improvements and configuration options have also been implemented, including a faster GLX (OpenGL) backend (disabled by default), default inactive/active window opacity, window frame transparency, window background blur, window color inversion, painting rate throttling, VSync, condition-based fine-tune control, configuration file reading, and D-Bus control.<br />
<br />
== Installation ==<br />
Install {{AUR|compton}} or its [[git]] version, {{AUR|compton-git}}, both available from the [[AUR]].<br />
<br />
== Use ==<br />
Compton may be manually enabled or disabled at any time during a session, or autostarted as a background ([[Daemon]]) process for sessions. There are also several optional arguments that may be used to tweak the compositing effects provided. These include:<br />
<br />
* {{ic|-b}}: Run as a background ([[Daemon]]) process for a session (e.g. when autostarting for a [[window manager]] such as [[Openbox]])<br />
* {{ic|-c}}: Enable shadow effects<br />
* {{ic|-C}}: Disable shadow effects on panels and docks<br />
* {{ic|-G}}: Disable shadow efffects for application windows and drag-and-drop objects<br />
* {{ic|--config}}: Use a specified configuration file<br />
<br />
Many more options are availble, including to set timing, displays to be managed, and the opacity of menus, window borders, and inactive application menus. See the [https://github.com/chjj/compton/blob/master/man/compton.1.asciidoc Compton Man Page] for further information.<br />
<br />
=== Autostarting ===<br />
How compton would be autostarted as a [[Daemon]] process will depend on the [[desktop environment]] or [[window manager]] used. For example, for [[Openbox]] the {{ic|~/.config/openbox/autostart}} file must be edited, while for [[i3]] it would be the {{ic|~/.i3/config}} file. Where necessary, compton may also be autostarted from [[xprofile]] or [[Xinitrc]]. Read the [[startup files]] article for further information.<br />
<br />
=== Command only ===<br />
To manually enable default compositing effects during a session, use the following command:<br />
<br />
$ compton<br />
<br />
Alternatively, to disable all shadowing effects during a session, the {{ic|-C}} and {{ic|-G}} arguments must be added:<br />
<br />
$ compton -CG<br />
<br />
To autostart compton as a background ([[Daemon]]) process for a session, the {{ic|-b}} argument must be used:<br />
<br />
compton -b<br />
<br />
To disable all shadowing effects from the [[Daemon]] process, the {{ic|-C}} and {{ic|-G}} arguments must again be added:<br />
<br />
compton -CGb<br />
<br />
Finally, this is an example where additional arguments that require values to be set have been used:<br />
<br />
compton -cCGfF -o 0.38 -O 200 -I 200 -t 0 -l 0 -r 3 -D2 -m 0.88<br />
<br />
=== Using a configuration file ===<br />
<br />
To use a custom configuration file with compton during a session, use the following command:<br />
<br />
compton --config <path/to/compton.conf><br />
<br />
To autostart compton as a background ([[Daemon]]) process for a session, the {{ic|-b}} argument must again be used:<br />
<br />
compton --config <path/to/compton.conf> -b<br />
<br />
It is recommended to either create the configuration file in the hidden {{ic|~/.config}} directory ({{ic|~/.config/compton.conf}}) or as a hidden file in the {{ic|Home}} directory ({{ic|~/.compton.conf}}). A sample script has been provided:<br />
<br />
# Shadow<br />
shadow = true; # Enabled client-side shadows on windows.<br />
no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.<br />
no-dnd-shadow = true; # Don't draw shadows on DND windows.<br />
clear-shadow = true; # Zero the part of the shadow's mask behind the <br />
# window. Fix some weirdness with ARGB windows.<br />
shadow-radius = 7; # The blur radius for shadows. (default 12)<br />
shadow-offset-x = -7; # The left offset for shadows. (default -15)<br />
shadow-offset-y = -7; # The top offset for shadows. (default -15)<br />
# shadow-opacity = 0.7; # The translucency for shadows. (default .75)<br />
# shadow-red = 0.0; # Red color value of shadow. (0.0 - 1.0, defaults to 0)<br />
# shadow-green = 0.0; # Green color value of shadow. (0.0 - 1.0, defaults to 0)<br />
# shadow-blue = 0.0; # Blue color value of shadow. (0.0 - 1.0, defaults to 0)<br />
shadow-exclude = [ "n:e:Notification" ]; # Exclude conditions for shadows.<br />
# shadow-exclude = "n:e:Notification";<br />
shadow-ignore-shaped = true; # Avoid drawing shadow on all shaped windows<br />
# (see also: --detect-rounded-corners)<br />
<br />
# Opacity<br />
menu-opacity = 0.9; # The opacity for menus. (default 1.0)<br />
inactive-opacity = 0.9; # Default opacity of inactive windows. (0.0 - 1.0)<br />
# active-opacity = 0.8; # Default opacity for active windows. (0.0 - 1.0)<br />
# frame-opacity = 0.8; # Opacity of window titlebars and borders. (0.1 - 1.0)<br />
# inactive-opacity-override = true; # Let inactive opacity set by 'inactive-opacity' overrides<br />
# value of _NET_WM_OPACITY. Bad choice.<br />
alpha-step = 0.06; # XRender backend: Step size for alpha pictures. Increasing<br />
# it may result in less X resource usage,<br />
# Yet fading may look bad.<br />
# inactive-dim = 0.2; # Dim inactive windows. (0.0 - 1.0)<br />
# inactive-dim-fixed = true; # Do not let dimness adjust based on window opacity.<br />
# blur-background = true; # Blur background of transparent windows.<br />
# Bad performance with X Render backend.<br />
# GLX backend is preferred.<br />
# blur-background-frame = true; # Blur background of opaque windows with transparent<br />
# frames as well.<br />
blur-background-fixed = false; # Do not let blur radius adjust based on window opacity.<br />
blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ];<br />
# Exclude conditions for background blur.<br />
<br />
# Fading<br />
fading = true; # Fade windows during opacity changes.<br />
# fade-delta = 30; # The time between steps in a fade in milliseconds. (default 10).<br />
fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).<br />
fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).<br />
# no-fading-openclose = true; # Avoid fade windows in/out when opening/closing.<br />
fade-exclude = [ ]; # Exclude conditions for fading.<br />
<br />
# Other<br />
backend = "xrender" # Backend to use: "xrender" or "glx". GLX backend is typically<br />
# much faster but depends on a sane driver.<br />
mark-wmwin-focused = true; # Try to detect WM windows and mark them as active.<br />
mark-ovredir-focused = true; # Mark all non-WM but override-redirect windows active (e.g. menus).<br />
use-ewmh-active-win = false; # Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused<br />
# instead of using FocusIn/Out events. Usually more reliable but<br />
# depends on a EWMH-compliant WM.<br />
detect-rounded-corners = true; # Detect rounded corners and treat them as rectangular when --shadow-ignore- shaped is on.<br />
detect-client-opacity = true; # Detect _NET_WM_OPACITY on client windows, useful for window<br />
# managers not passing _NET_WM_OPACITY of client windows to frame<br />
# windows.<br />
refresh-rate = 0; # For --sw-opti: Specify refresh rate of the screen. 0 for auto.<br />
vsync = "none"; # "none", "drm", "opengl", "opengl-oml", "opengl-swc", "opengl-mswc" <br />
# See man page for more details.<br />
dbe = false; # Enable DBE painting mode. Rarely needed.<br />
paint-on-overlay = false; # Painting on X Composite overlay window. Recommended.<br />
sw-opti = false; # Limit compton to repaint at most once every 1 / refresh_rate.<br />
# Incompatible with certain VSync methods.<br />
unredir-if-possible = false; # Unredirect all windows if a full-screen opaque window is<br />
# detected, to maximize performance for full-screen windows.<br />
focus-exclude = [ ]; # A list of conditions of windows that should always be considered<br />
# focused.<br />
detect-transient = true; # Use WM_TRANSIENT_FOR to group windows, and consider windows in<br />
# the same group focused at the same time.<br />
detect-client-leader = true; # Use WM_CLIENT_LEADER to group windows.<br />
invert-color-include = [ ]; # Conditions for windows to be painted with inverted color.<br />
<br />
# GLX backend # GLX backend fine-tune options. See man page for more info.<br />
# glx-no-stencil = true; # Recommended.<br />
glx-copy-from-front = false; # Useful with --glx-swap-method,<br />
# glx-use-copysubbuffermesa = true; # Recommended if it works. Breaks VSync.<br />
# glx-no-rebind-pixmap = true; # Recommended if it works. <br />
glx-swap-method = "undefined"; # See man page.<br />
<br />
# Window type settings<br />
wintypes:<br />
{<br />
tooltip = { fade = true; shadow = false; opacity = 0.75; focus = true; };<br />
# fade: Fade the particular type of windows.<br />
# shadow: Give those windows shadow<br />
# opacity: Default opacity for the type of windows.<br />
# focus: Whether to always consider windows of this type focused.<br />
};<br />
<br />
==== Disable conky shadowing ====<br />
<br />
To disable shadows around [[conky]] windows - where used - first amend the conky configuration file {{ic|~/.conkyrc}} as follows:<br />
<br />
own_window_class conky<br />
<br />
Then amend the compton configuration file as follows:<br />
<br />
shadow-exclude = "class_g = 'conky'";<br />
<br />
== Multihead ==<br />
If a [[multihead]] configuration is used without {{pkg|xinerama}} - meaning that X server is started with more than one screen - then compton will start on only one screen by default. It can be started on all screens by using the {{ic|-d}} argument. For example, compton can be executed for 4 monitors with the following command:<br />
<br />
seq 0 3 | xargs -l1 -I@ compton -b -d :0.@<br />
<br />
== Troubleshooting ==<br />
The use of compositing effects may on occasion cause issues such as visual glitches when not configured correctly for use with other applications and programs.<br />
<br />
=== Slock ===<br />
{{note|Use of the {{ic|--focus-exclude}} argument may be a cleaner solution.}}<br />
<br />
Where inactive window transparancy has been enabled (the {{ic|-i}} argument when running as a command), this may provide troublesome results when also using [[slock]]. The solution is to amend the transparency to {{ic|0.2}}. For example, where running compton arguments as a command:<br />
<br />
compton <any other arguments> -i 0.2<br />
<br />
Otherwise, where using a configuration file:<br />
<br />
inactive-dim = 0.2;</div>Dodo3773https://wiki.archlinux.org/index.php?title=Improving_performance&diff=284789Improving performance2013-11-27T04:16:26Z<p>Dodo3773: /* Go-preload */</p>
<hr />
<div>[[Category:Hardware]]<br />
[[Category:System administration]]<br />
[[ar:Maximizing Performance]]<br />
[[es:Maximizing Performance]]<br />
[[ja:Maximizing Performance]]<br />
[[ru:Maximizing Performance]]<br />
[[zh-CN:Maximizing Performance]]<br />
This article provides information on basic system diagnostics relating to performance as well as steps that may be taken to reduce resource consumption or to otherwise optimize the system with the end-goal being either perceived or documented improvements to a system's performance.<br />
<br />
==The basics==<br />
<br />
===Know your system===<br />
<br />
The best way to tune a system is to target the bottlenecks, that is the subsystems that limit the overall speed. They usually can be identified by knowing the specifications of the system, but there are some basic indications:<br />
<br />
* If the computer becomes slow when big applications, like OpenOffice.org and Firefox, are running at the same time, then there is a good chance the amount of RAM is insufficient. To verify available RAM, use this command, and check for the line beginning with -/+buffers:<br />
<br />
$ free -m<br />
<br />
* If boot time is really slow, and if applications take a lot of time to load the first time they are launched, but run fine afterwards, then the hard drive is probably too slow. The speed of a hard drive can be measured using the {{ic|hdparm}} command:<br />
<br />
$ hdparm -t /dev/sdx<br />
<br />
This is only the pure read speed of the hard drive, and is not a valid benchmark, but a value superior to 40MB/s (assuming drive tested while idle) can be considered decent on an average system. hdparm can be found in the [[Official Repositories]].<br />
* If the CPU load is consistently high even when RAM is available, then lowering CPU usage should be a priority. CPU load can be monitored in many ways, like using the {{ic|top}} command:<br />
<br />
$ top<br />
<br />
* If the only applications lagging are the ones using direct rendering, meaning they use the graphic card, like video players and games, then improving the graphic performance should help. First step would be to verify if direct rendering simply is not enabled. This is indicated by the {{ic|glxinfo}} command:<br />
<br />
$ glxinfo | grep direct<br />
<br />
{{ic|glxinfo}} is part of {{Pkg|mesa-demos}} package.<br />
<br />
===The first thing to do===<br />
<br />
The simplest and most efficient way of improving overall performance is to run lightweight environments and applications.<br />
* Use a [[Window Manager|window manager]] instead of a [[Desktop Environment]]. Choices include [[dwm]], [[wmii]], [[i3]], [[Awesome]], [[Openbox]], [[Fluxbox]] and [[JWM]].<br />
* Choose a minimal Desktop Environment over a heavier one like [[GNOME]] or [[KDE]]. Something like [[LXDE]] or [[Xfce]].<br />
* Using lightweight applications. Search [[List of Applications]] for console applications and the Light and Fast Applications Awards threads in the forum: [https://bbs.archlinux.org/viewtopic.php?id=41168 2007], [https://bbs.archlinux.org/viewtopic.php?id=67951 2008], [https://bbs.archlinux.org/viewtopic.php?id=78490 2009], [https://bbs.archlinux.org/viewtopic.php?id=88515 2010], [https://bbs.archlinux.org/viewtopic.php?id=111878 2011], and [https://bbs.archlinux.org/viewtopic.php?id=138281 2012].<br />
* Remove unnecessary [[daemons]].<br />
<br />
=== Compromise ===<br />
<br />
Almost all tuning brings drawbacks. Lighter applications usually come with less features and some tweaks may make a system unstable, or simply require time to implement and maintain. This page tries to highlight those drawbacks, but the final judgment rests on the user.<br />
<br />
=== Benchmarking ===<br />
<br />
The effects of optimization are often difficult to judge. They can however be measured by [[benchmarking]] tools.<br />
<br />
== Storage devices ==<br />
<br />
=== Device layout ===<br />
<br />
One of the biggest performance gains comes from having multiple storage devices in a layout that spreads the operating system work around. Having {{ic|/}} {{ic|/home}} {{ic|/var}} and {{ic|/usr}} on separate disks is dramatically faster than a single disk layout where they are all on the same hard drive.<br />
<br />
==== Swap files ====<br />
<br />
Creating your swap files on a separate disk can also help quite a bit, especially if your machine swaps frequently. It happens if you do not have enough RAM for your environment. Using KDE with all the features and applications that come along may require several GiB of memory, whereas a tiny window manager with console applications will perfectly fit in less than 512 MiB of memory.<br />
<br />
==== RAID benefits ====<br />
<br />
If you have multiple disks (2 or more) available, you can set them up as a software [[RAID]] for serious speed improvements. In a RAID 0 array there is no redundancy in case of drive failure, but for each additional disk you add to the array, the speed of the disk becomes that much faster. The smart choice is to use RAID 5 which offers both speed and data protection.<br />
<br />
==== Multiple hardware paths ====<br />
<br />
An internal hardware path is how the storage device is connected to your motherboard. There are different ways to connect to the motherboard such as TCP/IP through a NIC, plugged in directly using PCIe/PCI, Firewire, Raid Card, USB, etc. By spreading your storage devices across these multiple connection points you maximize the capabilities of your motherboard, for example 6 hard-drives connected via USB would be much much slower than 3 over USB and 3 over Firewire. The reason is that each entry path into the motherboard is like a pipe, and there is a set limit to how much can go through that pipe at any one time. The good news is that the motherboard usually has several pipes.<br />
<br />
More Examples<br />
# Directly to the motherboard using pci/PCIe/ata<br />
# Using an external enclosure to house the disk over USB/Firewire<br />
# Turn the device into a network storage device by connecting over tcp/ip<br />
<br />
Note also that if you have a 2 USB ports on the front of your machine, and 4 USB ports on the back, and you have 4 disks, it would probably be fastest to put 2 on front/2 on back or 3 on back/1 on front. This is because internally the front ports are likely a separate Root Hub than the back, meaning you can send twice as much data by using both than just 1. Use the following commands to determine the various paths on your machine.<br />
<br />
{{hc|USB Device Tree|$ lsusb -tv}}<br />
<br />
{{hc|PCI Device Tree|$ lspci -tv}}<br />
<br />
=== Partitioning ===<br />
<br />
The partition layout can influence the system's performance. Sectors at the beginning of the drive (closer to the center of the disk) are faster than those at the end. Also, a smaller partition requires less movements from the drive's head, and so speed up disk operations. Therefore, it is advised to create a small partition (10GB, more or less depending on your needs) only for your system, as near to the beginning of the drive as possible. Other data (pictures, videos) should be kept on a separate partition, and this is usually achieved by separating the home directory ({{ic|/home/''user''}}) from the system ({{ic|/}}).<br />
<br />
=== Choosing and tuning your filesystem ===<br />
<br />
Choosing the best filesystem for a specific system is very important because each has its own strengths. The [[File Systems]] article provides a short summary of the most popular ones. You can also find relevant articles [[:Category:File systems|here]].<br />
<br />
==== Mount options====<br />
<br />
Mount options offer an easy way to improve speed without reformatting. They can be set using the mount command:<br />
<br />
$ mount -o option1,option2 /dev/partition /mnt/partition<br />
<br />
To set them permanently, you can modify {{ic|/etc/fstab}} to make the relevant line look like this:<br />
<br />
/dev/partition /mnt/partition partitiontype option1,option2 0 0<br />
<br />
The mount options {{Ic|noatime,nodiratime}} are known for improving performance on almost all file-systems. The former is a superset of the latter (which applies to directories only -- {{Ic|noatime}} applies to both files and directories). In rare cases, for example if you use mutt, it can cause minor problems. You can instead use the {{Ic|relatime}} option (NB relatime is the default in >2.6.30)<br />
<br />
==== Ext3 ====<br />
<br />
See [[Ext3]].<br />
<br />
==== Ext4 ====<br />
<br />
See [[Ext4#Tips_and_tricks | Ext4]].<br />
<br />
==== JFS ====<br />
<br />
See [[JFS Filesystem#Optimizations|JFS Filesystem]].<br />
<br />
==== XFS ====<br />
<br />
{{Merge|XFS}}<br />
For optimal speed, just create an XFS file system with:<br />
<br />
$ mkfs.xfs /dev/thetargetpartition<br />
<br />
Yep, so simple — since all of the [http://xfs.org/index.php/XFS_FAQ#Q:_I_want_to_tune_my_XFS_filesystems_for_.3Csomething.3E "boost knobs" are already "on" by default].<br />
<br />
==== Reiserfs ====<br />
<br />
{{Merge|Reiser4}}<br />
<br />
The {{Ic|1=data=writeback}} mount option improves speed, but may corrupt data during power loss. The {{Ic|notail}} mount option increases the space used by the filesystem by about 5%, but also improves overall speed. You can also reduce disk load by putting the journal and data on separate drives. This is done when creating the filesystem: <br />
<br />
# mkreiserfs –j /dev/sd'''a1''' /dev/sd'''b1'''<br />
<br />
Replace {{ic|/dev/sd'''a1'''}} with the partition reserved for the journal, and {{ic|/dev/sd'''b1'''}} with the partition for data. You can learn more about reiserfs with this [http://www.funtoo.org/en/articles/linux/ffg/2/ article].<br />
<br />
==== Btrfs ====<br />
<br />
See [[Btrfs#Defragmentation|defragmentation]] and [[Btrfs#Compression|compression]].<br />
<br />
=== Tuning kernel parameters ===<br />
<br />
{{Merge|sysctl|It already contains a section on TCP/IP stack hardening, why should it not contain virtual memory settings? Similar information would be kept in one place.}}<br />
<br />
There are several key tunables governing filesystems that users should consider adding to {{ic|[[sysctl|/etc/sysctl.d/99-sysctl.conf]]}} which is auto-loaded at boot by [[systemd]]:<br />
<br />
# Contains, as a percentage of total system memory, the number of pages at which<br />
# a process which is generating disk writes will start writing out dirty data.<br />
vm.dirty_ratio = 3<br />
<br />
# Contains, as a percentage of total system memory, the number of pages at which<br />
# the background kernel flusher threads will start writing out dirty data.<br />
vm.dirty_background_ratio = 2<br />
<br />
As noted in the comments, one needs to consider the total amount of RAM when setting these values. <br />
<br />
*'''vm.dirty_ratio''' defaults to 10 (percent of RAM). Consensus is that 10% of RAM when RAM is say half a GB (so 10% is ~50 MB) is a sane value on spinning disks, but it can be MUCH worse when RAM is larger, say 16 GB (10% is ~1.6 GB), as that's several seconds of writeback on spinning disks. A more sane value in this cause is 3 (16*0.03 ~ 491 MB).<br />
<br />
*'''vm.dirty_background_ratio''' similarly, 5 (% of RAM) by default may be just fine for small memory values, but again, consider and adjust accordingly for the amount of RAM on a particular system.<br />
<br />
=== Compressing /usr ===<br />
<br />
{{Note|As of version 3.0 of the Linux kernel, aufs2 is no longer supported.}}<br />
{{out of date|aufs is no longer in the official repos. Also, read the Note box above.}}<br />
A way to speed up reading from the hard drive is to compress the data, because there is less data to be read. It must however be decompressed, which means a greater CPU load. Some file systems support transparent compression, most notably Btrfs and reiserfs4, but their compression ratio is limited by the 4k block size. A good alternative is to compress {{ic|/usr}} in a squashfs file, with a 64k(128k) block size, as instructed in this [http://forums.gentoo.org/viewtopic-t-646289.html Gentoo forums thread]. What this tutorial does is basically to compress the {{ic|/usr}} folder into a compressed squashfs file-system, then mounts it with aufs. A lot of space is saved, usually two thirds of the original size of {{ic|/usr}}, and applications load faster. However, each time an application is installed or reinstalled, it is written uncompressed, so {{ic|/usr}} must be re-compressed periodically. Squashfs is already in the kernel, and aufs2 is in the official repositories, so no kernel compilation is needed if using the stock kernel.<br />
Since the linked guide is for Gentoo, the next commands outline the steps specifically for Arch. To get it working, [[pacman|install]] the packages {{pkg|aufs2}} and {{pkg|squashfs-tools}}. These packages provide the aufs-modules and some userspace-tools for the squash-filesystem.<br />
<br />
Now we need some extra directories where we can store the archive of {{ic|/usr}} as read-only and another folder where we can store the data changed after the last compression as writeable:<br />
# mkdir -p /squashed/usr/{ro,rw}<br />
Now that we got a rough setup you should perform a complete system-upgrade since every change of content in {{ic|/usr}} after the compression will be excluded from this speedup. If you use prelink you should also perform a complete prelink before creating the archive. Now it is time to invoke the command to compress {{ic|/usr}}:<br />
# mksquashfs /usr /squashed/usr/usr.sfs -b 65536<br />
These parameters/options are the ones suggested by the Gentoo link but there might be some room for improvement using some of the options described [http://www.tldp.org/HOWTO/SquashFS-HOWTO/mksqoverview.html#mksqusing here].<br />
Now to get the archive mounted together with the writeable folder it is necessary to edit {{ic|/etc/fstab}} and add the following lines:<br />
/squashed/usr/usr.sfs /squashed/usr/ro squashfs loop,ro 0 0 <br />
usr /usr aufs udba=reval,br:/squashed/usr/rw:/squashed/usr/ro 0 0<br />
Now you should be done and able to reboot. The original author suggests to delete all the old content of {{ic|/usr}}, but this might cause some problems if anything goes wrong during some later re-compression. It is safer to leave the old files in place.<br />
<br />
A [https://bbs.archlinux.org/viewtopic.php?pid=714052 Bash script] has been created that will automate the process of re-compressing (read updating) the archive since the tutorial is meant for Gentoo and some options do not correlate to what they should be in Arch.<br />
<br />
=== Tuning for an SSD ===<br />
<br />
[[SSD#Tips_for_Maximizing_SSD_Performance]]<br />
<br />
=== RAM disks / tuning for really slow disks ===<br />
<br />
* [http://cs.joensuu.fi/~mmeri/usbraid/ USB stick RAID]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=493773#p493773 Combine RAM disk with disk in RAID]<br />
<br />
== CPU ==<br />
<br />
The only way to directly improve CPU speed is overclocking. As it is a complicated and risky task, it is not recommended for anyone except experts. The best way to overclock is through the BIOS. When purchasing your system, keep in mind that most Intel motherboards are notorious for disabling the capability to overclock.<br />
<br />
Many Intel i5 and i7 chips, even when overclocked properly through the BIOS or UEFI interface, will not report the correct clock frequency to acpi_cpufreq and most other utilities. This will result in excessive messages in dmesg about delays unless the module acpi_cpufreq is unloaded and blacklisted. The only tool known to correctly read the clock speed of these overclocked chips under Linux is i7z. The {{Pkg|i7z}} package is available in the community repo and {{AUR|i7z-git}} is available in the [[AUR]].<br />
<br />
A way to modify performance ([http://lkml.org/lkml/2009/9/6/136 ref]) is to use Con Kolivas' desktop-centric kernel patchset, which, among other things, replaces the Completely Fair Scheduler (CFS) with the Brain Fuck Scheduler (BFS).<br />
<br />
Kernel PKGBUILDs that include the BFS patch can be installed from the [[AUR]] or [[Unofficial User Repositories]]. See the respective pages for {{AUR|linux-ck}} and [[Linux-ck]] wiki page, {{AUR|linux-bfs}} or {{AUR|linux-pf}} for more information on their additional patches.<br />
<br />
{{Note|BFS/CK are designed for desktop/laptop use and not servers. They provide low latency and work well for 16 CPUs or less. Also, Con Kolivas suggests setting HZ to 1000. For more information, see the [http://ck.kolivas.org/patches/bfs/bfs-faq.txt BFS FAQ] and [http://users.on.net/~ckolivas/kernel/ Kernel patch homepage of Con Kolivas].}}<br />
<br />
=== Verynice ===<br />
<br />
[[Verynice]] is a daemon, available in the [[AUR]] as {{AUR|verynice}}, for dynamically adjusting the nice levels of executables. The nice level represents the priority of the executable when allocating CPU resources. Simply define executables for which responsiveness is important, like X or multimedia applications, as ''goodexe'' in {{ic|/etc/verynice.conf}}. Similarly, CPU-hungry executables running in the background, like make, can be defined as ''badexe''. This prioritization greatly improves system responsiveness under heavy load.<br />
<br />
=== Ulatencyd ===<br />
<br />
[[Ulatencyd]] is a daemon that controls how the Linux kernel will spend its resources on the running processes. It uses dynamic cgroups to give the kernel hints and limitations on processes. It supports prioritizing processes for disk I/O as well as CPU shares, and uses more clever heuristics than Verynice. In addition, it comes with a good set of configs out of the box.<br />
<br />
One note of warning, by default it changes the default scheduler of all block devices to cfq, to disable behavior see [[Ulatencyd]].<br />
<br />
== Graphics ==<br />
<br />
=== Xorg.conf configuration ===<br />
<br />
Graphic performance heavily depends on the settings in {{ic|/etc/X11/xorg.conf}}. There are tutorials for [[Nvidia]], [[ATI]] and [[Intel]] cards. Improper settings may stop Xorg from working, so caution is advised.<br />
<br />
=== Driconf ===<br />
<br />
{{Pkg|driconf}} is a small utility that can be found in the [[official repositories]] that allows you to change the direct rendering settings for open source drivers. Enabling HyperZ can drastically improve performance.<br />
<br />
=== GPU overclocking ===<br />
<br />
Overclocking a graphics card is typically more expedient than with a CPU, since there are readily accessible software packages which allow for on-the-fly GPU clock adjustments. For ATI users, get {{AUR|rovclock}} or {{AUR|amdoverdrivectrl}}, and NVIDIA users should get {{AUR|nvclock}} from the AUR. Intel chipsets users can install [http://www.gmabooster.com/ GMABooster] from with the {{AUR|gmabooster}} AUR package.<br />
<br />
The changes can be made permanent by running the appropriate command after X boots, for example by adding it to {{ic|~/.xinitrc}}. A safer approach would be to only apply the overclocked settings when needed.<br />
<br />
== RAM and swap ==<br />
<br />
=== Relocate files to tmpfs ===<br />
<br />
Relocate files, such as your browser profile, to a [[Wikipedia:tmpfs|tmpfs]] file system, including {{ic|/tmp}}, or {{ic|/dev/shm}} for improvements in application response as all the files are now stored in RAM.<br />
<br />
Use an active management script for maximal reliability and ease of use. <br />
<br />
Refer to the [[Profile-sync-daemon]] wiki article for more information on syncing browser profiles.<br />
<br />
Refer to the [[Anything-sync-daemon]] wiki article for more information on syncing any specified folder.<br />
<br />
=== Swappiness ===<br />
<br />
See [[Swap#Swappiness]].<br />
<br />
=== Compcache/Zram ===<br />
<br />
[https://code.google.com/p/compcache/ Compcache], nowadays replaced by the '''zram''' kernel module, creates a device in RAM and compresses it. If you use for swap means that part of the RAM can hold much more information but uses more CPU. Still, it is much quicker than swapping to a hard drive. If a system often falls back to swap, this could improve responsiveness. Zram is in mainline staging (therefore its not stable yet, use with caution).<br />
<br />
The AUR package {{AUR|zramswap}} provides an automated script fot setting up such swap devices with optimal settings for your system (such as RAM size and CPU core number). The script creates one zram device per CPU core with a total space equivalent to the RAM available. To do this automatically on every boot, enable {{ic|zramswap.service}} via [[systemd#Basic systemctl usage|systemctl]]. <br />
<br />
You will have a compressed swap with higher priority than your regular swap which will utilize multiple CPU cores for compessing data.<br />
<br />
{{Tip|Using zram is also a good way to reduce disk read/write cycles due to swap on SSDs.}}<br />
<br />
=== Using the graphic card's RAM ===<br />
<br />
In the unlikely case that you have very little RAM and a surplus of video RAM, you can use the latter as swap. See [[Swap on video ram]].<br />
<br />
=== Preloading ===<br />
<br />
Preloading is the action of putting and keeping target files into the RAM. The benefit is that preloaded applications start more quickly because reading from the RAM is always quicker than from the hard drive. However, part of your RAM will be dedicated to this task, but no more than if you kept the application open. Therefore preloading is best used with large and often-used applications like Firefox and LibreOffice.<br />
<br />
==== Go-preload ====<br />
<br />
{{AUR|gopreload-git}} is a small daemon created in the [http://forums.gentoo.org/viewtopic-t-789818-view-next.html?sid=5457cff93039fc7d4a3e445ef90f9821 Gentoo forum]. To use it, first run this command in a terminal for each program you want to preload at boot:<br />
# gopreload-prepare program<br />
<br />
For regular user take ownership of /usr/share/gopreload/enabled and /usr/share/gopreload/disabled<br />
# chown username:users /usr/share/gopreload/enabled /usr/share/gopreload/disabled<br />
and then gopreload each program you want to preload:<br />
$ gopreload-prepare program<br />
<br />
Then, as instructed, press Enter when the program is fully loaded. This will add a list of files needed by the program in {{ic|/usr/share/gopreload/enabled}}. To load all lists at boot, enable systemd service file:<br />
# systemctl enable gopreload.service<br />
<br />
To disable the loading of a program, remove the appropriate list in {{ic|/usr/share/gopreload/enabled}} or move it to {{ic|/usr/share/gopreload/disabled}}.<br />
<br />
==== Preload ====<br />
<br />
A more automated approach is used by [[Preload]]. All you have to do is enable it with this command:<br />
# systemctl enable preload<br />
It will monitor the most used files on your system, and with time build its own list of files to preload at boot.<br />
<br />
== Boot time ==<br />
<br />
You can find tutorials with good tips in the article [[Improve Boot Performance]].<br />
<br />
=== Suspend to RAM ===<br />
<br />
The best way to reduce boot time is not booting at all. Consider [[Suspend and Hibernate#Suspend to RAM|suspending your system to RAM]] instead.<br />
<br />
== Application-specific tips ==<br />
<br />
=== Firefox ===<br />
<br />
See [[Firefox Tweaks#Performance]] and [[Firefox Ramdisk]].<br />
<br />
Firefox in the official repositories is built with the profile guided optimization flag enabled. You may want to use it in your custom build.<br />
To do this append:<br />
ac_add_options --enable-profile-guided-optimization<br />
to your {{ic|.mozconfig}} file.<br />
<br />
=== Gcc/Makepkg ===<br />
<br />
See [[Ccache]].<br />
<br />
=== Office suites ===<br />
<br />
See [[LibreOffice#Speed up LibreOffice|Speed up LibreOffice]] and [[Openoffice#Speed up OpenOffice|Speed up OpenOffice]].<br />
<br />
=== Pacman ===<br />
<br />
See [[Improve Pacman Performance]].<br />
<br />
=== SSH ===<br />
<br />
See [[SSH#Speeding up SSH|Speed up SSH]].<br />
<br />
== Laptops ==<br />
<br />
See [[Laptop]].</div>Dodo3773https://wiki.archlinux.org/index.php?title=Improving_performance&diff=284788Improving performance2013-11-27T04:15:19Z<p>Dodo3773: /* Go-preload */ Now has a systemd service file.</p>
<hr />
<div>[[Category:Hardware]]<br />
[[Category:System administration]]<br />
[[ar:Maximizing Performance]]<br />
[[es:Maximizing Performance]]<br />
[[ja:Maximizing Performance]]<br />
[[ru:Maximizing Performance]]<br />
[[zh-CN:Maximizing Performance]]<br />
This article provides information on basic system diagnostics relating to performance as well as steps that may be taken to reduce resource consumption or to otherwise optimize the system with the end-goal being either perceived or documented improvements to a system's performance.<br />
<br />
==The basics==<br />
<br />
===Know your system===<br />
<br />
The best way to tune a system is to target the bottlenecks, that is the subsystems that limit the overall speed. They usually can be identified by knowing the specifications of the system, but there are some basic indications:<br />
<br />
* If the computer becomes slow when big applications, like OpenOffice.org and Firefox, are running at the same time, then there is a good chance the amount of RAM is insufficient. To verify available RAM, use this command, and check for the line beginning with -/+buffers:<br />
<br />
$ free -m<br />
<br />
* If boot time is really slow, and if applications take a lot of time to load the first time they are launched, but run fine afterwards, then the hard drive is probably too slow. The speed of a hard drive can be measured using the {{ic|hdparm}} command:<br />
<br />
$ hdparm -t /dev/sdx<br />
<br />
This is only the pure read speed of the hard drive, and is not a valid benchmark, but a value superior to 40MB/s (assuming drive tested while idle) can be considered decent on an average system. hdparm can be found in the [[Official Repositories]].<br />
* If the CPU load is consistently high even when RAM is available, then lowering CPU usage should be a priority. CPU load can be monitored in many ways, like using the {{ic|top}} command:<br />
<br />
$ top<br />
<br />
* If the only applications lagging are the ones using direct rendering, meaning they use the graphic card, like video players and games, then improving the graphic performance should help. First step would be to verify if direct rendering simply is not enabled. This is indicated by the {{ic|glxinfo}} command:<br />
<br />
$ glxinfo | grep direct<br />
<br />
{{ic|glxinfo}} is part of {{Pkg|mesa-demos}} package.<br />
<br />
===The first thing to do===<br />
<br />
The simplest and most efficient way of improving overall performance is to run lightweight environments and applications.<br />
* Use a [[Window Manager|window manager]] instead of a [[Desktop Environment]]. Choices include [[dwm]], [[wmii]], [[i3]], [[Awesome]], [[Openbox]], [[Fluxbox]] and [[JWM]].<br />
* Choose a minimal Desktop Environment over a heavier one like [[GNOME]] or [[KDE]]. Something like [[LXDE]] or [[Xfce]].<br />
* Using lightweight applications. Search [[List of Applications]] for console applications and the Light and Fast Applications Awards threads in the forum: [https://bbs.archlinux.org/viewtopic.php?id=41168 2007], [https://bbs.archlinux.org/viewtopic.php?id=67951 2008], [https://bbs.archlinux.org/viewtopic.php?id=78490 2009], [https://bbs.archlinux.org/viewtopic.php?id=88515 2010], [https://bbs.archlinux.org/viewtopic.php?id=111878 2011], and [https://bbs.archlinux.org/viewtopic.php?id=138281 2012].<br />
* Remove unnecessary [[daemons]].<br />
<br />
=== Compromise ===<br />
<br />
Almost all tuning brings drawbacks. Lighter applications usually come with less features and some tweaks may make a system unstable, or simply require time to implement and maintain. This page tries to highlight those drawbacks, but the final judgment rests on the user.<br />
<br />
=== Benchmarking ===<br />
<br />
The effects of optimization are often difficult to judge. They can however be measured by [[benchmarking]] tools.<br />
<br />
== Storage devices ==<br />
<br />
=== Device layout ===<br />
<br />
One of the biggest performance gains comes from having multiple storage devices in a layout that spreads the operating system work around. Having {{ic|/}} {{ic|/home}} {{ic|/var}} and {{ic|/usr}} on separate disks is dramatically faster than a single disk layout where they are all on the same hard drive.<br />
<br />
==== Swap files ====<br />
<br />
Creating your swap files on a separate disk can also help quite a bit, especially if your machine swaps frequently. It happens if you do not have enough RAM for your environment. Using KDE with all the features and applications that come along may require several GiB of memory, whereas a tiny window manager with console applications will perfectly fit in less than 512 MiB of memory.<br />
<br />
==== RAID benefits ====<br />
<br />
If you have multiple disks (2 or more) available, you can set them up as a software [[RAID]] for serious speed improvements. In a RAID 0 array there is no redundancy in case of drive failure, but for each additional disk you add to the array, the speed of the disk becomes that much faster. The smart choice is to use RAID 5 which offers both speed and data protection.<br />
<br />
==== Multiple hardware paths ====<br />
<br />
An internal hardware path is how the storage device is connected to your motherboard. There are different ways to connect to the motherboard such as TCP/IP through a NIC, plugged in directly using PCIe/PCI, Firewire, Raid Card, USB, etc. By spreading your storage devices across these multiple connection points you maximize the capabilities of your motherboard, for example 6 hard-drives connected via USB would be much much slower than 3 over USB and 3 over Firewire. The reason is that each entry path into the motherboard is like a pipe, and there is a set limit to how much can go through that pipe at any one time. The good news is that the motherboard usually has several pipes.<br />
<br />
More Examples<br />
# Directly to the motherboard using pci/PCIe/ata<br />
# Using an external enclosure to house the disk over USB/Firewire<br />
# Turn the device into a network storage device by connecting over tcp/ip<br />
<br />
Note also that if you have a 2 USB ports on the front of your machine, and 4 USB ports on the back, and you have 4 disks, it would probably be fastest to put 2 on front/2 on back or 3 on back/1 on front. This is because internally the front ports are likely a separate Root Hub than the back, meaning you can send twice as much data by using both than just 1. Use the following commands to determine the various paths on your machine.<br />
<br />
{{hc|USB Device Tree|$ lsusb -tv}}<br />
<br />
{{hc|PCI Device Tree|$ lspci -tv}}<br />
<br />
=== Partitioning ===<br />
<br />
The partition layout can influence the system's performance. Sectors at the beginning of the drive (closer to the center of the disk) are faster than those at the end. Also, a smaller partition requires less movements from the drive's head, and so speed up disk operations. Therefore, it is advised to create a small partition (10GB, more or less depending on your needs) only for your system, as near to the beginning of the drive as possible. Other data (pictures, videos) should be kept on a separate partition, and this is usually achieved by separating the home directory ({{ic|/home/''user''}}) from the system ({{ic|/}}).<br />
<br />
=== Choosing and tuning your filesystem ===<br />
<br />
Choosing the best filesystem for a specific system is very important because each has its own strengths. The [[File Systems]] article provides a short summary of the most popular ones. You can also find relevant articles [[:Category:File systems|here]].<br />
<br />
==== Mount options====<br />
<br />
Mount options offer an easy way to improve speed without reformatting. They can be set using the mount command:<br />
<br />
$ mount -o option1,option2 /dev/partition /mnt/partition<br />
<br />
To set them permanently, you can modify {{ic|/etc/fstab}} to make the relevant line look like this:<br />
<br />
/dev/partition /mnt/partition partitiontype option1,option2 0 0<br />
<br />
The mount options {{Ic|noatime,nodiratime}} are known for improving performance on almost all file-systems. The former is a superset of the latter (which applies to directories only -- {{Ic|noatime}} applies to both files and directories). In rare cases, for example if you use mutt, it can cause minor problems. You can instead use the {{Ic|relatime}} option (NB relatime is the default in >2.6.30)<br />
<br />
==== Ext3 ====<br />
<br />
See [[Ext3]].<br />
<br />
==== Ext4 ====<br />
<br />
See [[Ext4#Tips_and_tricks | Ext4]].<br />
<br />
==== JFS ====<br />
<br />
See [[JFS Filesystem#Optimizations|JFS Filesystem]].<br />
<br />
==== XFS ====<br />
<br />
{{Merge|XFS}}<br />
For optimal speed, just create an XFS file system with:<br />
<br />
$ mkfs.xfs /dev/thetargetpartition<br />
<br />
Yep, so simple — since all of the [http://xfs.org/index.php/XFS_FAQ#Q:_I_want_to_tune_my_XFS_filesystems_for_.3Csomething.3E "boost knobs" are already "on" by default].<br />
<br />
==== Reiserfs ====<br />
<br />
{{Merge|Reiser4}}<br />
<br />
The {{Ic|1=data=writeback}} mount option improves speed, but may corrupt data during power loss. The {{Ic|notail}} mount option increases the space used by the filesystem by about 5%, but also improves overall speed. You can also reduce disk load by putting the journal and data on separate drives. This is done when creating the filesystem: <br />
<br />
# mkreiserfs –j /dev/sd'''a1''' /dev/sd'''b1'''<br />
<br />
Replace {{ic|/dev/sd'''a1'''}} with the partition reserved for the journal, and {{ic|/dev/sd'''b1'''}} with the partition for data. You can learn more about reiserfs with this [http://www.funtoo.org/en/articles/linux/ffg/2/ article].<br />
<br />
==== Btrfs ====<br />
<br />
See [[Btrfs#Defragmentation|defragmentation]] and [[Btrfs#Compression|compression]].<br />
<br />
=== Tuning kernel parameters ===<br />
<br />
{{Merge|sysctl|It already contains a section on TCP/IP stack hardening, why should it not contain virtual memory settings? Similar information would be kept in one place.}}<br />
<br />
There are several key tunables governing filesystems that users should consider adding to {{ic|[[sysctl|/etc/sysctl.d/99-sysctl.conf]]}} which is auto-loaded at boot by [[systemd]]:<br />
<br />
# Contains, as a percentage of total system memory, the number of pages at which<br />
# a process which is generating disk writes will start writing out dirty data.<br />
vm.dirty_ratio = 3<br />
<br />
# Contains, as a percentage of total system memory, the number of pages at which<br />
# the background kernel flusher threads will start writing out dirty data.<br />
vm.dirty_background_ratio = 2<br />
<br />
As noted in the comments, one needs to consider the total amount of RAM when setting these values. <br />
<br />
*'''vm.dirty_ratio''' defaults to 10 (percent of RAM). Consensus is that 10% of RAM when RAM is say half a GB (so 10% is ~50 MB) is a sane value on spinning disks, but it can be MUCH worse when RAM is larger, say 16 GB (10% is ~1.6 GB), as that's several seconds of writeback on spinning disks. A more sane value in this cause is 3 (16*0.03 ~ 491 MB).<br />
<br />
*'''vm.dirty_background_ratio''' similarly, 5 (% of RAM) by default may be just fine for small memory values, but again, consider and adjust accordingly for the amount of RAM on a particular system.<br />
<br />
=== Compressing /usr ===<br />
<br />
{{Note|As of version 3.0 of the Linux kernel, aufs2 is no longer supported.}}<br />
{{out of date|aufs is no longer in the official repos. Also, read the Note box above.}}<br />
A way to speed up reading from the hard drive is to compress the data, because there is less data to be read. It must however be decompressed, which means a greater CPU load. Some file systems support transparent compression, most notably Btrfs and reiserfs4, but their compression ratio is limited by the 4k block size. A good alternative is to compress {{ic|/usr}} in a squashfs file, with a 64k(128k) block size, as instructed in this [http://forums.gentoo.org/viewtopic-t-646289.html Gentoo forums thread]. What this tutorial does is basically to compress the {{ic|/usr}} folder into a compressed squashfs file-system, then mounts it with aufs. A lot of space is saved, usually two thirds of the original size of {{ic|/usr}}, and applications load faster. However, each time an application is installed or reinstalled, it is written uncompressed, so {{ic|/usr}} must be re-compressed periodically. Squashfs is already in the kernel, and aufs2 is in the official repositories, so no kernel compilation is needed if using the stock kernel.<br />
Since the linked guide is for Gentoo, the next commands outline the steps specifically for Arch. To get it working, [[pacman|install]] the packages {{pkg|aufs2}} and {{pkg|squashfs-tools}}. These packages provide the aufs-modules and some userspace-tools for the squash-filesystem.<br />
<br />
Now we need some extra directories where we can store the archive of {{ic|/usr}} as read-only and another folder where we can store the data changed after the last compression as writeable:<br />
# mkdir -p /squashed/usr/{ro,rw}<br />
Now that we got a rough setup you should perform a complete system-upgrade since every change of content in {{ic|/usr}} after the compression will be excluded from this speedup. If you use prelink you should also perform a complete prelink before creating the archive. Now it is time to invoke the command to compress {{ic|/usr}}:<br />
# mksquashfs /usr /squashed/usr/usr.sfs -b 65536<br />
These parameters/options are the ones suggested by the Gentoo link but there might be some room for improvement using some of the options described [http://www.tldp.org/HOWTO/SquashFS-HOWTO/mksqoverview.html#mksqusing here].<br />
Now to get the archive mounted together with the writeable folder it is necessary to edit {{ic|/etc/fstab}} and add the following lines:<br />
/squashed/usr/usr.sfs /squashed/usr/ro squashfs loop,ro 0 0 <br />
usr /usr aufs udba=reval,br:/squashed/usr/rw:/squashed/usr/ro 0 0<br />
Now you should be done and able to reboot. The original author suggests to delete all the old content of {{ic|/usr}}, but this might cause some problems if anything goes wrong during some later re-compression. It is safer to leave the old files in place.<br />
<br />
A [https://bbs.archlinux.org/viewtopic.php?pid=714052 Bash script] has been created that will automate the process of re-compressing (read updating) the archive since the tutorial is meant for Gentoo and some options do not correlate to what they should be in Arch.<br />
<br />
=== Tuning for an SSD ===<br />
<br />
[[SSD#Tips_for_Maximizing_SSD_Performance]]<br />
<br />
=== RAM disks / tuning for really slow disks ===<br />
<br />
* [http://cs.joensuu.fi/~mmeri/usbraid/ USB stick RAID]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=493773#p493773 Combine RAM disk with disk in RAID]<br />
<br />
== CPU ==<br />
<br />
The only way to directly improve CPU speed is overclocking. As it is a complicated and risky task, it is not recommended for anyone except experts. The best way to overclock is through the BIOS. When purchasing your system, keep in mind that most Intel motherboards are notorious for disabling the capability to overclock.<br />
<br />
Many Intel i5 and i7 chips, even when overclocked properly through the BIOS or UEFI interface, will not report the correct clock frequency to acpi_cpufreq and most other utilities. This will result in excessive messages in dmesg about delays unless the module acpi_cpufreq is unloaded and blacklisted. The only tool known to correctly read the clock speed of these overclocked chips under Linux is i7z. The {{Pkg|i7z}} package is available in the community repo and {{AUR|i7z-git}} is available in the [[AUR]].<br />
<br />
A way to modify performance ([http://lkml.org/lkml/2009/9/6/136 ref]) is to use Con Kolivas' desktop-centric kernel patchset, which, among other things, replaces the Completely Fair Scheduler (CFS) with the Brain Fuck Scheduler (BFS).<br />
<br />
Kernel PKGBUILDs that include the BFS patch can be installed from the [[AUR]] or [[Unofficial User Repositories]]. See the respective pages for {{AUR|linux-ck}} and [[Linux-ck]] wiki page, {{AUR|linux-bfs}} or {{AUR|linux-pf}} for more information on their additional patches.<br />
<br />
{{Note|BFS/CK are designed for desktop/laptop use and not servers. They provide low latency and work well for 16 CPUs or less. Also, Con Kolivas suggests setting HZ to 1000. For more information, see the [http://ck.kolivas.org/patches/bfs/bfs-faq.txt BFS FAQ] and [http://users.on.net/~ckolivas/kernel/ Kernel patch homepage of Con Kolivas].}}<br />
<br />
=== Verynice ===<br />
<br />
[[Verynice]] is a daemon, available in the [[AUR]] as {{AUR|verynice}}, for dynamically adjusting the nice levels of executables. The nice level represents the priority of the executable when allocating CPU resources. Simply define executables for which responsiveness is important, like X or multimedia applications, as ''goodexe'' in {{ic|/etc/verynice.conf}}. Similarly, CPU-hungry executables running in the background, like make, can be defined as ''badexe''. This prioritization greatly improves system responsiveness under heavy load.<br />
<br />
=== Ulatencyd ===<br />
<br />
[[Ulatencyd]] is a daemon that controls how the Linux kernel will spend its resources on the running processes. It uses dynamic cgroups to give the kernel hints and limitations on processes. It supports prioritizing processes for disk I/O as well as CPU shares, and uses more clever heuristics than Verynice. In addition, it comes with a good set of configs out of the box.<br />
<br />
One note of warning, by default it changes the default scheduler of all block devices to cfq, to disable behavior see [[Ulatencyd]].<br />
<br />
== Graphics ==<br />
<br />
=== Xorg.conf configuration ===<br />
<br />
Graphic performance heavily depends on the settings in {{ic|/etc/X11/xorg.conf}}. There are tutorials for [[Nvidia]], [[ATI]] and [[Intel]] cards. Improper settings may stop Xorg from working, so caution is advised.<br />
<br />
=== Driconf ===<br />
<br />
{{Pkg|driconf}} is a small utility that can be found in the [[official repositories]] that allows you to change the direct rendering settings for open source drivers. Enabling HyperZ can drastically improve performance.<br />
<br />
=== GPU overclocking ===<br />
<br />
Overclocking a graphics card is typically more expedient than with a CPU, since there are readily accessible software packages which allow for on-the-fly GPU clock adjustments. For ATI users, get {{AUR|rovclock}} or {{AUR|amdoverdrivectrl}}, and NVIDIA users should get {{AUR|nvclock}} from the AUR. Intel chipsets users can install [http://www.gmabooster.com/ GMABooster] from with the {{AUR|gmabooster}} AUR package.<br />
<br />
The changes can be made permanent by running the appropriate command after X boots, for example by adding it to {{ic|~/.xinitrc}}. A safer approach would be to only apply the overclocked settings when needed.<br />
<br />
== RAM and swap ==<br />
<br />
=== Relocate files to tmpfs ===<br />
<br />
Relocate files, such as your browser profile, to a [[Wikipedia:tmpfs|tmpfs]] file system, including {{ic|/tmp}}, or {{ic|/dev/shm}} for improvements in application response as all the files are now stored in RAM.<br />
<br />
Use an active management script for maximal reliability and ease of use. <br />
<br />
Refer to the [[Profile-sync-daemon]] wiki article for more information on syncing browser profiles.<br />
<br />
Refer to the [[Anything-sync-daemon]] wiki article for more information on syncing any specified folder.<br />
<br />
=== Swappiness ===<br />
<br />
See [[Swap#Swappiness]].<br />
<br />
=== Compcache/Zram ===<br />
<br />
[https://code.google.com/p/compcache/ Compcache], nowadays replaced by the '''zram''' kernel module, creates a device in RAM and compresses it. If you use for swap means that part of the RAM can hold much more information but uses more CPU. Still, it is much quicker than swapping to a hard drive. If a system often falls back to swap, this could improve responsiveness. Zram is in mainline staging (therefore its not stable yet, use with caution).<br />
<br />
The AUR package {{AUR|zramswap}} provides an automated script fot setting up such swap devices with optimal settings for your system (such as RAM size and CPU core number). The script creates one zram device per CPU core with a total space equivalent to the RAM available. To do this automatically on every boot, enable {{ic|zramswap.service}} via [[systemd#Basic systemctl usage|systemctl]]. <br />
<br />
You will have a compressed swap with higher priority than your regular swap which will utilize multiple CPU cores for compessing data.<br />
<br />
{{Tip|Using zram is also a good way to reduce disk read/write cycles due to swap on SSDs.}}<br />
<br />
=== Using the graphic card's RAM ===<br />
<br />
In the unlikely case that you have very little RAM and a surplus of video RAM, you can use the latter as swap. See [[Swap on video ram]].<br />
<br />
=== Preloading ===<br />
<br />
Preloading is the action of putting and keeping target files into the RAM. The benefit is that preloaded applications start more quickly because reading from the RAM is always quicker than from the hard drive. However, part of your RAM will be dedicated to this task, but no more than if you kept the application open. Therefore preloading is best used with large and often-used applications like Firefox and LibreOffice.<br />
<br />
==== Go-preload ====<br />
<br />
{{AUR|gopreload-git}} is a small daemon created in the [http://forums.gentoo.org/viewtopic-t-789818-view-next.html?sid=5457cff93039fc7d4a3e445ef90f9821 Gentoo forum]. To use it, first run this command in a terminal for each program you want to preload at boot:<br />
# gopreload-prepare program<br />
<br />
For regular user take ownership of /usr/share/gopreload/enabled and /usr/share/gopreload/disabled<br />
# chown username:users /usr/share/gopreload/enabled /usr/share/gopreload/disabled<br />
and then gopreload each program you want to preload:<br />
$ gopreload-prepare program<br />
<br />
Then, as instructed, press Enter when the program is fully loaded. This will add a list of files needed by the program in {{ic|/usr/share/gopreload/enabled}}. To load all lists at boot, enable systemd service file:<br />
# systemctl enable gopreload.service<br />
<br />
To disable the loading of a program, remove the appropriate list in {{ic|/usr/share/gopreload/enabled}} or move it to {{ic|/usr/share/gopreload/disabled}}.<br />
<br />
==== Preload ====<br />
<br />
A more automated approach is used by [[Preload]]. All you have to do is enable it with this command:<br />
# systemctl enable preload<br />
It will monitor the most used files on your system, and with time build its own list of files to preload at boot.<br />
<br />
== Boot time ==<br />
<br />
You can find tutorials with good tips in the article [[Improve Boot Performance]].<br />
<br />
=== Suspend to RAM ===<br />
<br />
The best way to reduce boot time is not booting at all. Consider [[Suspend and Hibernate#Suspend to RAM|suspending your system to RAM]] instead.<br />
<br />
== Application-specific tips ==<br />
<br />
=== Firefox ===<br />
<br />
See [[Firefox Tweaks#Performance]] and [[Firefox Ramdisk]].<br />
<br />
Firefox in the official repositories is built with the profile guided optimization flag enabled. You may want to use it in your custom build.<br />
To do this append:<br />
ac_add_options --enable-profile-guided-optimization<br />
to your {{ic|.mozconfig}} file.<br />
<br />
=== Gcc/Makepkg ===<br />
<br />
See [[Ccache]].<br />
<br />
=== Office suites ===<br />
<br />
See [[LibreOffice#Speed up LibreOffice|Speed up LibreOffice]] and [[Openoffice#Speed up OpenOffice|Speed up OpenOffice]].<br />
<br />
=== Pacman ===<br />
<br />
See [[Improve Pacman Performance]].<br />
<br />
=== SSH ===<br />
<br />
See [[SSH#Speeding up SSH|Speed up SSH]].<br />
<br />
== Laptops ==<br />
<br />
See [[Laptop]].</div>Dodo3773https://wiki.archlinux.org/index.php?title=MATE&diff=155623MATE2011-09-04T19:47:20Z<p>Dodo3773: </p>
<hr />
<div>The MATE Desktop Environment Project is an attempt at forking and maintaining GNOME 2. For more information, see [https://bbs.archlinux.org/viewtopic.php?id=121162 this forum thread.]<br />
<br />
==Obtaining MATE==<br />
MATE is currently available in the AUR ({{Package AUR|mate-desktop-environment}}), hosted on [https://github.com/Perberos/Mate-Desktop-Environment Github] and hosted on two pacman mirrors.<br />
<br />
==Installation==<br />
To install MATE via pacman add one of the following mirrors to your pacman.conf:<br />
<br />
[mate]<br />
Server = http://matsusoft.com.ar/repository/archlinux/mate/$arch<br />
Server = http://cptl.org/mate/$arch <br />
Server = http://germ.winpe.com/archlinux/mate/$arch<br />
<br />
{{Note|The matusoft mirror is very slow and the cptl.org mirror is maintained by a member of the community. Please be considerate about your bandwidth usage. As of 25th August, cptl.org is out of date.<br />
Note that the germ.winpe.com server will be checked and updated continuously and should be considered reliable.}}<br />
<br />
Run -Syy and then:<br />
# pacman -S mate-desktop-environment<br />
<br />
You are very likely to get file conflicts when installing. Simply rename the offending files (I only had one conflict, migrating from XFCE) or install with the --force flag.<br />
<br />
You will also require a display manager (I use {{Package AUR|gdm-old}}) and dbus.<br />
<br />
{{Note|Currently, many MATE packages do not provide, conflict or replace any GNOME packages.}}<br />
<br />
==Starting MATE==<br />
Always make sure dbus is in your DAEMONS array in rc.conf before starting MATE.<br />
<br />
===GDM (Old)===<br />
If you are using gdm-old from the AUR, simply select the MATE session from the Sessions list. For your first time launching MATE, make sure to click "Just this session" when prompted.<br />
<br />
===No display manager (startx)===<br />
In order to start MATE without using a display manager, you must add<br />
<br />
exec ck-launch-session mate-session<br />
<br />
to your ~/.xinitrc file and then run<br />
<br />
$ startx<br />
<br />
==Rebranded Core Applications==<br />
It is important to note that many GNOME core applications are rebranded for MATE, as per the licensing terms. Here is a simple Rosetta Stone of GNOME -> MATE applications. <br />
<br />
* Nautilus is renamed '''caja'''<br />
* Metacity is renamed '''marco'''<br />
* Gconf is renamed '''mateconf'''<br />
<br />
Other applications and core components prefixed with GNOME (such as GNOME Panel, GNOME Menus etc) have simply had the prefix renamed "MATE" and become MATE Panel and MATE Menus.<br />
<br />
==Extra Applications==<br />
Not all of the GNOME extra applications (built for GTK2) have been forked yet. The following extra applications '''are''' available in MATE:<br />
<br />
* Totem (mate-video-player)<br />
* Eye of GNOME (mate-image-viewer)<br />
* Gedit (mate-text-editor)<br />
* File Roller (mate-archive-manager)<br />
* GNOME Panel applets (mate-applets)<br />
* GNOME Terminal (mate-terminal)<br />
<br />
If you are using NetworkManager to connect to the internet, you can install {{Package AUR|network-manager-applet-gtk2}} from the AUR for a GTK2 nm-applet. You will need to modify the PKGBUILD to depend on mate-bluetooth rather than gnome-bluetooth to prevent a recursive dependency on gnome-desktop.<br />
<br />
==Using Compiz Fusion sans Emerald==<br />
If you would like to use Marco with [[Compiz Fusion]], install and start Compiz Fusion as you would normally and install the package ''gtk-window-decorator'' and run the following command to create a symlink:<br />
<br />
# ln -s /usr/lib/libmarco-private.so.0 /usr/lib/libmetacity-private.so.0<br />
<br />
Enable the Window Decoration plugin in the Compiz Fusion settings manager and use<br />
<br />
gtk-window-decorator --replace<br />
as the command. However, without recompiling gtk-window-decorator, the necessary mateconf keys will not be created and you will be stuck with Cairo based decorations. It may be possible to create these keys yourself.<br />
<br />
==Known Issues==<br />
<br />
===Endless spawning of file manager instances===<br />
You may find that after you log in, the Caja file manager keeps spawning new instances and never stops. A temporary fix is performed with the following command:<br />
<br />
# ln -s /usr/lib/libgnutls.so /usr/lib/libgnutls.so.26<br />
<br />
Log out and log back in again once you perform this command.<br />
<br />
This may also fix an issue where the Clock panel applet does not appear.<br />
<br />
===QT Applications are not styled===<br />
You may find that QT4 applications are not inheriting the GTK2 theme like they should. This can be fixed easily by installing libgnomeui with the --force flag. This is likely to be fixed as MATE development continues.<br />
<br />
===I cannot access my audio preferences!===<br />
Currently there is no version of mate-volume-control, so audio preferences via the panel applet are unavailable. This may be fixed at a later date, or you can try and compile the package yourself.<br />
<br />
===Evolution Email Not Working===<br />
<br />
Please see [https://wiki.archlinux.org/index.php/Evolution#Using_Evolution_Outside_Of_Gnome https://wiki.archlinux.org/index.php/Evolution#Using_Evolution_Outside_Of_Gnome.]<br />
<br />
[[Category:Desktop environments (English)]]</div>Dodo3773https://wiki.archlinux.org/index.php?title=GNOME/Evolution&diff=155617GNOME/Evolution2011-09-04T19:40:05Z<p>Dodo3773: /* Using Evolution Outside Of Gnome */</p>
<hr />
<div>[[Category:Email Client (English)]]<br />
<br />
Evolution is a GNOME mail client it supports IMAP, Microsoft Exchange Server and Novell GroupWise. It also has a calender function that supports vcal,csv, google calendar and many more. You can also organise your contacts, tasks and memo's with Evolution. The beautiful thing about evolution is that it's easy to use and integrates with the gnome enviroment. You can see your calendar, tasks and location in the GNOME panel along with the weather and date. Just add the clock to your gnome panel.<br />
<br />
== Installation ==<br />
<br />
Evolution is available from the standard repositories: <br />
# pacman -S evolution<br />
<br />
Support for exchange servers:<br />
# pacman -S evolution-exchange<br />
<br />
Support for web calendars (like Google calendar):<br />
# pacman -S evolution-webcal<br />
<br />
== IMAP Setup ==<br />
<br />
This is the setup for a standard IMAP mail address.<br />
Go to Edit -> Preferences -> Mail Accounts. Add a mail account insert your Name and real email adress. Then click 'forward' here you are going to select the server type, this is IMAP. Now fill in the textbox server, for the server adress and username. For the rest of the options just follow the wizard. It is very easy, if you get stuck read this guide [http://library.gnome.org/users/evolution/stable/].<br />
<br />
Unfortunately, Evolution currently (version 2.26) suffers from a serious IMAP issue, as reported in [http://bugzilla.gnome.org/show_bug.cgi?id=336076]. It appears this issue has existed for at least the past 3 years prior to this version, and it shows no signs of being dealt with soon. This bug especially affects to the point of unuseability those with slow connections. The next section shows an alternative IMAP connectivity method which works better.<br />
<br />
== Alternative IMAP Setup ==<br />
<br />
An alternative to letting Evolution connect directly to the IMAP server is to sync the IMAP server to your PC. This costs as much hard-disc space as you have mail, though it is possible to limit the folders synced in this manner (see below). An additional benefit (primary inspiration for this app) is that you have a full copy of your email, including attachments, on your PC for retrieval, even if on the move without an internet connection.<br />
<br />
To set this up, you will need to install offlineimap ([http://software.complete.org/software/projects/show/offlineimap]). It is currently in the AUR, as well as in community, so just run the following:-<br />
#pacman -S offlineimap<br />
<br />
=== Offlineimap setup ===<br />
<br />
offlineimap takes its settings from the file ~/.offlineimaprc, which you will need to create. [http://software.complete.org/software/repositories/entry/offlineimap/offlineimap.conf The official wiki's configuration file] is the best guide to this, but most users will be able to use the .offlineimaprc below, for the most common case of a Gmail account. The settings for a general account are identical, except remotehost, ssl, and remoteport need to be set appropriately (see the comments below).<br />
<br />
[general]<br />
accounts = MyAccount<br />
# Set this to the number of accounts you have.<br />
maxsyncaccounts = 1<br />
# You can set ui = TTY.TTYUI for interactive password entry if needed.<br />
# Setting it within this file (see below) is easier.<br />
ui = Noninteractive.Basic<br />
<br />
[Account MyAccount]<br />
# Each account should have a local and remote repository<br />
localrepository = MyLocal<br />
remoterepository = MyGmail<br />
# Specifies how often to do a repeated sync (if running without crond)<br />
autorefresh = 10<br />
<br />
[Repository MyLocal]<br />
type = Maildir<br />
localfolders = /home/path/to/your/maildir<br />
# This needs to be specified so the MailDir uses a folder structure<br />
# suitable to Evolution<br />
sep = /<br />
<br />
[Repository MyGmail]<br />
# Example for a gmail account<br />
type = Gmail<br />
# If using some other IMAP server, uncomment and set the following:-<br />
#remotehost = imap.gmail.com<br />
#ssl = yes<br />
#remoteport = 993<br />
# Specify the Gmail user name and password.<br />
remoteuser = yourname@gmail.com<br />
remotepass = yourpassword<br />
# realdelete is Gmail specific, setting to no ensures that deleting<br />
# a message sends it to 'All Mail' instead of the trash.<br />
realdelete = no<br />
# Use 1 here first, increase it if your connection (and the server's)<br />
# supports it.<br />
maxconnections = 1<br />
# This translates folder names such that everything (including your Inbox)<br />
# appears in the same folder (named root).<br />
nametrans = lambda foldername: re.sub('^Sent$', 'root/Sent',<br />
re.sub('^(\[G.*ail\]|INBOX)', 'root', foldername))<br />
# This excludes some folders from being synced. You will almost<br />
# certainly want to exclude 'All Mail', 'Trash', and 'Starred', at<br />
# least. Note that offlineimap does NOT honor subscription details.<br />
folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail',<br />
'[Gmail]/Trash','[Gmail]/Spam','[Gmail]/Starred']<br />
<br />
WARNING: Please note that any space indenting a line of code in .offlineimaprc would be considered as appending that line to the previous line. In other words, always make sure there is no space before any lines in your config file.<br />
<br />
Acknowledgement: This config file was done by referring both to the official example as well as to the config file in [http://www.linux.com/archive/articles/feature/133834 this article].<br />
<br />
=== First offlineimap sync and automated sync-ing ===<br />
<br />
Once you have completed your offlineimap setup, you should perform your first sync by running with your normal user account<br />
$offlineimap<br />
Assuming you've set your password and all other settings correctly, offlineimap will begin to sync the requested repositories. This may take a long while, depending on connection speed and size of your mail account, so you should preferably find a fast connection to do this. You can run offlineimap using another interface by specifying<br />
$offlineimap -u TTY.TTYUI<br />
This allows interactive entry of passwords.<br />
<br />
Once you've completed your first sync, you'll want to set up automatic syncing. This can be done using crond, or just by running offlineimap on startup. The disadvantage of running offlineimap on startup (with autorefresh set) is that if for any reason an error appears, your mail will just stop syncing from that point onwards. So, running through crond requires you to add the following line to your crontab.<br />
*/10 * * * * /path/to/scripts/runofflineimap >/dev/null 2>&1<br />
<br />
For those unfamiliar with crontab and/or vi, just run<br />
$crontab -e<br />
Press 'i' to start input, type in the line above, press Esc to escape back to the prompt, and type ':wq' to save and quit. /path/to/scripts/runofflineimap should run offlineimap itself (with -o for a single run). Here is an example script for that:-<br />
<br />
#!/bin/sh<br />
# Run offlineimap through cron to fetch email periodically<br />
ps aux | grep "\/usr\/bin\/offlineimap"<br />
if [ $? -eq "0" ]; then<br />
logger -i -t offlineimap "Another instance of offlineimap running. Exiting."<br />
exit 0;<br />
else<br />
logger -i -t offlineimap "Starting offlineimap..."<br />
offlineimap -u Noninteractive.Quiet -o<br />
logger -i -t offlineimap "Done offlineimap..."<br />
exit 0;<br />
fi<br />
<br />
You should now have an automatically synced local copy of your IMAP server. Error messages (if any) will be shown in /var/log/cron.d or one of its variants.<br />
<br />
=== Evolution setup for offlineimap's maildir ===<br />
<br />
This is really quite simple, use Evolution's Account Assistant and select the Server Type "Maildir-format mail directories", under the Receiving Email section. Select also the path to your maildir (the 'root' folder if you're using a modified version of the .offlineimaprc above). You can change your 'Checking for New Mail' option to something very short, even 1 minute, since this only checks your local copy and not the server-side copy. SMTP settings are according to normal usage (does not go through offlineimap).<br />
<br />
== GMAIL Setup ==<br />
<br />
Setting up gmail for evolution is very easy.<br />
Go to Edit -> Preferences -> Mail Accounts and make a mail account. For your Email Adress: <username>@gmail.com . Now press forward<br />
Use this configuration<br />
Server type: POP<br />
Server: pop.gmail.com<br />
Username: <username>@gmail.com<br />
Use Secure Connecetion: SSL encryption<br />
Authenthication Type: password<br />
<br />
Now go to the next step:<br />
<br />
Optionally fill in automatically check for new mail every ** minutes.<br />
The rest is user specific.<br />
<br />
Go to the next Step<br />
<br />
Server type: SMTP<br />
Server: smtp.gmail.com<br />
Flag: server requires authentication<br />
Use Secure Connection: SSL<br />
Fill in Username: <username>@gmail.com<br />
<br />
You are now finished with configuring evolution for gmail. Just hit Send/ Receive in the main screen and wait for new mail.<br />
If it still didn't work, go to this link [http://tuxicity.wordpress.com/2007/03/08/howto-set-up-gmail-in-evolution-gnomes-mail-client-and-organizer/]<br />
<br />
== Gmail Calendar ==<br />
<br />
You can use your gmail calendar in evolution here's how:<br />
<br />
Go to your calendar in your browser. Click on manage calendars -> the click on the calendar you want to add -> In the Private URL section copy the URL of ICAL (green button).<br />
<br />
Now go to Evolution. Click on file -> new -> calendar .<br />
In the 'new calendar dialog box' select type: On The Web.<br />
You can fill in your own calendar name <br />
Then Copy the URL to the URL field <br />
<br />
Now you will see your google calendar in your calendar view in Evolution by the name you gave it in the Name field.<br />
<br />
'''Variant2 (with evolution-webcal):'''<br />
<br />
From Evolution click on -> new -> calendar .<br />
In the 'new calendar dialog box' select type: Google.<br />
You can fill in your own calendar name.<br />
Insert your username (not the email).<br />
Click the button "Get List" and choose the calendar you want to use.<br />
<br />
== Tudelft webmail (Exchange) ==<br />
<br />
This is the setup for your tudelft webmail for evolution. It might also work for other webmail based email accounts.<br />
<br />
Go to Edit -> Preferences -> Mail Accounts and make a mail account. For your Email Adress: <netid>@gmail.com . Be carefull your <netid>@student.tudelft.nl must be like this example: E.M.devries@student.tudelft.nl <br />
<br />
Receiving mail:<br />
Server type: Microsoft Exchange <br />
Username: <netid> this is just your netid like this example: edevries<br />
OWA URL: https://webmail.tudelft.nl -> now click 'Authenticate' and fill in your password. The mailbox will be filled in automaticlly<br />
<br />
Click Forward:<br />
The receiving options are already correct, you can select the option to automaticlly receive email every x minutes.<br />
<br />
Click Forward:<br />
Now just fill in the name of the mailbox and you are done.<br />
<br />
== Using Evolution Outside Of Gnome ==<br />
<br />
In order to use Evolution outside of Gnome desktop you must export gnome-keyring:<br />
<br />
#!/bin/bash<br />
eval \`gnome-keyring-daemon\`<br />
export GNOME_KEYRING_PID<br />
export GNOME_KEYRING_SOCKET<br />
exit<br />
<br />
Run the above script before starting Evolution. Reboot or remove the appropriate files in your /tmp directory prior to running.<br />
<br />
== Troubleshooting ==<br />
<br />
If after some system upgrade one gets no accounts in Evolution than all is not lost.<br />
First, we can see if we got our account files in ~/.evolution/, if so, then the only solution is to just make a new account in Evolution with the same parameters. (I only lost the signatures<br />
<br />
== References ==<br />
<br />
[http://library.gnome.org/users/evolution/stable/ Gnome Evolution Guide]<br />
[http://www.tudelft.nl/live/pagina.jsp?id=babae0a3-1479-4501-9ec4-e308153735dc&lang=nl Tudelft Evolution 2.24 Setup]</div>Dodo3773https://wiki.archlinux.org/index.php?title=GNOME/Evolution&diff=155615GNOME/Evolution2011-09-04T19:38:41Z<p>Dodo3773: </p>
<hr />
<div>[[Category:Email Client (English)]]<br />
<br />
Evolution is a GNOME mail client it supports IMAP, Microsoft Exchange Server and Novell GroupWise. It also has a calender function that supports vcal,csv, google calendar and many more. You can also organise your contacts, tasks and memo's with Evolution. The beautiful thing about evolution is that it's easy to use and integrates with the gnome enviroment. You can see your calendar, tasks and location in the GNOME panel along with the weather and date. Just add the clock to your gnome panel.<br />
<br />
== Installation ==<br />
<br />
Evolution is available from the standard repositories: <br />
# pacman -S evolution<br />
<br />
Support for exchange servers:<br />
# pacman -S evolution-exchange<br />
<br />
Support for web calendars (like Google calendar):<br />
# pacman -S evolution-webcal<br />
<br />
== IMAP Setup ==<br />
<br />
This is the setup for a standard IMAP mail address.<br />
Go to Edit -> Preferences -> Mail Accounts. Add a mail account insert your Name and real email adress. Then click 'forward' here you are going to select the server type, this is IMAP. Now fill in the textbox server, for the server adress and username. For the rest of the options just follow the wizard. It is very easy, if you get stuck read this guide [http://library.gnome.org/users/evolution/stable/].<br />
<br />
Unfortunately, Evolution currently (version 2.26) suffers from a serious IMAP issue, as reported in [http://bugzilla.gnome.org/show_bug.cgi?id=336076]. It appears this issue has existed for at least the past 3 years prior to this version, and it shows no signs of being dealt with soon. This bug especially affects to the point of unuseability those with slow connections. The next section shows an alternative IMAP connectivity method which works better.<br />
<br />
== Alternative IMAP Setup ==<br />
<br />
An alternative to letting Evolution connect directly to the IMAP server is to sync the IMAP server to your PC. This costs as much hard-disc space as you have mail, though it is possible to limit the folders synced in this manner (see below). An additional benefit (primary inspiration for this app) is that you have a full copy of your email, including attachments, on your PC for retrieval, even if on the move without an internet connection.<br />
<br />
To set this up, you will need to install offlineimap ([http://software.complete.org/software/projects/show/offlineimap]). It is currently in the AUR, as well as in community, so just run the following:-<br />
#pacman -S offlineimap<br />
<br />
=== Offlineimap setup ===<br />
<br />
offlineimap takes its settings from the file ~/.offlineimaprc, which you will need to create. [http://software.complete.org/software/repositories/entry/offlineimap/offlineimap.conf The official wiki's configuration file] is the best guide to this, but most users will be able to use the .offlineimaprc below, for the most common case of a Gmail account. The settings for a general account are identical, except remotehost, ssl, and remoteport need to be set appropriately (see the comments below).<br />
<br />
[general]<br />
accounts = MyAccount<br />
# Set this to the number of accounts you have.<br />
maxsyncaccounts = 1<br />
# You can set ui = TTY.TTYUI for interactive password entry if needed.<br />
# Setting it within this file (see below) is easier.<br />
ui = Noninteractive.Basic<br />
<br />
[Account MyAccount]<br />
# Each account should have a local and remote repository<br />
localrepository = MyLocal<br />
remoterepository = MyGmail<br />
# Specifies how often to do a repeated sync (if running without crond)<br />
autorefresh = 10<br />
<br />
[Repository MyLocal]<br />
type = Maildir<br />
localfolders = /home/path/to/your/maildir<br />
# This needs to be specified so the MailDir uses a folder structure<br />
# suitable to Evolution<br />
sep = /<br />
<br />
[Repository MyGmail]<br />
# Example for a gmail account<br />
type = Gmail<br />
# If using some other IMAP server, uncomment and set the following:-<br />
#remotehost = imap.gmail.com<br />
#ssl = yes<br />
#remoteport = 993<br />
# Specify the Gmail user name and password.<br />
remoteuser = yourname@gmail.com<br />
remotepass = yourpassword<br />
# realdelete is Gmail specific, setting to no ensures that deleting<br />
# a message sends it to 'All Mail' instead of the trash.<br />
realdelete = no<br />
# Use 1 here first, increase it if your connection (and the server's)<br />
# supports it.<br />
maxconnections = 1<br />
# This translates folder names such that everything (including your Inbox)<br />
# appears in the same folder (named root).<br />
nametrans = lambda foldername: re.sub('^Sent$', 'root/Sent',<br />
re.sub('^(\[G.*ail\]|INBOX)', 'root', foldername))<br />
# This excludes some folders from being synced. You will almost<br />
# certainly want to exclude 'All Mail', 'Trash', and 'Starred', at<br />
# least. Note that offlineimap does NOT honor subscription details.<br />
folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail',<br />
'[Gmail]/Trash','[Gmail]/Spam','[Gmail]/Starred']<br />
<br />
WARNING: Please note that any space indenting a line of code in .offlineimaprc would be considered as appending that line to the previous line. In other words, always make sure there is no space before any lines in your config file.<br />
<br />
Acknowledgement: This config file was done by referring both to the official example as well as to the config file in [http://www.linux.com/archive/articles/feature/133834 this article].<br />
<br />
=== First offlineimap sync and automated sync-ing ===<br />
<br />
Once you have completed your offlineimap setup, you should perform your first sync by running with your normal user account<br />
$offlineimap<br />
Assuming you've set your password and all other settings correctly, offlineimap will begin to sync the requested repositories. This may take a long while, depending on connection speed and size of your mail account, so you should preferably find a fast connection to do this. You can run offlineimap using another interface by specifying<br />
$offlineimap -u TTY.TTYUI<br />
This allows interactive entry of passwords.<br />
<br />
Once you've completed your first sync, you'll want to set up automatic syncing. This can be done using crond, or just by running offlineimap on startup. The disadvantage of running offlineimap on startup (with autorefresh set) is that if for any reason an error appears, your mail will just stop syncing from that point onwards. So, running through crond requires you to add the following line to your crontab.<br />
*/10 * * * * /path/to/scripts/runofflineimap >/dev/null 2>&1<br />
<br />
For those unfamiliar with crontab and/or vi, just run<br />
$crontab -e<br />
Press 'i' to start input, type in the line above, press Esc to escape back to the prompt, and type ':wq' to save and quit. /path/to/scripts/runofflineimap should run offlineimap itself (with -o for a single run). Here is an example script for that:-<br />
<br />
#!/bin/sh<br />
# Run offlineimap through cron to fetch email periodically<br />
ps aux | grep "\/usr\/bin\/offlineimap"<br />
if [ $? -eq "0" ]; then<br />
logger -i -t offlineimap "Another instance of offlineimap running. Exiting."<br />
exit 0;<br />
else<br />
logger -i -t offlineimap "Starting offlineimap..."<br />
offlineimap -u Noninteractive.Quiet -o<br />
logger -i -t offlineimap "Done offlineimap..."<br />
exit 0;<br />
fi<br />
<br />
You should now have an automatically synced local copy of your IMAP server. Error messages (if any) will be shown in /var/log/cron.d or one of its variants.<br />
<br />
=== Evolution setup for offlineimap's maildir ===<br />
<br />
This is really quite simple, use Evolution's Account Assistant and select the Server Type "Maildir-format mail directories", under the Receiving Email section. Select also the path to your maildir (the 'root' folder if you're using a modified version of the .offlineimaprc above). You can change your 'Checking for New Mail' option to something very short, even 1 minute, since this only checks your local copy and not the server-side copy. SMTP settings are according to normal usage (does not go through offlineimap).<br />
<br />
== GMAIL Setup ==<br />
<br />
Setting up gmail for evolution is very easy.<br />
Go to Edit -> Preferences -> Mail Accounts and make a mail account. For your Email Adress: <username>@gmail.com . Now press forward<br />
Use this configuration<br />
Server type: POP<br />
Server: pop.gmail.com<br />
Username: <username>@gmail.com<br />
Use Secure Connecetion: SSL encryption<br />
Authenthication Type: password<br />
<br />
Now go to the next step:<br />
<br />
Optionally fill in automatically check for new mail every ** minutes.<br />
The rest is user specific.<br />
<br />
Go to the next Step<br />
<br />
Server type: SMTP<br />
Server: smtp.gmail.com<br />
Flag: server requires authentication<br />
Use Secure Connection: SSL<br />
Fill in Username: <username>@gmail.com<br />
<br />
You are now finished with configuring evolution for gmail. Just hit Send/ Receive in the main screen and wait for new mail.<br />
If it still didn't work, go to this link [http://tuxicity.wordpress.com/2007/03/08/howto-set-up-gmail-in-evolution-gnomes-mail-client-and-organizer/]<br />
<br />
== Gmail Calendar ==<br />
<br />
You can use your gmail calendar in evolution here's how:<br />
<br />
Go to your calendar in your browser. Click on manage calendars -> the click on the calendar you want to add -> In the Private URL section copy the URL of ICAL (green button).<br />
<br />
Now go to Evolution. Click on file -> new -> calendar .<br />
In the 'new calendar dialog box' select type: On The Web.<br />
You can fill in your own calendar name <br />
Then Copy the URL to the URL field <br />
<br />
Now you will see your google calendar in your calendar view in Evolution by the name you gave it in the Name field.<br />
<br />
'''Variant2 (with evolution-webcal):'''<br />
<br />
From Evolution click on -> new -> calendar .<br />
In the 'new calendar dialog box' select type: Google.<br />
You can fill in your own calendar name.<br />
Insert your username (not the email).<br />
Click the button "Get List" and choose the calendar you want to use.<br />
<br />
== Tudelft webmail (Exchange) ==<br />
<br />
This is the setup for your tudelft webmail for evolution. It might also work for other webmail based email accounts.<br />
<br />
Go to Edit -> Preferences -> Mail Accounts and make a mail account. For your Email Adress: <netid>@gmail.com . Be carefull your <netid>@student.tudelft.nl must be like this example: E.M.devries@student.tudelft.nl <br />
<br />
Receiving mail:<br />
Server type: Microsoft Exchange <br />
Username: <netid> this is just your netid like this example: edevries<br />
OWA URL: https://webmail.tudelft.nl -> now click 'Authenticate' and fill in your password. The mailbox will be filled in automaticlly<br />
<br />
Click Forward:<br />
The receiving options are already correct, you can select the option to automaticlly receive email every x minutes.<br />
<br />
Click Forward:<br />
Now just fill in the name of the mailbox and you are done.<br />
<br />
== Using Evolution Outside Of Gnome ==<br />
<br />
In order to use Evolution outside of Gnome desktop you must export the keyring.<br />
<br />
#!/bin/bash<br />
eval \`gnome-keyring-daemon\`<br />
export GNOME_KEYRING_PID<br />
export GNOME_KEYRING_SOCKET<br />
exit<br />
<br />
Run the above script before starting Evolution. Reboot or remove the appropriate files in your /tmp directory prior to running.<br />
<br />
== Troubleshooting ==<br />
<br />
If after some system upgrade one gets no accounts in Evolution than all is not lost.<br />
First, we can see if we got our account files in ~/.evolution/, if so, then the only solution is to just make a new account in Evolution with the same parameters. (I only lost the signatures<br />
<br />
== References ==<br />
<br />
[http://library.gnome.org/users/evolution/stable/ Gnome Evolution Guide]<br />
[http://www.tudelft.nl/live/pagina.jsp?id=babae0a3-1479-4501-9ec4-e308153735dc&lang=nl Tudelft Evolution 2.24 Setup]</div>Dodo3773https://wiki.archlinux.org/index.php?title=Zsh&diff=146706Zsh2011-06-19T05:43:55Z<p>Dodo3773: /* Command Completion */</p>
<hr />
<div>[[Category:Command shells (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Zsh}}<br />
{{i18n_entry|Česky|Zsh (Česky)}}<br />
{{i18n_links_end}}<br />
[http://www.zsh.org Zsh] is a powerful shell that operates as both an interactive shell and as a scripting language interpreter. While being compatible with [[Bash]] (not by default, only if you issue "emulate sh"), it offers many advantages such as:<br />
<br />
*Faster<br />
*Improved tab completion<br />
*Improved globbing<br />
*Improved array handling<br />
*Fully customisable<br />
<br />
The Zsh FAQ offers [http://zsh.sourceforge.net/FAQ/zshfaq01.html#l4 more reasons] to use Zsh as your shell.<br />
<br />
==Installation Instructions==<br />
<br />
Before starting lets find out what shell is currently being used:<br />
<br />
$ echo $SHELL<br />
<br />
===Installing===<br />
<br />
To install the package for Zsh, run:<br />
<br />
# pacman -S zsh<br />
<br />
Before proceeding with the next step to make Zsh your default shell, you should ensure that it has been installed correctly by running Zsh in a terminal:<br />
<br />
$ zsh<br />
<br />
You should now see zsh-newuser-install, which will walk you through some basic configuration. If you want to skip this, press q.<br />
<br />
===Making Zsh your default shell===<br />
<br />
To change a user's default shell without root access, the chsh command is used. The chsh command can be used to change a user's default shell without root access if the shell is listed in {{Filename|/etc/shells}}. If you installed Zsh from the repos, Zsh should already have an entry in {{Filename|/etc/shells}}. <br />
<br />
Change the default shell for the current user:<br />
<br />
$ chsh -s `which zsh`<br />
<br />
{{Note| The user needs to logout and log back in, to start using Zsh as their default shell.}}<br />
<br />
After logging back in, the user can verify that Zsh is their default shell by issuing (Zsh also looks different than Bash):<br />
<br />
$ echo $SHELL<br />
<br />
{{Note| If applicable, don't forget to copy the code that starts your X Window System from e. g. {{Filename|.bash_profile}} to {{Filename|.zprofile}}.}}<br />
<br />
==Configuration==<br />
<br />
Although Zsh is usable out of the box, it is almost certainly not set up the way you would like to use it, but due to the sheer amount of customisation available in Zsh, creating a Zsh config can be a daunting and time-consuming experience.<br />
<br />
Included below is a sample configuration file, it provides a decent set of default options as well as giving examples of many ways that Zsh can be customised. In order to use this configuration save it as a file named {{Filename|.zshrc}}. You can then apply the changes without needing to logout and then back in by running:<br />
<br />
$ source ~/.zshrc<br />
<br />
===Simple .zshrc===<br />
<br />
Here is a simple {{Filename|.zshrc}}, that should be sufficient to get you started:<br />
<br />
{{File|name=~/.zshrc|content=<br />
autoload -U compinit promptinit<br />
compinit<br />
promptinit<br />
<br />
# This will set the default prompt to the walters theme<br />
prompt walters}}<br />
<br />
===Global configurations===<br />
<br />
Occasionally you might want to have some settings applied to all zsh users regardless of their individual configuration file.<br />
The zsh wiki tells us that there's some global configuration files, for example /etc/zshrc. This however is not the case with ArchLinux since<br />
it has been compiled with flags specifically to target /etc/zsh instead.<br />
<br />
So, for global configuration it's /etc/zsh/zshrc. Not /etc/zshrc.<br />
<br />
Same goes for zlogout, zlogin and zprofile.<br />
<br />
=== Command Completion ===<br />
Perhaps the most compelling feature of Zsh is its advanced autocompletion abilities. At the very least, you will want to enable autocompletion in your {{Filename|.zshrc}}. To enable autocompletion, add the following to:<br />
<br />
{{File|name=~/.zshrc|content=<br />
autoload -U compinit<br />
compinit}}<br />
<br />
The above configuration includes ssh/scp/sftp hostnames completion but in order for this feature to work you will need to prevent ssh from hashing hosts names in ~/.ssh/known_hosts (Warning: be aware that this makes your computer vulnerable to [http://itso.iu.edu/Hashing_the_OpenSSH_known__hosts_File "Island-hopping" attacks]). In that intention, comment the following line or set the value to "no":<br />
{{File|name=/etc/ssh/ssh_config|content=<br />
#HashKnownHosts yes}}<br />
And move your ~/.ssh/known_hosts somewhere else so that ssh creates a new one with with un-hashed hostnames (warning: previously known hosts will thus be lost).<br />
<br />
For autocompletion with an arrow-key driven interface, add the following to:<br />
{{File|name=~/.zshrc|content=<br />
zstyle ':completion:*' menu select}}<br />
<br />
For autocompletion of command line switches for aliases, add the following to:<br />
{{File|name=~/.zshrc|content=<br />
setopt completealiases}}<br />
<br />
=== Key Bindings ===<br />
Zsh doesn't use readline, instead it uses its own and more powerful zle. It doesn't read {{Filename|/etc/inputrc}} or {{Filename|~/.inputrc}}.<br />
zle has an emacs mode and a vi mode. By default, it tries to guess whether you want emacs or vi keys from the $EDITOR environment variable. If it's empty, it will default to emacs. You can change this with bindkey -v or bindkey -e.<br />
<br />
To get some special keys working:<br />
{{File|name=~/.zshrc|content= <br />
bindkey "\e[1~" beginning-of-line # Home<br />
bindkey "\e[4~" end-of-line # End<br />
bindkey "\e[5~" beginning-of-history # PageUp<br />
bindkey "\e[6~" end-of-history # PageDown<br />
bindkey "\e[2~" quoted-insert # Ins<br />
bindkey "\e[3~" delete-char # Del<br />
bindkey "\e[5C" forward-word<br />
bindkey "\eOc" emacs-forward-word<br />
bindkey "\e[5D" backward-word<br />
bindkey "\eOd" emacs-backward-word<br />
bindkey "\e\e[C" forward-word<br />
bindkey "\e\e[D" backward-word<br />
bindkey "\e[Z" reverse-menu-complete # Shift+Tab<br />
# for rxvt<br />
bindkey "\e[7~" beginning-of-line # Home<br />
bindkey "\e[8~" end-of-line # End<br />
# for non RH/Debian xterm, can't hurt for RH/Debian xterm<br />
bindkey "\eOH" beginning-of-line<br />
bindkey "\eOF" end-of-line<br />
# for freebsd console<br />
bindkey "\e[H" beginning-of-line<br />
bindkey "\e[F" end-of-line<br />
}}<br />
<br />
Alternatively, you can convert /etc/inputrc for Zsh:<br />
{{File|name=~/.zshrc|content=<br />
# bind special keys according to readline configuration<br />
eval "$(sed -n 's/^/bindkey /; s/: / /p' /etc/inputrc)"<br />
}}<br />
<br />
{{Note|To get the proper sequences for certain key combinations, start {{Codeline|cat}} or {{Codeline|read}} without any parameters and press them; they should then be printed in the terminal. Both can be closed again via ''Ctrl+c''.}}<br />
<br />
===History search===<br />
You can add these lines to your .zshrc<br />
<br />
{{File|name=~/.zshrc|content=<nowiki><br />
bindkey "^[[A" history-search-backward<br />
bindkey "^[[B" history-search-forward<br />
</nowiki>}}<br />
<br />
Doing this, only past commands beginning with the current input would've been shown.<br />
<br />
===Prompts===<br />
<br />
There is a quick and easy way to set up a colored prompt in Zsh. Make sure that prompt is set to autload in your {{Filename|.zshrc}}. This can be done by adding these lines to:<br />
<br />
{{File|name=~/.zshrc|content=<br />
autoload -U promptinit<br />
promptinit<br />
}}<br />
<br />
You can now see available prompts by running the command:<br />
<br />
$ prompt -l<br />
<br />
To try one of the commands that is listed, use the command prompt followed by the name of the prompt you like. For example, to use the "walters" prompt, you would enter:<br />
<br />
$ prompt walters<br />
<br />
===Customizing your prompt===<br />
<br />
In case you are dissatisfied with the prompts mentioned above(or want to expand their usefulness), zsh offers the possibility to build your own custom prompt. Zsh supports a left- and right-sided prompt additional to the single, left-sided prompt that is common to all shells. To customize it, the following variables can be used:<br />
<br />
====Prompt variables====<br />
=====General=====<br />
; %n : The username<br />
; %m : The computer's hostname(truncated to the first period)<br />
; %M : The computer's hostname<br />
; %l : The current tty<br />
; %? : The return code of the last-run application.<br />
; %# : The prompt based on user privileges (<tt>#</tt> for root and <tt>%</tt> for the rest)<br />
<br />
=====Times=====<br />
; %T : System time(HH:MM)<br />
; %* : System time(HH:MM:SS)<br />
; %D : System date(YY-MM-DD)<br />
<br />
=====Directories=====<br />
; %~ : The current working directory. If you are in you are in your $HOME, this will be replaced by "~".<br />
; %d : The current working directory.<br />
<br />
For the options mentioned above: You can prefix an integer to show only certain parts of your working path. If you entered <tt>%1d</tt> and found yourself in <tt>/usr/bin</tt> it would show <tt>bin</tt>. This can also be done with negative integers:<br />
<tt>%-1d</tt> using the same directory as above would show <tt>/</tt>.<br />
<br />
=====Formatting=====<br />
; %U [...] %u : Begin and end underlined print<br />
; %B [...] %b : Begin and end bold print<br />
; %{ [...] %} : Begin and enter area that will not be printed. Useful for setting colors.<br />
<br />
=====Colors=====<br />
Zsh has a different approach to setting colors on the terminal than the one depicted [https://wiki.archlinux.org/index.php/Color_Bash_Prompt here]. First you write in your <tt>.zshrc</tt>:<br />
autoload -U colors && colors<br />
<br />
Following commands would now produce the color escape sequence needed to set the requested color when the prompt is printed:<br />
; $fg[color] : will set the textcolor(red,green,blue, etc)<br />
; $reset_color : will reset the textcolor to white<br />
It is useful to put these commands in <tt>%{ [...] %}</tt>.<br />
<br />
====Example====<br />
To have a two-sided prompt you coud write:<br />
PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%1~ %{$reset_color%}%#"<br />
RPROMPT="[%{$fg[yellow]%}%?%{$reset_color%}]"<br />
<br />
It would equal(without colors):<br />
username@host ~ % [0]<br />
<br />
===Advanced .zshrc===<br />
<br />
This is an example of a more advanced {{Filename|.zshrc}}:<br />
<br />
{{File|name=~/.zshrc|content=<nowiki><br />
########################################################### <br />
# Options for Zsh<br />
<br />
export HISTFILE=~/.zsh_history<br />
export HISTSIZE=50000<br />
export SAVEHIST=50000<br />
eval `dircolors -b`<br />
<br />
autoload -U compinit compinit<br />
setopt autopushd pushdminus pushdsilent pushdtohome<br />
setopt autocd<br />
setopt cdablevars<br />
setopt ignoreeof<br />
setopt interactivecomments<br />
setopt nobanghist<br />
setopt noclobber<br />
setopt HIST_REDUCE_BLANKS<br />
setopt HIST_IGNORE_SPACE<br />
setopt SH_WORD_SPLIT<br />
setopt nohup<br />
<br />
# PS1 and PS2<br />
export PS1="$(print '%{\e[1;34m%}%n%{\e[0m%}'):$(print '%{\e[0;34m%}%~%{\e[0m%}')$ "<br />
export PS2="$(print '%{\e[0;34m%}>%{\e[0m%}')"<br />
<br />
# Vars used later on by Zsh<br />
export EDITOR="nano"<br />
export BROWSER=links<br />
export XTERM="aterm +sb -geometry 80x29 -fg black -bg lightgoldenrodyellow -fn -xos4-terminus-medium-*-normal-*-14-*-*-*-*-*-iso8859-15"<br />
<br />
##################################################################<br />
# Stuff to make my life easier<br />
<br />
# allow approximate<br />
zstyle ':completion:*' completer _complete _match _approximate<br />
zstyle ':completion:*:match:*' original only<br />
zstyle ':completion:*:approximate:*' max-errors 1 numeric<br />
<br />
# tab completion for PID :D<br />
zstyle ':completion:*:*:kill:*' menu yes select<br />
zstyle ':completion:*:kill:*' force-list always<br />
<br />
# cd not select parent dir<br />
zstyle ':completion:*:cd:*' ignore-parents parent pwd<br />
<br />
##################################################################<br />
# Key bindings<br />
# http://mundy.yazzy.org/unix/zsh.php<br />
# http://www.zsh.org/mla/users/2000/msg00727.html<br />
<br />
typeset -g -A key<br />
bindkey '^?' backward-delete-char<br />
bindkey '^[[1~' beginning-of-line<br />
bindkey '^[[5~' up-line-or-history<br />
bindkey '^[[3~' delete-char<br />
bindkey '^[[4~' end-of-line<br />
bindkey '^[[6~' down-line-or-history<br />
bindkey '^[[A' up-line-or-search<br />
bindkey '^[[D' backward-char<br />
bindkey '^[[B' down-line-or-search<br />
bindkey '^[[C' forward-char <br />
# completion in the middle of a line<br />
bindkey '^i' expand-or-complete-prefix<br />
<br />
##################################################################<br />
# My aliases<br />
<br />
# Set up auto extension stuff<br />
alias -s html=$BROWSER<br />
alias -s org=$BROWSER<br />
alias -s php=$BROWSER<br />
alias -s com=$BROWSER<br />
alias -s net=$BROWSER<br />
alias -s png=feh<br />
alias -s jpg=feh<br />
alias -s gif=feg<br />
alias -s sxw=soffice<br />
alias -s doc=soffice<br />
alias -s gz='tar -xzvf'<br />
alias -s bz2='tar -xjvf'<br />
alias -s java=$EDITOR<br />
alias -s txt=$EDITOR<br />
alias -s PKGBUILD=$EDITOR<br />
<br />
# Normal aliases<br />
alias ls='ls --color=auto -F'<br />
alias lsd='ls -ld *(-/DN)'<br />
alias lsa='ls -ld .*'<br />
alias f='find |grep'<br />
alias c="clear"<br />
alias dir='ls -1'<br />
alias gvim='gvim -geom 82x35'<br />
alias ..='cd ..'<br />
alias nicotine='/home/paul/downloads/nicotine-1.0.8rc1/nicotine'<br />
alias ppp-on='sudo /usr/sbin/ppp-on'<br />
alias ppp-off='sudo /usr/sbin/ppp-off'<br />
alias firestarter='sudo su -c firestarter'<br />
alias mpg123='mpg123 -o oss'<br />
alias mpg321='mpg123 -o oss'<br />
alias vba='/home/paul/downloads/VisualBoyAdvance -f 4'<br />
alias hist="grep '$1' /home/paul/.zsh_history"<br />
alias irssi="irssi -c irc.freenode.net -n yyz"<br />
alias mem="free -m"<br />
alias msn="tmsnc -l hutchy@subdimension.com"<br />
<br />
# command L equivalent to command |less<br />
alias -g L='|less' <br />
<br />
# command S equivalent to command &> /dev/null &<br />
alias -g S='&> /dev/null &'<br />
</nowiki>}}<br />
<br />
There are many more ways that you can customise Zsh, obviously far too many to list here, see the [http://zsh.sourceforge.net/Doc/Release/zsh.html Zsh manual] for more information.<br />
<br />
===Sample .zshrc files===<br />
An Arch package named [https://www.archlinux.org/packages/extra/any/grml-zsh-config/ grml-zsh-config] comes from http://grml.org/zsh and provides a zshrc file that includes many tweaks for your zshell.<br />
<br />
Here is a list of {{Filename|.zshrc}} files. Feel free to add your own:<br />
<br />
* Øyvind 'Mr.Elendig' Heggstad <=> Basic setup, with dynamic prompt and window title/hardinfo <=> http://github.com/MrElendig/dotfiles-alice/blob/master/.zshrc<br />
<br />
==Uninstallation==<br />
If you decide that Zsh is not the shell for you and you want to return to Bash, you must first change your default shell back to Bash, before removing the Zsh package.<br />
<br />
Follow, [[Zsh#Making Zsh your default shell]] to change the default shell back to Bash, just replace zsh with bash.<br />
<br />
Now you can safely remove the Zsh package.<br />
<br />
{{Warning| Failure to follow the above will result in all kinds of problems.}}<br />
<br />
If you did not follow the above, you can still change the default shell back to Bash by editing /etc/passwd as root. For example: <br />
<br />
from:<br />
username:x:1000:1000:Full Name,,,:/home/username:/bin/zsh<br />
to:<br />
username:x:1000:1000:Full Name,,,:/home/username:/bin/bash<br />
<br />
==External Resources==<br />
*[http://zsh.sourceforge.net/Intro/intro_1.html#SEC1 Zsh Introduction]<br />
*[http://zsh.sourceforge.net/Guide/zshguide.html Users Guide]<br />
*[http://zsh.sourceforge.net/Doc/Release/index-frame.html Zsh Docs] (you can choose a different format for the doc in http://zsh.sourceforge.net/Doc/)<br />
*[http://zsh.sourceforge.net/FAQ/zshfaq01.html Zsh FAQ]<br />
*[http://zshwiki.org/home/ Zsh Wiki]<br />
*[http://grml.org/zsh/zsh-lovers.html Zsh-lovers]<br />
*[http://www.bash2zsh.com/zsh_refcard/refcard.pdf Bash2Zsh Reference Card]<br />
*[https://github.com/robbyrussell/oh-my-zsh Oh My Zshell by Robby Russell] <br />
*[http://www.gentoo.org/doc/en/zsh.xml Gentoo zsh wiki article]<br />
*[http://my.opera.com/blackbelt_jones/blog/2007/06/05/zsh-prompt-configuration-issue-solved Setting up the zsh prompt]<br />
<br />
*'''IRC channel''': #zsh at irc.freenode.org</div>Dodo3773