https://wiki.archlinux.org/api.php?action=feedcontributions&user=Phinfinity&feedformat=atomArchWiki - User contributions [en]2024-03-28T12:15:35ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Browser_plugins&diff=291489Browser plugins2014-01-03T14:12:20Z<p>Phinfinity: /* PDF.js */ Pdf.js is available as an experimental plugin for chrome for quite a while now (Although experimental and not stable)</p>
<hr />
<div>[[de:Browser Plugins]]<br />
[[es:Browser Plugins]]<br />
[[fr:Plugins navigateur]]<br />
[[tr:Web tarayıcı eklentileri]]<br />
[[zh-CN:Browser Plugins]]<br />
[[Category:Web Browser]]<br />
These plugins work in [[Firefox]], [[Opera]] and WebKit derivatives.<br />
<br />
== Flash Player ==<br />
<br />
=== Shumway ===<br />
<br />
[http://mozilla.github.io/shumway/ Shumway] is an HTML5 technology experiment that explores building a faithful and efficient renderer for the SWF file format without native code assistance. As of 2013-01-01, the plugin may be installed directly from [http://mozilla.github.io/shumway/ Mozilla's github.io site]. According to the [https://github.com/mozilla/shumway/wiki Shumway wiki], "Integration with Firefox is a possibility if the experiment proves successful." <br />
<br />
{{Warning| As of 2013-10-23, the AUR package is no longer being maintained.<br />
}}<br />
<br />
Shumway is available as a [http://mozilla.github.io/shumway/extension/firefox/shumway.xpi plugin], as {{AUR|firefox-extension-shumway}} in the [[AUR]] or embedded in Firefox Nightly/Aurora builds.<br />
<br />
=== Gnash ===<br />
<br />
{{Wikipedia|Gnash}}<br />
<br />
[http://www.gnu.org/software/gnash/ GNU Gnash] is a free (libre) alternative to Adobe Flash Player. It is available both as a standalone player for desktop computers and embedded devices, as well as a browser plugin, and supports the SWF format up to version 7 (with versions 8 and 9 under development) and about 80% of ActionScript 2.0.<br />
<br />
GNU Gnash can be [[Pacman|installed]] with the package {{Pkg|gnash-gtk}}, available in the [[official repositories]].<br />
<br />
{{Note|If you find that Gnash doesn't work properly right out of the box, then you may also need to [[pacman|install]] {{Pkg|gstreamer0.10-ffmpeg}} from the [[official repositories]].}}<br />
<br />
=== Lightspark ===<br />
<br />
[http://lightspark.github.com/ Lightspark] is another attempt to provide a free alternative to Adobe Flash aimed at supporting newer Flash formats. Although it is still very much in development, it supports some [https://github.com/lightspark/lightspark/wiki/Site-Support popular sites]. <br />
<br />
Lightspark can be [[Pacman|installed]] with the package {{AUR|lightspark}} or {{AUR|lightspark-git}}, available in the [[AUR]].<br />
<br />
=== Adobe Flash Player ===<br />
<br />
[[pacman|Install]] {{Pkg|flashplugin}} from the official repositories.<br />
{{Note|<br />
* Adobe Flash Player for Linux using the NPAPI was [http://blogs.adobe.com/flashplayer/2012/02/adobe-and-google-partnering-for-flash-player-on-linux.html discontinued by Adobe], although security updates for version 11.2 will be provided for another 5 years by Adobe (i.e. 2017). Adobe will, however, release new versions of PPAPI version of the plugin, shipped with Google Chrome. See [[Chromium#Adobe (Pepper plugin API)]] for more information.<br />
* For hardware acceleration, see [[VDPAU]].<br />
* Some Flash apps may require {{AUR|ttf-ms-fonts}} from the [[AUR]] in order to properly render text.<br />
}}<br />
<br />
==== Configuration ====<br />
<br />
To change the preferences (privacy settings, resource usage, etc.) of Flash Player, right click on any embedded Flash content and choose ''Settings'' from the menu, or go to the [http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html Adobe website]. There, a Flash animation will give you access to your local settings.<br />
<br />
You can also use the Flash settings file {{ic|/etc/adobe/mms.cfg}}. An example configuration:<br />
{{hc|/etc/adobe/mms.cfg|<nowiki><br />
# Adobe player settings<br />
AVHardwareDisable = 0<br />
FullScreenDisable = 0<br />
LocalFileReadDisable = 1<br />
FileDownloadDisable = 1<br />
FileUploadDisable = 1<br />
LocalStorageLimit = 1<br />
ThirdPartyStorage = 1<br />
AssetCacheSize = 10<br />
AutoUpdateDisable = 1<br />
LegacyDomainMatching = 0<br />
LocalFileLegacyAction = 0<br />
AllowUserLocalTrust = 0<br />
# DisableSockets = 1 <br />
OverrideGPUValidation = 1<br />
</nowiki>}}<br />
<br />
You can also refer to the [http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/files/mms.cfg mms.cfg from Gentoo], which is extensively commented.<br />
<br />
==== Disable the "Press ESC to exit full screen mode" message ====<br />
<br />
For a way to disable this message see [http://ubuntuforums.org/showthread.php?t=1839293 this ubuntuforums.org post].<br />
<br />
Backup {{ic|libflashplayer.so}}:<br />
# cp /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so.backup <br />
<br />
Make a copy of it in your home directory:<br />
# cp /usr/lib/mozilla/plugins/libflashplayer.so ~/<br />
<br />
Install {{Pkg|wine}} from the official repositories.<br />
<br />
Download {{ic|Flash Fullscreen Patcher.zip}} from [http://forum.videohelp.com/threads/304807-How-to-remove-annoying-Press-Esc-to-message-in-Flash-Video this page], extract and execute with {{ic|wine}}:<br />
<br />
$ wget http://forum.videohelp.com/attachments/16250-1360745667/Flash%20Fullscreen%20Patcher.zip<br />
$ unzip Flash\ Fullscreen\ Patcher\ 2.0.zip<br />
$ wine Flash\ Fullscreen\ Patcher\ 2.0.exe<br />
<br />
Patch {{ic|libflashplayer.so}} (the one from your home directory) using the GUI.<br />
Copy the patched Flash Player back to the plugins directory:<br />
# cp ~/libflashplayer.so /usr/lib/mozilla/plugins/<br />
<br />
==== Fullscreen fix for GNOME 3 ====<br />
<br />
If you have problems with Flash's fullscreen-mode (video freezes but audio keeps playing), then it's probably because the fullscreen flash window is displayed ''behind'' the browser window. You can easily fix this by using [[Wikipedia:Devil's Pie (software)|devilspie]]:<br />
<br />
Install {{Pkg|devilspie}} from the official repositories.<br />
<br />
Create the {{ic|~/.devilspie}} directory:<br />
<br />
# mkdir ~/.devilspie<br />
<br />
Now you have to create a config file for each browser you use (see below)<br />
<br />
Finally, add devilspie to your list of startup items (usually in gnome-session-properties). <br />
<br />
===== Firefox =====<br />
<br />
{{hc|~/.devilspie/flash-fullscreen-firefox.ds|<nowiki><br />
(if<br />
(is (application_name) "plugin-container")<br />
(begin<br />
(focus)<br />
)<br />
)<br />
</nowiki>}}<br />
<br />
===== Chrome / Chromium =====<br />
<br />
{{hc|~/.devilspie/flash-fullscreen-chrome.ds|<nowiki><br />
(if<br />
(is (application_name) "exe")<br />
(begin<br />
(focus)<br />
)<br />
)<br />
</nowiki>}}<br />
<br />
===== Epiphany / GNOME Web =====<br />
<br />
{{hc|~/.devilspie/flash-fullscreen-epiphany.ds|<nowiki><br />
(if<br />
(is (application_name) "WebKitPluginProcess")<br />
(begin<br />
(focus)<br />
)<br />
)<br />
</nowiki>}}<br />
<br />
== PDF viewer ==<br />
<br />
=== PDF.js ===<br />
<br />
{{Wikipedia|Pdf.js}}<br />
<br />
[https://mozillalabs.com/en-US/pdfjs/ PDF.js] is a PDF renderer created by Mozilla and built using HTML5 technologies. It is currently available as a Firefox [https://addons.mozilla.org/en-US/firefox/addon/pdfjs/ plugin]. For Chrome there is an experimental version in the [https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm Chrome web store] or alternatively can be built from the source of [https://github.com/mozilla/pdf.js Pdf.js]<br />
<br />
=== External PDF viewers ===<br />
<br />
To use an external PDF viewer you need [[#MozPlugger]] or [[#kpartsplugin]].<br />
<br />
If you want to use MozPlugger with Evince, for example, you have to find the lines containing {{ic|pdf}} in the {{ic|/etc/mozpluggerrc}} file and modify the corresponding line after {{ic|GV()}} as below:<br />
repeat noisy swallow(evince) fill: evince "$file"<br />
(replace {{ic|evince}} with something else if it is not your viewer of choice).<br />
<br />
If this isn't enough, you may need to change 2 values in {{ic|about:config}}:<br />
* Change {{ic|pdfjs.disabled}}'s value to ''true'';<br />
* Change {{ic|plugin.disable_full_page_plugin_for_types}}'s value to an empty value.<br />
<br />
Restart and it should work like a charm!<br />
<br />
=== Adobe Reader ===<br />
<br />
Due to licensing restrictions, Adobe Reader cannot be distributed from any of the official Arch Linux repositories. There are versions available in the [[AUR]]. Please note that no matter how many votes it receives, Adobe Reader will never be included in the [[official repositories]].<br />
<br />
Also, there are [https://aur.archlinux.org/packages.php?O=0&K=acroread-&do_Search=Go localizations] available in many languages.<br />
<br />
==== 32-bit ====<br />
<br />
Adobe Acrobat Reader is only available as a 32-bit binary. It can be installed with the {{AUR|acroread}} package, available in the [[AUR]].<br />
<br />
This package installs the Acrobat Reader application as well as the Firefox plugin. Note that hardware-assisted rendering is unavailable under Linux (at least using a Geforce 8600GTS with driver version 185.18.14).<br />
<br />
==== 64-bit ====<br />
<br />
There is yet to be an official 64-bit version of Adobe Reader.<br />
<br />
To use it in a 64-bit environment, you can:<br />
* Follow [[Install bundled 32-bit system in Arch64|this guide]] originally posted in the forums. It involves creating a chrooted environment that could be reused for other 32-bit only applications.<br />
<br />
* Install {{AUR|acroread}} (with all its 32-bit dependencies) from [[AUR]]. Be advised that the [[Firefox]] plugin cannot be used ''directly'' with this binary -- it will not load in the 64-bit browser. To load it install the {{Pkg|nspluginwrapper}} package from the official [[Multilib|[multilib]]] repository and run:<br />
$ nspluginwrapper -v -a -i<br />
as a normal user. This checks the plugin directory and links the plugins as needed.<br />
<br />
== Citrix ==<br />
<br />
See the main article: [[Citrix]].<br />
<br />
== Java (IcedTea) ==<br />
<br />
To enable [[Java]] support in your browser, you have two options: the open-source [[Wikipedia:OpenJDK|OpenJDK]] (recommended) or Oracle's proprietary version. For details about why OpenJDK is recommended see [https://mailman.archlinux.org/pipermail/arch-general/2011-August/021671.html this].<br />
<br />
To use OpenJDK, you have to install the [http://icedtea.classpath.org/wiki/Main_Page IcedTea] browser plugin:<br />
* {{Pkg|icedtea-web-java7}} for version 7 of the Java environment.<br />
<br />
If you want to use Oracle's JRE, install the {{AUR|jre}} (or {{AUR|jre6}}) package, available in the [[AUR]].<br />
<br />
See [[Java#OpenJDK JVM]] for additional details and references.<br />
<br />
{{Note|If you experience any problems with the Java plugin (it is not recognized by the browser), you can try this [[Flash#Plugins_are_installed_but_not_working|solution]].}}<br />
<br />
== Video plugins ==<br />
<br />
* {{App|Gecko Media Player|Mozilla browser plugin to handle media on websites, using MPlayer.|https://sites.google.com/site/kdekorte2/gecko-mediaplayer|{{Pkg|gecko-mediaplayer}}}}<br />
* {{App|Totem Plugin|Browser plugin based on the [[Wikipedia:Totem (software)|Totem]] media player for [[Gnome]] which uses [[Gstreamer]].|http://projects.gnome.org/totem/|{{Pkg|totem-plugin}}}}<br />
* {{App|Rosa Media Player Plugin|Qt-based browser plugin also based on MPlayer.|https://abf.rosalinux.ru/uxteam/ROSA_Media_Player|{{AUR|rosa-media-player-plugin}}}}<br />
* {{App|VLC Plugin|NPAPI-based plugin that uses VLC technologies.|http://git.videolan.org/?p&#61;npapi-vlc.git;a&#61;summary|{{AUR|npapi-vlc-git}}}}<br />
<br />
== Other ==<br />
<br />
=== MozPlugger ===<br />
<br />
MozPlugger can be installed with the {{AUR|mozplugger}} package, respectively {{AUR|mozplugger-chromium}}, available in the [[AUR]].<br />
<br />
[http://mozplugger.mozdev.org/ MozPlugger] is a Mozilla plugin which can show many types of multimedia inside your browser. To accomplish this, it uses external programs such as MPlayer, xine, Evince, OpenOffice, TiMidity, etc. To modify or add applications to be used by MozPlugger just modify the {{ic|/etc/mozpluggerrc}} file.<br />
<br />
For example, MozPlugger uses OpenOffice by default to open {{ic|doc}} files. To change it to use LibreOffice instead, look for the OpenOffice section:<br />
{{hc|/etc/mozpluggerrc|<br />
...<br />
### OpenOffice<br />
define([OO],[swallow(VCLSalFrame) fill: ooffice2.0 -nologo -norestore -view $1 "$file"<br />
swallow(VCLSalFrame) fill: ooffice -nologo -norestore -view $1 "$file"<br />
swallow(VCLSalFrame) fill: soffice -nologo $1 "$file"])<br />
...<br />
}}<br />
and add LibreOffice at the beginning of the list:<br />
{{hc|/etc/mozpluggerrc|<br />
...<br />
### LibreOffice/OpenOffice<br />
define([OO],[swallow(VCLSalFrame) fill: libreoffice --nologo --norestore --view $1 "$file"<br />
swallow(VCLSalFrame) fill: ooffice2.0 -nologo -norestore -view $1 "$file"<br />
swallow(VCLSalFrame) fill: ooffice -nologo -norestore -view $1 "$file"<br />
swallow(VCLSalFrame) fill: soffice -nologo $1 "$file"])<br />
...<br />
}}<br />
{{Note|Be sure to also choose LibreOffice as your preferred application to open {{ic|doc}} files.}}<br />
<br />
As another simple example, if you want to open {{ic|cpp}} files with your favorite text editor (we will use Kate) to get syntax highlighting, just add a new section to your {{ic|mozpluggerrc}} file:<br />
{{hc|/etc/mozpluggerrc|<br />
text/x-c++:cpp:C++ Source File<br />
text/x-c++:hpp:C++ Header File<br />
repeat noisy swallow(kate) fill: kate -b "$file"<br />
}}<br />
<br />
For a more complete list of MozPlugger options see [http://www.linuxmanpages.com/man7/mozplugger.7.php this page].<br />
<br />
=== kpartsplugin ===<br />
<br />
[http://www.unix-ag.uni-kl.de/~fischer/kpartsplugin/ The KParts plugin] is a plugin that uses KDE's KPart technology to embed different file viewers in the browser, such as Okular (for PDF), Ark (for different archives), Calligra Words (for ODF), etc. It cannot use applications that are not based on the KPart technology.<br />
<br />
The KParts plugin can be installed with the package {{Pkg|kpartsplugin}}, available in the official repositories.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Flash Player: no sound ===<br />
<br />
Flash Player outputs its sound only through the default [[Advanced Linux Sound Architecture|ALSA]] device, which is number '''0'''. If you have multiple sound devices (a very common example is having a sound card and HDMI output in the video card), then your preferred device may have a different number.<br />
<br />
For a list of available devices with their respective numbers, run:<br />
{{hc|$ aplay -l|<br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 1: DX [Xonar DX], device 0: Multichannel [Multichannel]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
card 1: DX [Xonar DX], device 1: Digital [Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
}}<br />
In this case, the HDMI output is {{ic|card 0}} and the sound card is {{ic|card 1}}. To make your sound card the default for ALSA, create the file {{ic|.asoundrc}} in your home directory, with the following content:<br />
{{hc|~/.asoundrc|<br />
pcm.!default {<br />
type hw<br />
card 1<br />
}<br />
<br />
ctl.!default {<br />
type hw<br />
card 1<br />
}<br />
}}<br />
<br />
=== Flash Player: blocking sound for other applications or delayed playback ===<br />
<br />
If sound is delayed within Flash videos or Flash stops sound from any other application, then make sure you do not have {{ic|snd_pcm_oss}} module loaded:<br />
$ lsmod | grep snd_pcm_oss<br />
You can unload it:<br />
# rmmod snd_pcm_oss<br />
and restart the browser to see if it helps.<br />
<br />
=== Flash Player: bad (choppy) sound on the 64-bit version ===<br />
<br />
There is a problem with Flash plugin 11 on 64-bit systems and a new {{ic|memcpy}} routine in {{Pkg|glibc}} (for more details see [https://bugzilla.redhat.com/show_bug.cgi?id&#;638477 this Fedora bug report]), which makes the sound choppy on MP3 streams. Current workarounds are:<br />
* replacing the {{ic|memcpy}} routine as suggested in [http://forums.fedoraforum.org/showthread.php?t=258346 this thread].<br />
* installing {{AUR|flashplugin-square}} from the [[AUR]] (this is a version of the Flash plugin with working hardware acceleration).<br />
<br />
=== Flash Player: performance ===<br />
<br />
Adobe's Flash plugin has some serious performance issues, especially when CPU frequency scaling is used. There seems to be a policy not to use the whole CPU workload, so the frequency scaling governor does not clock the CPU any higher. To work around this issue, see [[cpufrequtils#Changing the ondemand governor's threshold|Cpufrequtils]]<br />
<br />
=== Flash Player: low webcam resolution ===<br />
<br />
If your webcam has low resolution in Flash (the image looks very pixelated) you can try starting your browser with this:<br />
$ LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so [broswer]<br />
<br />
=== Flash Player: black bars in full screen playback on multi-headed setups ===<br />
<br />
The Flash plugin has a known bug where the full screen mode does not really work when you have a multi-monitor setup. Apparently, it incorrectly determines the full screen resolution, so the full screen Flash Player fills the correct monitor but gets scaled as if the monitor had the resolution of the total display area.<br />
<br />
To fix this, you can use the "hack" described [http://al.robotfuzz.com/content/workaround-fullscreen-flash-linux-multiheaded-desktops here]. Simply download the source from the link given on the page, and follow the instructions in the README.<br />
<br />
{{Tip|The hack is available in the [[AUR]] and can be installed with the {{AUR|fullscreenhack}} package.}}<br />
<br />
{{Note|While the author mentions using NVDIA's TwinView, the hack should work for any multi-monitor setup.}}<br />
<br />
=== Flash Player: blue tint on videos with NVIDIA ===<br />
<br />
An issue with {{Pkg|flashplugin}} versions 11.2.202.228-1 and 11.2.202.233-1 causes it to send the U/V panes in the incorrect order resulting in a blue tint on certain videos. Version 0.5 of {{Pkg|libvdpau}} includes a workaround to fix this, see the [http://lists.x.org/archives/xorg-announce/2012-September/002066.html official announcement].<br />
<br />
=== Flash Player: leaking overlay with NVIDIA ===<br />
<br />
This bug is due to the incorrect color key being used by the {{Pkg|flashplugin}} version 11.2.202.228-1 (see [http://www.nvnews.net/vbulletin/showpost.php?p=2514210&postcount=102 this post] on the NVIDIA forums) and causes the Flash content to "leak" into other pages or solid black backgrounds. To avoid this issue simply export {{ic|1=VDPAU_NVIDIA_NO_OVERLAY=1}} within either your shell profile (e.g. {{ic|~/.bash_profile}} or {{ic|~/.zprofile}}) or {{ic|~/.xinitrc}}<br />
<br />
=== Flash Player: videos not working on older systems ===<br />
<br />
If you have Adobe Flash installed on an older system and you start playing a video which simply turns black with nothing happening, it is most likely that your CPU does not support SSE2. You can simply check this by looking at your CPU flags with this command:<br />
$ grep sse2 /proc/cpuinfo<br />
<br />
If no results are returned, then you need to install an older version of Flash (for example 10.3, or 11.1). Older versions possibly will have vulnerabilities. You should then consider sandboxing Firefox using {{AUR|sandfox}}, available in the [[AUR]]. See the [https://igurublog.wordpress.com/downloads/script-sandfox/ sandfox homepage] for usage information.<br />
<br />
Older versions of Flash are available here:<br />
http://www.adobe.com/products/flashplayer/distribution3.html<br />
You need to copy {{ic|libflashplayer.so}} to the folder {{ic|/usr/lib/mozilla/plugins/}}<br />
<br />
Older {{Pkg|flashplugin}} packages can be downloaded from the [[AUR]] e.g. {{AUR|flashplugin-nosse2}}. Alternatively you can install {{AUR|flashplugin-sse2-nosse2}} which can be used on CPUs with and without SSE2.<br />
<br />
The most recent package without SSE2 is {{ic|flashplugin-11.1.102.63-1-i686.pkg.tar.xz}}. If you use the packaged version, you have to add {{ic|IgnorePkg &#61; flashplugin}} to {{ic|/etc/pacman.conf}}.<br />
<br />
=== Plugins are installed but not working ===<br />
<br />
A common problem is that the plugin path is unset. This typically occurs on a new install, when the user has not re-logged in before running Firefox after the installation. Test if the path is unset:<br />
echo $MOZ_PLUGIN_PATH<br />
If unset, then either re-login, or source {{ic|/etc/profile.d/mozilla-common.sh}} and start Firefox from the same shell:<br />
source /etc/profile.d/mozilla-common.sh && firefox<br />
<br />
=== Gecko Media Player will not play Apple trailers ===<br />
<br />
If Apple Trailers appear to start to play and then fail, try setting the user agent for your browser to:<br />
QuickTime/7.6.2 (qtver=7.6.2;os=Windows NT 5.1Service Pack 3)</div>Phinfinityhttps://wiki.archlinux.org/index.php?title=Proxy_server&diff=160832Proxy server2011-09-20T17:37:33Z<p>Phinfinity: Added info about proxydriver.</p>
<hr />
<div>[[Category:Proxy servers (English)]]<br />
{{i18n|Proxy settings}}<br />
{{expansion}}<br />
==Introduction==<br />
A proxy is "an interface for a service, especially for one that is remote, resource-intensive, or otherwise difficult to use directly". Source: [http://en.wiktionary.org/wiki/proxy Proxy - Wiktionary].<br />
<br />
==Environment variables==<br />
Some programs (like [[wget]]) use environment variables of the form "protocol_proxy" to determine the proxy for a given protocol (e.g. HTTP, FTP, ...).<br />
<br />
Below is an example on how to set these variables in a shell:<br />
<br />
<nowiki><br />
export http_proxy=http://10.203.0.1:5187/<br />
export https_proxy=http://10.203.0.1:5187/<br />
export ftp_proxy=http://10.203.0.1:5187/<br />
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"</nowiki><br />
Some programs look for the all caps version of the environment variables.<br />
<br />
Alternatively you can automate the toggling of the variables by adding a function to your .bashrc (thanks to Alan Pope)<br />
<nowiki><br />
function proxy(){<br />
echo -n "username:"<br />
read -e username<br />
echo -n "password:"<br />
read -es password<br />
export http_proxy="http://$username:$password@proxyserver:8080/"<br />
export https_proxy="http://$username:$password@proxyserver:8080/"<br />
export ftp_proxy="http://$username:$password@proxyserver:8080/"<br />
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"<br />
echo -e "\nProxy environment variable set."<br />
}<br />
function proxyoff(){<br />
unset HTTP_PROXY<br />
unset http_proxy<br />
unset HTTPS_PROXY<br />
unset https_proxy<br />
unset FTP_PROXY<br />
unset ftp_proxy<br />
echo -e "\nProxy environment variable removed."<br />
}</nowiki><br />
If you do not need a password then omit it.<br />
<br />
===Automation with network managers===<br />
*[[NetworkManager]] cannot change the environment variables.<br />
*[[netcfg]] could set-up these environment variables but they would not be seen by other applications as they are not child of netcfg.<br />
<br />
==About libproxy==<br />
[http://code.google.com/p/libproxy/ libproxy] (which is available in the extra repository) is an abstraction library which should be used by all applications that want to access a network resource. It still is in development but could lead to a unified and automated handling of proxies in GNU/Linux if widely adopted.<br />
<br />
The role of libproxy is to read the proxy settings form different sources and make them available to applications which use the library. The interesting part with libproxy is that it offers an implementation of the [http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol Web Proxy Autodiscovery Protocol] and an implementation of [http://en.wikipedia.org/wiki/Proxy_auto-config Proxy Auto-Config] that goes with it.<br />
<br />
The {{Codeline|/usr/bin/proxy}} binary takes URL(s) as argument(s) and returns the proxy/proxies that could be used to fetch this/these network resource(s).<br />
{{Note|the 0.2.3-1 version does not work for me.}}<br />
<br />
As of 06/04/2009 libproxy is required by libsoup. It is then indirectly used by the [http://www.archlinux.org/packages/extra/i686/midori/ Midori] browser.<br />
<br />
== Web Proxy Options ==<br />
* [[Squid]] is a very popular caching/optimizing proxy<br />
* [[Privoxy]] is an anonymizing and ad-blocking proxy<br />
* For a simple proxy, ssh with port forwarding can be used<br />
<br />
=== Simple Proxy with SSH ===<br />
Connect to a server (HOST) on which you have an account (USER) as follows<br />
ssh -D PORT USER@HOST<br />
For PORT, choose some number which is not an IANA registered port. This specifies that traffic on the local PORT will be forwarded to the remote HOST. ssh will act as a [[Wikipedia:SOCKS|SOCKS]] server. Software supporting SOCKS proxy servers can simply be configured to connect to PORT on localhost.<br />
<br />
==Using a SOCKS proxy==<br />
There are two cases:<br />
*the application you want to use handles SOCKS proxies (for example Firefox) then you just have to configure it to use the proxy<br />
*the application you want to use does not handle SOCKS proxies then you can try to use [http://tsocks.sourceforge.net/ tsocks] (available in extra)<br />
<br />
==Proxy settings on GNOME3==<br />
Some programs like [[Chromium]] prefer to use the settings stored by gnome. These settings can be modified through the gnome-control-center front end and also through gsettings.<br />
<br />
gsettings set org.gnome.system.proxy mode 'manual' <br />
gsettings set org.gnome.system.proxy.http host 'proxy.localdomain.com'<br />
gsettings set org.gnome.system.proxy.http port 8080<br />
gsettings set org.gnome.system.proxy.ftp host 'proxy.localdomain.com'<br />
gsettings set org.gnome.system.proxy.ftp port 8080<br />
gsettings set org.gnome.system.proxy.https host 'proxy.localdomain.com'<br />
gsettings set org.gnome.system.proxy.https port 8080<br />
gsettings set org.gnome.system.proxy ignore-hosts "['localhost', '127.0.0.0/8', '10.0.0.0/8', '192.168.0.0/16', '172.16.0.0/12' , '*.localdomain.com' ]"<br />
<br />
This configuration can also be set to automatically execute when [[NetworkManager#Proxy_settings|Network Manager]] connects to specific networks , by using the package {{Package AUR|proxydriver}} from the [[AUR]]</div>Phinfinityhttps://wiki.archlinux.org/index.php?title=Splashy&diff=160709Splashy2011-09-19T17:13:22Z<p>Phinfinity: replaced dead link.</p>
<hr />
<div>[[Category:Bootsplash (English)]]<br />
{{i18n|Splashy}}<br />
<br />
[http://alioth.debian.org/projects/splashy/ Splashy] is a userspace implementation of a splash screen for Linux systems. It provides a graphical environment during system boot using the Linux framebuffer layer via [http://www.directfb.org directfb].<br />
<br />
==Installation==<br />
<br />
Before you can use Splashy, you should enable [[Kernel Mode Setting]]. Please refer to the specific instructions for [[ATI#Kernel_mode-setting_.28KMS.29|ATI cards]], [[Intel#KMS_.28Kernel_Mode_Setting.29|Intel cards]] or [[Nouveau#KMS|Nvidia cards]]. All of these require you to rebuild your kernel image. You will also have to do that later on in this article, so you may wish to skip that step for now.<br />
<br />
If you do not have KMS you will need to use framebuffer instead. [[Uvesafb]] is recommended. Of all the three the regular framebuffer is the only one that does not support custom resolutions (including wide screen splashes).<br />
<br />
Grab [https://aur.archlinux.org/packages.php?ID=27916 splashy-full] from the [[AUR]] and install it.<br />
<br />
You may also check out [http://bbs.archlinux.org/viewtopic.php?id=48978 this topic] on the [https://bbs.archlinux.org/ Arch Linux forum] for a repository you can add with working splashy packages.<br />
<br />
==Configuration==<br />
<br />
===/etc/rc.conf===<br />
<br />
Add this in {{Filename|/etc/[[rc.conf]]}}:<br />
SPLASH="splashy"<br />
<br />
===Including Splashy in initramfs===<br />
<br />
Add Splashy to the HOOKS array in [[mkinitcpio.conf]]. It '''must''' be added ''after'' '''base''', '''udev''' and '''autodetect''' for it to work:<br />
# nano /etc/mkinitcpio.conf<br />
<br />
HOOKS="base udev autodetect splashy ..."<br />
<br />
For early KMS start add the module [[radeon]] (for radeon cards), [[Intel|i915]] (for intel cards) or [[nouveau]] (for nvidia cards) to the MODULES line in {{Filename|/etc/mkinitcpio.conf}}:<br />
# nano /etc/mkinitcpio.conf<br />
<br />
MODULES="i915"<br />
<br />
MODULES="radeon"<br />
<br />
MODULES="nouveau"<br />
<br />
Rebuild your kernel image (refer to the [[mkinitcpio]] article for more info):<br />
# mkinitcpio -p [name of your kernel preset]<br />
<br />
===The kernel command line===<br />
<br />
You now need to set '''quiet splash''' as you kernel command line parametres in your bootloader. The following is an example for [[Grub2]] and {{Filename|/boot/grub/grub.cfg}} (the legacy [[Grub]] and [[Lilo]] follow the same pattern):<br />
linux /boot/vmlinuz-linux root=/dev/... ro quiet splash<br />
<br />
You can force enable KMS early start by appending "''radeon.modeset=1''" (for radeon cards) or "''i915.modeset=1''" (for intel cards) to your kernel options:<br />
<br />
linux /boot/vmlinuz-linux root=/dev/... radeon.modeset=1<br />
<br />
linux /boot/vmlinuz-linux root=/dev/... i915.modeset=1<br />
<br />
You may also edit the file {{Filename|/etc/default/grub}} and append your kernel options to the line ''GRUB_CMDLINE_LINUX_DEFAULT=""''. To re-generate {{Filename|grub.cfg}} run:<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
===Themes===<br />
<br />
You can install {{Package AUR|splashy-themes}} from the AUR. After installing, look at the available themes like so:<br />
ls /usr/share/splashy/themes<br />
<br />
The folder name is the theme name. Now change the theme to the one you want, eg.:<br />
# splashy_config -s darch-white<br />
<br />
{{Note|Themes ending in 43 are of 4:3 aspect ratio - the others are widescreen.}}<br />
<br />
Rebuild your kernel image with:<br />
# mkinitcpio -p [name of your kernel preset]<br />
<br />
and reboot.<br />
<br />
==Troubleshooting==<br />
<br />
===GNOME will not shut down===<br />
<br />
'''Problem:''' You are using Gnome, and starting GDM as a daemon, Splashy causes Gnome to not be able to properly shutdown/reboot.<br />
<br />
'''Fix:''' Remove '''gdm''' from DAEMONS in {{Filename|/etc/rc.conf}}, and set it up in [[Display manager#inittab method|{{Filename|/etc/inittab}}]].</div>Phinfinityhttps://wiki.archlinux.org/index.php?title=Proxy_server&diff=160689Proxy server2011-09-19T13:49:31Z<p>Phinfinity: /* Proxy settings on GNOME3 */</p>
<hr />
<div>[[Category:Proxy servers (English)]]<br />
{{expansion}}<br />
==Introduction==<br />
A proxy is "an interface for a service, especially for one that is remote, resource-intensive, or otherwise difficult to use directly". Source: [http://en.wiktionary.org/wiki/proxy Proxy - Wiktionary].<br />
<br />
==Environment variables==<br />
Some programs (like [[wget]]) use environment variables of the form "protocol_proxy" to determine the proxy for a given protocol (e.g. HTTP, FTP, ...).<br />
<br />
Below is an example on how to set these variables in a shell:<br />
<pre><nowiki><br />
export http_proxy=http://10.203.0.1:5187/<br />
export https_proxy=http://10.203.0.1:5187/<br />
export ftp_proxy=http://10.203.0.1:5187/<br />
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"<br />
</nowiki></pre><br />
Some programs look for the all caps version of the environment variables.<br />
<br />
Alternatively you can automate the toggling of the variables by adding a function to your .bashrc (thanks to Alan Pope)<br />
<pre><nowiki><br />
function proxy(){<br />
echo -n "username:"<br />
read -e username<br />
echo -n "password:"<br />
read -es password<br />
export http_proxy="http://$username:$password@proxyserver:8080/"<br />
export https_proxy="http://$username:$password@proxyserver:8080/"<br />
export ftp_proxy="http://$username:$password@proxyserver:8080/"<br />
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"<br />
echo -e "\nProxy environment variable set."<br />
}<br />
function proxyoff(){<br />
unset HTTP_PROXY<br />
unset http_proxy<br />
unset HTTPS_PROXY<br />
unset https_proxy<br />
unset FTP_PROXY<br />
unset ftp_proxy<br />
echo -e "\nProxy environment variable removed."<br />
}</nowiki></pre><br />
If you don't need a password then omit it.<br />
<br />
<br />
===Automation with network managers===<br />
*[[NetworkManager]] can't change the environment variables.<br />
*[[netcfg]] could set-up these environment variables but they would not be seen by other applications as they are not child of netcfg.<br />
<br />
==About libproxy==<br />
[http://code.google.com/p/libproxy/ libproxy] (which is available in the extra repository) is an abstraction library which should be used by all applications that want to access a network resource. It still is in development but could lead to a unified and automated handling of proxies in GNU/Linux if widely adopted.<br />
<br />
The role of libproxy is to read the proxy settings form different sources and make them available to applications which use the library. The interesting part with libproxy is that it offers an implementation of the [http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol Web Proxy Autodiscovery Protocol] and an implementation of [http://en.wikipedia.org/wiki/Proxy_auto-config Proxy Auto-Config] that goes with it.<br />
<br />
The {{Codeline|/usr/bin/proxy}} binary takes URL(s) as argument(s) and returns the proxy/proxies that could be used to fetch this/these network resource(s).<br />
{{Note|the 0.2.3-1 version doesn't work for me.}}<br />
<br />
As of 06/04/2009 libproxy is required by libsoup. It is then indirectly used by the [http://www.archlinux.org/packages/extra/i686/midori/ Midori] browser.<br />
<br />
== Web Proxy Options ==<br />
* [[Squid]] is a very popular caching/optimizing proxy<br />
* [[Privoxy]] is an anonymizing and ad-blocking proxy<br />
* For a simple proxy, ssh with port forwarding can be used<br />
<br />
=== Simple Proxy with SSH ===<br />
Connect to a server (HOST) on which you have an account (USER) as follows<br />
ssh -D PORT USER@HOST<br />
For PORT, choose some number which is not an IANA registered port. This specifies that traffic on the local PORT will be forwarded to the remote HOST. ssh will act as a [[Wikipedia:SOCKS|SOCKS]] server. Software supporting SOCKS proxy servers can simply be configured to connect to PORT on localhost.<br />
<br />
==Using a SOCKS proxy==<br />
There are two cases:<br />
*the application you want to use handles SOCKS proxies (for example Firefox) then you just have to configure it to use the proxy<br />
*the application you want to use does not handle SOCKS proxies then you can try to use [http://tsocks.sourceforge.net/ tsocks] (available in extra)<br />
<br />
==Proxy settings on GNOME3==<br />
Some programs like [[Chromium]] prefer to use the settings stored by gnome. These settings can be modified through the gnome-control-center front end and also through gsettings.<br />
<pre><br />
gsettings set org.gnome.system.proxy mode 'manual' <br />
gsettings set org.gnome.system.proxy.http host 'proxy.localdomain.com'<br />
gsettings set org.gnome.system.proxy.http port 8080<br />
gsettings set org.gnome.system.proxy.ftp host 'proxy.localdomain.com'<br />
gsettings set org.gnome.system.proxy.ftp port 8080<br />
gsettings set org.gnome.system.proxy.https host 'proxy.localdomain.com'<br />
gsettings set org.gnome.system.proxy.https port 8080<br />
gsettings set org.gnome.system.proxy ignore-hosts "['localhost', '127.0.0.0/8', '10.0.0.0/8', '192.168.0.0/16', '172.16.0.0/12' , '*.localdomain.com' ]"<br />
</pre></div>Phinfinityhttps://wiki.archlinux.org/index.php?title=Proxy_server&diff=160687Proxy server2011-09-19T13:48:36Z<p>Phinfinity: Added Gnome3 proxy settings</p>
<hr />
<div>[[Category:Proxy servers (English)]]<br />
{{expansion}}<br />
==Introduction==<br />
A proxy is "an interface for a service, especially for one that is remote, resource-intensive, or otherwise difficult to use directly". Source: [http://en.wiktionary.org/wiki/proxy Proxy - Wiktionary].<br />
<br />
==Environment variables==<br />
Some programs (like [[wget]]) use environment variables of the form "protocol_proxy" to determine the proxy for a given protocol (e.g. HTTP, FTP, ...).<br />
<br />
Below is an example on how to set these variables in a shell:<br />
<pre><nowiki><br />
export http_proxy=http://10.203.0.1:5187/<br />
export https_proxy=http://10.203.0.1:5187/<br />
export ftp_proxy=http://10.203.0.1:5187/<br />
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"<br />
</nowiki></pre><br />
Some programs look for the all caps version of the environment variables.<br />
<br />
Alternatively you can automate the toggling of the variables by adding a function to your .bashrc (thanks to Alan Pope)<br />
<pre><nowiki><br />
function proxy(){<br />
echo -n "username:"<br />
read -e username<br />
echo -n "password:"<br />
read -es password<br />
export http_proxy="http://$username:$password@proxyserver:8080/"<br />
export https_proxy="http://$username:$password@proxyserver:8080/"<br />
export ftp_proxy="http://$username:$password@proxyserver:8080/"<br />
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"<br />
echo -e "\nProxy environment variable set."<br />
}<br />
function proxyoff(){<br />
unset HTTP_PROXY<br />
unset http_proxy<br />
unset HTTPS_PROXY<br />
unset https_proxy<br />
unset FTP_PROXY<br />
unset ftp_proxy<br />
echo -e "\nProxy environment variable removed."<br />
}</nowiki></pre><br />
If you don't need a password then omit it.<br />
<br />
<br />
===Automation with network managers===<br />
*[[NetworkManager]] can't change the environment variables.<br />
*[[netcfg]] could set-up these environment variables but they would not be seen by other applications as they are not child of netcfg.<br />
<br />
==About libproxy==<br />
[http://code.google.com/p/libproxy/ libproxy] (which is available in the extra repository) is an abstraction library which should be used by all applications that want to access a network resource. It still is in development but could lead to a unified and automated handling of proxies in GNU/Linux if widely adopted.<br />
<br />
The role of libproxy is to read the proxy settings form different sources and make them available to applications which use the library. The interesting part with libproxy is that it offers an implementation of the [http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol Web Proxy Autodiscovery Protocol] and an implementation of [http://en.wikipedia.org/wiki/Proxy_auto-config Proxy Auto-Config] that goes with it.<br />
<br />
The {{Codeline|/usr/bin/proxy}} binary takes URL(s) as argument(s) and returns the proxy/proxies that could be used to fetch this/these network resource(s).<br />
{{Note|the 0.2.3-1 version doesn't work for me.}}<br />
<br />
As of 06/04/2009 libproxy is required by libsoup. It is then indirectly used by the [http://www.archlinux.org/packages/extra/i686/midori/ Midori] browser.<br />
<br />
== Web Proxy Options ==<br />
* [[Squid]] is a very popular caching/optimizing proxy<br />
* [[Privoxy]] is an anonymizing and ad-blocking proxy<br />
* For a simple proxy, ssh with port forwarding can be used<br />
<br />
=== Simple Proxy with SSH ===<br />
Connect to a server (HOST) on which you have an account (USER) as follows<br />
ssh -D PORT USER@HOST<br />
For PORT, choose some number which is not an IANA registered port. This specifies that traffic on the local PORT will be forwarded to the remote HOST. ssh will act as a [[Wikipedia:SOCKS|SOCKS]] server. Software supporting SOCKS proxy servers can simply be configured to connect to PORT on localhost.<br />
<br />
==Using a SOCKS proxy==<br />
There are two cases:<br />
*the application you want to use handles SOCKS proxies (for example Firefox) then you just have to configure it to use the proxy<br />
*the application you want to use does not handle SOCKS proxies then you can try to use [http://tsocks.sourceforge.net/ tsocks] (available in extra)<br />
<br />
==Proxy settings on GNOME3==<br />
Some programs like [[Chromium]] prefer to use the settings stored by gnome. These settings are available through the gnome-control-center front end and also through gsettings.<br />
<pre><br />
gsettings set org.gnome.system.proxy mode 'manual' <br />
gsettings set org.gnome.system.proxy.http host 'proxy.localdomain.com'<br />
gsettings set org.gnome.system.proxy.http port 8080<br />
gsettings set org.gnome.system.proxy.ftp host 'proxy.localdomain.com'<br />
gsettings set org.gnome.system.proxy.ftp port 8080<br />
gsettings set org.gnome.system.proxy.https host 'proxy.localdomain.com'<br />
gsettings set org.gnome.system.proxy.https port 8080<br />
gsettings set org.gnome.system.proxy ignore-hosts "['localhost', '127.0.0.0/8', '10.0.0.0/8', '192.168.0.0/16', '172.16.0.0/12' , '*.localdomain.com' ]"<br />
</pre></div>Phinfinityhttps://wiki.archlinux.org/index.php?title=Proxy_server&diff=160681Proxy server2011-09-19T13:35:44Z<p>Phinfinity: Added no_proxy variables.</p>
<hr />
<div>[[Category:Proxy servers (English)]]<br />
{{expansion}}<br />
==Introduction==<br />
A proxy is "an interface for a service, especially for one that is remote, resource-intensive, or otherwise difficult to use directly". Source: [http://en.wiktionary.org/wiki/proxy Proxy - Wiktionary].<br />
<br />
==Environment variables==<br />
Some programs (like [[wget]]) use environment variables of the form "protocol_proxy" to determine the proxy for a given protocol (e.g. HTTP, FTP, ...).<br />
<br />
Below is an example on how to set these variables in a shell:<br />
<pre><nowiki><br />
export http_proxy=http://10.203.0.1:5187/<br />
export https_proxy=http://10.203.0.1:5187/<br />
export ftp_proxy=http://10.203.0.1:5187/<br />
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"<br />
</nowiki></pre><br />
Some programs look for the all caps version of the environment variables.<br />
<br />
Alternatively you can automate the toggling of the variables by adding a function to your .bashrc (thanks to Alan Pope)<br />
<pre><nowiki><br />
function proxy(){<br />
echo -n "username:"<br />
read -e username<br />
echo -n "password:"<br />
read -es password<br />
export http_proxy="http://$username:$password@proxyserver:8080/"<br />
export https_proxy="http://$username:$password@proxyserver:8080/"<br />
export ftp_proxy="http://$username:$password@proxyserver:8080/"<br />
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"<br />
echo -e "\nProxy environment variable set."<br />
}<br />
function proxyoff(){<br />
unset HTTP_PROXY<br />
unset http_proxy<br />
unset HTTPS_PROXY<br />
unset https_proxy<br />
unset FTP_PROXY<br />
unset ftp_proxy<br />
echo -e "\nProxy environment variable removed."<br />
}</nowiki></pre><br />
If you don't need a password then omit it.<br />
<br />
<br />
===Automation with network managers===<br />
*[[NetworkManager]] can't change the environment variables.<br />
*[[netcfg]] could set-up these environment variables but they would not be seen by other applications as they are not child of netcfg.<br />
<br />
==About libproxy==<br />
[http://code.google.com/p/libproxy/ libproxy] (which is available in the extra repository) is an abstraction library which should be used by all applications that want to access a network resource. It still is in development but could lead to a unified and automated handling of proxies in GNU/Linux if widely adopted.<br />
<br />
The role of libproxy is to read the proxy settings form different sources and make them available to applications which use the library. The interesting part with libproxy is that it offers an implementation of the [http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol Web Proxy Autodiscovery Protocol] and an implementation of [http://en.wikipedia.org/wiki/Proxy_auto-config Proxy Auto-Config] that goes with it.<br />
<br />
The {{Codeline|/usr/bin/proxy}} binary takes URL(s) as argument(s) and returns the proxy/proxies that could be used to fetch this/these network resource(s).<br />
{{Note|the 0.2.3-1 version doesn't work for me.}}<br />
<br />
As of 06/04/2009 libproxy is required by libsoup. It is then indirectly used by the [http://www.archlinux.org/packages/extra/i686/midori/ Midori] browser.<br />
<br />
== Web Proxy Options ==<br />
* [[Squid]] is a very popular caching/optimizing proxy<br />
* [[Privoxy]] is an anonymizing and ad-blocking proxy<br />
* For a simple proxy, ssh with port forwarding can be used<br />
<br />
=== Simple Proxy with SSH ===<br />
Connect to a server (HOST) on which you have an account (USER) as follows<br />
ssh -D PORT USER@HOST<br />
For PORT, choose some number which is not an IANA registered port. This specifies that traffic on the local PORT will be forwarded to the remote HOST. ssh will act as a [[Wikipedia:SOCKS|SOCKS]] server. Software supporting SOCKS proxy servers can simply be configured to connect to PORT on localhost.<br />
<br />
==Using a SOCKS proxy==<br />
There are two cases:<br />
*the application you want to use handles SOCKS proxies (for example Firefox) then you just have to configure it to use the proxy<br />
*the application you want to use does not handle SOCKS proxies then you can try to use [http://tsocks.sourceforge.net/ tsocks] (available in extra)</div>Phinfinityhttps://wiki.archlinux.org/index.php?title=User:Phinfinity&diff=159043User:Phinfinity2011-09-10T15:04:07Z<p>Phinfinity: Created page with "A Guy who loved Linux on first sight, and now with Arch!!"</p>
<hr />
<div>A Guy who loved Linux on first sight, and now with Arch!!</div>Phinfinityhttps://wiki.archlinux.org/index.php?title=Pm-utils&diff=159042Pm-utils2011-09-10T15:01:20Z<p>Phinfinity: Added hook ordering convention from man-page.</p>
<hr />
<div>[[Category:Power management (English)]]<br />
{{i18n|pm-utils}} {{DISPLAYTITLE:pm-utils}}<br />
{{Article summary start}}<br />
{{Article summary text|Describes installing, configuring, using and troubleshooting pm-utils, the new suspend and powerstate setting framework.}}<br />
{{Article summary heading|Related articles}}<br />
{{Article summary wiki|Uswsusp}}<br />
{{Article summary wiki|Tuxonice}}<br />
{{Article summary end}}<br />
'''pm-utils''' is the new suspend and powerstate setting framework. It is designed to replace such scripts as those provided by the {{Codeline|powersave}} package.<br />
<br />
It is usually used by upower to execute the various hacks needed to work around bugs in drivers and subsystems that are not yet aware of suspend. It is easily extensible by putting custom hooks into a directory, which can either be done by the system administrator or those hooks can be part of a package, especially if this package needs special attention during a system suspend or power state transition.<br />
<br />
A lesser known feature is one that mimmicks toggling done by [[Laptop Mode Tools]], although the responsible scripts have been deleted from the Arch Linux package.<br />
<br />
Used in conjunction with the [[cpufrequtils]] package, notebook (and desktop) owners are provided with a complete power management suite.<br />
<br />
== Installation ==<br />
<br />
The {{Codeline|pm-utils}} package is now available from the [http://www.archlinux.org/packages/search/?q=pm-utils Extra] repository:<br />
# pacman -S pm-utils<br />
<br />
{{note|If you run into issues when resuming video, it might be necessary to also sync {{Codeline|vbetool}} from [extra].}}<br />
<br />
{{note|If you are starting from a clean install, make sure that you have {{Codeline|acpi}} installed.}}<br />
<br />
== Basic Configuration ==<br />
=== Hibernation (suspend2disk) ===<br />
In order for suspend2disk (hibernate) to work, we need to edit {{Filename|/boot/grub/menu.lst}} as root and add '''resume=/path/to/swap/drive''' (e.g. {{Filename|/dev/sda2}}) to the kernel options, for example:<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,0)<br />
kernel /vmlinuz26 root=/dev/sda3 '''resume=/dev/sda2''' ro vga=0<br />
initrd /kernel26.img<br />
<br />
Raid swap example:<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,0)<br />
kernel /vmlinuz26 root=/dev/md2 resume=/dev/md0 ro md=0,/dev/sda2,/dev/sdb2 md=2,/dev/sda5,/dev/sdb5 vga=773<br />
initrd /kernel26.img<br />
<br />
If you want to use the UUID of the device instead then use the following example (The UUID itself can be found out by using the blkid command as root.):<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,0)<br />
kernel /vmlinuz26 cryptdevice=/dev/sda2:main root=/dev/mapper/main-root resume=/dev/disk/by-uuid/1d893194-b151-43cd-a89e-6f89bd8b9f99 ro<br />
initrd /kernel26.img<br />
<br />
When the machine is placed into hibernation, it will now move all data from RAM to the swap partition... you ''did'' make your swap partition large enough to hold your RAM data, right?<br />
<br />
For '''GRUB2''', adjust the "linux" (kernel) line in {{Filename|/boot/grub/grub.cfg}} of your OS in question. Here my example (obviously, change the resume path to your swap partition):<br />
linux /boot/vmlinuz26 root=/dev/disk/by-uuid/818dc030-8108-4428-8859-b73a58d0b0f3 ro quiet '''resume=/dev/sda2'''<br />
<br />
For discussion regarding permanence, please refer to [https://bbs.archlinux.org/viewtopic.php?pid=886789#p88678 this thread].<br />
<br />
Even if your swap partition is smaller than RAM, you still have a big chance in hibernating successfully. According to [http://www.mjmwired.net/kernel/Documentation/power/interface.txt kernel documentation], ''{{Filename|/sys/power/image_size}} controls the size of the image created by the suspend-to-disk mechanism'', which has a default value of 500M. ''The suspend-to-disk mechanism will do its best to ensure the image size will not exceed that number.'' You may either decrease it due to a small swap partition or increase it in purpose of possible hibernation speed up.<br />
<br />
{{Warning|You may have to add the {{Codeline|resume}} hook to {{Filename|/etc/mkinitcpio.conf}}, see [[Pm-utils#Resume_Hook|below]]!}}<br />
<br />
=== Suspend/Hibernate as regular user ===<br />
<br />
Three methods are available to suspend without the need for a root password: using HAL, using UPower, and giving the user permissions with visudo.<br />
<br />
==== UPower method ====<br />
<br />
Install Upower<br />
<pre><br />
# pacman -S upower<br />
</pre><br />
<br />
To suspend to RAM:<br />
<br />
<pre><br />
$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" \<br />
/org/freedesktop/UPower org.freedesktop.UPower.Suspend<br />
</pre><br />
<br />
To suspend to disk (hibernate):<br />
<br />
<pre><br />
$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" \<br />
/org/freedesktop/UPower org.freedesktop.UPower.Hibernate<br />
</pre><br />
<br />
==== User Permission Method ====<br />
<br />
Because the {{Codeline|pm-utils}} scripts must be run as root, you may want to make the scripts accessible to normal users by running sudo without the root password. To do so, edit the {{Filename|/etc/sudoers}} file with {{Codeline|visudo}}, for example:<br />
<br />
# visudo<br />
<br />
add the following lines, replacing ''username'' with your own:<br />
<br />
''username'' ALL = NOPASSWD: /usr/sbin/pm-hibernate<br />
''username'' ALL = NOPASSWD: /usr/sbin/pm-suspend<br />
<br />
save and exit visudo<br />
<br />
Or you can enable it for a group, using the following lines, of course replacing ''group'':<br />
<br />
''%group'' ALL = NOPASSWD: /usr/sbin/pm-hibernate<br />
''%group'' ALL = NOPASSWD: /usr/sbin/pm-suspend<br />
<br />
Note: These must come after any user privilege specifications, e.g., "username ALL=(ALL) ALL", or they will not work.<br />
<br />
You can now run the scripts without a password by simply typing:<br />
<br />
$ sudo pm-hibernate<br />
<br />
or <br />
<br />
$ sudo pm-suspend<br />
<br />
Also, add yourself to the ''power'' group so that way using things like applets to do suspend will work. If you do not do this, when you try to use suspend though things like the gnome shutdown applet to suspend/hibernate your computer will just play a very annoying loud triple beep and lock the screen.<br />
<br />
# gpasswd -a ''username'' power<br />
<br />
You should now be able to use gnome power management tools (and kpowersave?) to automatically suspend/hibernate when doing things like closing the laptop lid, running low on battery power etc...<br />
<br />
== Advanced Configuration ==<br />
The main configuration file is {{Filename|/usr/lib/pm-utils/defaults}}. You ''should not edit this file'', since after a package update it might be overwritten with the default settings. Put your config file into {{Filename|/etc/pm/config.d/}} instead.<br />
You can just put a simple text file with<br />
SUSPEND_MODULES="button uhci_hcd"<br />
named {{Filename|modules}} or {{Filename|config}} into {{Filename|/etc/pm/config.d}} and it will override the settings in the system-wide configuration file.<br />
<br />
=== Available Variables for use in config files ===<br />
SUSPEND_MODULES="button" # the list of modules to be unloaded before suspend<br />
SLEEP_MODULE="tuxonice uswsusp kernel" # The default sleep/wake systems to try<br />
HIBERNATE_MODE="shutdown" # forces the system to shutdown rather than reboot<br />
<br />
=== Disabling a hook ===<br />
If a hook is run which you do not like or which you think is not useful or even harmful, we would appreciate a bug report for that.<br />
You can however easily disable hooks by just creating an empty file corresponding to the hook in {{Filename|/etc/pm/sleep.d/}}. Say you want to disable the hook {{Filename|/usr/lib/pm-utils/sleep.d/45pcmcia}}, you can do this easily by calling<br />
# touch /etc/pm/sleep.d/45pcmcia<br />
Do not set the executable bit on that dummy-hook.<br />
<br />
==== Alternative method ====<br />
Create a file in {{Filename|/etc/pm/config.d}} with the modules you want to blacklist in the HOOK_BLACKLIST variable.<br />
For example, to manage power saving yourself, use:<br />
HOOK_BLACKLIST="intel-audio-powersave journal-commit laptop-mode pcie-aspm sata_alpm sched-powersave"<br />
<br />
=== Creating your own hooks ===<br />
If you want to do something specific to your setup during suspend / hibernate, then you can easily put your own hook into {{Filename|/etc/pm/sleep.d}}. The hooks in this directory will be called in alphabetic order during suspend (that is the reason their names all start with 2 digits, to make the ordering explicit) and in the reverse order during resume. The general convention to be followed on number ordering is:.<br />
*00 - 49 : User and most package supplied hooks. If a hook assumes that all of the usual services and userspace infrastructure is still running, it should be here.<br />
<br />
*50 - 74 : Service handling hooks. Hooks that start or stop a service belong in this range. At or before 50, hooks can assume that all services are still enabled.<br />
<br />
*75 - 89 :Module and non-core hardware handling. If a hook needs to load/unload a module, or if it needs to place non-video hardware that would otherwise break suspend or hibernate into a safe state, it belongs in this range. At or before 75, hooks can assume all modules are still loaded.<br />
<br />
*90 - 99 :Reserved for critical suspend hooks.<br />
<br />
<br />
I am showing a pretty useless demonstration hook here, that will just put some informative lines into your log file:<br />
<br />
#!/bin/bash<br />
case $1 in<br />
hibernate)<br />
echo "Hey guy, we are going to suspend to disk!"<br />
;;<br />
suspend)<br />
echo "Oh, this time we are doing a suspend to RAM. Cool!"<br />
;;<br />
thaw)<br />
echo "oh, suspend to disk is over, we are resuming..."<br />
;;<br />
resume)<br />
echo "hey, the suspend to RAM seems to be over..."<br />
;;<br />
*) echo "somebody is calling me totally wrong."<br />
;;<br />
esac<br />
<br />
Put this into {{Filename|/etc/pm/sleep.d/66dummy}}, do a {{Codeline|chmod +x /etc/pm/sleep.d/66dummy}} and it will spew some useless lines during suspend / resume.<br />
<br />
{{Warning|All the hooks run as user root. This means that you need to be careful when creating temporary files, check that the PATH variable is set correctly, etc. to avoid security problems.}}<br />
<br />
== How it Works ==<br />
The concept is quite easy: the main script ({{Codeline|pm-action}}, called via symlinks as either {{Codeline|pm-suspend}}, {{Codeline|pm-hibernate}} or {{Codeline|pm-suspend-hybrid}}) executes so-called "hooks", executable scripts, in the alphabetical sorted order with the parameter {{Codeline|suspend}} (suspend to RAM) or {{Codeline|hibernate}} (suspend to disk).<br />
Once all hooks are done, it puts the machine to sleep. After the machine has woken up again, all those hooks are executed in reverse order with the parameter {{Codeline|resume}} (resume from RAM) or {{Codeline|thaw}} (resume from disk).<br />
The hooks perform various tasks, such as preparing the bootloader, stopping the Bluetooth subsystem, or unloading of critical modules.<br />
<br />
Both pm-suspend and pm-hibernate are usually called from HAL, initiated by desktop applets like {{Codeline|gnome-power-manager}} or {{Codeline|kpowersave}}.<br />
<br />
{{Box Note|{{Codeline|suspend-hybrid}} is a placeholder right now -- it is not completely implemented.}}<br />
<br />
There is also the possibility to set the machine into high-power and low-power mode, the command {{Codeline|pm-powersave}} is used with an additional parameter of {{Codeline|true}} or {{Codeline|false}}. It works basically the same as the suspend framework.<br />
<br />
The hooks for suspend are placed in<br />
* {{Filename|/usr/lib/pm-utils/sleep.d}} (distribution / package provided hooks)<br />
* {{Filename|/etc/pm/sleep.d}} (hooks added by the system administrator)<br />
<br />
The hooks for the power state are placed in <br />
* {{Filename|/usr/lib/pm-utils/power.d}} (distribution / package provided hooks)<br />
* {{Filename|/etc/pm/power.d}} (hooks added by the system administrator)<br />
<br />
Hooks in {{Filename|/etc/pm/}} take precedence over those in {{Filename|/usr/lib/pm-utils/}}, so the system administrator can override the defaults provided by the distribution.<br />
<br />
== Troubleshooting ==<br />
If suspend or hibernate did not work correctly, you will probably find some information in the log file '''{{Filename|/var/log/pm-suspend.log}}''', for example which hooks were run and what the output of them was.<br />
<br />
=== Resume Hook ===<br />
<br />
It has been suggested that some systems, including those using [[LVM]], require the {{Codeline|resume}} hook be added to the initrd image, otherwise the kernel will '''not''' resume. You can see if this is happening if the hibernation works fine, no error messages appear in {{Filename|/var/log/pm-suspend.log}} and the kernel logs the following message: "PM: Hibernation image not present or could not be loaded." To add the resume hook, edit {{Filename|/etc/mkinitcpio.conf}} as root and add {{Codeline|resume}} to the HOOKS array:<br />
HOOKS="base udev autodetect ide scsi sata lvm2 '''''resume''''' filesystems "<br />
<br />
Note that this is an example, and your HOOKS array may look different.<br />
<br />
{{Codeline|resume}} must be placed ''after'' 'ide', 'scsi', 'sata' and/or 'lvm2', but before 'filesystems'. Of course, there has to be an appropriate 'resume' file in {{Filename|/lib/initcpio/hooks}}, but it should already be there, as it is part of the {{Codeline|mkinitcpio}} package.<br />
<br />
Finally, you must rebuild the initrd image for these changes to take effect:<br />
<br />
# mkinitcpio -p linux<br />
<br />
{{Box Note|If you use a custom kernel then you might have to change the value of the '-p' option.}}<br />
<br />
=== Set UUID === <br />
<br />
If you experience segmentation faults that might result in an unresponsive system and missing keys then try to set the UUID in the resume-path in {{Filename|/boot/grub/menu.lst}} as explained [[#Hibernation (suspend2disk)|above]].<br />
<br />
=== Reboot instead of resume from suspend ===<br />
<br />
This problem started when saving NVS area during suspend was introduced (in 2.6.35-rc4) (http://www.spinics.net/lists/linux-acpi/msg29521.html). However, it is known that this mechanism does not work on all machines, so the kernel developers allow the user to disable it with the help of the {{Codeline|1=acpi_sleep=nonvs}} kernel command line option. This option could be pass to the kernel through GRUB options by editing the file {{Filename|/boot/grub/menu.lst}} (GRUB 0.97) on the ''kernel'' line.<br />
<br />
=== Resume from Suspend shuts down instead of wake up ===<br />
On an Acer Aspire AS3810TG, resuming from suspend shuts down the computer instead of waking it up. If you experience a similar issue, try passing the parameter {{Codeline|1=i8042.reset=1}} to your kernel. In GRUB, the line in {{Filename|/boot/grub/menu.lst}} should be something like this:<br />
<pre>kernel /vmlinuz26 root=/dev/vg00/root resume=/dev/vg00/swap i8042.reset=1 ro</pre><br />
<br />
Although I have not tested this, you could also set this parameter live without having to restart by doing:<br />
<pre># sysctl -e -w i8042.reset=1</pre><br />
<br />
=== Blank screen when waking from suspend ===<br />
<br />
Some laptops (e.g Dell Inspiron Mini 1018) will just show a black screen with no backlight after resuming from suspend. If this happens to you, try going into the BIOS of the laptop and disabling Intel SpeedStep if it is present.<br />
<br />
=== VirtualBox problems ===<br />
<br />
The VirtualBox kernel modules cause {{Codeline|pm-suspend}} and {{Codeline|pm-hibernate}} to fail on some laptops. (See [https://bbs.archlinux.org/viewtopic.php?id=123354 this discussion]). Instead of suspending or hibernating, the system freezes and indicator LED's blink (the suspend indicator in the case of ThinkPads and the Caps Lock and Scroll Lock indicators in the case of the MSI Wind U100). The pm-suspend and pm-hibernate logs appear normal.<br />
<br />
The problem can be fixed by removing the modules before suspension or hibernation and reloading them afterwards. That can be accomplished through a script:<br />
<br />
#!/bin/sh<br />
<br />
rmmod vboxdrv<br />
pm-hibernate<br />
modprobe vboxdrv<br />
<br />
== Tips and Tricks / FAQ ==<br />
=== Triggering suspend manually ===<br />
If you want to trigger suspend manually for debugging, without using HAL and other frameworks, call '''{{Codeline|pm-suspend}}''' or '''{{Codeline|pm-hibernate}}''' as root.<br />
=== Automatically deactivate kwin compositing before suspend===<br />
<br />
At the moment, pm-suspend fails to resume with garbled screen when you resume from suspend with active AIGLX clients, such as kwin compositing (only ati-catalyst?).<br />
To automatically deactivate kwin compositing add a new hook under {{Filename|/etc/pm/sleep.d/00togglecompositing}} with this content:<br />
<br />
#!/bin/bash<br />
USER=`finger|grep '*:0'|grep -o '^\w*'`<br />
DBUS_SESSION_BUS_ADDRESS=`grep -o 'DBUS_SESSION_BUS_ADDRESS=.*' /home/$USER/.dbus/session-bus/*|sed s/DBUS_SESSION_BUS_ADDRESS=//`<br />
case $1 in<br />
hibernate)<br />
;;<br />
suspend)<br />
if `sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus org.kde.kwin /KWin compositingActive`;<br />
then<br />
sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus org.kde.kwin /KWin toggleCompositing;<br />
sleep 1<br />
fi<br />
;;<br />
thaw)<br />
;;<br />
resume)<br />
sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus org.kde.kwin /KWin toggleCompositing;<br />
;;<br />
*) echo "somebody is calling me totally wrong."<br />
;;<br />
esac<br />
<br />
I do not know if it is very secure or if it can be done simpler. Feel free to add better versions.<br />
<br />
If you are having trouble getting the above script to work, you can try my version. This version removes the use of finger, and fixes the DBUS_SESSION_BUS_ADDRESS resolution which did not work for me (though my solution is admittedly quite dirty). Simply replace the first three lines with:<br />
<br />
#!/bin/bash<br />
USER=`who | grep ':0' | grep -o '^\w*' | head -n1`<br />
. /home/$USER/.dbus/session-bus/*<br />
<br />
=== Using another sleep backend (like uswsusp) ===<br />
Create a file with a SLEEP_MODULE variable, like this:<br />
$ cat /etc/pm/config.d/module <br />
SLEEP_MODULE=uswsusp<br />
To list available modules, use:<br />
$ pacman -Ql pm-utils | grep module.d<br />
<br />
=== Having the hd power management level automatically set again on resume ===<br />
Do it like this:<br />
$ cat /etc/pm/sleep.d/50-hdparm_pm <br />
#!/bin/dash<br />
<br />
if [ -n "$1" ] && ([ "$1" = "resume" ] || [ "$1" = "thaw" ]); then<br />
hdparm -B 254 /dev/sda > /dev/null<br />
fi<br />
<br />
Then:<br />
$ sudo chmod +x /etc/pm/sleep.d/50-hdparm_pm<br />
<br />
If the above bash script fails the work, the following may instead:<br />
#!/bin/sh<br />
<br />
. "${PM_FUNCTIONS}"<br />
case "$1" in<br />
thaw|resume)<br />
sleep 6<br />
hdparm -B 254 /dev/sda<br />
;;<br />
*)<br />
;;<br />
esac<br />
exit $NA<br />
<br />
Lower -B switch values may be effective. See [[hdparm]].<br />
<br />
=== Restarting the mouse ===<br />
On some laptops the mouse will hang after an otherwise successful suspend. One way to remedy this is to force a reinit of the PS/2 driver (here {{Codeline|i8042}}) through a hook in {{Codeline|/etc/pm/hooks}} (see [[#Creating_your_own_hooks|hooks]])<br />
<br />
#!/bin/sh <br />
echo -n "i8042" > /sys/bus/platform/drivers/i8042/unbind<br />
echo -n "i8042" > /sys/bus/platform/drivers/i8042/bind<br />
<br />
=== It seems to not do anything / where is the logfile ===<br />
If it seem to not do anything when called via the desktop applets, then try to call {{Codeline|pm-suspend}} or {{Codeline|pm-hibernate}} [[#Triggering_suspend_manually|manually from a root shell in a terminal]]. Maybe you will already get some output that will point you to the problem.<br />
The suspend scripts also write a [[#Troubleshooting|logfile at '''{{Codeline|/var/log/pm-suspend.log}}''']].<br />
<br />
=== Add sleep modes to Openbox menu ===<br />
Openbox users can add the new scripts as additional shutdown options within the Openbox menu by adding the items to a new or existing sub-menu in {{Codeline|~/.config/openbox/menu.xml}}, for example:<br />
<menu id="64" label="Shutdown"><br />
<item label="Lock"> <action name="Execute"> <execute>xscreensaver-command -lock</execute> </action> </item><br />
<item label="Logout"> <action name="Exit"/> </item><br />
<item label="Reboot"> <action name="Execute"> <execute>sudo shutdown -r now</execute> </action> </item><br />
<item label="Poweroff"> <action name="Execute"> <execute>sudo shutdown -h now </execute> </action> </item><br />
'''''<item label="Hibernate"> <action name="Execute"> <execute>sudo pm-hibernate</execute> </action> </item>'''''<br />
'''''<item label="Suspend"> <action name="Execute"> <execute>sudo pm-suspend</execute> </action> </item>'''''<br />
</menu><br />
<br />
=== Blank screen issue ===<br />
Some users have reported having issues with their laptops not resuming after a suspend or hibernate. This is due to the autodetect HOOK. This can be disabled using the same method for adding the resume HOOK. Just remove autodetect from the list and follow the steps to build the new image. See [[#Resume Hook|Resume Hook]] for more details on building the new image.<br />
<br />
=== Handling "sleep" and "power" buttons ===<br />
"Sleep" and "power" buttons are handled by {{Codeline|acpid}} in {{Filename|/etc/acpi/handler.sh}} (see "button/power" and "power/sleep" entries). You may want to substitute the default actions with calls to pm-suspend and pm-hibernate.<br />
<br />
== Other Resources ==<br />
* [https://wiki.ubuntu.com/UnderstandingSuspend Understanding Suspend] - Ubuntu article explaining how suspend-to-ram works<br />
*[[Cpufrequtils]] - CPU Frequency Scaling and CPU Power schemes<br />
*[[Acpid]] - daemon for delivering ACPI events.<br />
<br />
== Credits ==<br />
''This wiki entry was originally sourced from the [http://en.opensuse.org/Pm-utils OpenSUSE Wiki]{{Linkrot|2011|09|05}} (Licensed under GPL). A big thank you goes to the {{Codeline|pm-utils}} developers and documenters for their time.''</div>Phinfinity