https://wiki.archlinux.org/api.php?action=feedcontributions&user=Foutrelis&feedformat=atomArchWiki - User contributions [en]2024-03-28T16:16:37ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=User_talk:Nl6720&diff=761861User talk:Nl67202022-12-22T19:12:41Z<p>Foutrelis: Undo revision 761860 by Foutrelis (talk)</p>
<hr />
<div>__NOINDEX__{{Lowercase title}}<br />
<br />
== Improving style on external github links ==<br />
<br />
This might be a question better directed at the bureaucrats or site admins, but I'm curious as to your opinion on this as one of the most active maintainers of the site, and you seem to be particularly involved when it comes to link styling. According to [[Help:Editing#Links]], "It is often more useful to give the link an alternative label rather than displaying the URL." (regarding external site links). However, I noticed that on any section that lists a number of applications, such as [[List of applications]], virtually every single one of the external links uses the URL instead of an alternative label.<br />
<br />
For sites that are specific to an individual application, I think it is appropriate to show the full url. However, for common sites that are used as a homepage for a number of applications, such as github repositories, it might be a better styling practice to set an alternative label like "github" or "github repository". [[Help:Editing#Links]] is not particularly strict on external links, but I personally think it would look significantly cleaner this way. Let me know what you think, I'd like to potentially bring this up with others as well. Also let me know if there's someone specific (such as a bureaucrat or admin that specializes in styling) I should discuss this with.<br />
<br />
If the others are on board with this suggestion, I'd be more than willing to start applying this to a number of different pages. I think it would make for a good starter project for me to work on. As a long term aspiration of sorts, I am interested in prospect of eventually becoming a maintainer (I know that I have a long ways to go). I think it'd be a great way to improve my skills at technical documentation, while contributing to one of the most useful sites for linux documentation. -- [[User:Aeros167|Aeros167]] ([[User talk:Aeros167|talk]]) 21:32, 9 June 2019 (UTC)<br />
<br />
:The [[List of applications]] page uses [[Template:App]], so you can propose changes in [[Template talk:App]] or [[Help talk:Style]]. Personally I don't agree to this change, I don't see a need to hide the URL by using a link title in [[Template:App]]. If the link was in a block of text, then I could agree to it, but not when specifically listing the URL. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 07:20, 10 June 2019 (UTC)<br />
<br />
::Ah no problem, it was just an idea. If the current template is already well established with a fairly recent dedicated page, it will likely stay the same. I'll keep that in mind though for replacing the URL with the substitute if it's in a block of text, I find the text substitutions to be quite useful within those contexts especially. Are there any other frequently used Template pages that would be useful to be aware of? I checked [[Template]] (similar to how [[Help]] directs to all pages in the help category) but that seems to be a dead end. -- [[User:Aeros167|Aeros167]] ([[User talk:Aeros167|talk]]) 09:40, 10 June 2019 (UTC)<br />
<br />
:::AFAIK templates are not categorized so you can find a list of them in [[Special:UncategorizedTemplates]]. A more useful list, separating them by usage, is available in [[Help:Template#List of templates]]. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 10:13, 10 June 2019 (UTC)<br />
<br />
== Is there any reason why you chose to remove the note about ISO Image mode? ==<br />
<br />
https://wiki.archlinux.org/index.php/USB_flash_installation_media#Using_Rufus<br />
<br />
The note that says DD Image mode has to be used is not correct. ISO image mode will work for most people. You only need to use DD Image mode if the drive doesn't boot.<br />
[[User:Tonij|Tonij]] ([[User talk:Tonij|talk]]) 17:12, 2 August 2019 (UTC)<br />
<br />
:DD Image mode writes the iso to the drive as it was intended by Arch developers while using ISO image mode means trusting that Rufus correctly copies the bootloader configuration. Any messing with the boot setup is bound to result in some incompatibilities, which is exactly what happens with the crap known as UNetbootin, luckily Rufus has not deteriorated to such extent. I restored [[Special:Diff/578638]] in [[Special:Diff/578856]]. Frankly, I'm not a fan of Rufus since it keeps hiding useful features. [https://github.com/pbatard/rufus/issues/1148][https://github.com/pbatard/rufus/wiki/FAQ#why-doesnt-rufus-create-a-windows-installation-usb-that-can-be-booted-in-dual-biosuefi-mode] -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 18:51, 2 August 2019 (UTC)<br />
<br />
Also if someone is using GPT, they never had any intention of booting in BIOS. What is the point of saying that they should use MBR in that situation? [[User:Tonij|Tonij]] ([[User talk:Tonij|talk]]) 17:22, 2 August 2019 (UTC)<br />
<br />
:That's an unfounded claim. The installation media should be bootable for both BIOS and UEFI systems and that means using MBR in Rufus. Any other specialization is outside the scope of the [[USB flash installation media]] article. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 18:51, 2 August 2019 (UTC)<br />
<br />
Read this: https://www.reddit.com/r/ManjaroLinux/comments/b5fzj4/make_sure_you_burned_the_iso_in_dd_mode/ejdcz9y?utm_source=share&utm_medium=web2x [[User:Tonij|Tonij]] ([[User talk:Tonij|talk]]) 17:32, 2 August 2019 (UTC)<br />
<br />
== dm-crypt/Encrypting an entire system ==<br />
<br />
About the revert: Ok, thanks. I also had problems with some kind of "escape template-breaking characters" that I couldn't solve before you reverted very fast (so I was looking into changing something wrong with the link, but you very too fast). In the future, there will be a release where LUKS2 can be used... Then the wiki could be updated, I guess. I wasn't sure about how often people updated the wiki (and am not used to this, one time has to be the first), but it seems very frequently you guys update the wiki and thanks a lot for that. I also didn't remove the LUKS1-warning, because some people will use old versions for a long time. Thanks and I'll leave it here until we have a release and people begin using that new release with LUKS2-support (but then you or someone else probably updates the wiki before). Cheers! :-) [[User:Newsboost|Newsboost]] ([[User talk:Newsboost|talk]]) 17:51, 26 January 2020 (UTC)<br />
<br />
:The template-breaking character issue was because of {{ic|1==}} in the Phoronix URL. Since the URL was in [[Template:Warning]], normally you would need to escape it with e.g. {{ic|<nowiki>{{Warning|1=text text [https://www.phoronix.com/scan.php?page=news_item&px=GRUB-Boots-LUKS2-Disk-Encrypt]}}</nowiki>}}, but since it starts with a list, it becomes a little more annoying:<br />
{{bc|<nowiki><br />
{{Warning|1&#61;&lt;nowiki&gt;&lt;/nowiki&gt;<br />
* list item<br />
* list item [https://www.phoronix.com/scan.php?page=news_item&px=GRUB-Boots-LUKS2-Disk-Encrypt]<br />
}}<br />
</nowiki>}}<br />
:Without {{ic|&lt;nowiki&gt;&lt;/nowiki&gt;}} the first item would not get parsed as a list item.<br />
:About GRUB, when a new release with LUKS2 support lands in the stable repos, feel free to update the warnings (or remove them if GRUB miraculously gains Argon2 support), until then I think that the dm-crypt pages should retain the current warnings. I'm certain I'm not the only one with such opinion.<br />
:That said, this does not prevent you from editing [[GRUB#Encrypted /boot]]. Currently it does not give a clear solution for using LUKS2, but only hints about PBKDFs. It ''should'' be possible to use GRUB from git with LUKS2 created with the {{ic|cryptsetup luksFormat --pbkdf pbkdf2}}, but I couldn't test it since {{AUR|grub-git}} didn't build for me when I tried it a few weeks ago.<br />
:Anyway, don't get discouraged from editing the wiki just because one of your edits was undone :) <br />
: -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 07:11, 27 January 2020 (UTC)<br />
::Yeah, frontend web-devel isn't really my thing, this template-breaking character stuff confused me a lot. So thanks a lot for explaining some details about this, I had major challenges "fixing" that broken template-stuff. About GRUB and LUKS2: I think I'll also skip the grub-git-method (I don't want to risk anything, but after a new release has been out for some weeks it'll be safer to test). I've been so unlucky for the past year that I for various reasons had to reinstall Arch Linux and therefore have been through the encrypted boot-procedure (too) many times recently. I takes me around 30 hours to fully setup an Arch Linux to my taste, incl. getting packages setup, window managers etc up and running so I hope I won't have to do it too many times again in year 2020 (this time I'll take an image with clonezilla and hopefully that can be used to save time in the future). I use luks1 for boot partition /boot, which after unlocking, unlocks my root-partition which is actually contained in a luks2-container with detached header and LVM inside. So I guess I'm not a normal user, anyway, maybe other people could use that procedure I've gathered and am using with the detached header... I'll watch out and hopefully soon I can use luks2 (and maybe detached header, e.g. on USB-stick) for the boot-partition. Once GRUB with LUKS2-support is stable, I'll see if I can contribute a bit about the detached header-setup, which I think is really nice. There are some details I'm not fully into, e.g. Argon2 and pbkdf2 but I'll see if I can contribute somewhere in the future, when something strikes my eyes. So I fully understand you, I think, this just serves as a bit of practice for me so I better know how things work the next time. Thanks a lot for your feedback, I'll have that in mind when I in the future browse and use the wiki! [[User:Newsboost|Newsboost]] ([[User talk:Newsboost|talk]]) 20:32, 27 January 2020 (UTC)<br />
<br />
:::Just in case you don't know, the setup for LUKS with a detached header is documented in [[dm-crypt/Specialties#Encrypted system using a detached LUKS header]]. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 10:26, 28 January 2020 (UTC)<br />
<br />
::::I'm not sure if I've seen that (can't remember). I usually have a folder with text-files that contain instructions for how to setup things and once I've done things a few times, that becomes my only source of "truth" or information (unless a new version of something causes unforeseen problems, in which case I try to solve it and update the instructions again till next time). That being said, I think the arch linux wiki is a great source and many of my own rewritten instructions are based on info from the wiki in some form (sometimes I extend things with detailed examples, I think the wiki isn't suited for that). I'll have in mind that if I notice something on the wiki that other users could benefit from, I'll see if I can contribute. I also copied your comment about the template-stuff to my own https://wiki.archlinux.org/index.php/User_talk:Newsboost (+ a reference to the broken url), so I guess I can always easily find that info again, if something similar appears, i.e. I would then be less dependent on remembering where to find the this conversation)... Now I went through the process of editing here a few times, I think I'll feel more comfortable the next time, thanks :-) [[User:Newsboost|Newsboost]] ([[User talk:Newsboost|talk]]) 17:01, 28 January 2020 (UTC)<br />
<br />
== F2FS warning ==<br />
<br />
Hello, I see you reverted my F2FS warning. Fair point for the doc. I have this link [https://web.archive.org/web/20200925120546/https://archived.forum.manjaro.org/t/record-fsync-data-failed-on-f2fs-file-system-how-to-fix-foregt-the-help-i-reinstalled-its-just-easier/121051] which gives a lot of details on what is going on. Basically, if you shut down your system improperly at the wrong time, F2FS will be corrupt <i>beyond repair</i>. Even {{ic|fsck.f2fs}} will error out. I had found a weird, temporary fix allowing to mount the filesystem read only and even to allow the system to boot for a day or so. I've got a write-up (in French) about that on my blog ([https://lesviallon.fr/p/f2fs-record-fsync-data-failed-469431])<br />
This has happened to several users before, and most smartphone manufacturers, Samsung itself included (they created F2FS), don't use it on their phones because of the stability issues. Do you think this data is sufficient? [[User:Aviallon|Aviallon]] ([[User talk:Aviallon|talk]]) 12:34, 25 September 2020 (UTC)<br />
<br />
:I didn't doubt that the issue with F2FS is real. I've had my own issues with this file system ({{Bug|63839}}) which made me switch to [[XFS|a different one]]. It's just that without any sort of reference that warning was fairly useless. Your links look good and there's even a kernel bugzilla link in you blog. If you can create a section in [[F2FS]] based on you blog post (adjusted for the wiki's style, of course) then it would be perfect :) -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 13:23, 25 September 2020 (UTC)<br />
<br />
::Understood! I will do that right away! Does that mean I should only put this information in Known Issues, and that I shouldn't put a warning like with [[Btrfs]] ? [[User:Aviallon|Aviallon]] ([[User talk:Aviallon|talk]]) 13:56, 25 September 2020 (UTC)<br />
<br />
:::You should definitely document your issue in "Known issues". Now whether it should be also linked from a warning in the intro, I'd say go by the consensus of [[Talk:F2FS#Adding warning about F2FS potentially being unsafe?]] -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 14:05, 25 September 2020 (UTC)<br />
<br />
== TPM/Data-at-rest encryption with LUKS ==<br />
<br />
Hello, I'm curious about a recent edit you made to [[TPM#Data-at-rest_encryption_with_LUKS]]. I am the one who wrote the part that you edited, but I'm fine with most of your changes. The only thing I take issue with is the statement "This means that access to data is not protected in case the hardware gets stolen." This seems to imply that if the hardware is stolen, the data is as good as unencrypted. Given that full disk encryption is mostly useful in the case that the hardware is stolen, this implies that using a TPM to unlock your drive is as good as not encrypting it at all, which I don't think is fair to say.<br />
<br />
Cold boot attacks, bus sniffing attacks, and other potential ways of circumventing a TPM are not trivial to perform, and are no comparison at all to the ease with which one can access an unencrypted drive. Furthermore, in the (admittedly unlikely) case where an attacker steals only the drive and not the entire computer, the fact that a TPM was set up to unlock the drive won't help them at all. Perhaps this could be changed to something like "This increases the number of options an attacker has to attempt to steal the data," or even "This makes the data significantly less secure."<br />
<br />
Thoughts?<br />
<br />
[[User:Forgonewarrior|Forgonewarrior]] ([[User talk:Forgonewarrior|talk]]) 08:37, 10 April 2021 (UTC)<br />
<br />
:By "hardware" I meant the whole PC not just the drive. If TPM automatically unlocks the the LUKS encrypted root volume on boot, then the thief just needs to power on the PC to get access to the data. So yes, it is almost as good as unencrypted. Getting passed user login is out of scope, and, while I can't think of a way to sidestep it, relying on it for data safety would be naive. See also https://github.com/systemd/systemd/issues/19229. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 08:46, 10 April 2021 (UTC)<br />
<br />
== Konsole true color ==<br />
<br />
I have seen your edit in [[Konsole]]. You changed {{ic|1=TERM=konsole-256color}} to {{ic|1=TERM=konsole-direct}}. I was the one who added that section.<br />
<br />
It seems {{ic|1=TERM=konsole-direct}} is broken. {{ic|vim}} and {{ic|nvim}} don't display correctly and {{ic|vis}} simply segfaults.<br />
<br />
But you were right {{ic|1=TERM=konsole-256color}} is not for true color.<br />
<br />
I think we should undo your last edit and change the section title from "True-color programs do not display correctly" to "Some color programs do not display correctly".<br />
<br />
{{Unsigned|09:30, 17 April 2021 (UTC)|ENV25}}<br />
<br />
:From what I see, [[nvim]] with {{ic|set termguicolors}}[https://gist.github.com/XVilka/8346728] looks the same with {{ic|1=TERM=xterm-256color}}, {{ic|1=TERM=konsole-256color}} and {{ic|1=TERM=konsole-direct}}. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 13:25, 17 April 2021 (UTC)<br />
<br />
== <s>rEFInd Install Script</s> ==<br />
<br />
Hey there, I saw that you removed my edit in [[rEFInd]] about the config file location. You mentioned that the config file needs to be in {{ic|''esp''}} (i.e. /boot) instead of {{ic|''esp''/EFI/refind/}}. However, in my installation, placing the configuration file in {{ic|''esp''}} resulted in the configuration file not being loaded. It only loaded when I moved it to {{ic|''esp''/EFI/refind/}}. <br />
<br />
According to https://www.rodsbooks.com/refind/configfile.html. The configuration file needs to be in the same directory as {{ic|refind_x64.efi}}, which in my case (standard installation) was not in {{ic|''esp''}} but {{ic|''esp''/EFI/refind/}}. <br />
<br />
Have I perhaps understood the phrasing in the Wikipage wrong? If not, I think a comment on the rEFInd page would be rather helpful for others. <br />
<br />
[[User:Sunjerry019|Sunjerry019]] ([[User talk:Sunjerry019|talk]]) 18:38, 11 Jan 2022 (UTC)<br />
<br />
:In [[Special:Diff/707347]] you added text about {{ic|refind.conf}} to the paragraph that talks about {{ic|refind_linux.conf}}. I think you may be confusing the two files. {{ic|refind.conf}} (the rEFInd configuration file) needs to be in the same directory as the rEFInd EFI binary (e.g. {{ic|''esp''/EFI/rEFInd}} or {{ic|''esp''/EFI/BOOT}}) and {{ic|refind_linux.conf}} (the boot entry configuration file for autodetected kernels) needs to be in the same directory as the kernel(s) (typically {{ic|/boot}}, unless you customized {{ic|/usr/share/libalpm/scripts/mkinitcpio-install}}). -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 11:30, 12 January 2022 (UTC)<br />
:: Ahhh okay yes I was confused between the two. Thanks for the clarification! -- [[User:Sunjerry019|Sunjerry019]] ([[User talk:Sunjerry019|talk]]) 16:40, 12 Jan 2022 (UTC)<br />
<br />
== <s>"By default only root can use sudo"</s> ==<br />
<br />
Hi, the title refers to [[Special:Diff/722745/prev|this]] edit summary. Upon seeing it I was a bit stumped, but then I understood you meant that without any further configuration, sudo could only be used by the root user to change/run a command as another user, hence the change in sign. Is that it?<br />
<br />
However, how common is that use case? It is really a thing that some people install sudo but don't configure a regular user account, instead use only root and sudo when they need to do something as another user? Even on a server I can't picture this being a really common case, so I'm a bit wondering about the change here. Sure it is factually correct, but still...<br />
<br />
The only guideline I could find about it is [[Help:Style#Command line text]] and it is pretty ambivalent, stating "The only exception [to never using sudo with #] is when sudo is used with the -u flag: in this case the prompt can match the others of the same code block, or default to $". But here we have both in the preceding examples, and since it is exceedingly rare to see sudo used with a # I think it'd be better to just leave it at the $ that was used up until that point.<br />
<br />
--[[User:Neitsab|Neitsab]] ([[User talk:Neitsab|talk]]) 22:37, 15 March 2022 (UTC)<br />
<br />
:Yes, I meant sudo "without any further configuration" with that edit summary. And you're correct that it goes against [[Help:Style#Command line text]]. I've now undid that edit. Sorry about that! By being a bad example I've now tarnished the reputation of the ''monkey see monkey do'' wiki editor self-training program :( -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 16:06, 16 March 2022 (UTC)<br />
<br />
== "Excellent work" ==<br />
<br />
Very good work on the mediawiki 1.37.2 update, thanks! [[User:😎|😎]] ([[User talk:😎|talk]]) 18:17, 9 April 2022 (UTC)<br />
<br />
== <s>Do you think using the AUR to install GNOME extensions is considered correct?</s> ==<br />
<br />
[[GNOME#Extensions]] has always been inconsistent, people keep making edits that contradict with each other. One of which is installing GNOME from the AUR. It works and it makes it easy to update when you're using an AUR helper, but a concrete answer is still needed so I could know what changes to make to the section. I already opened a discussion in [[Talk:GNOME]] (the discussion could get no spotlight, just like many others), but a word from a Wiki admin who knows all about this would be very appreciated.<br />
<br />
Do you think using the AUR to install GNOME extensions is considered a correct way of doing so along with using extensions.gnome.org? Thanks! [[User:Cont999|Cont999]] ([[User talk:Cont999|talk]]) 19:56, 20 September 2022 (UTC)<br />
<br />
:Sorry, but I don't use GNOME. Never have, never will. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 13:30, 21 September 2022 (UTC)</div>Foutrelishttps://wiki.archlinux.org/index.php?title=User_talk:Nl6720&diff=761860User talk:Nl67202022-12-22T19:11:57Z<p>Foutrelis: CAT</p>
<hr />
<div>__NOINDEX__{{Lowercase title}}<br />
<br />
== Improving style on external github links ==<br />
<br />
🐱<br />
<br />
This might be a question better directed at the bureaucrats or site admins, but I'm curious as to your opinion on this as one of the most active maintainers of the site, and you seem to be particularly involved when it comes to link styling. According to [[Help:Editing#Links]], "It is often more useful to give the link an alternative label rather than displaying the URL." (regarding external site links). However, I noticed that on any section that lists a number of applications, such as [[List of applications]], virtually every single one of the external links uses the URL instead of an alternative label.<br />
<br />
For sites that are specific to an individual application, I think it is appropriate to show the full url. However, for common sites that are used as a homepage for a number of applications, such as github repositories, it might be a better styling practice to set an alternative label like "github" or "github repository". [[Help:Editing#Links]] is not particularly strict on external links, but I personally think it would look significantly cleaner this way. Let me know what you think, I'd like to potentially bring this up with others as well. Also let me know if there's someone specific (such as a bureaucrat or admin that specializes in styling) I should discuss this with.<br />
<br />
If the others are on board with this suggestion, I'd be more than willing to start applying this to a number of different pages. I think it would make for a good starter project for me to work on. As a long term aspiration of sorts, I am interested in prospect of eventually becoming a maintainer (I know that I have a long ways to go). I think it'd be a great way to improve my skills at technical documentation, while contributing to one of the most useful sites for linux documentation. -- [[User:Aeros167|Aeros167]] ([[User talk:Aeros167|talk]]) 21:32, 9 June 2019 (UTC)<br />
<br />
:The [[List of applications]] page uses [[Template:App]], so you can propose changes in [[Template talk:App]] or [[Help talk:Style]]. Personally I don't agree to this change, I don't see a need to hide the URL by using a link title in [[Template:App]]. If the link was in a block of text, then I could agree to it, but not when specifically listing the URL. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 07:20, 10 June 2019 (UTC)<br />
<br />
::Ah no problem, it was just an idea. If the current template is already well established with a fairly recent dedicated page, it will likely stay the same. I'll keep that in mind though for replacing the URL with the substitute if it's in a block of text, I find the text substitutions to be quite useful within those contexts especially. Are there any other frequently used Template pages that would be useful to be aware of? I checked [[Template]] (similar to how [[Help]] directs to all pages in the help category) but that seems to be a dead end. -- [[User:Aeros167|Aeros167]] ([[User talk:Aeros167|talk]]) 09:40, 10 June 2019 (UTC)<br />
<br />
:::AFAIK templates are not categorized so you can find a list of them in [[Special:UncategorizedTemplates]]. A more useful list, separating them by usage, is available in [[Help:Template#List of templates]]. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 10:13, 10 June 2019 (UTC)<br />
<br />
== Is there any reason why you chose to remove the note about ISO Image mode? ==<br />
<br />
https://wiki.archlinux.org/index.php/USB_flash_installation_media#Using_Rufus<br />
<br />
The note that says DD Image mode has to be used is not correct. ISO image mode will work for most people. You only need to use DD Image mode if the drive doesn't boot.<br />
[[User:Tonij|Tonij]] ([[User talk:Tonij|talk]]) 17:12, 2 August 2019 (UTC)<br />
<br />
:DD Image mode writes the iso to the drive as it was intended by Arch developers while using ISO image mode means trusting that Rufus correctly copies the bootloader configuration. Any messing with the boot setup is bound to result in some incompatibilities, which is exactly what happens with the crap known as UNetbootin, luckily Rufus has not deteriorated to such extent. I restored [[Special:Diff/578638]] in [[Special:Diff/578856]]. Frankly, I'm not a fan of Rufus since it keeps hiding useful features. [https://github.com/pbatard/rufus/issues/1148][https://github.com/pbatard/rufus/wiki/FAQ#why-doesnt-rufus-create-a-windows-installation-usb-that-can-be-booted-in-dual-biosuefi-mode] -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 18:51, 2 August 2019 (UTC)<br />
<br />
Also if someone is using GPT, they never had any intention of booting in BIOS. What is the point of saying that they should use MBR in that situation? [[User:Tonij|Tonij]] ([[User talk:Tonij|talk]]) 17:22, 2 August 2019 (UTC)<br />
<br />
:That's an unfounded claim. The installation media should be bootable for both BIOS and UEFI systems and that means using MBR in Rufus. Any other specialization is outside the scope of the [[USB flash installation media]] article. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 18:51, 2 August 2019 (UTC)<br />
<br />
Read this: https://www.reddit.com/r/ManjaroLinux/comments/b5fzj4/make_sure_you_burned_the_iso_in_dd_mode/ejdcz9y?utm_source=share&utm_medium=web2x [[User:Tonij|Tonij]] ([[User talk:Tonij|talk]]) 17:32, 2 August 2019 (UTC)<br />
<br />
== dm-crypt/Encrypting an entire system ==<br />
<br />
About the revert: Ok, thanks. I also had problems with some kind of "escape template-breaking characters" that I couldn't solve before you reverted very fast (so I was looking into changing something wrong with the link, but you very too fast). In the future, there will be a release where LUKS2 can be used... Then the wiki could be updated, I guess. I wasn't sure about how often people updated the wiki (and am not used to this, one time has to be the first), but it seems very frequently you guys update the wiki and thanks a lot for that. I also didn't remove the LUKS1-warning, because some people will use old versions for a long time. Thanks and I'll leave it here until we have a release and people begin using that new release with LUKS2-support (but then you or someone else probably updates the wiki before). Cheers! :-) [[User:Newsboost|Newsboost]] ([[User talk:Newsboost|talk]]) 17:51, 26 January 2020 (UTC)<br />
<br />
:The template-breaking character issue was because of {{ic|1==}} in the Phoronix URL. Since the URL was in [[Template:Warning]], normally you would need to escape it with e.g. {{ic|<nowiki>{{Warning|1=text text [https://www.phoronix.com/scan.php?page=news_item&px=GRUB-Boots-LUKS2-Disk-Encrypt]}}</nowiki>}}, but since it starts with a list, it becomes a little more annoying:<br />
{{bc|<nowiki><br />
{{Warning|1&#61;&lt;nowiki&gt;&lt;/nowiki&gt;<br />
* list item<br />
* list item [https://www.phoronix.com/scan.php?page=news_item&px=GRUB-Boots-LUKS2-Disk-Encrypt]<br />
}}<br />
</nowiki>}}<br />
:Without {{ic|&lt;nowiki&gt;&lt;/nowiki&gt;}} the first item would not get parsed as a list item.<br />
:About GRUB, when a new release with LUKS2 support lands in the stable repos, feel free to update the warnings (or remove them if GRUB miraculously gains Argon2 support), until then I think that the dm-crypt pages should retain the current warnings. I'm certain I'm not the only one with such opinion.<br />
:That said, this does not prevent you from editing [[GRUB#Encrypted /boot]]. Currently it does not give a clear solution for using LUKS2, but only hints about PBKDFs. It ''should'' be possible to use GRUB from git with LUKS2 created with the {{ic|cryptsetup luksFormat --pbkdf pbkdf2}}, but I couldn't test it since {{AUR|grub-git}} didn't build for me when I tried it a few weeks ago.<br />
:Anyway, don't get discouraged from editing the wiki just because one of your edits was undone :) <br />
: -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 07:11, 27 January 2020 (UTC)<br />
::Yeah, frontend web-devel isn't really my thing, this template-breaking character stuff confused me a lot. So thanks a lot for explaining some details about this, I had major challenges "fixing" that broken template-stuff. About GRUB and LUKS2: I think I'll also skip the grub-git-method (I don't want to risk anything, but after a new release has been out for some weeks it'll be safer to test). I've been so unlucky for the past year that I for various reasons had to reinstall Arch Linux and therefore have been through the encrypted boot-procedure (too) many times recently. I takes me around 30 hours to fully setup an Arch Linux to my taste, incl. getting packages setup, window managers etc up and running so I hope I won't have to do it too many times again in year 2020 (this time I'll take an image with clonezilla and hopefully that can be used to save time in the future). I use luks1 for boot partition /boot, which after unlocking, unlocks my root-partition which is actually contained in a luks2-container with detached header and LVM inside. So I guess I'm not a normal user, anyway, maybe other people could use that procedure I've gathered and am using with the detached header... I'll watch out and hopefully soon I can use luks2 (and maybe detached header, e.g. on USB-stick) for the boot-partition. Once GRUB with LUKS2-support is stable, I'll see if I can contribute a bit about the detached header-setup, which I think is really nice. There are some details I'm not fully into, e.g. Argon2 and pbkdf2 but I'll see if I can contribute somewhere in the future, when something strikes my eyes. So I fully understand you, I think, this just serves as a bit of practice for me so I better know how things work the next time. Thanks a lot for your feedback, I'll have that in mind when I in the future browse and use the wiki! [[User:Newsboost|Newsboost]] ([[User talk:Newsboost|talk]]) 20:32, 27 January 2020 (UTC)<br />
<br />
:::Just in case you don't know, the setup for LUKS with a detached header is documented in [[dm-crypt/Specialties#Encrypted system using a detached LUKS header]]. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 10:26, 28 January 2020 (UTC)<br />
<br />
::::I'm not sure if I've seen that (can't remember). I usually have a folder with text-files that contain instructions for how to setup things and once I've done things a few times, that becomes my only source of "truth" or information (unless a new version of something causes unforeseen problems, in which case I try to solve it and update the instructions again till next time). That being said, I think the arch linux wiki is a great source and many of my own rewritten instructions are based on info from the wiki in some form (sometimes I extend things with detailed examples, I think the wiki isn't suited for that). I'll have in mind that if I notice something on the wiki that other users could benefit from, I'll see if I can contribute. I also copied your comment about the template-stuff to my own https://wiki.archlinux.org/index.php/User_talk:Newsboost (+ a reference to the broken url), so I guess I can always easily find that info again, if something similar appears, i.e. I would then be less dependent on remembering where to find the this conversation)... Now I went through the process of editing here a few times, I think I'll feel more comfortable the next time, thanks :-) [[User:Newsboost|Newsboost]] ([[User talk:Newsboost|talk]]) 17:01, 28 January 2020 (UTC)<br />
<br />
== F2FS warning ==<br />
<br />
Hello, I see you reverted my F2FS warning. Fair point for the doc. I have this link [https://web.archive.org/web/20200925120546/https://archived.forum.manjaro.org/t/record-fsync-data-failed-on-f2fs-file-system-how-to-fix-foregt-the-help-i-reinstalled-its-just-easier/121051] which gives a lot of details on what is going on. Basically, if you shut down your system improperly at the wrong time, F2FS will be corrupt <i>beyond repair</i>. Even {{ic|fsck.f2fs}} will error out. I had found a weird, temporary fix allowing to mount the filesystem read only and even to allow the system to boot for a day or so. I've got a write-up (in French) about that on my blog ([https://lesviallon.fr/p/f2fs-record-fsync-data-failed-469431])<br />
This has happened to several users before, and most smartphone manufacturers, Samsung itself included (they created F2FS), don't use it on their phones because of the stability issues. Do you think this data is sufficient? [[User:Aviallon|Aviallon]] ([[User talk:Aviallon|talk]]) 12:34, 25 September 2020 (UTC)<br />
<br />
:I didn't doubt that the issue with F2FS is real. I've had my own issues with this file system ({{Bug|63839}}) which made me switch to [[XFS|a different one]]. It's just that without any sort of reference that warning was fairly useless. Your links look good and there's even a kernel bugzilla link in you blog. If you can create a section in [[F2FS]] based on you blog post (adjusted for the wiki's style, of course) then it would be perfect :) -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 13:23, 25 September 2020 (UTC)<br />
<br />
::Understood! I will do that right away! Does that mean I should only put this information in Known Issues, and that I shouldn't put a warning like with [[Btrfs]] ? [[User:Aviallon|Aviallon]] ([[User talk:Aviallon|talk]]) 13:56, 25 September 2020 (UTC)<br />
<br />
:::You should definitely document your issue in "Known issues". Now whether it should be also linked from a warning in the intro, I'd say go by the consensus of [[Talk:F2FS#Adding warning about F2FS potentially being unsafe?]] -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 14:05, 25 September 2020 (UTC)<br />
<br />
== TPM/Data-at-rest encryption with LUKS ==<br />
<br />
Hello, I'm curious about a recent edit you made to [[TPM#Data-at-rest_encryption_with_LUKS]]. I am the one who wrote the part that you edited, but I'm fine with most of your changes. The only thing I take issue with is the statement "This means that access to data is not protected in case the hardware gets stolen." This seems to imply that if the hardware is stolen, the data is as good as unencrypted. Given that full disk encryption is mostly useful in the case that the hardware is stolen, this implies that using a TPM to unlock your drive is as good as not encrypting it at all, which I don't think is fair to say.<br />
<br />
Cold boot attacks, bus sniffing attacks, and other potential ways of circumventing a TPM are not trivial to perform, and are no comparison at all to the ease with which one can access an unencrypted drive. Furthermore, in the (admittedly unlikely) case where an attacker steals only the drive and not the entire computer, the fact that a TPM was set up to unlock the drive won't help them at all. Perhaps this could be changed to something like "This increases the number of options an attacker has to attempt to steal the data," or even "This makes the data significantly less secure."<br />
<br />
Thoughts?<br />
<br />
[[User:Forgonewarrior|Forgonewarrior]] ([[User talk:Forgonewarrior|talk]]) 08:37, 10 April 2021 (UTC)<br />
<br />
:By "hardware" I meant the whole PC not just the drive. If TPM automatically unlocks the the LUKS encrypted root volume on boot, then the thief just needs to power on the PC to get access to the data. So yes, it is almost as good as unencrypted. Getting passed user login is out of scope, and, while I can't think of a way to sidestep it, relying on it for data safety would be naive. See also https://github.com/systemd/systemd/issues/19229. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 08:46, 10 April 2021 (UTC)<br />
<br />
== Konsole true color ==<br />
<br />
I have seen your edit in [[Konsole]]. You changed {{ic|1=TERM=konsole-256color}} to {{ic|1=TERM=konsole-direct}}. I was the one who added that section.<br />
<br />
It seems {{ic|1=TERM=konsole-direct}} is broken. {{ic|vim}} and {{ic|nvim}} don't display correctly and {{ic|vis}} simply segfaults.<br />
<br />
But you were right {{ic|1=TERM=konsole-256color}} is not for true color.<br />
<br />
I think we should undo your last edit and change the section title from "True-color programs do not display correctly" to "Some color programs do not display correctly".<br />
<br />
{{Unsigned|09:30, 17 April 2021 (UTC)|ENV25}}<br />
<br />
:From what I see, [[nvim]] with {{ic|set termguicolors}}[https://gist.github.com/XVilka/8346728] looks the same with {{ic|1=TERM=xterm-256color}}, {{ic|1=TERM=konsole-256color}} and {{ic|1=TERM=konsole-direct}}. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 13:25, 17 April 2021 (UTC)<br />
<br />
== <s>rEFInd Install Script</s> ==<br />
<br />
Hey there, I saw that you removed my edit in [[rEFInd]] about the config file location. You mentioned that the config file needs to be in {{ic|''esp''}} (i.e. /boot) instead of {{ic|''esp''/EFI/refind/}}. However, in my installation, placing the configuration file in {{ic|''esp''}} resulted in the configuration file not being loaded. It only loaded when I moved it to {{ic|''esp''/EFI/refind/}}. <br />
<br />
According to https://www.rodsbooks.com/refind/configfile.html. The configuration file needs to be in the same directory as {{ic|refind_x64.efi}}, which in my case (standard installation) was not in {{ic|''esp''}} but {{ic|''esp''/EFI/refind/}}. <br />
<br />
Have I perhaps understood the phrasing in the Wikipage wrong? If not, I think a comment on the rEFInd page would be rather helpful for others. <br />
<br />
[[User:Sunjerry019|Sunjerry019]] ([[User talk:Sunjerry019|talk]]) 18:38, 11 Jan 2022 (UTC)<br />
<br />
:In [[Special:Diff/707347]] you added text about {{ic|refind.conf}} to the paragraph that talks about {{ic|refind_linux.conf}}. I think you may be confusing the two files. {{ic|refind.conf}} (the rEFInd configuration file) needs to be in the same directory as the rEFInd EFI binary (e.g. {{ic|''esp''/EFI/rEFInd}} or {{ic|''esp''/EFI/BOOT}}) and {{ic|refind_linux.conf}} (the boot entry configuration file for autodetected kernels) needs to be in the same directory as the kernel(s) (typically {{ic|/boot}}, unless you customized {{ic|/usr/share/libalpm/scripts/mkinitcpio-install}}). -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 11:30, 12 January 2022 (UTC)<br />
:: Ahhh okay yes I was confused between the two. Thanks for the clarification! -- [[User:Sunjerry019|Sunjerry019]] ([[User talk:Sunjerry019|talk]]) 16:40, 12 Jan 2022 (UTC)<br />
<br />
== <s>"By default only root can use sudo"</s> ==<br />
<br />
Hi, the title refers to [[Special:Diff/722745/prev|this]] edit summary. Upon seeing it I was a bit stumped, but then I understood you meant that without any further configuration, sudo could only be used by the root user to change/run a command as another user, hence the change in sign. Is that it?<br />
<br />
However, how common is that use case? It is really a thing that some people install sudo but don't configure a regular user account, instead use only root and sudo when they need to do something as another user? Even on a server I can't picture this being a really common case, so I'm a bit wondering about the change here. Sure it is factually correct, but still...<br />
<br />
The only guideline I could find about it is [[Help:Style#Command line text]] and it is pretty ambivalent, stating "The only exception [to never using sudo with #] is when sudo is used with the -u flag: in this case the prompt can match the others of the same code block, or default to $". But here we have both in the preceding examples, and since it is exceedingly rare to see sudo used with a # I think it'd be better to just leave it at the $ that was used up until that point.<br />
<br />
--[[User:Neitsab|Neitsab]] ([[User talk:Neitsab|talk]]) 22:37, 15 March 2022 (UTC)<br />
<br />
:Yes, I meant sudo "without any further configuration" with that edit summary. And you're correct that it goes against [[Help:Style#Command line text]]. I've now undid that edit. Sorry about that! By being a bad example I've now tarnished the reputation of the ''monkey see monkey do'' wiki editor self-training program :( -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 16:06, 16 March 2022 (UTC)<br />
<br />
== "Excellent work" ==<br />
<br />
Very good work on the mediawiki 1.37.2 update, thanks! [[User:😎|😎]] ([[User talk:😎|talk]]) 18:17, 9 April 2022 (UTC)<br />
<br />
== <s>Do you think using the AUR to install GNOME extensions is considered correct?</s> ==<br />
<br />
[[GNOME#Extensions]] has always been inconsistent, people keep making edits that contradict with each other. One of which is installing GNOME from the AUR. It works and it makes it easy to update when you're using an AUR helper, but a concrete answer is still needed so I could know what changes to make to the section. I already opened a discussion in [[Talk:GNOME]] (the discussion could get no spotlight, just like many others), but a word from a Wiki admin who knows all about this would be very appreciated.<br />
<br />
Do you think using the AUR to install GNOME extensions is considered a correct way of doing so along with using extensions.gnome.org? Thanks! [[User:Cont999|Cont999]] ([[User talk:Cont999|talk]]) 19:56, 20 September 2022 (UTC)<br />
<br />
:Sorry, but I don't use GNOME. Never have, never will. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 13:30, 21 September 2022 (UTC)</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Systemd-resolved&diff=755210Systemd-resolved2022-10-30T08:05:37Z<p>Foutrelis: Remove "without filtering and without DNSSEC" clarification from Quad9; the PKGBUILD was switched to the default Quad9 nameservers on 2022-02-09 and released as systemd 250.3-4 the following day.</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Domain Name System]]<br />
[[de:Systemd/systemd-resolved]]<br />
[[es:Systemd-resolved]]<br />
[[ja:Systemd-resolved]]<br />
[[ru:Systemd-resolved]]<br />
{{Related articles start}}<br />
{{Related|systemd-networkd}}<br />
{{Related|Domain name resolution}}<br />
{{Related|Avahi}}<br />
{{Related articles end}}<br />
''systemd-resolved'' is a [[systemd]] service that provides network name resolution to local applications via a [[D-Bus]] interface, the {{ic|resolve}} [[Name Service Switch|NSS]] service ({{man|8|nss-resolve}}), and a local DNS stub listener on {{ic|127.0.0.53}}. See {{man|8|systemd-resolved}} for the usage.<br />
<br />
== Installation ==<br />
<br />
''systemd-resolved'' is a part of the {{Pkg|systemd}} package that is installed by default.<br />
<br />
== Configuration ==<br />
<br />
''systemd-resolved'' provides resolver services for [[Wikipedia:Domain Name System|Domain Name System (DNS)]] (including [[Wikipedia:Domain Name System Security Extensions|DNSSEC]] and [[Wikipedia:DNS over TLS|DNS over TLS]]), [[Wikipedia:Multicast DNS|Multicast DNS (mDNS)]] and [[Wikipedia:Link-Local Multicast Name Resolution|Link-Local Multicast Name Resolution (LLMNR)]].<br />
<br />
The resolver can be configured by editing {{ic|/etc/systemd/resolved.conf}} and/or drop-in ''.conf'' files in {{ic|/etc/systemd/resolved.conf.d/}}. See {{man|5|resolved.conf}}.<br />
<br />
To use ''systemd-resolved'' [[start]] and [[enable]] {{ic|systemd-resolved.service}}.<br />
<br />
{{Tip|To understand the context around the choices and switches, one can turn on detailed debug information for ''systemd-resolved'' as described in [[systemd#Diagnosing a service]].}}<br />
<br />
=== DNS ===<br />
<br />
Software that relies on glibc's {{man|3|getaddrinfo}} (or similar) will work out of the box, since, by default, {{ic|/etc/nsswitch.conf}} is configured to use {{man|8|nss-resolve}} if it is available.<br />
<br />
To provide [[domain name resolution]] for software that reads {{ic|/etc/resolv.conf}} directly, such as [[web browsers]] and [[GnuPG]], ''systemd-resolved'' has four different modes for handling the file—stub, static, uplink and foreign. They are described in {{man|8|systemd-resolved|/ETC/RESOLV.CONF}}. We will focus here only on the recommended mode, i.e. the stub mode which uses {{ic|/run/systemd/resolve/stub-resolv.conf}}.<br />
<br />
{{ic|/run/systemd/resolve/stub-resolv.conf}} contains the local stub {{ic|127.0.0.53}} as the only DNS server and a list of search domains. This is the recommended mode of operation that propagates the ''systemd-resolved'' managed configuration to all clients. To use it, replace {{ic|/etc/resolv.conf}} with a symbolic link to it:<br />
<br />
# ln -rsf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf<br />
<br />
{{Note|<br />
* Failure to properly configure {{ic|/etc/resolv.conf}} will result in broken DNS resolution.<br />
* Creating the {{ic|/etc/resolv.conf}} symlink will not be possible while inside ''arch-chroot'', since the file is bind-mounted from the outside system. Instead, create the symlink from outside the chroot. E.g. {{bc|# ln -sf /run/systemd/resolve/stub-resolv.conf ''/mnt''/etc/resolv.conf}}<br />
}}<br />
<br />
==== Setting DNS servers ====<br />
<br />
{{Tip|To check the DNS currently in use by ''systemd-resolved'', run {{ic|resolvectl status}}.}}<br />
<br />
===== Automatically =====<br />
<br />
''systemd-resolved'' will work out of the box with a [[network manager]] using {{ic|/etc/resolv.conf}}. No particular configuration is required since ''systemd-resolved'' will be detected by following the {{ic|/etc/resolv.conf}} symlink. This is going to be the case with [[systemd-networkd]], [[NetworkManager]], and [[iwd]].<br />
<br />
However, if the [[DHCP]] and [[VPN]] clients use the [[Wikipedia:resolvconf|resolvconf]] program to set name servers and search domains (see [[openresolv#Users]] for a list of software that use ''resolvconf''), the additional package {{Pkg|systemd-resolvconf}} is needed to provide the {{ic|/usr/bin/resolvconf}} symlink.<br />
<br />
{{Note|<br />
* ''systemd-resolved'' has a limited ''resolvconf'' interface and may not work with all the clients, see {{man|1|resolvectl|COMPATIBILITY WITH RESOLVCONF(8)}} for more information.<br />
* {{Pkg|systemd-resolvconf}} only works when {{ic|systemd-resolved.service}} is running. If you are not using ''systemd-resolved'', make sure the {{Pkg|systemd-resolvconf}} package is [[uninstall]]ed, otherwise it will cause issues with networking software that expect a working {{ic|/usr/bin/resolvconf}} binary.<br />
}}<br />
<br />
===== Manually =====<br />
<br />
In stub and static modes, custom DNS server(s) can be set in the {{man|5|resolved.conf}} file:<br />
<br />
{{hc|/etc/systemd/resolved.conf.d/dns_servers.conf|2=<br />
[Resolve]<br />
DNS=192.168.35.1 fd7b:d0bd:7a6e::1<br />
Domains=~.<br />
}}<br />
<br />
{{Note|<br />
* Without the {{ic|1=Domains=~.}} option in {{man|5|resolved.conf}}, ''systemd-resolved'' might use the per-link DNS servers, if any of them set {{ic|1=Domains=~.}} in the per-link configuration.<br />
* This option will not affect queries of domain names that match the more specific search domains specified in per-link configuration, they will still be resolved using their respective per-link DNS servers.<br />
For more information on per-link configuration see [[systemd-networkd#network files]].<br />
}}<br />
<br />
===== Fallback =====<br />
<br />
If ''systemd-resolved'' does not receive DNS server addresses from the [[network manager]] and no DNS servers are configured [[#Manually|manually]] then ''systemd-resolved'' falls back to the fallback DNS addresses to ensure that DNS resolution always works.<br />
<br />
{{Note|1=The fallback DNS are in this order: [[Alternative DNS services#Cloudflare|Cloudflare]], [[Alternative DNS services#Quad9|Quad9]] and [[Alternative DNS services#Google|Google]]; see the [https://github.com/archlinux/svntogit-packages/blob/packages/systemd/trunk/PKGBUILD#L100-L111 systemd PKGBUILD] where the servers are defined.}}<br />
<br />
The addresses can be changed by setting {{ic|FallbackDNS}} in {{man|5|resolved.conf}}. E.g.:<br />
<br />
{{hc|/etc/systemd/resolved.conf.d/fallback_dns.conf|2=<br />
[Resolve]<br />
FallbackDNS=127.0.0.1 ::1<br />
}}<br />
<br />
To disable the fallback DNS functionality set the {{ic|FallbackDNS}} option without specifying any addresses:<br />
<br />
{{hc|/etc/systemd/resolved.conf.d/fallback_dns.conf|2=<br />
[Resolve]<br />
FallbackDNS=<br />
}}<br />
<br />
==== DNSSEC ====<br />
<br />
[[DNSSEC]] validation can be enabled by changing {{ic|DNSSEC}} setting in {{man|5|resolved.conf}}.<br />
<br />
* Set {{ic|1=DNSSEC=allow-downgrade}} to validate DNSSEC only if the upstream DNS server supports it.<br />
* Set {{ic|1=DNSSEC=true}} to always validate DNSSEC, thus breaking DNS resolution with name servers that do not support it. For example:<br />
<br />
{{hc|/etc/systemd/resolved.conf.d/dnssec.conf|2=<br />
[Resolve]<br />
DNSSEC=true<br />
}}<br />
<br />
{{Note|<br />
* If your DNS server does not support DNSSEC and you experience problems with the default allow-downgrade mode (e.g. [https://github.com/systemd/systemd/issues/10579 systemd issue 10579]), you can explicitly disable systemd-resolved's DNSSEC support by setting {{ic|1=DNSSEC=false}}.<br />
* systemd-resolved may disable DNSSEC after a few unsuccessful validations. If the {{ic|DNSSEC}} option is set to {{ic|true}}, then DNS resolution will stop working entirely. See [https://github.com/systemd/systemd/issues/9867 systemd issue 9867].<br />
}}<br />
<br />
Test DNSSEC validation by querying a domain with a invalid signature:<br />
<br />
{{hc|$ resolvectl query sigfail.verteiltesysteme.net|<br />
sigfail.verteiltesysteme.net: resolve call failed: DNSSEC validation failed: invalid<br />
}}<br />
<br />
Now test a domain with valid signature:<br />
<br />
{{hc|$ resolvectl query sigok.verteiltesysteme.net|<br />
sigok.verteiltesysteme.net: 134.91.78.139<br />
<br />
-- Information acquired via protocol DNS in 266.3ms.<br />
-- Data is authenticated: yes<br />
}}<br />
<br />
==== DNS over TLS ====<br />
<br />
DNS over TLS is disabled by default. To enable it change the {{ic|DNSOverTLS}} setting in the {{ic|[Resolve]}} section in {{man|5|resolved.conf}}. To enable validation of your DNS provider's server certificate, include their hostname in the {{ic|DNS}} setting in the format {{ic|''ip_address''#''hostname''}}. For example:<br />
<br />
{{hc|/etc/systemd/resolved.conf.d/dns_over_tls.conf|2=<br />
[Resolve]<br />
DNS=9.9.9.9#dns.quad9.net<br />
DNSOverTLS=yes<br />
}}<br />
<br />
{{Note|The DNS server used must support DNS over TLS. Otherwise all DNS requests will fail.}}<br />
<br />
{{pkg|ngrep}} can be used to test if DNS over TLS is working since DNS over TLS always uses port 853 and never port 53. The command {{ic|ngrep port 53}} should produce no output when a hostname is resolved with DNS over TLS and {{ic|ngrep port 853}} should produce encrypted output.<br />
<br />
[[Wireshark]] can be used for more detailed packet inspection of DNS over TLS queries.<br />
<br />
=== mDNS ===<br />
<br />
''systemd-resolved'' is capable of working as a [[Wikipedia:Multicast DNS|multicast DNS]] resolver and responder.<br />
<br />
The resolver provides [[hostname]] resolution using a "''hostname''.local" naming scheme.<br />
<br />
mDNS will only be activated for a connection if both systemd-resolved's mDNS support has been enabled, and if the configuration for the currently active [[network manager]] enables mDNS for the connection.<br />
<br />
''systemd-resolved'''s mDNS support can be enabled by its {{ic|MulticastDNS}} setting (see {{man|5|resolved.conf|OPTIONS}}).<br />
<br />
Enabling per-connection mDNS support depends on the [[network manager]]:<br />
<br />
* For [[systemd-networkd]], set the {{ic|MulticastDNS}} setting in the {{ic|[Network]}} section of a per-connection settings file. You may also have to set {{ic|1=Multicast=yes}} in the {{ic|[Link]}} section. See {{man|5|systemd.network}}.<br />
* Otherwise, for [[NetworkManager]], set {{ic|mdns}} in the {{ic|[connection]}} section of the connection's settings file. Running {{ic|nmcli connection modify ''interface_name'' connection.mdns ''{yes{{!}}no{{!}}resolve}''}} will do that for you. See {{man|5|nm-settings}}.<br />
<br />
{{Note|<br />
* If [[Avahi]] has been installed, consider [[disabling]] or [[mask]]ing {{ic|avahi-daemon.service}} and {{ic|avahi-daemon.socket}} to prevent conflicts with ''systemd-resolved''.<br />
* If you plan to use mDNS and a [[firewall]], make sure to open UDP port {{ic|5353}}.<br />
}}<br />
<br />
{{Tip|1=The default for all [[NetworkManager]] connections can be set by creating a configuration file in {{ic|/etc/NetworkManager/conf.d/}} and setting {{ic|1=connection.mdns=2}} in the {{ic|[connection]}} section. See {{man|5|NetworkManager.conf|CONNECTION SECTION}} and [https://bbs.archlinux.org/viewtopic.php?pid=1965078#p1965078].}}<br />
<br />
=== LLMNR ===<br />
<br />
[[Wikipedia:Link-Local Multicast Name Resolution|Link-Local Multicast Name Resolution]] is a [[hostname]] resolution protocol created by Microsoft.<br />
<br />
LLMNR will only be activated for the connection if both the systemd-resolved's global setting ({{ic|LLMNR}} in {{man|5|resolved.conf|OPTIONS}}) and the [[Network manager|network manager's]] per-connection setting is enabled. By default ''systemd-resolved'' enables LLMNR responder; [[systemd-networkd]] and [[NetworkManager]][https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/301] enable it for connections.<br />
<br />
* For [[systemd-networkd]] the setting is {{ic|LLMNR}} in the {{ic|[Network]}} section. See {{man|5|systemd.network|[NETWORK] SECTION OPTIONS}}.<br />
* For [[NetworkManager]] the setting is {{ic|llmnr}} in the {{ic|[connection]}} section. See {{man|5|nm-settings|connection setting}}.<br />
<br />
{{Tip|The default for all [[NetworkManager]] connections can be set by creating a configuration file in {{ic|/etc/NetworkManager/conf.d/}} and setting {{ic|connection.llmnr}} in the {{ic|[connection]}} section. See {{man|5|NetworkManager.conf|CONNECTION SECTION}}.}}<br />
<br />
If you plan to use LLMNR and use a [[firewall]], make sure to open UDP and TCP ports {{ic|5355}}.<br />
<br />
== Lookup ==<br />
<br />
To query DNS records, mDNS or LLMNR hosts you can use the ''resolvectl'' utility.<br />
<br />
For example, to query a DNS record:<br />
<br />
{{hc|$ resolvectl query archlinux.org|<br />
archlinux.org: 2a01:4f8:172:1d86::1<br />
138.201.81.199<br />
<br />
-- Information acquired via protocol DNS in 48.4ms.<br />
-- Data is authenticated: no<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== systemd-resolved not searching the local domain ===<br />
<br />
''systemd-resolved'' may not search the local domain when given just the hostname, even when {{ic|1=UseDomains=yes}} or {{ic|1=Domains=[domain-list]}} is present in the appropriate [[systemd-networkd]]'s ''.network'' file, and that file produces the expected {{ic|search [domain-list]}} in {{ic|resolv.conf}}. You can run {{ic|networkctl status}} or {{ic|resolvectl status}} to check if the search domains are actually being picked up.<br />
<br />
Possible workarounds:<br />
<br />
* Disable [[#LLMNR|LLMNR]] to let ''systemd-resolved'' immediately continue with appending the DNS suffixes<br />
* Trim {{ic|/etc/nsswitch.conf}}'s {{ic|hosts}} database (e.g., by removing {{ic|1=[!UNAVAIL=return]}} option after {{ic|resolve}} service)<br />
* Switch to using fully-qualified domain names<br />
* Use {{ic|/etc/hosts}} to resolve hostnames<br />
* Fall back to using glibc's {{ic|dns}} instead of using systemd's {{ic|resolve}}<br />
<br />
=== systemd-resolved does not resolve hostnames without suffix ===<br />
<br />
To make systemd-resolved resolve hostnames that are not fully qualified domain names, add {{ic|1=ResolveUnicastSingleLabel=yes}} to {{ic|/etc/systemd/resolved.conf}}.<br />
<br />
{{Warning|This will forward single-label names to global DNS servers which may not be under your control. This behaviour is not standard-conformant and may create a privacy and security risk. See {{man|5|resolved.conf}} for details.}}<br />
<br />
This only seems to work with LLMNR disabled ({{ic|1=LLMNR=no}}).<br />
<br />
If you are using [[systemd-networkd]], you might want the domain supplied by the DHCP server or IPv6 Router Advertisement to be used as a search domain. This is disabled by default, to enable it add to the interface's ''.network'' file:<br />
<br />
{{bc|1=<br />
[DHCPv4]<br />
UseDomains=true<br />
<br />
[IPv6AcceptRA]<br />
UseDomains=yes<br />
}}<br />
<br />
You can check what systemd-resolved has for each interface with:<br />
<br />
$ resolvectl domain<br />
<br />
== See also ==<br />
<br />
* [https://moss.sh/name-resolution-issue-systemd-resolved A name resolution issue with systemd-resolved we found in the wild By Francisco Ros]<br />
* See {{man|1|resolvectl|EXAMPLES}} for more examples.</div>Foutrelishttps://wiki.archlinux.org/index.php?title=User:Foutrelis&diff=754621User:Foutrelis2022-10-23T14:01:29Z<p>Foutrelis: Blanked the page</p>
<hr />
<div></div>Foutrelishttps://wiki.archlinux.org/index.php?title=User:Foutrelis&diff=754620User:Foutrelis2022-10-23T14:00:51Z<p>Foutrelis: </p>
<hr />
<div>🦔</div>Foutrelishttps://wiki.archlinux.org/index.php?title=User:Foutrelis&diff=754619User:Foutrelis2022-10-23T14:00:34Z<p>Foutrelis: Created page with "🐱"</p>
<hr />
<div>🐱</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Python_package_guidelines&diff=694794Python package guidelines2021-09-07T02:36:56Z<p>Foutrelis: Remove PYTHONHASHSEED workaround now set by pacman</p>
<hr />
<div>[[Category:Arch package guidelines]]<br />
[[it:Python package guidelines]]<br />
[[ja:Python パッケージガイドライン]]<br />
[[pt:Python package guidelines]]<br />
[[zh-hans:Python package guidelines]]<br />
{{Package guidelines}}<br />
This document covers standards and guidelines on writing [[PKGBUILD]]s for [[Python]] software.<br />
<br />
== Package naming ==<br />
<br />
For [[Python#Python 3|Python 3]] library modules, use {{ic|python-''modulename''}}. Also use the prefix if the package provides a program that is strongly coupled to the Python ecosystem (e.g. ''pip'' or ''tox''). For other applications, use only the program name.<br />
<br />
The same applies to Python 2 except that the prefix (if needed) is {{Ic|python2-}}.<br />
<br />
{{Note|The package name should be entirely lowercase.}}<br />
<br />
== Architecture ==<br />
<br />
See [[PKGBUILD#arch]].<br />
<br />
A Python package that contains C extensions using the {{ic|ext_modules}} keyword in {{ic|setup.py}}, is architecture-dependent. Otherwise it is most likely architecture-independent.<br />
<br />
== Source ==<br />
<br />
Download URLs linked from the PyPI website include an unpredictable hash that needs to be fetched from the PyPI website each time a package must be updated. This makes them unsuitable for use in a PKGBUILD. PyPI [https://github.com/pypa/pypi-legacy/issues/438#issuecomment-226940730 provides] an alternative stable scheme: [[PKGBUILD#source]] {{ic|1=source=()}} array should use the following URL templates:<br />
<br />
;Source package:<br />
:{{ic|<nowiki>https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz</nowiki>}}<br />
;Pure Python wheel package<br />
:{{ic|<nowiki>https://files.pythonhosted.org/packages/py2.py3/${_name::1}/$_name/${_name//-/_}-$pkgver-py2.py3-none-any.whl</nowiki>}} (Bilingual – Python 2 and Python 3 compatible)<br />
:{{ic|<nowiki>https://files.pythonhosted.org/packages/py3/${_name::1}/$_name/${_name//-/_}-$pkgver-py3-none-any.whl</nowiki>}} (Python 3 only)<br />
:Note that the distribution name can contain dashes, while its representation in a wheel filename cannot (they are converted to underscores).<br />
;Arch specific wheel package<br />
:in this example for {{ic|1=source_x86_64=('...')}}. Also {{ic|1=_py=cp38}} can be used to not repeat the python version:<br />
:{{ic|<nowiki>https://files.pythonhosted.org/packages/$_py/${_name::1}/$_name/${_name//-/_}-$pkgver-$_py-${_py}m-manylinux1_x86_64.whl</nowiki>}}<br />
<br />
Note that a custom {{ic|'''_name'''}} variable is used instead of {{ic|pkgname}} since python packages are generally prefixed with {{ic|python-}}. This variable can generically be defined as follows:<br />
_name=${pkgname#python-}<br />
<br />
== Installation methods ==<br />
<br />
Python packages are generally installed using language-specific tools, such as [https://pip.pypa.io/ pip] or [https://setuptools.readthedocs.io/en/latest/deprecated/easy_install.html easy_install] (deprecated), which are comparable to dedicated package managers in that they are designed to fetch the source files from an online repository (usually [https://pypi.org/ PyPI], the Python Package Index) and track the relevant files (for a detailed comparison between the two, see [https://packaging.python.org/pip_easy_install/#pip-vs-easy-install pip vs easy_install]).<br />
<br />
However, for managing Python packages from within PKGBUILDs, the standard-provided [https://docs.python.org/3/library/distutils.html distutils] proves to be the most convenient solution since it uses the downloaded source package's {{ic|setup.py}} and easily installs files under {{ic|''$pkgdir''/usr/lib/python''<python version>''/site-packages/''$pkgname''}} directory.<br />
<br />
{{Note|Dependencies from {{ic|setup.py}} must be defined in the {{ic|depends}} array otherwise they will not be installed.}}<br />
<br />
=== distutils ===<br />
<br />
A ''distutils'' PKGBUILD is usually quite simple:<br />
<br />
{{bc|1=<br />
build() {<br />
''python'' setup.py build<br />
}<br />
<br />
package() {<br />
''python'' setup.py install --root="$pkgdir" --optimize=1<br />
}<br />
}}<br />
<br />
where:<br />
<br />
* ''python'' is replaced with the proper binary, {{ic|python}} or {{ic|python2}}<br />
* {{ic|1=--root="$pkgdir" }} prevents trying to directly install in the host system instead of inside the package file, which would result in a permission error<br />
* {{ic|1=--optimize=1}} compiles optimized bytecode files (''.pyo'' for Python 2, ''.opt-1.pyc'' for Python 3) so they can be tracked by [[pacman]] instead of being created on the host system on demand<br />
* Adding {{ic|1=--skip-build}} optimizes away the unnecessary attempt to re-run the build steps already run in the {{ic|build()}} function, if that is the case.<br />
<br />
=== setuptools ===<br />
<br />
The Python packaging scene has largely migrated from ''distutils'' to ''setuptools'', which is actively developed and functions as a drop-in replacement import in {{ic|setup.py}}. The main difference for packagers is that ''setuptools'' is packaged separately from Python itself, and must be specified as a {{ic|makedepends}}:<br />
makedepends=('python-setuptools')<br />
<br />
If the resulting package includes executables which [https://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation import the pkg_resources module], then ''setuptools'' must be additionally specified as a {{ic|depends}} in the split {{ic|package_*()}} functions; alternatively, if the PKGBUILD only installs the Python package for a single version of Python, ''setuptools'' should be moved from {{ic|makedepends}} to {{ic|depends}}.<br />
<br />
Some packages try to use ''setuptools'' and fall back to ''distutils'' if ''setuptools'' could not be imported. In this case, setuptools should be added as a {{ic|makedepends}}, so that the resulting python metadata is better.<br />
<br />
If a package needs ''setuptools'' to build due to including executables (which is not supported by ''distutils''), but only imports ''distutils'', then building will raise a warning, and the resulting package will be broken (it will not contain the executables):<br />
<br />
{{bc|1=<br />
/usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'entry_points'<br />
warnings.warn(msg)<br />
}}<br />
<br />
An upstream bug should be reported. To work around the problem, an undocumented setuptools feature can be used:<br />
<br />
{{bc|1=<br />
# fails because of distutils<br />
python setup.py build<br />
<br />
# works by using a setuptools shim<br />
python -m setuptools.launch setup.py build<br />
}}<br />
<br />
=== pip ===<br />
<br />
If you need to use ''pip'' (provided by {{Pkg|python-pip}} and {{Pkg|python2-pip}}), ''e.g.'' for installing [https://github.com/pypa/wheel wheel] packages, remember to pass the following flags:<br />
<br />
PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps *.whl<br />
<br />
* {{ic|PIP_CONFIG_FILE&#61;/dev/null}} ignores {{ic|{/etc,~/.config}/pip.conf}} that may be appending arbitrary flags to '''pip'''.<br />
* {{ic|--isolated}} ignores environment variables (and again {{ic|{/etc,~/.config}/pip/pip.conf}}) that may otherwise also be appending arbitrary flags to '''pip'''.<br />
* {{ic|--ignore-installed}} is necessary until https://github.com/pypa/pip/issues/3063 is resolved (otherwise '''pip''' skips the install in the presence of an earlier {{ic|--user}} install).<br />
* {{ic|--no-deps}} ensures, that dependencies do not get packaged together with the main package.<br />
<br />
''pip'' does not know how to generate {{ic|.pyo}} (or for 3.5 and later, {{ic|.pyc}}) files (see https://github.com/pypa/pip/issues/2209). In order to generate them manually after ''pip'' has installed the module, run:<br />
<br />
python -O -m compileall "${pkgdir}/path/to/module"<br />
<br />
{{Warning|Use of ''pip'' and/or wheel packages is discouraged in favor of setuptools source packages, and should only be used when the latter is not a viable option (for example, packages which '''only''' come with wheel sources, and therefore cannot be installed using setuptools).}}<br />
<br />
=== Build-time 2to3 translation ===<br />
<br />
Most Python projects target either Python 2 or Python 3, or target both using compatibility layers like [https://github.com/benjaminp/six six]. However, some use the deprecated 2to3 keyword in setuptools to heuristically convert the source code from Python 2 to Python 3 at build time. As a result, the same source directories cannot be used to build both Python 2 and Python 3 split packages.<br />
<br />
For packages that do this, we need a [[Creating_packages#prepare.28.29|prepare()]] function that copies the source before it is built. Then the Python 2 and Python 3 packages can be converted and built independently without overriding each other.<br />
<br />
{{bc|1=<br />
makedepends=("python-setuptools" "python2-setuptools")<br />
<br />
prepare() {<br />
cp -a foo-$pkgver{,-py2}<br />
}<br />
<br />
build() {<br />
cd "$srcdir/foo-$pkgver"<br />
python setup.py build<br />
<br />
cd "$srcdir/foo-$pkgver-py2"<br />
python2 setup.py build<br />
}<br />
<br />
package_python-foo() {<br />
depends=("python")<br />
cd "$srcdir/foo-$pkgver"<br />
python setup.py install --root="$pkgdir/" --optimize=1<br />
}<br />
<br />
package_python2-foo() {<br />
depends=("python2")<br />
cd "$srcdir/foo-$pkgver-py2"<br />
python2 setup.py install --root="$pkgdir/" --optimize=1<br />
}<br />
}}<br />
<br />
=== pyproject.toml (PEP 517) ===<br />
<br />
If an upstream only provides a {{ic| pyproject.toml}} ([https://www.python.org/dev/peps/pep-0517/ PEP 517]) in their source tarball, most of the time it is possible to convert it to a {{ic|setup.py}} and use [[#setuptools]] as usual.<br />
<br />
Add {{pkg|python-dephell}} to {{ic|makedepends}} and generate the setuptools integration in {{ic|prepare()}}:<br />
<br />
{{bc|1=<br />
makedepends=("python-setuptools" "python-dephell")<br />
<br />
prepare() {<br />
cd "$pkgname-$pkgver"<br />
dephell deps convert --from pyproject.toml --to setup.py<br />
}<br />
}}<br />
<br />
==== setuptools without a setup.py ====<br />
<br />
The PEP 517 build-backend {{ic|setuptools.build_meta}} does not need a {{ic|setup.py}} file to exist, and if one does not exist, a minimal one is implied (most such projects will, however, include the minimal one in the upstream tarball):<br />
<br />
{{bc|1=<br />
from setuptools import setup<br />
setup()<br />
}}<br />
<br />
This breaks compatibility with non-PEP 517 installation methods, such as [https://github.com/pypa/setuptools/issues/2088 Linux distributions] (as of June 2020, there is no option other than pip). Painful hacks are needed to build; either create the minimal setup.py yourself, or use<br />
<br />
{{bc|1=<br />
python "from setuptools import setup; setup()"<br />
}}<br />
<br />
in place of <br />
{{bc|1=<br />
python setup.py<br />
}}<br />
<br />
An example of this is [https://github.com/archlinux/svntogit-community/blob/db1a44ec13b3b7caf37222638a782d1cdbba1755/trunk/PKGBUILD#L15 ansible-lint]<br />
<br />
This page will eventually be updated once a non-gross way is found.<br />
<br />
== Check ==<br />
<br />
{{Warning|Avoid using {{ic|tox}} to run testsuites as it is explicitly designed to test repeatable configurations downloaded from PyPI while {{ic|tox}} is running, and does '''not''' test the version that will be installed by the package. This defeats the purpose of having a ''check'' function at all.}}<br />
<br />
Most python projects providing a testsuite use nosetests or pytest to run tests with {{ic|test}} in the name of the file or directory containing the testsuite. In general, simply running {{ic|nosetests}} or {{ic|pytest}} is enough to run the testsuite.<br />
<br />
{{bc|<br />
check(){<br />
cd "$srcdir/foo-$pkgver"<br />
<br />
# For nosetests<br />
nosetests<br />
<br />
# For pytest<br />
pytest<br />
}<br />
}}<br />
<br />
If there is a compiled C extension, the tests need to be run using a {{ic|$PYTHONPATH}}, that reflects the current major and minor version of Python in order to find and load it.<br />
<br />
{{bc|1=<br />
check(){<br />
cd "$pkgname-$pkgver"<br />
local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')<br />
# For nosetests<br />
PYTHONPATH="$PWD/build/lib.linux-$CARCH-${python_version}" nosetests<br />
<br />
# For pytest<br />
PYTHONPATH="$PWD/build/lib.linux-$CARCH-${python_version}" pytest<br />
}<br />
}}<br />
<br />
Some projects provide {{ic|setup.py}} entry points for running the test. This works for both {{ic|pytest}} and {{ic|nosetests}}.<br />
<br />
{{bc|<br />
check(){<br />
cd "$srcdir/foo-$pkgver"<br />
<br />
# For nosetests<br />
python setup.py nosetests<br />
<br />
# For pytest - needs python-pytest-runner<br />
python setup.py pytest<br />
}<br />
}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Discovering detached PGP signatures on PyPi ===<br />
<br />
If detached PGP signatures for a given Python sdist tarball exist, they should be used to verify the tarball.<br />
However, the signature files do not show up directly in the files download section of any given project on pypi.org.<br />
To discover the sdist tarballs and their potential signature files, it's possible to use this service to get an overview per project: https://pypi.debian.net/<br />
<br />
For {{pkg|python-requests}} this would be: https://pypi.debian.net/requests<br />
<br />
=== Using site-packages ===<br />
<br />
Sometimes during building, testing or installation it is required to refer to the system's {{ic|site-packages}} directory.<br />
To not hardcode the directory, use a call to the system Python version to retrieve the path and store it in a local variable:<br />
<br />
{{bc|1=<br />
check(){<br />
cd "$pkgname-$pkgver"<br />
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")<br />
...<br />
}<br />
}}<br />
<br />
=== Test directory in site-package ===<br />
<br />
Make sure to not install a directory named just {{ic|tests}} into {{ic|site-packages}} (e.g. {{ic|/usr/lib/python2.7/site-packages/tests/}}), as it easily conflicts with other Python packages.</div>Foutrelishttps://wiki.archlinux.org/index.php?title=DeveloperWiki:NewMirrors&diff=689710DeveloperWiki:NewMirrors2021-07-29T12:47:39Z<p>Foutrelis: Update suggested rsync options</p>
<hr />
<div>[[Category:Arch development]]<br />
== Adding a new mirror ==<br />
<br />
This text should outline the procedure for adding a new mirror for Arch packages.<br />
<br />
== Notes about private mirrors ==<br />
<br />
* Bandwidth is not free for the mirrors. They must pay for all the data they serve you<br />
** This still applies although you pay your ISP<br />
** A full mirror is over 50 GiB in size<br />
* There are many packages that will be downloaded that you will likely never use<br />
* Mirror operators will much prefer you to download only the packages you need<br />
* Really please look at the alternatives listed in [[pacman/Tips and tricks#Network shared pacman cache]] before setting up a private mirror<br />
<br />
== 2-tier mirroring scheme ==<br />
<br />
Due to the high load and bandwidth limits Arch Linux uses 2-tier mirroring scheme.<br />
<br />
There are few tier 1 mirrors that sync directly from archlinux.org every hour.<br />
<br />
All other mirrors should sync from one of tier 1 mirrors. Syncing from archlinux.org is not allowed.<br />
<br />
== For the mirror administrator ==<br />
<br />
=== Tier 2 requirements ===<br />
<br />
* Disk-space >= 60 GiB<br />
* Sync off a tier 1 mirror (see https://archlinux.org/mirrors/tier/1/)<br />
* Sync all contents of the upstream mirror (i.e. do not sync only some repositories)<br />
* Do not sync more often than every hour, but you should sync at least once a day<br />
* Sync on a random minute so it is more likely the requests will be spaced out with other mirrors<br />
* Use the following [[rsync]] options: {{ic|-rlptH --safe-links --delete-delay --delay-updates}}<br />
* If you ever wish to send downtime notifications to our users, please use the [https://mailman.archlinux.org/mailman/listinfo/arch-mirrors-announce arch-mirrors-announce] list. You do not need to subscribe to be able to post.<br />
* http support<br />
<br />
=== Tier 1 requirements ===<br />
<br />
* Tier 2 requirements<br />
* Bandwidth >= 100 Mbit/s<br />
* [[rsync]] support<br />
* Proven reliability (be a tier 2 mirror for a while and have reasonable uptime, response to out-of-sync notifications etc.)<br />
<br />
You can use rsync directly or the [https://gitlab.archlinux.org/archlinux/infrastructure/-/blob/master/roles/syncrepo/files/syncrepo-template.sh syncrepo-template.sh script] as a starting point. Please note that the script tries to minimize load and bandwidth used (about 3 MiB of metadata for each rsync run as of 2018-03-01) in case there are no changes. Feel free to remove this check if you do not sync very often or your upstream mirror does not provide the {{ic|lastupdate}} file.<br />
<br />
=== Create a feature-request ===<br />
<br />
{{Note|We are not accepting new ftp mirrors.}}<br />
<br />
Go to [https://bugs.archlinux.org/newtask/proj1 https://bugs.archlinux.org] and create a feature-request (category: mirrors) containing the following information:<br />
<br />
* Mirror domain name<br />
* Geographical location of the mirror (country)<br />
* URLs for supported access methods (http(s), [[rsync]]) (no ftp)<br />
* Your mirror's available bandwidth<br />
* An administrative contact email (optional, see below)<br />
* An alternative administrative contact email (optional)<br />
* (tier 1 mirrors) Rsync IPs so your server(s) can be allowed to sync off tier 0 (rsync.archlinux.org)<br />
* (tier 2 mirrors) The name of tier 1 mirror you are syncing from. You can find available tier 1 mirrors in https://archlinux.org/mirrors/tier/1/<br />
<br />
The contact email(s) will be used by Arch Linux staff to contact the mirror administrator if they have questions regarding the mirror or if there are problems with the mirror. If a contact email is not provided, the mirror listing may be removed at any time, especially if problems occur, without prior contact to the admin.<br />
<br />
=== Contact info and mailing lists ===<br />
<br />
Feel free to join the [https://mailman.archlinux.org/mailman/listinfo/arch-mirrors arch-mirrors mailing list] which can be used for general discussion about our mirrors. If you want to inform our users about downtime of your mirror please use the [https://lists.archlinux.org/listinfo/arch-mirrors-announce arch-mirrors-announce] mailing list. You do not need to subscribe to be able to post to arch-mirrors-announce.<br />
<br />
If you want to reach the Arch Linux staff for questions, you can either use the arch-mirrors list, you can open a bug report on our tracker or you can send a mail to [mailto:mirrors@archlinux.org mirrors@archlinux.org].<br />
<br />
== The Arch Linux side ==<br />
<br />
* Add the mirror info to the Django admin site<br />
* Regenerate the rsync whitelist with the {{ic|gen_rsyncd.conf.pl}} script - only for tier 1 mirrors, or when disabling access to a previously untiered mirror (also done by an hourly cronjob)<br />
* Regenerate the {{Pkg|pacman-mirrorlist}} package<br />
<br />
== Mirror size ==<br />
<br />
To give you an impression how much space will be needed for a mirror here are some numbers (as of 2018-03-01):<br />
<br />
Mandatory:<br />
<br />
* pool (all packages) - 42 GiB<br />
* repositories (core, community, extra, testing, gnome-unstable, kde-unstable, multilib) - total ~100 MiB<br />
<br />
Optional:<br />
<br />
* iso - 7 GiB (encouraged)<br />
* archive - 15 GiB (permanently frozen)<br />
* other - 17 GiB<br />
* sources - 50 GiB<br />
<br />
Most mirrors do not sync archive, other and sources directories, but sync everything else (including temporary repositories),<br />
so usually you will need about 50 GiB reserved for Arch Linux mirror.<br />
<br />
However, note that the required space may temporarily increase when a big rebuild happens and thus many packages exist twice in different versions. Please plan in a buffer of 30 GiB to 50 GiB on top of the above mentioned values.</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Improving_performance&diff=687675Improving performance2021-07-12T04:05:40Z<p>Foutrelis: Add tip about disabling zswap when using zram</p>
<hr />
<div>[[Category:Hardware]]<br />
[[Category:System administration]]<br />
[[ar:Improving performance]]<br />
[[es:Improving performance]]<br />
[[fr:Improving performance]]<br />
[[ja:パフォーマンスの最大化]]<br />
[[pt:Improving performance]]<br />
[[ru:Improving performance]]<br />
[[zh-hans:Improving performance]]<br />
{{Related articles start}}<br />
{{Related|/Boot process}}<br />
{{Related|Pacman/Tips and tricks#Performance}}<br />
{{Related|OpenSSH#Speeding up SSH}}<br />
{{Related|Openoffice#Speed up OpenOffice}}<br />
{{Related|Laptop}}<br />
{{Related|Preload}}<br />
{{Related articles end}}<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 bottlenecks, or subsystems which limit overall speed. The system specifications can help identify them.<br />
<br />
* If the computer becomes slow when large applications (such as LibreOffice and Firefox) run at the same time, check if the amount of RAM is sufficient. Use the following command, and check the "available" column:<br />
<br />
$ free -h<br />
<br />
* If boot time is slow, and applications take a long time to load at first launch (only), then the hard drive is likely to blame. The speed of a hard drive can be measured with the {{ic|hdparm}} command:<br />
{{Note|{{Pkg|hdparm}} indicates only the pure read speed of a hard drive, and is not a valid benchmark. A value higher than 40MB/s (while idle) is however acceptable on an average system.}}<br />
<br />
# hdparm -t /dev/sdX<br />
<br />
* If CPU load is consistently high even with enough RAM available, then try to lower CPU usage by disabling running [[daemons]] and/or processes. This can be monitored in several ways, for example with {{Pkg|htop}}, {{ic|pstree}} or any other [[List_of_applications#System monitors|system monitoring]] tool:<br />
<br />
$ htop<br />
<br />
* If applications using direct rendering are slow (i.e those which use the GPU, such as video players, games, or even a [[window manager]]), then improving GPU performance should help. The first step is to verify if direct rendering is actually enabled. This is indicated by the {{ic|glxinfo}} command, part of the {{Pkg|mesa-demos}} package:<br />
<br />
{{hc|$ glxinfo {{!}} grep "direct rendering"|<br />
direct rendering: Yes<br />
}}<br />
<br />
* When running a [[desktop environment]], disabling (unused) visual desktop effects may reduce GPU usage. Use a more lightweight environment or create a [[Desktop_environment#Custom_environments|custom environment]] if the current does not meet the hardware and/or personal requirements.<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 />
=== Multiple hardware paths ===<br />
<br />
{{Style|Subjective writing}}<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 />
<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 than 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 -t}}<br />
<br />
{{hc|PCI Device Tree|$ lspci -tv}}<br />
<br />
=== Partitioning ===<br />
<br />
Make sure that your partitions are [[Partitioning#Partition_alignment|properly aligned]].<br />
<br />
==== Multiple drives ====<br />
<br />
If you have multiple disks available, you can set them up as a software [[RAID]] for serious speed improvements.<br />
<br />
Creating [[swap]] on a separate disk can also help quite a bit, especially if your machine swaps frequently.<br />
<br />
==== Layout on HDDs ====<br />
<br />
If using a traditional spinning HDD, your partition layout can influence the system's performance. Sectors at the beginning of the drive (closer to the outside 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 in [[:Category:File systems]].<br />
<br />
==== Mount options ====<br />
<br />
The [[fstab#atime options|noatime]] option is known to improve performance of the filesystem.<br />
<br />
Other mount options are filesystem specific, therefore see the relevant articles for the filesystems:<br />
<br />
* [[Ext3]]<br />
* [[Ext4#Improving performance]]<br />
* [[JFS Filesystem#Optimizations]]<br />
* [[XFS#Performance]]<br />
* [[Btrfs#Defragmentation]], [[Btrfs#Compression]], and {{man|5|btrfs}}<br />
* [[ZFS#Tuning]]<br />
<br />
===== Reiserfs =====<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 [[Funtoo:Funtoo Filesystem Guide, Part 2|Funtoo Filesystem Guide]].<br />
<br />
=== Tuning kernel parameters ===<br />
<br />
There are several key tunables affecting the performance of block devices, see [[sysctl#Virtual memory]] for more information.<br />
<br />
=== Input/output schedulers ===<br />
<br />
==== Background information ====<br />
<br />
The input/output ''(I/O)'' scheduler is the kernel component that decides in which order the block I/O operations are submitted to storage devices. It is useful to remind here some specifications of two main drive types because the goal of the I/O scheduler is to optimize the way these are able to deal with read requests:<br />
<br />
* An HDD has spinning disks and a head that moves physically to the required location. Therefore, random latency is quite high ranging between 3 and 12ms (whether it is a high end server drive or a laptop drive and bypassing the disk controller write buffer) while sequential access provides much higher throughput. The typical HDD throughput is about 200 I/O operations per second ''(IOPS)''.<br />
<br />
* An SSD does not have moving parts, random access is as fast as sequential one, typically under 0.1ms, and it can handle multiple concurrent requests. The typical SSD throughput is greater than 10,000 IOPS, which is more than needed in common workload situations.<br />
<br />
If there are many processes making I/O requests to different storage parts, thousands of IOPS can be generated while a typical HDD can handle only about 200 IOPS. There is a queue of requests that have to wait for access to the storage. This is where the I/O schedulers plays an optimization role.<br />
<br />
==== The scheduling algorithms ====<br />
<br />
One way to improve throughput is to linearize access: by ordering waiting requests by their logical address and grouping the closest ones. Historically this was the first Linux I/O scheduler called [[Wikipedia:Elevator algorithm|elevator]].<br />
<br />
One issue with the elevator algorithm is that it is not optimal for a process doing sequential access: reading a block of data, processing it for several microseconds then reading next block and so on. The elevator scheduler does not know that the process is about to read another block nearby and, thus, moves to another request by another process at some other location. The [[Wikipedia:Anticipatory scheduling|anticipatory]] I/O scheduler overcomes the problem: it pauses for a few milliseconds in anticipation of another close-by read operation before dealing with another request.<br />
<br />
While these schedulers try to improve total throughput, they might leave some unlucky requests waiting for a very long time. As an example, imagine the majority of processes make requests at the beginning of the storage space while an unlucky process makes a request at the other end of storage. This potentially infinite postponement of the process is called starvation. To improve fairness, the [[Wikipedia:Deadline scheduler|deadline]] algorithm was developed. It has a queue ordered by address, similar to the elevator, but if some request sits in this queue for too long then it moves to an "expired" queue ordered by expire time. The scheduler checks the expire queue first and processes requests from there and only then moves to the elevator queue. Note that this fairness has a negative impact on overall throughput.<br />
<br />
The [[Wikipedia:CFQ|Completely Fair Queuing (CFQ)]] approaches the problem differently by allocating a timeslice and a number of allowed requests by queue depending on the priority of the process submitting them. It supports [[cgroup]] that allows to reserve some amount of I/O to a specific collection of processes. It is in particular useful for shared and cloud hosting: users who paid for some IOPS want to get their share whenever needed. Also, it idles at the end of synchronous I/O waiting for other nearby operations, taking over this feature from the ''anticipatory'' scheduler and bringing some enhancements. Both the ''anticipatory'' and the ''elevator'' schedulers were decommissioned from the Linux kernel replaced by the more advanced alternatives presented below.<br />
<br />
The [https://algo.ing.unimo.it/people/paolo/disk_sched/ Budget Fair Queuing (BFQ)] is based on CFQ code and brings some enhancements. It does not grant the disk to each process for a fixed time-slice but assigns a "budget" measured in number of sectors to the process and uses heuristics. It is a relatively complex scheduler, it may be more adapted to rotational drives and slow SSDs because its high per-operation overhead, especially if associated with a slow CPU, can slow down fast devices. The objective of BFQ on personal systems is that for interactive tasks, the storage device is virtually as responsive as if it was idle. In its default configuration it focuses on delivering the lowest latency rather than achieving the maximum throughput.<br />
<br />
[https://lwn.net/Articles/720675/ Kyber] is a recent scheduler inspired by active queue management techniques used for network routing. The implementation is based on "tokens" that serve as a mechanism for limiting requests. A queuing token is required to allocate a request, this is used to prevent starvation of requests. A dispatch token is also needed and limits the operations of a certain priority on a given device. Finally, a target read latency is defined and the scheduler tunes itself to reach this latency goal. The implementation of the algorithm is relatively simple and it is deemed efficient for fast devices.<br />
<br />
==== Kernel's I/O schedulers ====<br />
<br />
While some of the early algorithms have now been decommissioned, the official Linux kernel supports a number of I/O schedulers which can be split into two categories:<br />
<br />
*The '''multi-queue schedulers''' are available by default with the kernel. The [https://www.thomas-krenn.com/en/wiki/Linux_Multi-Queue_Block_IO_Queueing_Mechanism_(blk-mq) Multi-Queue Block I/O Queuing Mechanism (blk-mq)] maps I/O queries to multiple queues, the tasks are distributed across threads and therefore CPU cores. Within this framework the following schedulers are available:<br />
**''None'', where no queuing algorithm is applied.<br />
**''mq-deadline'', the adaptation of the deadline scheduler (see below) to multi-threading.<br />
**''Kyber''<br />
**''BFQ''<br />
<br />
*The '''single-queue schedulers''' are legacy schedulers:<br />
**[[w:Noop scheduler|NOOP]] is the simplest scheduler, it inserts all incoming I/O requests into a simple FIFO queue and implements request merging. In this algorithm, there is no re-ordering of the request based on the sector number. Therefore it can be used if the ordering is dealt with at another layer, at the device level for example, or if it does not matter, for SSDs for instance.<br />
**[[w:Deadline scheduler|Deadline]]<br />
**[[w:CFQ|CFQ]]<br />
<br />
:{{Note|1=Single-queue schedulers [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f382fb0bcef4c37dc049e9f6963e3baf204d815c were removed from kernel since Linux 5.0].}}<br />
<br />
==== Changing I/O scheduler ====<br />
<br />
{{Note|The best choice of scheduler depends on both the device and the exact nature of the workload. Also, the throughput in MB/s is not the only measure of performance: deadline or fairness deteriorate the overall throughput but may improve system responsiveness. [[Benchmarking]] may be useful to indicate each I/O scheduler performance.}}<br />
<br />
To list the available schedulers for a device and the active scheduler (in brackets):<br />
<br />
{{hc|$ cat /sys/block/'''''sda'''''/queue/scheduler|<br />
mq-deadline kyber [bfq] none<br />
}}<br />
<br />
To list the available schedulers for all devices:<br />
<br />
{{hc|$ grep "" /sys/block/'''*'''/queue/scheduler|<br />
/sys/block/pktcdvd0/queue/scheduler:none<br />
/sys/block/sda/queue/scheduler:mq-deadline kyber [bfq] none<br />
/sys/block/sr0/queue/scheduler:[mq-deadline] kyber bfq none<br />
}}<br />
<br />
To change the active I/O scheduler to ''bfq'' for device ''sda'', use:<br />
<br />
# echo '''''bfq''''' > /sys/block/'''''sda'''''/queue/scheduler<br />
<br />
The process to change I/O scheduler, depending on whether the disk is rotating or not can be automated and persist across reboots. For example the [[udev]] rule below sets the scheduler to ''none'' for [[NVMe]], ''mq-deadline'' for [[SSD]]/eMMC, and ''bfq'' for rotational drives:<br />
<br />
{{hc|/etc/udev/rules.d/60-ioschedulers.rules|2=<br />
# set scheduler for NVMe<br />
ACTION=="add{{!}}change", KERNEL=="nvme[0-9]n[0-9]", ATTR{queue/scheduler}="none"<br />
# set scheduler for SSD and eMMC<br />
ACTION=="add{{!}}change", KERNEL=="sd[a-z]{{!}}mmcblk[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline"<br />
# set scheduler for rotating disks<br />
ACTION=="add{{!}}change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"<br />
}}<br />
<br />
Reboot or force [[udev#Loading new rules]].<br />
<br />
==== Tuning I/O scheduler ====<br />
<br />
Each of the kernel's I/O scheduler has its own tunables, such as the latency time, the expiry time or the FIFO parameters. They are helpful in adjusting the algorithm to a particular combination of device and workload. This is typically to achieve a higher throughput or a lower latency for a given utilization.<br />
The tunables and their description can be found within the [https://www.kernel.org/doc/html/latest/block/index.html kernel documentation].<br />
<br />
To list the available tunables for a device, in the example below ''sdb'' which is using ''deadline'', use:<br />
<br />
{{hc|$ ls /sys/block/'''''sdb'''''/queue/iosched|<br />
fifo_batch front_merges read_expire write_expire writes_starved}}<br />
<br />
To improve ''deadline'''s throughput at the cost of latency, one can increase {{ic|fifo_batch}} with the command:<br />
<br />
{{bc|# echo ''32'' > /sys/block/'''''sdb'''''/queue/iosched/'''fifo_batch'''}}<br />
<br />
=== Power management configuration ===<br />
<br />
When dealing with traditional rotational disks (HDD's) you may want to [[Hdparm#Power_management_configuration|lower or disable power saving features]] completely.<br />
<br />
=== Reduce disk reads/writes ===<br />
<br />
Avoiding unnecessary access to slow storage drives is good for performance and also increasing lifetime of the devices, although on modern hardware the difference in life expectancy is usually negligible.<br />
<br />
{{Note|A 32GB SSD with a mediocre 10x write amplification factor, a standard 10000 write/erase cycle, and '''10GB of data written per day''', would get an '''8 years life expectancy'''. It gets better with bigger SSDs and modern controllers with less write amplification. Also compare [https://techreport.com/review/25889/the-ssd-endurance-experiment-500tb-update] when considering whether any particular strategy to limit disk writes is actually needed.}}<br />
<br />
==== Show disk writes ====<br />
<br />
The {{Pkg|iotop}} package can sort by disk writes, and show how much and how frequently programs are writing to the disk. See {{man|8|iotop}} for details.<br />
<br />
==== Relocate files to tmpfs ====<br />
<br />
Relocate files, such as your browser profile, to a [[tmpfs]] file system, for improvements in application response as all the files are now stored in RAM:<br />
<br />
* Refer to [[Profile-sync-daemon]] for syncing browser profiles. Certain browsers might need special attention, see e.g. [[Firefox on RAM]].<br />
* Refer to [[Anything-sync-daemon]] for syncing any specified folder.<br />
* Refer to [[Makepkg#Improving compile times]] for improving compile times by building packages in tmpfs.<br />
<br />
==== File systems ====<br />
<br />
Refer to corresponding [[file system]] page in case there were performance improvements instructions, e.g. [[Ext4#Improving performance]] and [[XFS#Performance]].<br />
<br />
==== Swap space ====<br />
<br />
See [[Swap#Performance]].<br />
<br />
==== Writeback interval and buffer size ====<br />
<br />
See [[Sysctl#Virtual memory]] for details.<br />
<br />
=== Storage I/O scheduling with ionice ===<br />
<br />
Many tasks such as backups do not rely on a short storage I/O delay or high storage I/O bandwidth to fulfil their task, they can be classified as background tasks. On the other hand quick I/O is necessary for good UI responsiveness on the desktop. Therefore it is beneficial to reduce the amount of storage bandwidth available to background tasks, whilst other tasks are in need of storage I/O. This can be achieved by making use of the linux I/O scheduler CFQ, which allows setting different priorities for processes.<br />
<br />
The I/O priority of a background process can be reduced to the "Idle" level by starting it with<br />
<br />
# ionice -c 3 command<br />
<br />
See {{man|1|ionice}} and [https://www.cyberciti.biz/tips/linux-set-io-scheduling-class-priority.html] for more information.<br />
<br />
== CPU ==<br />
<br />
=== Overclocking ===<br />
<br />
[[Wikipedia:Overclocking|Overclocking]] improves the computational performance of the CPU by increasing its peak clock frequency. The ability to overclock depends on the combination of CPU model and motherboard model. It is most frequently done through the BIOS. Overclocking also has disadvantages and risks. It is neither recommended nor discouraged here.<br />
<br />
Many Intel chips will not correctly report their clock frequency to acpi_cpufreq and most other utilities. This will result in excessive messages in [[dmesg]], which can be avoided by unloading and blacklisting the kernel module {{ic|acpi_cpufreq}}.<br />
To read their clock speed use ''i7z'' from the {{Pkg|i7z}} package. To check for correct operation of an overclocked CPU, it is recommended to do [[stress testing]].<br />
<br />
=== Frequency scaling ===<br />
<br />
See [[CPU frequency scaling]].<br />
<br />
=== Alternative CPU schedulers ===<br />
<br />
{{Expansion|MuQSS is not the only alternative scheduler.}}<br />
<br />
The default CPU scheduler in the mainline Linux kernel is [[Wikipedia:Completely_Fair_Scheduler|CFS]]. Alternative schedulers are available.<br />
<br />
{{Accuracy|The official {{Pkg|linux-zen}} package does not enable MuQSS ([https://bugs.archlinux.org/task/56312 Bug Report])}}<br />
<br />
One alternative scheduler focused on desktop interactivity and responsiveness is [http://ck.kolivas.org/patches/muqss/sched-MuQSS.txt MuQSS], developed by [http://kernel.kolivas.org/ Con Kolivas]. MuQSS is included in the {{Pkg|linux-zen}} kernel package. It is also available as a stand-alone patch or as part of the wider '''-ck''' patchset. See [[Linux-ck]] and [[Linux-pf]] for more information on the patchset.<br />
<br />
=== Real-time kernel ===<br />
<br />
Some applications such as running a TV tuner card at full HD resolution (1080p) may benefit from using a [[realtime kernel]].<br />
<br />
=== Adjusting priorities of processes ===<br />
<br />
See also {{man|1|nice}} and {{man|1|renice}}.<br />
<br />
==== Ananicy ====<br />
<br />
[https://github.com/Nefelim4ag/Ananicy Ananicy] is a daemon, available in the {{AUR|ananicy-git}} package, for auto adjusting the nice levels of executables. The nice level represents the priority of the executable when allocating CPU resources.<br />
<br />
==== cgroups ====<br />
<br />
See [[cgroups]].<br />
<br />
==== Cpulimit ====<br />
<br />
[https://github.com/opsengine/cpulimit Cpulimit] is a program to limit the CPU usage percentage of a specific process. After installing {{Pkg|cpulimit}}, you may limit the CPU usage of a processes' PID using a scale of 0 to 100 times the number of CPU cores that the computer has. For example, with eight CPU cores the precentage range will be 0 to 800. Usage:<br />
<br />
$ cpulimit -l 50 -p 5081<br />
<br />
=== irqbalance ===<br />
<br />
The purpose of {{Pkg|irqbalance}} is distribute hardware interrupts across processors on a multiprocessor system in order to increase performance. It can be [[systemd#Using units|controlled]] by the provided {{ic|irqbalance.service}}.<br />
<br />
=== Turn off CPU exploit mitigations ===<br />
<br />
{{Warning|1=Do not apply this setting without considering the vulnerabilities it opens up. See [https://phoronix.com/scan.php?page=news_item&px=Linux-Improve-CPU-Spec-Switches this] and [https://linuxreviews.org/HOWTO_make_Linux_run_blazing_fast_(again)_on_Intel_CPUs this] for more information.}}<br />
<br />
Turning off CPU exploit mitigations improves performance (sometimes up to 50%). Use below [[kernel parameter]] to disable them all:<br />
<br />
mitigations=off<br />
<br />
The explanations of all the switches it toggles are given at [https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html kernel.org]. You can use {{AUR|spectre-meltdown-checker}} for vulnerability check.<br />
<br />
== Graphics ==<br />
<br />
=== Xorg configuration ===<br />
<br />
Graphics performance may depend on the settings in {{man|5|xorg.conf}}; see the [[NVIDIA]], [[ATI]], [[AMDGPU]] and [[Intel]] articles. Improper settings may stop Xorg from working, so caution is advised.<br />
<br />
=== Mesa configuration ===<br />
<br />
The performance of the Mesa drivers can be configured via [https://dri.freedesktop.org/wiki/ConfigurationInfrastructure/ drirc]. GUI configuration tools are available:<br />
<br />
* {{App|adriconf (Advanced DRI Configurator)|GUI tool to configure Mesa drivers by setting options and writing them to the standard drirc file.|https://gitlab.freedesktop.org/mesa/adriconf/|{{Pkg|adriconf}}}}<br />
* {{App|DRIconf|Configuration applet for the Direct Rendering Infrastructure. It allows customizing performance and visual quality settings of OpenGL drivers on a per-driver, per-screen and/or per-application level.|https://dri.freedesktop.org/wiki/DriConf/|{{AUR|driconf}}}}<br />
<br />
=== Overclocking ===<br />
<br />
As with CPUs, overclocking can directly improve performance, but is generally recommended against. There are several packages in the [[AUR]], such as {{AUR|amdoverdrivectrl}} (old AMD/ATI cards), {{AUR|rocm-smi-lib64}} (recent AMD cards), {{AUR|nvclock}} (old NVIDIA - up to Geforce 9), and {{Pkg|nvidia-utils}} for recent NVIDIA cards.<br />
<br />
See [[AMDGPU#Overclocking]] or [[NVIDIA/Tips and tricks#Enabling overclocking]].<br />
<br />
=== Enabling PCI Resizable BAR ===<br />
<br />
The PCI specification allows larger [[wikipedia:PCI_configuration_space#Standardized_registers|Base Address Registers]] to be used for exposing PCI devices memory to the PCI Controller. This can result in a performance increase for video cards. Having access to the the full vRAM improves performance, but also enables optimizations in the graphics driver. The combination of resizable BAR, above 4G encoding and these driver optimizations are what AMD calls [https://www.amd.com/en/technologies/smart-access-memory AMD Smart Access Memory], currently available on AMD Series 500 chipset motherboards. This setting may not be available on all motherboards, and is known to sometimes cause boot problems on certain boards.<br />
<br />
If the BAR has a 256M size, the feature is not enabled or not supported:<br />
<br />
{{hc|1=# dmesg {{!}} grep BAR=|2=<br />
[drm] Detected VRAM RAM=8176M, BAR=256M}}<br />
<br />
To enable it, enable the setting named "Above 4G Decode" or ">4GB MMIO" in your motherboard settings. Verify that the BAR is now larger:<br />
<br />
{{hc|1=# dmesg {{!}} grep BAR=|2=<br />
[drm] Detected VRAM RAM=8176M, BAR=8192M}}<br />
<br />
== RAM, swap and OOM handling ==<br />
<br />
=== Clock frequency and timings ===<br />
<br />
RAM can run at different clock frequencies and timings, which can be configured in the BIOS. Memory performance depends on both values. Selecting the highest preset presented by the BIOS usually improves the performance over the default setting. Note that increasing the frequency to values not supported by both motherboard and RAM vendor is overclocking, and similar risks and disadvantages apply, see [[#Overclocking]].<br />
<br />
=== Root on RAM overlay ===<br />
<br />
If running off a slow writing medium (USB, spinning HDDs) and storage requirements are low, the root may be run on a RAM overlay ontop of read only root (on disk). This can vastly improve performance at the cost of a limited writable space to root. See {{AUR|liveroot}}.<br />
<br />
=== zram or zswap ===<br />
<br />
The [https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html zram] kernel module (previously called '''compcache''') provides a compressed block device in RAM. If you use it as swap device, 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. Using zram is also a good way to reduce disk read/write cycles due to swap on SSDs.<br />
<br />
Similar benefits (at similar costs) can be achieved using [[zswap]] rather than zram. The two are generally similar in intent although not operation: zswap operates as a compressed RAM cache and neither requires (nor permits) extensive userspace configuration.<br />
<br />
{{Tip|Consider [[Zswap#Toggling_zswap|disabling zswap]] when using zram to avoid it acting as a swap cache in front of zram. Having both enabled also results in incorrect {{ic|zramctl}} statistics as zram remains mostly unused; this is because zswap intercepts and compresses memory pages being swapped out before they can reach zram.}}<br />
<br />
Example: To set up one lz4 compressed zram device with 32GiB capacity and a higher-than-normal priority (only for the current session):<br />
<br />
# modprobe zram<br />
# echo lz4 > /sys/block/zram0/comp_algorithm<br />
# echo 32G > /sys/block/zram0/disksize<br />
# mkswap --label zram0 /dev/zram0<br />
# swapon --priority 100 /dev/zram0<br />
<br />
To disable it again, either reboot or run<br />
<br />
# swapoff /dev/zram0<br />
# rmmod zram<br />
<br />
A detailed explanation of all steps, options and potential problems is provided in the [https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html official documentation of the zram module].<br />
<br />
The {{pkg|zram-generator}} package provides a {{ic|systemd-zram-setup@.service}} unit to automatically initialize zram devices without users needing to [[enable/start]] the template or its instances. The following resources provide information on how to use it:<br />
<br />
* {{man|8|zram-generator}}<br />
* {{man|5|zram-generator.conf}}<br />
* https://github.com/systemd/zram-generator#readme<br />
<br />
"The generator will be invoked by systemd early at boot", so usage is as simple as creating the appropriate configuration file(s) and rebooting. A sample configuration is provided in [https://raw.githubusercontent.com/systemd/zram-generator/main/zram-generator.conf.example /usr/share/doc/zram-generator/zram-generator.conf.example]. You can also [[Swap#Swap space|check the swap status]] of your configured {{ic|/dev/zram''N''}} devices by checking the [[unit status]] of the {{ic|systemd-zram-setup@zram''N''.service}} instance(s).<br />
<br />
The package {{AUR|zramswap}} provides an automated script for setting up a swap with a higher priority and a default size of 20% of the RAM size of your system. To do this automatically on every boot, [[enable]] {{ic|zramswap.service}}.<br />
<br />
Alternatively, the {{AUR|zramd}} package allows to setup zram automatically using zstd compression by default, its configuration can be changed at {{ic|/etc/default/zramd}}. It can be started at boot by enabling the {{ic|zramd.service}} unit.<br />
<br />
==== Swap on zram using a udev rule ====<br />
<br />
The example below describes how to set up swap on zram automatically at boot with a single udev rule. No extra package should be needed to make this work.<br />
<br />
First, enable the module:<br />
<br />
{{hc|/etc/modules-load.d/zram.conf|<br />
zram<br />
}}<br />
<br />
Configure the number of /dev/zram nodes you need.<br />
<br />
{{hc|/etc/modprobe.d/zram.conf|2=<br />
options zram num_devices=2<br />
}}<br />
<br />
Create the udev rule as shown in the example.<br />
<br />
{{hc|/etc/udev/rules.d/99-zram.rules|2=<br />
KERNEL=="zram0", ATTR{disksize}="512M" RUN="/usr/bin/mkswap /dev/zram0", TAG+="systemd"<br />
KERNEL=="zram1", ATTR{disksize}="512M" RUN="/usr/bin/mkswap /dev/zram1", TAG+="systemd"<br />
}}<br />
<br />
Add /dev/zram to your fstab.<br />
<br />
{{hc|/etc/fstab|<br />
/dev/zram0 none swap defaults 0 0<br />
/dev/zram1 none swap defaults 0 0<br />
}}<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 />
=== Improving system responsiveness under low-memory conditions ===<br />
<br />
On traditional GNU/Linux system, especially for graphical workstations, when allocated memory is overcommitted, the overall system's responsiveness may degrade to a nearly unusable state before either triggering the in-kernel OOM-killer or a sufficient amount of memory got free (which is unlikely to happen quickly when the system is unresponsive, as you can hardly close any memory-hungry applications which may continue to allocate more memory). The behaviour also depends on specific setups and conditions, returning to a normal responsive state may take from a few seconds to more than half an hour, which could be a pain to wait in serious scenario like during a conference presentation.<br />
<br />
While the behaviour of the kernel as well as the userspace things under low-memory conditions may improve in the future as discussed on [https://lore.kernel.org/lkml/d9802b6a-949b-b327-c4a6-3dbca485ec20@gmx.com/T/ kernel] and [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/XUZLHJ5O32OX24LG44R7UZ2TMN6NY47N/ Fedora] mailing lists, users can use more feasible and effective options than hard-resetting the system or tuning the {{ic|vm.overcommit_*}} [[sysctl]] parameters:<br />
<br />
* Manually trigger the kernel OOM-killer with [https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html Magic SysRq key], namely {{ic|Alt+SysRq+f}}.<br />
* Use a userspace OOM daemon to tackle these automatically (or interactively).<br />
<br />
{{Warning|Triggering OOM killer to kill running applications may lose your unsaved works. It is up to you that either you are patient enough to wait in hope that applications will finally free the memory normally, or you want to bring back unresponsive system as soon as possible.}}<br />
<br />
Sometimes a user may prefer OOM daemon to SysRq because with kernel OOM-killer you cannot prioritize the process to (or not) terminate. To list some OOM daemons:<br />
<br />
* {{App|systemd-oomd|Provided by [[systemd]] as {{ic|systemd-oomd.service}} that uses cgroups-v2 and pressure stall information (PSI) to monitor and take action on processes before an OOM occurs in kernel space.|https://github.com/systemd/systemd, {{man|8|systemd-oomd}}|{{Pkg|systemd}}}}<br />
* {{App|earlyoom|Simple userspace OOM-killer implementation written in C.|https://github.com/rfjakob/earlyoom|{{Pkg|earlyoom}}}}<br />
* {{App|oomd|OOM-killer implementation based on [https://lwn.net/Articles/759781/ PSI], requires Linux kernel version 4.20+. Configuration is in JSON and is quite complex. Confirmed to work in Facebook's production environment.|https://github.com/facebookincubator/oomd|{{aur|oomd}}}}<br />
* {{App|nohang|Sophisticated OOM handler written in Python, with optional PSI support, more configurable than earlyoom.|https://github.com/hakavlad/nohang|{{aur|nohang-git}}}}<br />
* {{App|low-memory-monitor|GNOME developer's effort that aims to provides better communication to userspace applications to indicate the low memory state, besides that it could be configured to trigger the kernel OOM-killer. Based on PSI, requires Linux 5.2+.|https://gitlab.freedesktop.org/hadess/low-memory-monitor/|{{aur|low-memory-monitor-git}}}}<br />
<br />
== Network ==<br />
<br />
* Kernel networking: see [[Sysctl#Improving performance]]<br />
* NIC: see [[Network configuration#Set device MTU and queue length]]<br />
* DNS: consider using a caching DNS resolver, see [[Domain name resolution#DNS servers]]<br />
* Samba: see [[Samba#Improve throughput]]<br />
<br />
== Watchdogs ==<br />
<br />
According to [[Wikipedia:Watchdog timer]]:<br />
<br />
:A watchdog timer [...] is an electronic timer that is used to detect and recover from computer malfunctions. During normal operation, the computer regularly resets the watchdog timer [...]. If, [...], the computer fails to reset the watchdog, the timer will elapse and generate a timeout signal [...] used to initiate corrective [...] actions [...] typically include placing the computer system in a safe state and restoring normal system operation.<br />
<br />
Many users need this feature due to their system's mission-critical role (i.e. servers), or because of the lack of power reset (i.e. embedded devices). Thus, this feature is required for a good operation in some situations. On the other hand, normal users (i.e. desktop and laptop) do not need this feature and can disable it.<br />
<br />
To disable watchdog timers (both software and hardware), append {{ic|nowatchdog}} to your boot parameters.<br />
<br />
To check the new configuration do:<br />
<br />
# cat /proc/sys/kernel/watchdog<br />
<br />
or use:<br />
<br />
# wdctl<br />
<br />
After you disabled watchdogs, you can ''optionally'' avoid the loading of the module responsible of the hardware watchdog, too. Do it by [[blacklisting]] the related module, e.g. {{ic|iTCO_wdt}}.<br />
<br />
{{Note|1=Some users [https://bbs.archlinux.org/viewtopic.php?id=221239 reported] the {{ic|nowatchdog}} parameter does not work as expected but they have successfully disabled the watchdog (at least the hardware one) by blacklisting the above-mentioned module.}}<br />
<br />
Either action will speed up your boot and shutdown, because one less module is loaded. Additionally disabling watchdog timers increases performance and [[Power management#Disabling NMI watchdog|lowers power consumption]].<br />
<br />
See [https://bbs.archlinux.org/viewtopic.php?id=163768], [https://bbs.archlinux.org/viewtopic.php?id=165834], [http://0pointer.de/blog/projects/watchdog.html], and [https://www.kernel.org/doc/html/latest/watchdog/watchdog-parameters.html] for more information.<br />
<br />
== See also ==<br />
<br />
* [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Performance_Tuning_Guide/index.html Red Hat Performance Tuning Guide]<br />
* [https://www.thomas-krenn.com/en/wiki/Linux_Performance_Measurements_using_vmstat Linux Performance Measurements using vmstat]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Chromium&diff=653866Chromium2021-03-02T21:19:03Z<p>Foutrelis: Add note about using Chrome's keys for Sync.</p>
<hr />
<div>[[Category:Web browser]]<br />
[[Category:Google]]<br />
[[de:Chromium]]<br />
[[es:Chromium]]<br />
[[fr:chromium]]<br />
[[it:Chromium]]<br />
[[ja:Chromium]]<br />
[[zh-hans:Chromium]]<br />
{{Related articles start}}<br />
{{Related|Browser extensions}}<br />
{{Related|Firefox}}<br />
{{Related|Opera}}<br />
{{Related articles end}}<br />
<br />
[[Wikipedia:Chromium (web browser)|Chromium]] is an open-source graphical web browser based on the [[Wikipedia:Blink (web engine)|Blink]] rendering engine. It is the basis for the proprietary Google Chrome browser.<br />
<br />
See [https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md this page] for an explanation of the differences between Chromium and Google Chrome. Additionally:<br />
<br />
* Sync is unavailable in Chromium 89+ (2021-03-02) [https://archlinux.org/news/chromium-losing-sync-support-in-early-march/]<br />
<br />
{{Note|Sync can be temporarily restored by [https://gist.github.com/foutrelis/14e339596b89813aa9c37fd1b4e5d9d5 using Chrome's OAuth2 credentials], but pay attention to the disclaimers and do not consider this to be a long-term solution.}}<br />
<br />
See [[List of applications/Internet#Blink-based]] for other browsers based on Chromium.<br />
<br />
== Installation ==<br />
<br />
There are several packages available to [[install]] Chromium with:<br />
<br />
* {{Pkg|chromium}} — stable release;<br />
* {{AUR|chromium-dev}} — development release;<br />
* {{AUR|chromium-snapshot-bin}} — nightly build.<br />
<br />
Google Chrome packages:<br />
<br />
* {{AUR|google-chrome}} — stable release;<br />
* {{AUR|google-chrome-beta}} — beta release;<br />
* {{AUR|google-chrome-dev}} — development release.<br />
<br />
{{Note|From the [https://www.chromium.org/Home/chromium-privacy Chromium privacy page]: "Features that communicate with Google made available through the compilation of code in Chromium are subject to the [http://www.google.com/policies/privacy/ Google Privacy Policy]." For those who want to avoid all integration with Google services, there are some [[List of applications/Internet#Privacy-focused chromium spin-offs|privacy-focused spin-offs]].}}<br />
<br />
== Configuration ==<br />
<br />
=== Default applications ===<br />
<br />
To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see [[default applications]].<br />
<br />
=== Certificates ===<br />
<br />
Chromium uses [[Network Security Services]] for certificate management. Certificates can be managed in {{ic|chrome://settings/certificates}}.<br />
<br />
=== Force GPU acceleration ===<br />
<br />
{{Warning|Disabling the rendering blacklist may cause unstable behavior, including crashes of the host. See the bug reports in {{ic|chrome://gpu}} for details.}}<br />
<br />
By default Chromium on Linux doesn't use any GPU acceleration. To force GPU acceleration, [[append]] the following flags to [[/Tips and tricks#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
--enable-zero-copy<br />
}}<br />
<br />
Additionally the flag {{ic|--disable-gpu-driver-bug-workarounds}} may need to be passed to prevent GPU workaround from being used. Flags in {{ic|chrome://gpu}} should state "Hardware accelerated" when configured and available.<br />
<br />
{{ic|--enable-native-gpu-memory-buffers}} is broken since mesa 20.1.1 [https://gitlab.freedesktop.org/mesa/mesa/-/issues/3119#note_533902]<br />
<br />
=== Hardware video acceleration ===<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* There is no official support from Chromium or Arch Linux for this feature [https://chromium.googlesource.com/chromium/src/+/master/docs/gpu/vaapi.md#vaapi-on-linux], but you may ask for help in [https://bbs.archlinux.org/viewtopic.php?id=244031 the dedicated forum thread].<br />
* {{Pkg|chromium}} from official repositories is compiled with VA-API support.<br />
* For proprietary NVIDIA support, installing {{AUR|libva-vdpau-driver-chromium}} or {{AUR|libva-vdpau-driver-vp9-git}} is required.<br />
* Wayland is not supported.<br />
* To use VA-API on XWayland, use the {{ic|1=--use-gl=egl}} flag. Currently exhibits choppiness {{Bug|67035}}. It could be solved by enabling [[#Native Wayland support]].<br />
* To use VA-API on Xorg, use the {{ic|1=--use-gl=desktop}} flag.<br />
* Starting in Chromium 86, there will be support for VA-API when using the ANGLE gl renderer. Use the {{ic|--enable-accelerated-video-decode}} to enable it on an Intel GPU.}}<br />
<br />
Before trying VA-API support in Chromium, be sure to:<br />
<br />
* Install correct VA-API driver for your video card and verify VA-API has been enabled and working correctly, see [[Hardware video acceleration]];<br />
* One may need to [[#Force GPU acceleration]] as Chromium uses a GPU blocklist by default;<br />
* Check {{ic|chrome://gpu}} ''Video Decode'' field.<br />
* Test on a large enough video. Starting with version 86, Chromium on desktop [https://bugs.chromium.org/p/chromium/issues/detail?id=684792 will only accelerate videos larger than 720p].<br />
<br />
To check if it's working play a video which is using a codec supported by your VA-API driver (''vainfo'' tells you which codecs are supported, but chrome will only support VP9 and h264):<br />
<br />
* With the Media Internals tab: Go to {{ic|chrome://media-internals/}} and check ''video_decoder'' field:<br />
** Hardware accelerated: ''MojoVideoDecoder'', ''GpuVideoDecoder''.<br />
** In-software decoding: ''VpxVideoDecoder'', ''FFmpegVideoDecoder'', ''Dav1dVideoDecoder''.<br />
* With Chrome DevTools:<br />
** Open the DevTools by pressing {{ic|Ctrl+Shift+I}} or on the ''Inspect'' button of the context (right-click) menu<br />
** (Version 84 and below only) Enable the media inspection experiment: ''Settings'' ({{ic|F1}} or menu) ''> Experiments > Media Element Inspection''<br />
** Add the Media inspection tab: ''menu > More tools > Media''<br />
** In the newly opened Media tab, look at the hardware decoder state of the video decoder<br />
<br />
To reduce CPU usage while watching YouTube where VP8/VP9 hardware decoding is not available use the [https://chrome.google.com/webstore/detail/h264ify/aleakchihdccplidncghkekgioiakgal h264ify] or [https://chrome.google.com/webstore/detail/enhanced-h264ify/omkfmpieigblcllmkgbflkikinpkodlk enhanced-h264ify] extension.<br />
<br />
=== Making flags persistent ===<br />
<br />
{{Note|The {{ic|chromium-flags.conf}} file and the accompanying custom launcher script are specific to the Arch Linux {{Pkg|chromium}} package. For {{AUR|google-chrome}}, use {{ic|chrome-flags.conf}} instead.}}<br />
<br />
You can put your flags in a {{ic|chromium-flags.conf}} file under {{ic|$HOME/.config/}} (or under {{ic|$XDG_CONFIG_HOME}} if you have configured that environment variable).<br />
<br />
No special syntax is used; flags are defined as if they were written in a terminal.<br />
<br />
* The arguments are split on whitespace and shell quoting rules apply, but no further parsing is performed.<br />
* In case of improper quoting anywhere in the file, a fatal error is raised.<br />
* Flags can be placed in separate lines for readability, but this is not required.<br />
* Lines starting with a hash symbol (#) are skipped.<br />
<br />
Below is an example {{ic|chromium-flags.conf}} file that defines the flags {{ic|--start-maximized --incognito}}:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
# This line will be ignored.<br />
--start-maximized<br />
--incognito<br />
}}<br />
<br />
=== PDF viewer plugin ===<br />
<br />
Chromium and Google Chrome are bundled with the ''Chromium PDF Viewer'' plugin. If you don't want to use this plugin, check ''Open PDFs using a different application'' in {{ic|chrome://settings/content/pdfDocuments}}.<br />
<br />
=== Flash Player plugin ===<br />
<br />
Support for Flash Player was removed in Chromium 88.[https://www.chromium.org/flash-roadmap#TOC-Flash-Support-Removed-from-Chromium-Target:-Chrome-88---Jan-2021-]<br />
<br />
=== Native Wayland support ===<br />
<br />
Since version 87, native [[Wayland]] support in Chromium can be enabled with the following flags [https://bugs.chromium.org/p/chromium/issues/detail?id=1085700]:<br />
<br />
--enable-features=UseOzonePlatform --ozone-platform=wayland<br />
<br />
See [[#Making flags persistent]] for a permanent configuration.<br />
<br />
== Tips and tricks ==<br />
<br />
The following tips and tricks should work for both Chromium and Chrome unless explicitly stated.<br />
<br />
=== Browsing experience ===<br />
==== chrome:// URLs ====<br />
A number of tweaks can be accessed via Chrome URLs. See '''chrome://chrome-urls''' for a complete list.<br />
<br />
* '''chrome://flags''' - access experimental features such as WebGL and rendering webpages with GPU, etc.<br />
* '''chrome://extensions''' - view, enable and disable the currently used Chromium extensions.<br />
* '''chrome://gpu''' - status of different GPU options.<br />
* '''chrome://sandbox''' - indicate sandbox status.<br />
* '''chrome://version''' - display version and switches used to invoke the active {{ic|/usr/bin/chromium}}.<br />
<br />
An automatically updated, complete listing of Chromium switches (command line parameters) is available [http://peter.sh/experiments/chromium-command-line-switches/ here].<br />
<br />
==== Chromium task manager ====<br />
Shift+ESC can be used to bring up the browser task manager wherein memory, CPU, and network usage can be viewed.<br />
<br />
==== Chromium overrides/overwrites Preferences file ====<br />
<br />
If you enabled syncing with a Google Account, then Chromium will override any direct edits to the Preferences file found under {{ic|~/.config/chromium/Default/Preferences}}. To work around this, start Chromium with the {{ic|--disable-sync-preferences}} switch:<br />
$ chromium --disable-sync-preferences<br />
<br />
If Chromium is started in the background when you login in to your desktop environment, make sure the command your desktop environment uses is:<br />
$ chromium --disable-sync-preferences --no-startup-window<br />
<br />
==== Search engines ====<br />
Make sites like [https://wiki.archlinux.org wiki.archlinux.org] and [https://en.wikipedia.org wikipedia.org] easily searchable by first executing a search on those pages, then going to ''Settings > Search'' and click the ''Manage search engines..'' button. From there, "Edit" the Wikipedia entry and change its keyword to '''w''' (or some other shortcut you prefer). Now searching Wikipedia for "Arch Linux" from the address bar is done simply by entering "'''w arch linux'''".<br />
<br />
{{Note| Google search is used automatically when typing something into the URL bar. A hard-coded keyword trigger is also available using the '''?''' prefix.}}<br />
<br />
==== Tmpfs ====<br />
===== Cache in tmpfs =====<br />
{{Note|Chromium stores its cache separate from its browser profile directory.}}<br />
<br />
To limit Chromium from writing its cache to a physical disk, one can define an alternative location via the {{ic|--disk-cache-dir}} flag:<br />
$ chromium --disk-cache-dir="$XDG_RUNTIME_DIR/chromium-cache"<br />
<br />
Cache should be considered temporary and will '''not''' be saved after a reboot or hard lock. Another option is to setup the space in {{ic|/etc/fstab}}:<br />
<br />
{{hc|/etc/fstab|2=<br />
tmpfs /home/''username''/.cache tmpfs noatime,nodev,nosuid,size=400M 0 0<br />
}}<br />
<br />
===== Profile in tmpfs =====<br />
Relocate the browser profile to a [[Wikipedia:Tmpfs|tmpfs]] filesystem, including {{ic|/tmp}}, or {{ic|/dev/shm}} for improvements in application response as the entire profile is now stored in RAM.<br />
<br />
Use an active profile management tool such as {{Pkg|profile-sync-daemon}} for maximal reliability and ease of use. It symlinks or bind mounts and syncs the browser profile directories to RAM. For more, see [[Profile-sync-daemon]].<br />
<br />
====Launch a new browser instance====<br />
When you launch the browser, it first checks if another instance using the same data directory is already running. If there is one, the new window is associated with the old instance. If you want to launch an independent instance of the browser, you must specify separate directory using the {{ic|--user-data-dir}} parameter:<br />
<br />
$ chromium --user-data-dir=''/path/to/some/directory''<br />
<br />
{{Note|The default location of the user data is {{ic|~/.config/chromium/}}.}}<br />
<br />
====Directly open *.torrent files and magnet links with a torrent client====<br />
<br />
By default, Chromium downloads {{ic|*.torrent}} files directly and you need to click the notification from the bottom-left corner of the screen in order for the file to be opened with your default torrent client. This can be avoided with the following method:<br />
<br />
* Download a {{ic|*.torrent}} file.<br />
* Right-click the notification displayed at the bottom-left corner of the screen.<br />
* Check the "''Always Open Files of This Type''" checkbox.<br />
<br />
See [[xdg-open]] to change the default assocation.<br />
<br />
==== Touch Scrolling on touchscreen devices ====<br />
You may need to specify which touch device to use. Find your touchscreen device with {{ic| xinput list}} then launch Chromium with the {{ic|1=--touch-devices='''x'''}} parameter, where "'''x'''" is the id of your device. {{Note|If the device is designated as a slave pointer, using this may not work, use the master pointer's ID instead.}}<br />
<br />
==== Reduce memory usage ====<br />
<br />
By default, Chromium uses a separate OS process for each ''instance'' of a visited web site. [https://www.chromium.org/developers/design-documents/process-models#Supported_Models] However, you can specify command-line switches when starting Chromium to modify this behaviour.<br />
<br />
For example, to share one process for all instances of a website:<br />
<br />
$ chromium --process-per-site<br />
<br />
To use a single process model:<br />
<br />
$ chromium --single-process<br />
<br />
{{Warning|The single-process model is discouraged because it is unsafe and may contain bugs not present in other models.[https://www.chromium.org/developers/design-documents/process-models#TOC-Single-process]}}<br />
<br />
In addition, you can suspend or store inactive Tabs with extensions such as [https://chrome.google.com/webstore/detail/tab-suspender/fiabciakcmgepblmdkmemdbbkilneeeh?hl=en Tab Suspender], [https://github.com/deanoemcke/thegreatsuspender/ The Great Suspender(GPLv2)] and [https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall?hl=en OneTab].<br />
<br />
==== User Agent====<br />
<br />
The User Agent can be arbitrarily modified at the start of Chromium's base instance via its {{Ic|<nowiki>--user-agent="[string]"</nowiki>}} parameter.<br />
<br />
==== DOM Distiller ====<br />
Chromium has a similar reader mode to Firefox. In this case it's called DOM Distiller, which is an [https://github.com/chromium/dom-distiller open source project].<br />
It is disabled by default, but can be enabled using the {{Ic|chrome://flags/#enable-reader-mode}} flag, which you can also make [[#Making flags persistent|persistent]].<br />
Not only does DOM Distiller provide a better reading experience by distilling the content of the page, it also simplifies pages for print. Even though the latter checkbox option has been removed from the print dialog, you can still print the distilled page, which basically has the same effect.<br />
<br />
After enabling the flag, you will find a new "Toggle reader mode" menu item and corresponding icon in the address bar when Chromium thinks the website you're visiting could do with some distilling.<br />
<br />
==== Forcing specific GPU ====<br />
<br />
In multi-GPU systems, Chromium automatically detects which GPU should be used for rendering (discrete or integrated). This works 99% of the time, except when it doesn't - if a unavailable GPU is picked (for example, discrete graphics on VFIO GPU passthrough-enabled systems), {{ic|chrome://gpu}} will complain about not being able to initialize the GPU process. On the same page below '''Driver Information''' there'll be multiple GPUs shown (GPU0, GPU1, ...). There's no way to switch between them in a user-friendly way, but you can read the device/vendor IDs present there and configure Chromium to use a specific GPU with flags:<br />
<br />
$ chromium --gpu-testing-vendor-id=0x8086 --gpu-testing-device-id=0x1912<br />
<br />
...where {{ic|0x8086}} and {{ic|0x1912}} is replaced by the IDs of the GPU you want to use (as shown on the {{ic|chrome://gpu}} page).<br />
<br />
==== Import bookmarks from Firefox ====<br />
<br />
To ease the transition, you can import bookmarks from [[Firefox]] into Chromium.<br />
<br />
Navigate Chromium to {{ic|chrome://settings/importData}}<br />
<br />
If Firefox is already installed on your computer, you can directly import bookmarks as well as many other things from Firefox.<br />
<br />
Make sure '''Mozilla Firefox''' is selected. Optionally, you can uncheck some unwanted items here. Click the '''Import''' and then '''Done'''. You're done with it.<br />
<br />
{{note|If you haven't created any bookmarks in Chromium yet, the bookmarks will show up in your bookmarks bar. If you already have bookmarks, the bookmarks will be in a new folder labeled "Imported From Firefox"}}<br />
<br />
If you import bookmarks from another PC, you have to export bookmarks from Firefox first.<br />
<br />
{{ic|''Ctrl + Shift + O > Import and Backup > Export Bookmarks To HTML}} in Firefox''<br />
<br />
The procedure is pretty much the same. You need to go to {{ic|chrome://settings/importData}}. However, this time, in the '''From''' drop-down menu, select '''Bookmarks HTML File''' and click the '''Choose File''' button and upload the desired bookmark file.<br />
<br />
==== Enabling native notifications ====<br />
<br />
Go to {{ic|chrome://flags#enable-native-notifications}} and select ''Enabled''.<br />
<br />
==== U2F authentication ====<br />
Install {{Pkg|libfido2}} library. This provides the udev rules required to enable access to the [[U2F]] key as a user.<br />
U2F keys are by default only accessible by root, and without these rules Chromium will give an error.<br />
<br />
==== Dark mode ====<br />
To enable dark mode (used in ''prefers-color-scheme'' in CSS, JavaScript, Settings and Dev-Tools) and enable the dark theme (normally used for incognito mode) [[append]] the following flag to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--force-dark-mode<br />
--enable-features=WebUIDarkMode<br />
}}<br />
<br />
===== Dark mode by system preference =====<br />
[https://bugs.chromium.org/p/chromium/issues/detail?id=998903 This Chromium issue] aims to bring dark mode based on GTK theme selection into Chromium.<br />
<br />
In the future, all that will be required to properly use system preference, is setting ''Designs'' to GTK in {{ic|chrome://settings/appearance}}.<br />
<br />
=== Profile maintenance ===<br />
Chromium uses [[SQLite]] databases to manage history and the like. Sqlite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks- and history-related tasks is to defragment and trim unused space from these databases.<br />
<br />
{{Pkg|profile-cleaner}} and {{AUR|browser-vacuum}} in the [[AUR]] do just this.<br />
<br />
=== Security ===<br />
==== WebRTC ====<br />
WebRTC is a communication protocol that relies on JavaScript that can leak one's actual IP address and hardware hash from behind a VPN. While some software may prevent the leaking scripts from running, it's probably a good idea to block this protocol directly as well, just to be safe. As of October 2016, there is no way to disable WebRTC on Chromium on desktop, there are extensions available to disable local IP address leak, one is this [https://chrome.google.com/webstore/detail/webrtc-network-limiter/npeicpdbkakmehahjeeohfdhnlpdklia extension].<br />
<br />
One can test WebRTC via [https://www.privacytools.io/webrtc.html this page].<br />
<br />
{{Warning|Even though IP leak can be prevented, Chromium still sends your unique hash, and there is no way to prevent this. Read more on https://www.browserleaks.com/webrtc#webrtc-disable }}<br />
<br />
==== SSL certificates ====<br />
Chromium does not have an SSL certificate manager. It relies on the NSS Shared DB {{ic|~/.pki/nssdb}}. In order to add SSL certificates to the database, users will have to use the shell. <br />
<br />
===== Adding CAcert certificates for self-signed certificates =====<br />
Grab the CAcerts and create an {{ic|nssdb}}, if one does not already exist. To do this, first install the {{Pkg|nss}} package, then complete these steps:<br />
<br />
$ mkdir -p $HOME/.pki/nssdb<br />
$ cd $HOME/.pki/nssdb<br />
$ certutil -N -d sql:.<br />
<br />
$ curl -k -o "cacert-root.crt" "http://www.cacert.org/certs/root.crt"<br />
$ curl -k -o "cacert-class3.crt" "http://www.cacert.org/certs/class3.crt"<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org" -i cacert-root.crt <br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org Class 3" -i cacert-class3.crt<br />
<br />
{{Note|Users will need to create a password for the database, if it does not exist.}}<br />
<br />
Now users may manually import a self-signed certificate.<br />
<br />
===== Example 1: Using a shell script to isolate the certificate from TomatoUSB =====<br />
Below is a simple script that will extract and add a certificate to the user's {{ic|nssdb}}:<br />
<br />
#!/bin/sh<br />
#<br />
# usage: import-cert.sh remote.host.name [port]<br />
#<br />
REMHOST=$1<br />
REMPORT=${2:-443}<br />
exec 6>&1<br />
exec > $REMHOST<br />
echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'<br />
certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n "$REMHOST" -i $REMHOST <br />
exec 1>&6 6>&-<br />
<br />
Syntax is advertised in the commented lines.<br />
<br />
References:<br />
*http://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu{{Dead link|2020|03|28|status=404}}<br />
*https://chromium.googlesource.com/chromium/src/+/master/docs/linux/cert_management.md<br />
<br />
===== Example 2: Using Firefox to isolate the certificate from TomatoUSB =====<br />
The {{Pkg|firefox}} browser can be used to save the certificate to a file for manual import into the database.<br />
<br />
Using firefox:<br />
#Browse to the target URL.<br />
#Upon seeing the "This Connection is Untrusted" warning screen, click: ''I understand the Risks > Add Exception...''<br />
#Click: ''View > Details > Export'' and save the certificate to a temporary location ({{ic|/tmp/easy.pem}} in this example).<br />
<br />
Now import the certificate for use in Chromium:<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "easy" -i /tmp/easy.pem<br />
<br />
{{Note|Adjust the name to match that of the certificate. In the example above, "easy" is the name of the certificate.}}<br />
<br />
Reference:<br />
*https://sahissam.blogspot.com/2012/06/new-ssl-certificates-for-tomatousb-and.html<br />
<br />
==== Canvas Fingerprinting ====<br />
Canvas fingerprinting is a technique that allows websites to identify users by detecting differences when rendering to an HTML5 canvas. This information can be made inaccessible by using the {{ic|--disable-reading-from-canvas}} flag.<br />
<br />
To confirm this is working run [https://panopticlick.eff.org this test] and make sure "hash of canvas fingerprint" is reported as undetermined in the full results.<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* Some extensions require reading from canvas and may be broken by setting {{ic|--disable-reading-from-canvas}}.<br />
* YouTube player does not work properly without canvas reading. [https://github.com/qutebrowser/qutebrowser/issues/5345][https://bbs.archlinux.org/viewtopic.php?pid=1907406]<br />
}}<br />
<br />
==== Privacy extensions ====<br />
<br />
See [[Browser extensions#Privacy]].<br />
<br />
{{Tip|Installing too many extensions might take up much space in the toolbar. Those extensions which you wouldn't interact with anyway (e.g. [https://chrome.google.com/webstore/detail/gcbommkclmclpchllfjekcdonpmejbdp HTTPS Everywhere]) can be hidden by right-clicking on the extension and choosing ''Hide in Chromium menu''.}}<br />
<br />
==== Do Not Track ====<br />
<br />
To enable [[wikipedia:Do Not Track|Do Not Track]], visit {{ic|chrome://settings}}, scroll down to ''Advanced'' and under ''Privacy and security'', check ''Send a "Do Not Track" request with your browsing traffic''.<br />
<br />
==== Force a password store ====<br />
<br />
Chromium uses a password store to store your passwords and the ''Chromium Safe Storage'' key, which is used to encrypt cookie values. [https://codereview.chromium.org/24734007]<br />
<br />
By default Chromium auto-detects which password store to use, which can lead to you apparently losing your passwords and cookies when switching to another desktop environment or window manager.<br />
<br />
You can force Chromium to use a specific password store by launching it with the {{ic|--password-store}} flag with one of following the values [https://chromium.googlesource.com/chromium/src/+/master/docs/linux/password_storage.md]:<br />
<br />
* {{ic|gnome}}, uses [[Gnome Keyring]]<br />
* {{ic|kwallet5}}, uses [[KDE Wallet]]<br />
* {{ic|basic}}, saves the passwords and the cookies' encryption key as plain text in the file {{ic|Login Data}}<br />
* {{ic|detect}}, the default auto-detect behavior<br />
<br />
For example, to force Chromium to use Gnome Keyring in another desktop or WM use {{ic|1=--password-store=gnome}}, see [[#Making flags persistent]] for making it permanent.<br />
<br />
When using a password store of another desktop environment you probably also want to unlock it automatically see:<br />
[[GNOME/Keyring#Using the keyring outside GNOME]] and [[KDE Wallet#Unlock KDE Wallet automatically on login]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Fonts ===<br />
<br />
{{Note|Chromium does not fully integrate with fontconfig/GTK/Pango/X/etc. due to its sandbox. For more information, see the [https://dev.chromium.org/developers/linux-technical-faq Linux Technical FAQ].}}<br />
<br />
==== Tab font size is too large ====<br />
<br />
Chromium will use the GTK settings as described in [[GTK#Configuration]]. When configured, Chromium will use the {{ic|gtk-font-name}} setting for tabs (which may mismatch window font size). To override these settings, use {{ic|1=--force-device-scale-factor=1.0}}.<br />
<br />
=== WebGL ===<br />
<br />
There is the possibility that your graphics card has been blacklisted by Chromium. See [[#Force GPU acceleration]].<br />
<br />
If you are using Chromium with [[Bumblebee]], WebGL might crash due to GPU sandboxing. In this case, you can disable GPU sandboxing with {{ic|optirun chromium --disable-gpu-sandbox}}.<br />
<br />
Visit {{ic|chrome://gpu/}} for debugging information about WebGL support.<br />
<br />
Chromium can save incorrect data about your GPU in your user profile (e.g. if you use switch between an Nvidia card using Optimus and Intel, it will show the Nvidia card in {{ic|chrome://gpu}} even when you're not using it or primusrun/optirun). Running using a different user directory, e.g, {{ic|1=chromium --user-data-dir=$(mktemp -d)}} may solve this issue. For a persistent solution you can reset the GPU information by deleting {{ic|~/.config/chromium/Local\ State}}.<br />
<br />
=== Incorrect HiDPI rendering ===<br />
<br />
Chromium will automatically scale for a [[HiDPI]] display, however, this may cause an incorrect rendered GUI.<br />
<br />
The flag {{ic|1=--force-device-scale-factor=1}} may be used to overrule the automatic scaling factor.<br />
<br />
When [[#Native Wayland support|native Wayland support]] is enabled, Chromium will automatically scale based on the configured scale of each monitor.<br />
<br />
=== Password prompt on every start with GNOME Keyring ===<br />
<br />
See [[GNOME/Keyring#Passwords are not remembered]].<br />
<br />
=== Chromecasts in the network are not discovered ===<br />
<br />
You will need to enable the Media Router Component Extension in {{ic|chrome://flags/#load-media-router-component-extension}}.<br />
<br />
=== Everything is syncing except for password ===<br />
<br />
If synchronization is not working for password only (you can check it on {{ic|chrome://sync-internals/}}) delete profile login data:<br />
<br />
$ rm ~/.config/chromium/Default/Login\ Data*<br />
<br />
See [https://support.google.com/chrome/thread/9947763?hl=en&msgid=23687608 Google Chrome Help forum] for details.<br />
<br />
=== Losing cookies and passwords when switching between desktop environments ===<br />
<br />
If you see the message {{ic|Failed to decrypt token for service AccountId-*}} in the terminal when you start Chromium, it might try to use the wrong password storage backend. This might happen when you switch between Desktop Environments.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Hang on startup when Google Sync enabled ===<br />
<br />
Try launching Chrome with {{ic|1=--password-store=basic}} or another appropriate password store.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Chromium asks to be set as the default browser every time it starts ===<br />
<br />
If you are using KDE and have once set Firefox as the default browser (by clicking the button inside Firefox), you might find Chromium asks to be set as the default browser every time it starts, even if you click the "set as default" button.<br />
<br />
Chromium checks for this status by running {{ic|xdg-settings check default-web-browser chromium.desktop}}. If the output is "no", it is not considering itself to be the default browser. The script {{ic|xdg-settings}} checks for the following MIME associations and expect all of them to be {{ic|chromium.desktop}}:<br />
<br />
{{bc|<br />
x-scheme-handler/http<br />
x-scheme-handler/https<br />
text/html}}<br />
<br />
To fix it, go to ''System settings > Applications > Default applications > Web browser'' and choose Chromium. Then, set the MIME association for {{ic|text/html}}:<br />
<br />
$ xdg-mime default chromium.desktop text/html<br />
<br />
Finally, [[XDG_MIME_Applications#New_MIME_types|update the MIME database]]:<br />
<br />
$ update-mime-database ~/.local/share/mime<br />
<br />
=== "This browser or app may not be secure" error logging in to Google ===<br />
<br />
As of 2020.04.20 if you run chromium with {{ic|1=--remote-debugging-port=9222}} flag for web development, you can't log in to your Google account. Temporarily disable this flag to login and then you can enable it back.<br />
<br />
=== Chromium stuck at 60fps when using a 144Hz + 60Hz monitor ===<br />
<br />
There's a suitable workaround for this issue, [[append]] the following flags to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--use-gl=egl<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
}}<br />
<br />
This should make Chromium run at 144fps when used on your 144hz display, assuming your compositor is refreshing at 144fps. <br />
Keep in mind it might be a little choppy {{Bug|67035}}, but this is way better than it being stuck at 60fps.<br />
<br />
=== Chromium low scroll speed ===<br />
<br />
Mouse whell scrolling in chromium and electron based applications may be too slow for daily usage. Here are some solutions.<br />
<br />
[[Libinput#Mouse wheel scrolling speed scaling]] injects {{ic|libinput_event_pointer_get_axis_value}} function in libinput and provides an interface to change scale factor. This is not a application level injection, so an addition script for application specific scale factor tuning is needed. Note that scroll on chromium's small height developer tools may be too fast when scale factor is large enough.<br />
<br />
[[IMWheel]] increares scroll distance by replaying X wheel button event for multiple times. However, chromium assumes the real scroll and the replayed ones as two events. There is a small but noticeable delay bwtween them, so one mouse wheel scroll leads to twice page jumps. Also, touchpad scroll needs addition care.<br />
<br />
[https://chrome.google.com/webstore/detail/linux-scroll-speed-fix/mlboohjioameadaedfjcpemcaangkkbp Linux Scroll Speed Fix] and [https://chrome.google.com/webstore/detail/smoothscroll/nbokbjkabcmbfdlbddjidfmibcpneigj SmoothScroll] are two chromium extensions with suppport for scroll distance modification. Upon wheel scroll in a web page, the closest scrollable ancestor of current focused node will be found, then a scroll method with given pixel distance will be called on it, even if it has been scrolled to bottom. So once you scroll into a text editor or any scrollable element, you can never scroll out of it, except moving mouse. Also, extension based methods can not be used outside chromium.<br />
<br />
== See also ==<br />
<br />
* [https://www.chromium.org/ Chromium homepage]<br />
* [https://chromereleases.googleblog.com/ Google Chrome release notes]<br />
* [https://chrome.google.com/webstore/ Chrome web store]<br />
* [[Wikipedia:Chromium (web browser)#Differences from Google Chrome|Differences between Chromium and Google Chrome]]<br />
* [https://peter.sh/experiments/chromium-command-line-switches/ List of Chromium command-line switches]<br />
* [[Profile-sync-daemon]] - Systemd service that saves Chromium profile in tmpfs and syncs to disk<br />
* [[Tmpfs]] - Tmpfs Filesystem in {{ic|/etc/fstab}}<br />
* [https://www.kernel.org/doc/html/latest/filesystems/tmpfs.html Official tmpfs kernel Documentation]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Chromium&diff=650631Chromium2021-02-03T10:38:17Z<p>Foutrelis: Fix formatting at the end of the previous note change.</p>
<hr />
<div>[[Category:Web browser]]<br />
[[Category:Google]]<br />
[[de:Chromium]]<br />
[[es:Chromium]]<br />
[[fr:chromium]]<br />
[[it:Chromium]]<br />
[[ja:Chromium]]<br />
[[zh-hans:Chromium]]<br />
{{Related articles start}}<br />
{{Related|Browser extensions}}<br />
{{Related|Firefox}}<br />
{{Related|Opera}}<br />
{{Related articles end}}<br />
<br />
[[Wikipedia:Chromium (web browser)|Chromium]] is an open-source graphical web browser based on the [[Wikipedia:Blink (web engine)|Blink]] rendering engine. It is the basis for the proprietary Google Chrome browser.<br />
<br />
See [https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md this page] for an explanation of the differences between Chromium and Google Chrome. Additionally:<br />
<br />
* Sync will be unavailable in Chromium 89+ (~2021-03-02) [https://archlinux.org/news/chromium-losing-sync-support-in-early-march/]<br />
<br />
See [[List of applications/Internet#Blink-based]] for other browsers based on Chromium.<br />
<br />
== Installation ==<br />
<br />
There are several packages available to [[install]] Chromium with:<br />
<br />
* {{Pkg|chromium}} — stable release;<br />
* {{AUR|chromium-dev}} — development release;<br />
* {{AUR|chromium-snapshot-bin}} — nightly build.<br />
<br />
Google Chrome packages:<br />
<br />
* {{AUR|google-chrome}} — stable release;<br />
* {{AUR|google-chrome-beta}} — beta release;<br />
* {{AUR|google-chrome-dev}} — development release.<br />
<br />
{{Note|From the [https://www.chromium.org/Home/chromium-privacy Chromium privacy page]: "Features that communicate with Google made available through the compilation of code in Chromium are subject to the [http://www.google.com/policies/privacy/ Google Privacy Policy]." For those who want to avoid all integration with Google services, there are some [[List of applications/Internet#Privacy-focused chromium spin-offs|privacy-focused spin-offs]].}}<br />
<br />
== Configuration ==<br />
<br />
=== Default applications ===<br />
<br />
To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see [[default applications]].<br />
<br />
=== Certificates ===<br />
<br />
Chromium uses [[Network Security Services]] for certificate management. Certificates can be managed in {{ic|chrome://settings/certificates}}.<br />
<br />
=== Force GPU acceleration ===<br />
<br />
{{Warning|Disabling the rendering blacklist may cause unstable behavior, including crashes of the host. See the bug reports in {{ic|chrome://gpu}} for details.}}<br />
<br />
By default Chromium on Linux doesn't use any GPU acceleration. To force GPU acceleration, [[append]] the following flags to [[/Tips and tricks#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
--enable-zero-copy<br />
}}<br />
<br />
Additionally the flag {{ic|--disable-gpu-driver-bug-workarounds}} may need to be passed to prevent GPU workaround from being used. Flags in {{ic|chrome://gpu}} should state "Hardware accelerated" when configured and available.<br />
<br />
{{ic|--enable-native-gpu-memory-buffers}} is broken since mesa 20.1.1 [https://gitlab.freedesktop.org/mesa/mesa/-/issues/3119#note_533902]<br />
<br />
=== Hardware video acceleration ===<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* There is no official support from Chromium or Arch Linux for this feature [https://chromium.googlesource.com/chromium/src/+/master/docs/gpu/vaapi.md#vaapi-on-linux], but you may ask for help in [https://bbs.archlinux.org/viewtopic.php?id=244031 the dedicated forum thread].<br />
* {{Pkg|chromium}} from official repositories is compiled with VA-API support.<br />
* For proprietary NVIDIA support, installing {{AUR|libva-vdpau-driver-chromium}} or {{AUR|libva-vdpau-driver-vp9-git}} is required.<br />
* Wayland is not supported.<br />
* To use VA-API on XWayland, use the {{ic|1=--use-gl=egl}} flag. Currently exhibits choppiness {{Bug|67035}}.<br />
* To use VA-API on Xorg, use the {{ic|1=--use-gl=desktop}} flag.<br />
* Starting in Chromium 86, there will be support for VA-API when using the ANGLE gl renderer. Use the {{ic|--enable-accelerated-video-decode}} to enable it on an Intel GPU.}}<br />
<br />
Before trying VA-API support in Chromium, be sure to:<br />
<br />
* Install correct VA-API driver for your video card and verify VA-API has been enabled and working correctly, see [[Hardware video acceleration]];<br />
* One may need to [[#Force GPU acceleration]] as Chromium uses a GPU blocklist by default;<br />
* Check {{ic|chrome://gpu}} ''Video Decode'' field.<br />
* Test on a large enough video. Starting with version 86, Chromium on desktop [https://bugs.chromium.org/p/chromium/issues/detail?id=684792 will only accelerate videos larger than 720p].<br />
<br />
To check if it's working play a video which is using a codec supported by your VA-API driver (''vainfo'' tells you which codecs are supported, but chrome will only support VP9 and h264):<br />
<br />
* With the Media Internals tab: Go to {{ic|chrome://media-internals/}} and check ''video_decoder'' field:<br />
** Hardware accelerated: ''MojoVideoDecoder'', ''GpuVideoDecoder''.<br />
** In-software decoding: ''VpxVideoDecoder'', ''FFmpegVideoDecoder'', ''Dav1dVideoDecoder''.<br />
* With Chrome DevTools:<br />
** Open the DevTools by pressing {{ic|Ctrl+Shift+I}} or on the ''Inspect'' button of the context (right-click) menu<br />
** (Version 84 and below only) Enable the media inspection experiment: ''Settings'' ({{ic|F1}} or menu) ''> Experiments > Media Element Inspection''<br />
** Add the Media inspection tab: ''menu > More tools > Media''<br />
** In the newly opened Media tab, look at the hardware decoder state of the video decoder<br />
<br />
To reduce CPU usage while watching YouTube where VP8/VP9 hardware decoding is not available use the [https://chrome.google.com/webstore/detail/h264ify/aleakchihdccplidncghkekgioiakgal h264ify] or [https://chrome.google.com/webstore/detail/enhanced-h264ify/omkfmpieigblcllmkgbflkikinpkodlk enhanced-h264ify] extension.<br />
<br />
=== Making flags persistent ===<br />
<br />
{{Note|The {{ic|chromium-flags.conf}} file and the accompanying custom launcher script are specific to the Arch Linux {{Pkg|chromium}} package. For {{AUR|google-chrome}}, use {{ic|chrome-flags.conf}} instead.}}<br />
<br />
You can put your flags in a {{ic|chromium-flags.conf}} file under {{ic|$HOME/.config/}} (or under {{ic|$XDG_CONFIG_HOME}} if you have configured that environment variable).<br />
<br />
No special syntax is used; flags are defined as if they were written in a terminal.<br />
<br />
* The arguments are split on whitespace and shell quoting rules apply, but no further parsing is performed.<br />
* In case of improper quoting anywhere in the file, a fatal error is raised.<br />
* Flags can be placed in separate lines for readability, but this is not required.<br />
* Lines starting with a hash symbol (#) are skipped.<br />
<br />
Below is an example {{ic|chromium-flags.conf}} file that defines the flags {{ic|--start-maximized --incognito}}:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
# This line will be ignored.<br />
--start-maximized<br />
--incognito<br />
}}<br />
<br />
=== PDF viewer plugin ===<br />
<br />
Chromium and Google Chrome are bundled with the ''Chromium PDF Viewer'' plugin. If you don't want to use this plugin, check ''Open PDFs using a different application'' in {{ic|chrome://settings/content/pdfDocuments}}.<br />
<br />
=== Flash Player plugin ===<br />
<br />
Support for Flash Player was removed in Chromium 88.[https://www.chromium.org/flash-roadmap#TOC-Flash-Support-Removed-from-Chromium-Target:-Chrome-88---Jan-2021-]<br />
<br />
=== Native Wayland support ===<br />
<br />
Since version 87, native [[Wayland]] support in Chromium can be enabled with the following flags [https://bugs.chromium.org/p/chromium/issues/detail?id=1085700]:<br />
<br />
--enable-features=UseOzonePlatform --ozone-platform=wayland<br />
<br />
See [[#Making flags persistent]] for a permanent configuration.<br />
<br />
== Tips and tricks ==<br />
<br />
The following tips and tricks should work for both Chromium and Chrome unless explicitly stated.<br />
<br />
=== Browsing experience ===<br />
==== chrome:// URLs ====<br />
A number of tweaks can be accessed via Chrome URLs. See '''chrome://chrome-urls''' for a complete list.<br />
<br />
* '''chrome://flags''' - access experimental features such as WebGL and rendering webpages with GPU, etc.<br />
* '''chrome://extensions''' - view, enable and disable the currently used Chromium extensions.<br />
* '''chrome://gpu''' - status of different GPU options.<br />
* '''chrome://sandbox''' - indicate sandbox status.<br />
* '''chrome://version''' - display version and switches used to invoke the active {{ic|/usr/bin/chromium}}.<br />
<br />
An automatically updated, complete listing of Chromium switches (command line parameters) is available [http://peter.sh/experiments/chromium-command-line-switches/ here].<br />
<br />
==== Chromium task manager ====<br />
Shift+ESC can be used to bring up the browser task manager wherein memory, CPU, and network usage can be viewed.<br />
<br />
==== Chromium overrides/overwrites Preferences file ====<br />
<br />
If you enabled syncing with a Google Account, then Chromium will override any direct edits to the Preferences file found under {{ic|~/.config/chromium/Default/Preferences}}. To work around this, start Chromium with the {{ic|--disable-sync-preferences}} switch:<br />
$ chromium --disable-sync-preferences<br />
<br />
If Chromium is started in the background when you login in to your desktop environment, make sure the command your desktop environment uses is:<br />
$ chromium --disable-sync-preferences --no-startup-window<br />
<br />
==== Search engines ====<br />
Make sites like [https://wiki.archlinux.org wiki.archlinux.org] and [https://en.wikipedia.org wikipedia.org] easily searchable by first executing a search on those pages, then going to ''Settings > Search'' and click the ''Manage search engines..'' button. From there, "Edit" the Wikipedia entry and change its keyword to '''w''' (or some other shortcut you prefer). Now searching Wikipedia for "Arch Linux" from the address bar is done simply by entering "'''w arch linux'''".<br />
<br />
{{Note| Google search is used automatically when typing something into the URL bar. A hard-coded keyword trigger is also available using the '''?''' prefix.}}<br />
<br />
==== Tmpfs ====<br />
===== Cache in tmpfs =====<br />
{{Note|Chromium stores its cache separate from its browser profile directory.}}<br />
<br />
To limit Chromium from writing its cache to a physical disk, one can define an alternative location via the {{ic|--disk-cache-dir}} flag:<br />
$ chromium --disk-cache-dir="$XDG_RUNTIME_DIR/chromium-cache"<br />
<br />
Cache should be considered temporary and will '''not''' be saved after a reboot or hard lock. Another option is to setup the space in {{ic|/etc/fstab}}:<br />
<br />
{{hc|/etc/fstab|2=<br />
tmpfs /home/''username''/.cache tmpfs noatime,nodev,nosuid,size=400M 0 0<br />
}}<br />
<br />
===== Profile in tmpfs =====<br />
Relocate the browser profile to a [[Wikipedia:Tmpfs|tmpfs]] filesystem, including {{ic|/tmp}}, or {{ic|/dev/shm}} for improvements in application response as the entire profile is now stored in RAM.<br />
<br />
Use an active profile management tool such as {{Pkg|profile-sync-daemon}} for maximal reliability and ease of use. It symlinks or bind mounts and syncs the browser profile directories to RAM. For more, see [[Profile-sync-daemon]].<br />
<br />
====Launch a new browser instance====<br />
When you launch the browser, it first checks if another instance using the same data directory is already running. If there is one, the new window is associated with the old instance. If you want to launch an independent instance of the browser, you must specify separate directory using the {{ic|--user-data-dir}} parameter:<br />
<br />
$ chromium --user-data-dir=''/path/to/some/directory''<br />
<br />
{{Note|The default location of the user data is {{ic|~/.config/chromium/}}.}}<br />
<br />
====Directly open *.torrent files and magnet links with a torrent client====<br />
<br />
By default, Chromium downloads {{ic|*.torrent}} files directly and you need to click the notification from the bottom-left corner of the screen in order for the file to be opened with your default torrent client. This can be avoided with the following method:<br />
<br />
* Download a {{ic|*.torrent}} file.<br />
* Right-click the notification displayed at the bottom-left corner of the screen.<br />
* Check the "''Always Open Files of This Type''" checkbox.<br />
<br />
See [[xdg-open]] to change the default assocation.<br />
<br />
==== Touch Scrolling on touchscreen devices ====<br />
You may need to specify which touch device to use. Find your touchscreen device with {{ic| xinput list}} then launch Chromium with the {{ic|1=--touch-devices='''x'''}} parameter, where "'''x'''" is the id of your device. {{Note|If the device is designated as a slave pointer, using this may not work, use the master pointer's ID instead.}}<br />
<br />
==== Reduce memory usage ====<br />
<br />
By default, Chromium uses a separate OS process for each ''instance'' of a visited web site. [https://www.chromium.org/developers/design-documents/process-models#Supported_Models] However, you can specify command-line switches when starting Chromium to modify this behaviour.<br />
<br />
For example, to share one process for all instances of a website:<br />
<br />
$ chromium --process-per-site<br />
<br />
To use a single process model:<br />
<br />
$ chromium --single-process<br />
<br />
{{Warning|The single-process model is discouraged because it is unsafe and may contain bugs not present in other models.[https://www.chromium.org/developers/design-documents/process-models#TOC-Single-process]}}<br />
<br />
In addition, you can suspend or store inactive Tabs with extensions such as [https://chrome.google.com/webstore/detail/tab-suspender/fiabciakcmgepblmdkmemdbbkilneeeh?hl=en Tab Suspender], [https://github.com/deanoemcke/thegreatsuspender/ The Great Suspender(GPLv2)] and [https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall?hl=en OneTab].<br />
<br />
==== User Agent====<br />
<br />
The User Agent can be arbitrarily modified at the start of Chromium's base instance via its {{Ic|<nowiki>--user-agent="[string]"</nowiki>}} parameter.<br />
<br />
==== DOM Distiller ====<br />
Chromium has a similar reader mode to Firefox. In this case it's called DOM Distiller, which is an [https://github.com/chromium/dom-distiller open source project].<br />
It is disabled by default, but can be enabled using the {{Ic|chrome://flags/#enable-reader-mode}} flag, which you can also make [[#Making flags persistent|persistent]].<br />
Not only does DOM Distiller provide a better reading experience by distilling the content of the page, it also simplifies pages for print. Even though the latter checkbox option has been removed from the print dialog, you can still print the distilled page, which basically has the same effect.<br />
<br />
After enabling the flag, you will find a new "Toggle reader mode" menu item and corresponding icon in the address bar when Chromium thinks the website you're visiting could do with some distilling.<br />
<br />
==== Forcing specific GPU ====<br />
<br />
In multi-GPU systems, Chromium automatically detects which GPU should be used for rendering (discrete or integrated). This works 99% of the time, except when it doesn't - if a unavailable GPU is picked (for example, discrete graphics on VFIO GPU passthrough-enabled systems), {{ic|chrome://gpu}} will complain about not being able to initialize the GPU process. On the same page below '''Driver Information''' there'll be multiple GPUs shown (GPU0, GPU1, ...). There's no way to switch between them in a user-friendly way, but you can read the device/vendor IDs present there and configure Chromium to use a specific GPU with flags:<br />
<br />
$ chromium --gpu-testing-vendor-id=0x8086 --gpu-testing-device-id=0x1912<br />
<br />
...where {{ic|0x8086}} and {{ic|0x1912}} is replaced by the IDs of the GPU you want to use (as shown on the {{ic|chrome://gpu}} page).<br />
<br />
==== Import bookmarks from Firefox ====<br />
<br />
To ease the transition, you can import bookmarks from [[Firefox]] into Chromium.<br />
<br />
Navigate Chromium to {{ic|chrome://settings/importData}}<br />
<br />
If Firefox is already installed on your computer, you can directly import bookmarks as well as many other things from Firefox.<br />
<br />
Make sure '''Mozilla Firefox''' is selected. Optionally, you can uncheck some unwanted items here. Click the '''Import''' and then '''Done'''. You're done with it.<br />
<br />
{{note|If you haven't created any bookmarks in Chromium yet, the bookmarks will show up in your bookmarks bar. If you already have bookmarks, the bookmarks will be in a new folder labeled "Imported From Firefox"}}<br />
<br />
If you import bookmarks from another PC, you have to export bookmarks from Firefox first.<br />
<br />
{{ic|''Ctrl + Shift + O > Import and Backup > Export Bookmarks To HTML}} in Firefox''<br />
<br />
The procedure is pretty much the same. You need to go to {{ic|chrome://settings/importData}}. However, this time, in the '''From''' drop-down menu, select '''Bookmarks HTML File''' and click the '''Choose File''' button and upload the desired bookmark file.<br />
<br />
==== Enabling native notifications ====<br />
<br />
Go to {{ic|chrome://flags#enable-native-notifications}} and select ''Enabled''.<br />
<br />
==== U2F authentication ====<br />
Install {{Pkg|libfido2}} library. This provides the udev rules required to enable access to the [[U2F]] key as a user.<br />
U2F keys are by default only accessible by root, and without these rules Chromium will give an error.<br />
<br />
==== Dark mode ====<br />
To enable dark mode (used in ''prefers-color-scheme'' in CSS, JavaScript, Settings and Dev-Tools) and enable the dark theme (normally used for incognito mode) [[append]] the following flag to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--force-dark-mode<br />
--enable-features=WebUIDarkMode<br />
}}<br />
<br />
===== Dark mode by system preference =====<br />
[https://bugs.chromium.org/p/chromium/issues/detail?id=998903 This Chromium issue] aims to bring dark mode based on GTK theme selection into Chromium.<br />
<br />
In the future, all that will be required to properly use system preference, is setting ''Designs'' to GTK in {{ic|chrome://settings/appearance}}.<br />
<br />
=== Profile maintenance ===<br />
Chromium uses [[SQLite]] databases to manage history and the like. Sqlite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks- and history-related tasks is to defragment and trim unused space from these databases.<br />
<br />
{{Pkg|profile-cleaner}} and {{AUR|browser-vacuum}} in the [[AUR]] do just this.<br />
<br />
=== Security ===<br />
==== WebRTC ====<br />
WebRTC is a communication protocol that relies on JavaScript that can leak one's actual IP address and hardware hash from behind a VPN. While some software may prevent the leaking scripts from running, it's probably a good idea to block this protocol directly as well, just to be safe. As of October 2016, there is no way to disable WebRTC on Chromium on desktop, there are extensions available to disable local IP address leak, one is this [https://chrome.google.com/webstore/detail/webrtc-network-limiter/npeicpdbkakmehahjeeohfdhnlpdklia extension].<br />
<br />
One can test WebRTC via [https://www.privacytools.io/webrtc.html this page].<br />
<br />
{{Warning|Even though IP leak can be prevented, Chromium still sends your unique hash, and there is no way to prevent this. Read more on https://www.browserleaks.com/webrtc#webrtc-disable }}<br />
<br />
==== SSL certificates ====<br />
Chromium does not have an SSL certificate manager. It relies on the NSS Shared DB {{ic|~/.pki/nssdb}}. In order to add SSL certificates to the database, users will have to use the shell. <br />
<br />
===== Adding CAcert certificates for self-signed certificates =====<br />
Grab the CAcerts and create an {{ic|nssdb}}, if one does not already exist. To do this, first install the {{Pkg|nss}} package, then complete these steps:<br />
<br />
$ mkdir -p $HOME/.pki/nssdb<br />
$ cd $HOME/.pki/nssdb<br />
$ certutil -N -d sql:.<br />
<br />
$ curl -k -o "cacert-root.crt" "http://www.cacert.org/certs/root.crt"<br />
$ curl -k -o "cacert-class3.crt" "http://www.cacert.org/certs/class3.crt"<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org" -i cacert-root.crt <br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org Class 3" -i cacert-class3.crt<br />
<br />
{{Note|Users will need to create a password for the database, if it does not exist.}}<br />
<br />
Now users may manually import a self-signed certificate.<br />
<br />
===== Example 1: Using a shell script to isolate the certificate from TomatoUSB =====<br />
Below is a simple script that will extract and add a certificate to the user's {{ic|nssdb}}:<br />
<br />
#!/bin/sh<br />
#<br />
# usage: import-cert.sh remote.host.name [port]<br />
#<br />
REMHOST=$1<br />
REMPORT=${2:-443}<br />
exec 6>&1<br />
exec > $REMHOST<br />
echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'<br />
certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n "$REMHOST" -i $REMHOST <br />
exec 1>&6 6>&-<br />
<br />
Syntax is advertised in the commented lines.<br />
<br />
References:<br />
*http://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu{{Dead link|2020|03|28|status=404}}<br />
*https://chromium.googlesource.com/chromium/src/+/master/docs/linux/cert_management.md<br />
<br />
===== Example 2: Using Firefox to isolate the certificate from TomatoUSB =====<br />
The {{Pkg|firefox}} browser can be used to save the certificate to a file for manual import into the database.<br />
<br />
Using firefox:<br />
#Browse to the target URL.<br />
#Upon seeing the "This Connection is Untrusted" warning screen, click: ''I understand the Risks > Add Exception...''<br />
#Click: ''View > Details > Export'' and save the certificate to a temporary location ({{ic|/tmp/easy.pem}} in this example).<br />
<br />
Now import the certificate for use in Chromium:<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "easy" -i /tmp/easy.pem<br />
<br />
{{Note|Adjust the name to match that of the certificate. In the example above, "easy" is the name of the certificate.}}<br />
<br />
Reference:<br />
*https://sahissam.blogspot.com/2012/06/new-ssl-certificates-for-tomatousb-and.html<br />
<br />
==== Canvas Fingerprinting ====<br />
Canvas fingerprinting is a technique that allows websites to identify users by detecting differences when rendering to an HTML5 canvas. This information can be made inaccessible by using the {{ic|--disable-reading-from-canvas}} flag.<br />
<br />
To confirm this is working run [https://panopticlick.eff.org this test] and make sure "hash of canvas fingerprint" is reported as undetermined in the full results.<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* Some extensions require reading from canvas and may be broken by setting {{ic|--disable-reading-from-canvas}}.<br />
* YouTube player does not work properly without canvas reading. [https://github.com/qutebrowser/qutebrowser/issues/5345][https://bbs.archlinux.org/viewtopic.php?pid=1907406]<br />
}}<br />
<br />
==== Privacy extensions ====<br />
<br />
See [[Browser extensions#Privacy]].<br />
<br />
{{Tip|Installing too many extensions might take up much space in the toolbar. Those extensions which you wouldn't interact with anyway (e.g. [https://chrome.google.com/webstore/detail/gcbommkclmclpchllfjekcdonpmejbdp HTTPS Everywhere]) can be hidden by right-clicking on the extension and choosing ''Hide in Chromium menu''.}}<br />
<br />
==== Do Not Track ====<br />
<br />
To enable [[wikipedia:Do Not Track|Do Not Track]], visit {{ic|chrome://settings}}, scroll down to ''Advanced'' and under ''Privacy and security'', check ''Send a "Do Not Track" request with your browsing traffic''.<br />
<br />
==== Force a password store ====<br />
<br />
Chromium uses a password store to store your passwords and the ''Chromium Safe Storage'' key, which is used to encrypt cookie values. [https://codereview.chromium.org/24734007]<br />
<br />
By default Chromium auto-detects which password store to use, which can lead to you apparently losing your passwords and cookies when switching to another desktop environment or window manager.<br />
<br />
You can force Chromium to use a specific password store by launching it with the {{ic|--password-store}} flag with one of following the values [https://chromium.googlesource.com/chromium/src/+/master/docs/linux/password_storage.md]:<br />
<br />
* {{ic|gnome}}, uses [[Gnome Keyring]]<br />
* {{ic|kwallet5}}, uses [[KDE Wallet]]<br />
* {{ic|basic}}, saves the passwords and the cookies' encryption key as plain text in the file {{ic|Login Data}}<br />
* {{ic|detect}}, the default auto-detect behavior<br />
<br />
For example, to force Chromium to use Gnome Keyring in another desktop or WM use {{ic|1=--password-store=gnome}}, see [[#Making flags persistent]] for making it permanent.<br />
<br />
When using a password store of another desktop environment you probably also want to unlock it automatically see:<br />
[[GNOME/Keyring#Using the keyring outside GNOME]] and [[KDE Wallet#Unlock KDE Wallet automatically on login]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Fonts ===<br />
<br />
{{Note|Chromium does not fully integrate with fontconfig/GTK/Pango/X/etc. due to its sandbox. For more information, see the [https://dev.chromium.org/developers/linux-technical-faq Linux Technical FAQ].}}<br />
<br />
==== Font rendering issues in PDF plugin ====<br />
<br />
To fix the font rendering in some PDFs one has to install the {{Pkg|ttf-liberation}} package, otherwise the substituted font causes text to run into other text. This was [https://code.google.com/p/chromium/issues/detail?id=369991 reported on the chromium bug tracker] by an Arch user.<br />
<br />
==== Font rendering issues of UTF characters ====<br />
<br />
UTF characters may render as boxes (e.g. simplified Chinese characters). Installing {{Pkg|ttf-liberation}} or another Unicode [[font]] will allow for the characters to be rendered as expected.<br />
<br />
==== Tab font size is too large ====<br />
<br />
Chromium will use the GTK settings as described in [[GTK#Configuration]]. When configured, Chromium will use the {{ic|gtk-font-name}} setting for tabs (which may mismatch window font size). To override these settings, use {{ic|1=--force-device-scale-factor=1.0}}.<br />
<br />
=== WebGL ===<br />
<br />
There is the possibility that your graphics card has been blacklisted by Chromium. See [[#Force GPU acceleration]].<br />
<br />
If you are using Chromium with [[Bumblebee]], WebGL might crash due to GPU sandboxing. In this case, you can disable GPU sandboxing with {{ic|optirun chromium --disable-gpu-sandbox}}.<br />
<br />
Visit {{ic|chrome://gpu/}} for debugging information about WebGL support.<br />
<br />
Chromium can save incorrect data about your GPU in your user profile (e.g. if you use switch between an Nvidia card using Optimus and Intel, it will show the Nvidia card in {{ic|chrome://gpu}} even when you're not using it or primusrun/optirun). Running using a different user directory, e.g, {{ic|1=chromium --user-data-dir=$(mktemp -d)}} may solve this issue. For a persistent solution you can reset the GPU information by deleting {{ic|~/.config/chromium/Local\ State}}.<br />
<br />
=== Incorrect HiDPI rendering ===<br />
<br />
Chromium will automatically scale for a [[HiDPI]] display, however, this may cause an incorrect rendered GUI.<br />
<br />
The flag {{ic|1=--force-device-scale-factor=1}} may be used to overrule the automatic scaling factor.<br />
<br />
When [[#Native Wayland support|native Wayland support]] is enabled, Chromium will automatically scale based on the configured scale of each monitor.<br />
<br />
=== Password prompt on every start with GNOME Keyring ===<br />
<br />
See [[GNOME/Keyring#Passwords are not remembered]].<br />
<br />
=== Chromecasts in the network are not discovered ===<br />
<br />
You will need to enable the Media Router Component Extension in {{ic|chrome://flags/#load-media-router-component-extension}}.<br />
<br />
=== Everything is syncing except for password ===<br />
<br />
If synchronization is not working for password only (you can check it on {{ic|chrome://sync-internals/}}) delete profile login data:<br />
<br />
$ rm ~/.config/chromium/Default/Login\ Data*<br />
<br />
See [https://support.google.com/chrome/thread/9947763?hl=en&msgid=23687608 Google Chrome Help forum] for details.<br />
<br />
=== Losing cookies and passwords when switching between desktop environments ===<br />
<br />
If you see the message {{ic|Failed to decrypt token for service AccountId-*}} in the terminal when you start Chromium, it might try to use the wrong password storage backend. This might happen when you switch between Desktop Environments.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Hang on startup when Google Sync enabled ===<br />
<br />
Try launching Chrome with {{ic|1=--password-store=basic}} or another appropriate password store.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Chromium asks to be set as the default browser every time it starts ===<br />
<br />
If you are using KDE and have once set Firefox as the default browser (by clicking the button inside Firefox), you might find Chromium asks to be set as the default browser every time it starts, even if you click the "set as default" button.<br />
<br />
Chromium checks for this status by running {{ic|xdg-settings check default-web-browser chromium.desktop}}. If the output is "no", it is not considering itself to be the default browser. The script {{ic|xdg-settings}} checks for the following MIME associations and expect all of them to be {{ic|chromium.desktop}}:<br />
<br />
{{bc|<br />
x-scheme-handler/http<br />
x-scheme-handler/https<br />
text/html}}<br />
<br />
To fix it, go to ''System settings > Applications > Default applications > Web browser'' and choose Chromium. Then, set the MIME association for {{ic|text/html}}:<br />
<br />
$ xdg-mime default chromium.desktop text/html<br />
<br />
Finally, [[XDG_MIME_Applications#New_MIME_types|update the MIME database]]:<br />
<br />
$ update-mime-database ~/.local/share/mime<br />
<br />
=== "This browser or app may not be secure" error logging in to Google ===<br />
<br />
As of 2020.04.20 if you run chromium with {{ic|1=--remote-debugging-port=9222}} flag for web development, you can't log in to your Google account. Temporarily disable this flag to login and then you can enable it back.<br />
<br />
=== Chromium stuck at 60fps when using a 144Hz + 60Hz monitor ===<br />
<br />
There's a suitable workaround for this issue, [[append]] the following flags to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--use-gl=egl<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
}}<br />
<br />
This should make Chromium run at 144fps when used on your 144hz display, assuming your compositor is refreshing at 144fps. <br />
Keep in mind it might be a little choppy {{Bug|67035}}, but this is way better than it being stuck at 60fps.<br />
<br />
=== Chromium low scroll speed ===<br />
<br />
Mouse whell scrolling in chromium and electron based applications may be too slow for daily usage. Here are some solutions.<br />
<br />
[[Libinput#Mouse_wheel_scrolling_speed_scaling]] injects {{ic|libinput_event_pointer_get_axis_value}} function in libinput and provides an interface to change scale factor. This is not a application level injection, so an addition script for application specific scale factor tuning is needed. Note that scroll on chromium's small height developer tools may be too fast when scale factor is large enough.<br />
<br />
[[IMWheel]] increares scroll distance by replaying X wheel button event for multiple times. However, chromium assumes the real scroll and the replayed ones as two events. There is a small but noticeable delay bwtween them, so one mouse wheel scroll leads to twice page jumps. Also, touchpad scroll needs addition care.<br />
<br />
[https://chrome.google.com/webstore/detail/linux-scroll-speed-fix/mlboohjioameadaedfjcpemcaangkkbp Linux Scroll Speed Fix] and [https://chrome.google.com/webstore/detail/smoothscroll/nbokbjkabcmbfdlbddjidfmibcpneigj SmoothScroll] are two chromium extensions with suppport for scroll distance modification. Upon wheel scroll in a web page, the closest scrollable ancestor of current focused node will be found, then a scroll method with given pixel distance will be called on it, even if it has been scrolled to bottom. So once you scroll into a text editor or any scrollable element, you can never scroll out of it, except moving mouse. Also, extension based methods can not be used outside chromium.<br />
<br />
== See also ==<br />
<br />
* [https://www.chromium.org/ Chromium homepage]<br />
* [https://chromereleases.googleblog.com/ Google Chrome release notes]<br />
* [https://chrome.google.com/webstore/ Chrome web store]<br />
* [[Wikipedia:Chromium (web browser)#Differences from Google Chrome|Differences between Chromium and Google Chrome]]<br />
* [https://peter.sh/experiments/chromium-command-line-switches/ List of Chromium command-line switches]<br />
* [[Profile-sync-daemon]] - Systemd service that saves Chromium profile in tmpfs and syncs to disk<br />
* [[Tmpfs]] - Tmpfs Filesystem in {{ic|/etc/fstab}}<br />
* [https://www.kernel.org/doc/html/latest/filesystems/tmpfs.html Official tmpfs kernel Documentation]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Chromium&diff=650630Chromium2021-02-03T10:36:15Z<p>Foutrelis: Update note about sync removal; drop incorrect note about geolocation being disabled.</p>
<hr />
<div>[[Category:Web browser]]<br />
[[Category:Google]]<br />
[[de:Chromium]]<br />
[[es:Chromium]]<br />
[[fr:chromium]]<br />
[[it:Chromium]]<br />
[[ja:Chromium]]<br />
[[zh-hans:Chromium]]<br />
{{Related articles start}}<br />
{{Related|Browser extensions}}<br />
{{Related|Firefox}}<br />
{{Related|Opera}}<br />
{{Related articles end}}<br />
<br />
[[Wikipedia:Chromium (web browser)|Chromium]] is an open-source graphical web browser based on the [[Wikipedia:Blink (web engine)|Blink]] rendering engine. It is the basis for the proprietary Google Chrome browser.<br />
<br />
See [https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md this page] for an explanation of the differences between Chromium and Google Chrome. Additionally:<br />
<br />
* Sync will be unavailable in Chromium 89+ (~2021-03-02).[https://archlinux.org/news/chromium-losing-sync-support-in-early-march/]<br />
<br />
See [[List of applications/Internet#Blink-based]] for other browsers based on Chromium.<br />
<br />
== Installation ==<br />
<br />
There are several packages available to [[install]] Chromium with:<br />
<br />
* {{Pkg|chromium}} — stable release;<br />
* {{AUR|chromium-dev}} — development release;<br />
* {{AUR|chromium-snapshot-bin}} — nightly build.<br />
<br />
Google Chrome packages:<br />
<br />
* {{AUR|google-chrome}} — stable release;<br />
* {{AUR|google-chrome-beta}} — beta release;<br />
* {{AUR|google-chrome-dev}} — development release.<br />
<br />
{{Note|From the [https://www.chromium.org/Home/chromium-privacy Chromium privacy page]: "Features that communicate with Google made available through the compilation of code in Chromium are subject to the [http://www.google.com/policies/privacy/ Google Privacy Policy]." For those who want to avoid all integration with Google services, there are some [[List of applications/Internet#Privacy-focused chromium spin-offs|privacy-focused spin-offs]].}}<br />
<br />
== Configuration ==<br />
<br />
=== Default applications ===<br />
<br />
To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see [[default applications]].<br />
<br />
=== Certificates ===<br />
<br />
Chromium uses [[Network Security Services]] for certificate management. Certificates can be managed in {{ic|chrome://settings/certificates}}.<br />
<br />
=== Force GPU acceleration ===<br />
<br />
{{Warning|Disabling the rendering blacklist may cause unstable behavior, including crashes of the host. See the bug reports in {{ic|chrome://gpu}} for details.}}<br />
<br />
By default Chromium on Linux doesn't use any GPU acceleration. To force GPU acceleration, [[append]] the following flags to [[/Tips and tricks#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
--enable-zero-copy<br />
}}<br />
<br />
Additionally the flag {{ic|--disable-gpu-driver-bug-workarounds}} may need to be passed to prevent GPU workaround from being used. Flags in {{ic|chrome://gpu}} should state "Hardware accelerated" when configured and available.<br />
<br />
{{ic|--enable-native-gpu-memory-buffers}} is broken since mesa 20.1.1 [https://gitlab.freedesktop.org/mesa/mesa/-/issues/3119#note_533902]<br />
<br />
=== Hardware video acceleration ===<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* There is no official support from Chromium or Arch Linux for this feature [https://chromium.googlesource.com/chromium/src/+/master/docs/gpu/vaapi.md#vaapi-on-linux], but you may ask for help in [https://bbs.archlinux.org/viewtopic.php?id=244031 the dedicated forum thread].<br />
* {{Pkg|chromium}} from official repositories is compiled with VA-API support.<br />
* For proprietary NVIDIA support, installing {{AUR|libva-vdpau-driver-chromium}} or {{AUR|libva-vdpau-driver-vp9-git}} is required.<br />
* Wayland is not supported.<br />
* To use VA-API on XWayland, use the {{ic|1=--use-gl=egl}} flag. Currently exhibits choppiness {{Bug|67035}}.<br />
* To use VA-API on Xorg, use the {{ic|1=--use-gl=desktop}} flag.<br />
* Starting in Chromium 86, there will be support for VA-API when using the ANGLE gl renderer. Use the {{ic|--enable-accelerated-video-decode}} to enable it on an Intel GPU.}}<br />
<br />
Before trying VA-API support in Chromium, be sure to:<br />
<br />
* Install correct VA-API driver for your video card and verify VA-API has been enabled and working correctly, see [[Hardware video acceleration]];<br />
* One may need to [[#Force GPU acceleration]] as Chromium uses a GPU blocklist by default;<br />
* Check {{ic|chrome://gpu}} ''Video Decode'' field.<br />
* Test on a large enough video. Starting with version 86, Chromium on desktop [https://bugs.chromium.org/p/chromium/issues/detail?id=684792 will only accelerate videos larger than 720p].<br />
<br />
To check if it's working play a video which is using a codec supported by your VA-API driver (''vainfo'' tells you which codecs are supported, but chrome will only support VP9 and h264):<br />
<br />
* With the Media Internals tab: Go to {{ic|chrome://media-internals/}} and check ''video_decoder'' field:<br />
** Hardware accelerated: ''MojoVideoDecoder'', ''GpuVideoDecoder''.<br />
** In-software decoding: ''VpxVideoDecoder'', ''FFmpegVideoDecoder'', ''Dav1dVideoDecoder''.<br />
* With Chrome DevTools:<br />
** Open the DevTools by pressing {{ic|Ctrl+Shift+I}} or on the ''Inspect'' button of the context (right-click) menu<br />
** (Version 84 and below only) Enable the media inspection experiment: ''Settings'' ({{ic|F1}} or menu) ''> Experiments > Media Element Inspection''<br />
** Add the Media inspection tab: ''menu > More tools > Media''<br />
** In the newly opened Media tab, look at the hardware decoder state of the video decoder<br />
<br />
To reduce CPU usage while watching YouTube where VP8/VP9 hardware decoding is not available use the [https://chrome.google.com/webstore/detail/h264ify/aleakchihdccplidncghkekgioiakgal h264ify] or [https://chrome.google.com/webstore/detail/enhanced-h264ify/omkfmpieigblcllmkgbflkikinpkodlk enhanced-h264ify] extension.<br />
<br />
=== Making flags persistent ===<br />
<br />
{{Note|The {{ic|chromium-flags.conf}} file and the accompanying custom launcher script are specific to the Arch Linux {{Pkg|chromium}} package. For {{AUR|google-chrome}}, use {{ic|chrome-flags.conf}} instead.}}<br />
<br />
You can put your flags in a {{ic|chromium-flags.conf}} file under {{ic|$HOME/.config/}} (or under {{ic|$XDG_CONFIG_HOME}} if you have configured that environment variable).<br />
<br />
No special syntax is used; flags are defined as if they were written in a terminal.<br />
<br />
* The arguments are split on whitespace and shell quoting rules apply, but no further parsing is performed.<br />
* In case of improper quoting anywhere in the file, a fatal error is raised.<br />
* Flags can be placed in separate lines for readability, but this is not required.<br />
* Lines starting with a hash symbol (#) are skipped.<br />
<br />
Below is an example {{ic|chromium-flags.conf}} file that defines the flags {{ic|--start-maximized --incognito}}:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
# This line will be ignored.<br />
--start-maximized<br />
--incognito<br />
}}<br />
<br />
=== PDF viewer plugin ===<br />
<br />
Chromium and Google Chrome are bundled with the ''Chromium PDF Viewer'' plugin. If you don't want to use this plugin, check ''Open PDFs using a different application'' in {{ic|chrome://settings/content/pdfDocuments}}.<br />
<br />
=== Flash Player plugin ===<br />
<br />
Support for Flash Player was removed in Chromium 88.[https://www.chromium.org/flash-roadmap#TOC-Flash-Support-Removed-from-Chromium-Target:-Chrome-88---Jan-2021-]<br />
<br />
=== Native Wayland support ===<br />
<br />
Since version 87, native [[Wayland]] support in Chromium can be enabled with the following flags [https://bugs.chromium.org/p/chromium/issues/detail?id=1085700]:<br />
<br />
--enable-features=UseOzonePlatform --ozone-platform=wayland<br />
<br />
See [[#Making flags persistent]] for a permanent configuration.<br />
<br />
== Tips and tricks ==<br />
<br />
The following tips and tricks should work for both Chromium and Chrome unless explicitly stated.<br />
<br />
=== Browsing experience ===<br />
==== chrome:// URLs ====<br />
A number of tweaks can be accessed via Chrome URLs. See '''chrome://chrome-urls''' for a complete list.<br />
<br />
* '''chrome://flags''' - access experimental features such as WebGL and rendering webpages with GPU, etc.<br />
* '''chrome://extensions''' - view, enable and disable the currently used Chromium extensions.<br />
* '''chrome://gpu''' - status of different GPU options.<br />
* '''chrome://sandbox''' - indicate sandbox status.<br />
* '''chrome://version''' - display version and switches used to invoke the active {{ic|/usr/bin/chromium}}.<br />
<br />
An automatically updated, complete listing of Chromium switches (command line parameters) is available [http://peter.sh/experiments/chromium-command-line-switches/ here].<br />
<br />
==== Chromium task manager ====<br />
Shift+ESC can be used to bring up the browser task manager wherein memory, CPU, and network usage can be viewed.<br />
<br />
==== Chromium overrides/overwrites Preferences file ====<br />
<br />
If you enabled syncing with a Google Account, then Chromium will override any direct edits to the Preferences file found under {{ic|~/.config/chromium/Default/Preferences}}. To work around this, start Chromium with the {{ic|--disable-sync-preferences}} switch:<br />
$ chromium --disable-sync-preferences<br />
<br />
If Chromium is started in the background when you login in to your desktop environment, make sure the command your desktop environment uses is:<br />
$ chromium --disable-sync-preferences --no-startup-window<br />
<br />
==== Search engines ====<br />
Make sites like [https://wiki.archlinux.org wiki.archlinux.org] and [https://en.wikipedia.org wikipedia.org] easily searchable by first executing a search on those pages, then going to ''Settings > Search'' and click the ''Manage search engines..'' button. From there, "Edit" the Wikipedia entry and change its keyword to '''w''' (or some other shortcut you prefer). Now searching Wikipedia for "Arch Linux" from the address bar is done simply by entering "'''w arch linux'''".<br />
<br />
{{Note| Google search is used automatically when typing something into the URL bar. A hard-coded keyword trigger is also available using the '''?''' prefix.}}<br />
<br />
==== Tmpfs ====<br />
===== Cache in tmpfs =====<br />
{{Note|Chromium stores its cache separate from its browser profile directory.}}<br />
<br />
To limit Chromium from writing its cache to a physical disk, one can define an alternative location via the {{ic|--disk-cache-dir}} flag:<br />
$ chromium --disk-cache-dir="$XDG_RUNTIME_DIR/chromium-cache"<br />
<br />
Cache should be considered temporary and will '''not''' be saved after a reboot or hard lock. Another option is to setup the space in {{ic|/etc/fstab}}:<br />
<br />
{{hc|/etc/fstab|2=<br />
tmpfs /home/''username''/.cache tmpfs noatime,nodev,nosuid,size=400M 0 0<br />
}}<br />
<br />
===== Profile in tmpfs =====<br />
Relocate the browser profile to a [[Wikipedia:Tmpfs|tmpfs]] filesystem, including {{ic|/tmp}}, or {{ic|/dev/shm}} for improvements in application response as the entire profile is now stored in RAM.<br />
<br />
Use an active profile management tool such as {{Pkg|profile-sync-daemon}} for maximal reliability and ease of use. It symlinks or bind mounts and syncs the browser profile directories to RAM. For more, see [[Profile-sync-daemon]].<br />
<br />
====Launch a new browser instance====<br />
When you launch the browser, it first checks if another instance using the same data directory is already running. If there is one, the new window is associated with the old instance. If you want to launch an independent instance of the browser, you must specify separate directory using the {{ic|--user-data-dir}} parameter:<br />
<br />
$ chromium --user-data-dir=''/path/to/some/directory''<br />
<br />
{{Note|The default location of the user data is {{ic|~/.config/chromium/}}.}}<br />
<br />
====Directly open *.torrent files and magnet links with a torrent client====<br />
<br />
By default, Chromium downloads {{ic|*.torrent}} files directly and you need to click the notification from the bottom-left corner of the screen in order for the file to be opened with your default torrent client. This can be avoided with the following method:<br />
<br />
* Download a {{ic|*.torrent}} file.<br />
* Right-click the notification displayed at the bottom-left corner of the screen.<br />
* Check the "''Always Open Files of This Type''" checkbox.<br />
<br />
See [[xdg-open]] to change the default assocation.<br />
<br />
==== Touch Scrolling on touchscreen devices ====<br />
You may need to specify which touch device to use. Find your touchscreen device with {{ic| xinput list}} then launch Chromium with the {{ic|1=--touch-devices='''x'''}} parameter, where "'''x'''" is the id of your device. {{Note|If the device is designated as a slave pointer, using this may not work, use the master pointer's ID instead.}}<br />
<br />
==== Reduce memory usage ====<br />
<br />
By default, Chromium uses a separate OS process for each ''instance'' of a visited web site. [https://www.chromium.org/developers/design-documents/process-models#Supported_Models] However, you can specify command-line switches when starting Chromium to modify this behaviour.<br />
<br />
For example, to share one process for all instances of a website:<br />
<br />
$ chromium --process-per-site<br />
<br />
To use a single process model:<br />
<br />
$ chromium --single-process<br />
<br />
{{Warning|The single-process model is discouraged because it is unsafe and may contain bugs not present in other models.[https://www.chromium.org/developers/design-documents/process-models#TOC-Single-process]}}<br />
<br />
In addition, you can suspend or store inactive Tabs with extensions such as [https://chrome.google.com/webstore/detail/tab-suspender/fiabciakcmgepblmdkmemdbbkilneeeh?hl=en Tab Suspender], [https://github.com/deanoemcke/thegreatsuspender/ The Great Suspender(GPLv2)] and [https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall?hl=en OneTab].<br />
<br />
==== User Agent====<br />
<br />
The User Agent can be arbitrarily modified at the start of Chromium's base instance via its {{Ic|<nowiki>--user-agent="[string]"</nowiki>}} parameter.<br />
<br />
==== DOM Distiller ====<br />
Chromium has a similar reader mode to Firefox. In this case it's called DOM Distiller, which is an [https://github.com/chromium/dom-distiller open source project].<br />
It is disabled by default, but can be enabled using the {{Ic|chrome://flags/#enable-reader-mode}} flag, which you can also make [[#Making flags persistent|persistent]].<br />
Not only does DOM Distiller provide a better reading experience by distilling the content of the page, it also simplifies pages for print. Even though the latter checkbox option has been removed from the print dialog, you can still print the distilled page, which basically has the same effect.<br />
<br />
After enabling the flag, you will find a new "Toggle reader mode" menu item and corresponding icon in the address bar when Chromium thinks the website you're visiting could do with some distilling.<br />
<br />
==== Forcing specific GPU ====<br />
<br />
In multi-GPU systems, Chromium automatically detects which GPU should be used for rendering (discrete or integrated). This works 99% of the time, except when it doesn't - if a unavailable GPU is picked (for example, discrete graphics on VFIO GPU passthrough-enabled systems), {{ic|chrome://gpu}} will complain about not being able to initialize the GPU process. On the same page below '''Driver Information''' there'll be multiple GPUs shown (GPU0, GPU1, ...). There's no way to switch between them in a user-friendly way, but you can read the device/vendor IDs present there and configure Chromium to use a specific GPU with flags:<br />
<br />
$ chromium --gpu-testing-vendor-id=0x8086 --gpu-testing-device-id=0x1912<br />
<br />
...where {{ic|0x8086}} and {{ic|0x1912}} is replaced by the IDs of the GPU you want to use (as shown on the {{ic|chrome://gpu}} page).<br />
<br />
==== Import bookmarks from Firefox ====<br />
<br />
To ease the transition, you can import bookmarks from [[Firefox]] into Chromium.<br />
<br />
Navigate Chromium to {{ic|chrome://settings/importData}}<br />
<br />
If Firefox is already installed on your computer, you can directly import bookmarks as well as many other things from Firefox.<br />
<br />
Make sure '''Mozilla Firefox''' is selected. Optionally, you can uncheck some unwanted items here. Click the '''Import''' and then '''Done'''. You're done with it.<br />
<br />
{{note|If you haven't created any bookmarks in Chromium yet, the bookmarks will show up in your bookmarks bar. If you already have bookmarks, the bookmarks will be in a new folder labeled "Imported From Firefox"}}<br />
<br />
If you import bookmarks from another PC, you have to export bookmarks from Firefox first.<br />
<br />
{{ic|''Ctrl + Shift + O > Import and Backup > Export Bookmarks To HTML}} in Firefox''<br />
<br />
The procedure is pretty much the same. You need to go to {{ic|chrome://settings/importData}}. However, this time, in the '''From''' drop-down menu, select '''Bookmarks HTML File''' and click the '''Choose File''' button and upload the desired bookmark file.<br />
<br />
==== Enabling native notifications ====<br />
<br />
Go to {{ic|chrome://flags#enable-native-notifications}} and select ''Enabled''.<br />
<br />
==== U2F authentication ====<br />
Install {{Pkg|libfido2}} library. This provides the udev rules required to enable access to the [[U2F]] key as a user.<br />
U2F keys are by default only accessible by root, and without these rules Chromium will give an error.<br />
<br />
==== Dark mode ====<br />
To enable dark mode (used in ''prefers-color-scheme'' in CSS, JavaScript, Settings and Dev-Tools) and enable the dark theme (normally used for incognito mode) [[append]] the following flag to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--force-dark-mode<br />
--enable-features=WebUIDarkMode<br />
}}<br />
<br />
===== Dark mode by system preference =====<br />
[https://bugs.chromium.org/p/chromium/issues/detail?id=998903 This Chromium issue] aims to bring dark mode based on GTK theme selection into Chromium.<br />
<br />
In the future, all that will be required to properly use system preference, is setting ''Designs'' to GTK in {{ic|chrome://settings/appearance}}.<br />
<br />
=== Profile maintenance ===<br />
Chromium uses [[SQLite]] databases to manage history and the like. Sqlite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks- and history-related tasks is to defragment and trim unused space from these databases.<br />
<br />
{{Pkg|profile-cleaner}} and {{AUR|browser-vacuum}} in the [[AUR]] do just this.<br />
<br />
=== Security ===<br />
==== WebRTC ====<br />
WebRTC is a communication protocol that relies on JavaScript that can leak one's actual IP address and hardware hash from behind a VPN. While some software may prevent the leaking scripts from running, it's probably a good idea to block this protocol directly as well, just to be safe. As of October 2016, there is no way to disable WebRTC on Chromium on desktop, there are extensions available to disable local IP address leak, one is this [https://chrome.google.com/webstore/detail/webrtc-network-limiter/npeicpdbkakmehahjeeohfdhnlpdklia extension].<br />
<br />
One can test WebRTC via [https://www.privacytools.io/webrtc.html this page].<br />
<br />
{{Warning|Even though IP leak can be prevented, Chromium still sends your unique hash, and there is no way to prevent this. Read more on https://www.browserleaks.com/webrtc#webrtc-disable }}<br />
<br />
==== SSL certificates ====<br />
Chromium does not have an SSL certificate manager. It relies on the NSS Shared DB {{ic|~/.pki/nssdb}}. In order to add SSL certificates to the database, users will have to use the shell. <br />
<br />
===== Adding CAcert certificates for self-signed certificates =====<br />
Grab the CAcerts and create an {{ic|nssdb}}, if one does not already exist. To do this, first install the {{Pkg|nss}} package, then complete these steps:<br />
<br />
$ mkdir -p $HOME/.pki/nssdb<br />
$ cd $HOME/.pki/nssdb<br />
$ certutil -N -d sql:.<br />
<br />
$ curl -k -o "cacert-root.crt" "http://www.cacert.org/certs/root.crt"<br />
$ curl -k -o "cacert-class3.crt" "http://www.cacert.org/certs/class3.crt"<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org" -i cacert-root.crt <br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org Class 3" -i cacert-class3.crt<br />
<br />
{{Note|Users will need to create a password for the database, if it does not exist.}}<br />
<br />
Now users may manually import a self-signed certificate.<br />
<br />
===== Example 1: Using a shell script to isolate the certificate from TomatoUSB =====<br />
Below is a simple script that will extract and add a certificate to the user's {{ic|nssdb}}:<br />
<br />
#!/bin/sh<br />
#<br />
# usage: import-cert.sh remote.host.name [port]<br />
#<br />
REMHOST=$1<br />
REMPORT=${2:-443}<br />
exec 6>&1<br />
exec > $REMHOST<br />
echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'<br />
certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n "$REMHOST" -i $REMHOST <br />
exec 1>&6 6>&-<br />
<br />
Syntax is advertised in the commented lines.<br />
<br />
References:<br />
*http://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu{{Dead link|2020|03|28|status=404}}<br />
*https://chromium.googlesource.com/chromium/src/+/master/docs/linux/cert_management.md<br />
<br />
===== Example 2: Using Firefox to isolate the certificate from TomatoUSB =====<br />
The {{Pkg|firefox}} browser can be used to save the certificate to a file for manual import into the database.<br />
<br />
Using firefox:<br />
#Browse to the target URL.<br />
#Upon seeing the "This Connection is Untrusted" warning screen, click: ''I understand the Risks > Add Exception...''<br />
#Click: ''View > Details > Export'' and save the certificate to a temporary location ({{ic|/tmp/easy.pem}} in this example).<br />
<br />
Now import the certificate for use in Chromium:<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "easy" -i /tmp/easy.pem<br />
<br />
{{Note|Adjust the name to match that of the certificate. In the example above, "easy" is the name of the certificate.}}<br />
<br />
Reference:<br />
*https://sahissam.blogspot.com/2012/06/new-ssl-certificates-for-tomatousb-and.html<br />
<br />
==== Canvas Fingerprinting ====<br />
Canvas fingerprinting is a technique that allows websites to identify users by detecting differences when rendering to an HTML5 canvas. This information can be made inaccessible by using the {{ic|--disable-reading-from-canvas}} flag.<br />
<br />
To confirm this is working run [https://panopticlick.eff.org this test] and make sure "hash of canvas fingerprint" is reported as undetermined in the full results.<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* Some extensions require reading from canvas and may be broken by setting {{ic|--disable-reading-from-canvas}}.<br />
* YouTube player does not work properly without canvas reading. [https://github.com/qutebrowser/qutebrowser/issues/5345][https://bbs.archlinux.org/viewtopic.php?pid=1907406]<br />
}}<br />
<br />
==== Privacy extensions ====<br />
<br />
See [[Browser extensions#Privacy]].<br />
<br />
{{Tip|Installing too many extensions might take up much space in the toolbar. Those extensions which you wouldn't interact with anyway (e.g. [https://chrome.google.com/webstore/detail/gcbommkclmclpchllfjekcdonpmejbdp HTTPS Everywhere]) can be hidden by right-clicking on the extension and choosing ''Hide in Chromium menu''.}}<br />
<br />
==== Do Not Track ====<br />
<br />
To enable [[wikipedia:Do Not Track|Do Not Track]], visit {{ic|chrome://settings}}, scroll down to ''Advanced'' and under ''Privacy and security'', check ''Send a "Do Not Track" request with your browsing traffic''.<br />
<br />
==== Force a password store ====<br />
<br />
Chromium uses a password store to store your passwords and the ''Chromium Safe Storage'' key, which is used to encrypt cookie values. [https://codereview.chromium.org/24734007]<br />
<br />
By default Chromium auto-detects which password store to use, which can lead to you apparently losing your passwords and cookies when switching to another desktop environment or window manager.<br />
<br />
You can force Chromium to use a specific password store by launching it with the {{ic|--password-store}} flag with one of following the values [https://chromium.googlesource.com/chromium/src/+/master/docs/linux/password_storage.md]:<br />
<br />
* {{ic|gnome}}, uses [[Gnome Keyring]]<br />
* {{ic|kwallet5}}, uses [[KDE Wallet]]<br />
* {{ic|basic}}, saves the passwords and the cookies' encryption key as plain text in the file {{ic|Login Data}}<br />
* {{ic|detect}}, the default auto-detect behavior<br />
<br />
For example, to force Chromium to use Gnome Keyring in another desktop or WM use {{ic|1=--password-store=gnome}}, see [[#Making flags persistent]] for making it permanent.<br />
<br />
When using a password store of another desktop environment you probably also want to unlock it automatically see:<br />
[[GNOME/Keyring#Using the keyring outside GNOME]] and [[KDE Wallet#Unlock KDE Wallet automatically on login]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Fonts ===<br />
<br />
{{Note|Chromium does not fully integrate with fontconfig/GTK/Pango/X/etc. due to its sandbox. For more information, see the [https://dev.chromium.org/developers/linux-technical-faq Linux Technical FAQ].}}<br />
<br />
==== Font rendering issues in PDF plugin ====<br />
<br />
To fix the font rendering in some PDFs one has to install the {{Pkg|ttf-liberation}} package, otherwise the substituted font causes text to run into other text. This was [https://code.google.com/p/chromium/issues/detail?id=369991 reported on the chromium bug tracker] by an Arch user.<br />
<br />
==== Font rendering issues of UTF characters ====<br />
<br />
UTF characters may render as boxes (e.g. simplified Chinese characters). Installing {{Pkg|ttf-liberation}} or another Unicode [[font]] will allow for the characters to be rendered as expected.<br />
<br />
==== Tab font size is too large ====<br />
<br />
Chromium will use the GTK settings as described in [[GTK#Configuration]]. When configured, Chromium will use the {{ic|gtk-font-name}} setting for tabs (which may mismatch window font size). To override these settings, use {{ic|1=--force-device-scale-factor=1.0}}.<br />
<br />
=== WebGL ===<br />
<br />
There is the possibility that your graphics card has been blacklisted by Chromium. See [[#Force GPU acceleration]].<br />
<br />
If you are using Chromium with [[Bumblebee]], WebGL might crash due to GPU sandboxing. In this case, you can disable GPU sandboxing with {{ic|optirun chromium --disable-gpu-sandbox}}.<br />
<br />
Visit {{ic|chrome://gpu/}} for debugging information about WebGL support.<br />
<br />
Chromium can save incorrect data about your GPU in your user profile (e.g. if you use switch between an Nvidia card using Optimus and Intel, it will show the Nvidia card in {{ic|chrome://gpu}} even when you're not using it or primusrun/optirun). Running using a different user directory, e.g, {{ic|1=chromium --user-data-dir=$(mktemp -d)}} may solve this issue. For a persistent solution you can reset the GPU information by deleting {{ic|~/.config/chromium/Local\ State}}.<br />
<br />
=== Incorrect HiDPI rendering ===<br />
<br />
Chromium will automatically scale for a [[HiDPI]] display, however, this may cause an incorrect rendered GUI.<br />
<br />
The flag {{ic|1=--force-device-scale-factor=1}} may be used to overrule the automatic scaling factor.<br />
<br />
When [[#Native Wayland support|native Wayland support]] is enabled, Chromium will automatically scale based on the configured scale of each monitor.<br />
<br />
=== Password prompt on every start with GNOME Keyring ===<br />
<br />
See [[GNOME/Keyring#Passwords are not remembered]].<br />
<br />
=== Chromecasts in the network are not discovered ===<br />
<br />
You will need to enable the Media Router Component Extension in {{ic|chrome://flags/#load-media-router-component-extension}}.<br />
<br />
=== Everything is syncing except for password ===<br />
<br />
If synchronization is not working for password only (you can check it on {{ic|chrome://sync-internals/}}) delete profile login data:<br />
<br />
$ rm ~/.config/chromium/Default/Login\ Data*<br />
<br />
See [https://support.google.com/chrome/thread/9947763?hl=en&msgid=23687608 Google Chrome Help forum] for details.<br />
<br />
=== Losing cookies and passwords when switching between desktop environments ===<br />
<br />
If you see the message {{ic|Failed to decrypt token for service AccountId-*}} in the terminal when you start Chromium, it might try to use the wrong password storage backend. This might happen when you switch between Desktop Environments.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Hang on startup when Google Sync enabled ===<br />
<br />
Try launching Chrome with {{ic|1=--password-store=basic}} or another appropriate password store.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Chromium asks to be set as the default browser every time it starts ===<br />
<br />
If you are using KDE and have once set Firefox as the default browser (by clicking the button inside Firefox), you might find Chromium asks to be set as the default browser every time it starts, even if you click the "set as default" button.<br />
<br />
Chromium checks for this status by running {{ic|xdg-settings check default-web-browser chromium.desktop}}. If the output is "no", it is not considering itself to be the default browser. The script {{ic|xdg-settings}} checks for the following MIME associations and expect all of them to be {{ic|chromium.desktop}}:<br />
<br />
{{bc|<br />
x-scheme-handler/http<br />
x-scheme-handler/https<br />
text/html}}<br />
<br />
To fix it, go to ''System settings > Applications > Default applications > Web browser'' and choose Chromium. Then, set the MIME association for {{ic|text/html}}:<br />
<br />
$ xdg-mime default chromium.desktop text/html<br />
<br />
Finally, [[XDG_MIME_Applications#New_MIME_types|update the MIME database]]:<br />
<br />
$ update-mime-database ~/.local/share/mime<br />
<br />
=== "This browser or app may not be secure" error logging in to Google ===<br />
<br />
As of 2020.04.20 if you run chromium with {{ic|1=--remote-debugging-port=9222}} flag for web development, you can't log in to your Google account. Temporarily disable this flag to login and then you can enable it back.<br />
<br />
=== Chromium stuck at 60fps when using a 144Hz + 60Hz monitor ===<br />
<br />
There's a suitable workaround for this issue, [[append]] the following flags to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--use-gl=egl<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
}}<br />
<br />
This should make Chromium run at 144fps when used on your 144hz display, assuming your compositor is refreshing at 144fps. <br />
Keep in mind it might be a little choppy {{Bug|67035}}, but this is way better than it being stuck at 60fps.<br />
<br />
=== Chromium low scroll speed ===<br />
<br />
Mouse whell scrolling in chromium and electron based applications may be too slow for daily usage. Here are some solutions.<br />
<br />
[[Libinput#Mouse_wheel_scrolling_speed_scaling]] injects {{ic|libinput_event_pointer_get_axis_value}} function in libinput and provides an interface to change scale factor. This is not a application level injection, so an addition script for application specific scale factor tuning is needed. Note that scroll on chromium's small height developer tools may be too fast when scale factor is large enough.<br />
<br />
[[IMWheel]] increares scroll distance by replaying X wheel button event for multiple times. However, chromium assumes the real scroll and the replayed ones as two events. There is a small but noticeable delay bwtween them, so one mouse wheel scroll leads to twice page jumps. Also, touchpad scroll needs addition care.<br />
<br />
[https://chrome.google.com/webstore/detail/linux-scroll-speed-fix/mlboohjioameadaedfjcpemcaangkkbp Linux Scroll Speed Fix] and [https://chrome.google.com/webstore/detail/smoothscroll/nbokbjkabcmbfdlbddjidfmibcpneigj SmoothScroll] are two chromium extensions with suppport for scroll distance modification. Upon wheel scroll in a web page, the closest scrollable ancestor of current focused node will be found, then a scroll method with given pixel distance will be called on it, even if it has been scrolled to bottom. So once you scroll into a text editor or any scrollable element, you can never scroll out of it, except moving mouse. Also, extension based methods can not be used outside chromium.<br />
<br />
== See also ==<br />
<br />
* [https://www.chromium.org/ Chromium homepage]<br />
* [https://chromereleases.googleblog.com/ Google Chrome release notes]<br />
* [https://chrome.google.com/webstore/ Chrome web store]<br />
* [[Wikipedia:Chromium (web browser)#Differences from Google Chrome|Differences between Chromium and Google Chrome]]<br />
* [https://peter.sh/experiments/chromium-command-line-switches/ List of Chromium command-line switches]<br />
* [[Profile-sync-daemon]] - Systemd service that saves Chromium profile in tmpfs and syncs to disk<br />
* [[Tmpfs]] - Tmpfs Filesystem in {{ic|/etc/fstab}}<br />
* [https://www.kernel.org/doc/html/latest/filesystems/tmpfs.html Official tmpfs kernel Documentation]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Pacman_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)/Pacnew_and_Pacsave_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=591979Pacman (简体中文)/Pacnew and Pacsave (简体中文)2019-12-15T14:43:53Z<p>Foutrelis: Remove pacmarge; no longer supported</p>
<hr />
<div>[[Category:Package management (简体中文)]]<br />
[[cs:Pacman/Pacnew and Pacsave]]<br />
[[de:Pacnew- und Pacsave-Dateien]]<br />
[[en:Pacman/Pacnew and Pacsave]]<br />
[[es:Pacman (Español)/Pacnew and Pacsave]]<br />
[[fr:Gestion des fichiers de configurations]]<br />
[[it:Pacman/Pacnew and Pacsave]]<br />
[[ja:Pacnew と Pacsave ファイル]]<br />
[[pt:Pacman (Português)/Pacnew and Pacsave]]<br />
[[ru:Pacman (Русский)/Pacnew and Pacsave]]<br />
{{TranslationStatus (简体中文)|Pacman/Pacnew and Pacsave|2019-10-26|582907}}<br />
在使用 pacman 移除一个带有配置文档的软件包时,pacman 通常会将配置文档复制为一个后缀名为 .pacsave 的备份文档。<br />
<br />
同样的,当 pacman 升级一个软件包,而新软件包含有与与当前配置不同的新配置文件时,pacman 会将新配置写入 .pacnew 文件。当写入这些文件时,pacman 会输出提示信息。<br />
<br />
== 为什么创建了这样的文件 ==<br />
<br />
当升级某个软件包(命令为 {{Ic|pacman -Syu}},{{Ic|pacman -Su}} 或者{{Ic|pacman -U}})时,可能会创建一个 {{ic|.pacnew}} 文件,以避免覆盖一个之前被用户修改过的已存在文件。此时,pacman会输出如下信息:<br />
<br />
warning: /etc/pam.d/usermod installed as /etc/pam.d/usermod.pacnew<br />
<br />
当卸载某个软件包(命令为 {{Ic|pacman -R}})或升级某个软件包(该软件包必须首先被卸载)时,可能会创建一个 {{ic|.pacsave}} 文件。当 pacman 数据库记录了应当备份该软件包的某个文件时,pacman 会创建一个 {{ic|.pacsave}} 文件。此时,pacman 会输出如下信息:<br />
<br />
warning: /etc/pam.d/usermod saved as /etc/pam.d/usermod.pacsave<br />
<br />
这些文件需要用户手动干预,我们推荐您在每次软件包升级或卸载之后马上处理它们。如果不处理,不当的配置可能导致软件功能出问题,甚至完全无法使用。<br />
<br />
== 包备份文件 ==<br />
<br />
软件包的 {{ic|PKGBUILD}} 文件指定了升级或卸载软件包时哪写文件需要被保存或备份。例如,{{ic|puslseaudio}} 的 {{ic|PKGBUILD}} 文件包含如下行:<br />
<br />
backup=('etc/pulse/client.conf' 'etc/pulse/daemon.conf' 'etc/pulse/default.pa')<br />
<br />
要阻止任何软件包覆盖一个文件,请阅读 [[Pacman#Skip file from being upgraded]].<br />
<br />
== 类型说明 ==<br />
<br />
===.pacnew===<br />
<br />
对于包升级过程中的每个备份文件,pacman 会交叉校验三个版本的文件内容生成的 [[wikipedia:zh:Md5sum|md5sums]] 值:一个为软件包最初创建的版本,一个为文件系统中当前的版本,还有一个为新软件包中的版本。如果软件包安装的版本被修改为文件系统中当前的版本,pacman 不知道如何将这些修改合并到新版本的文件中。因此,pacman 以扩展名 {{ic|.pacnew}} 保存新版本的文件,修改过的版本保持不变,而不是被覆盖。<br />
<br />
更细一步来说,3路MD5值校验结果为下述输出之一:<br />
<br />
; original = ''X'', current = ''X'', new = ''X'' : 三个版本的文件具有相同的内容,因此覆盖不会产生问题。pacman 将用新版本覆盖当前版本而不通知用户。(尽管文件内容相同,覆盖操作会更新文件系统中和文件创建,修改和访问时间有关的信息,也确保了任何文件权限的修改被实施。)<br />
<br />
; original = ''X'', current = ''X'', new = ''Y'' : 当前版本文件的内容和原始版本的相同,但与新版本不同。既然用户没有修改过当前版本文件,且新版本可能包含改进和 bug 修正,pacman 用新版本覆盖当前版本,而不通知用户。这是 pacman 有能力执行的唯一一个新改动的自动合并。<br />
<br />
; original = ''X'', current = ''Y'', new = ''X'' : 原始软件包和新软件包都包含版本完全相同的文件,但当前文件系统中的版本是被修改过的。此时 pacman 保留当前版本,忽略新版本,且不通知用户。<br />
<br />
; original = ''X'', current = ''Y'', new = ''Y'' : 新版本和当前版本相同。此时 pacman 将用新版本覆盖当前版本且不通知用户。(尽管文件内容相同,覆盖操作会更新文件系统中和文件创建,修改和访问时间有关的信息,也确保了任何文件权限的修改被实施。)<br />
<br />
; original = ''X'', current = ''Y'', new = ''Z'' : 三个版本的文件都不相同,所以保留当前版本,以扩展名 {{ic|.pacnew}} 创建新版本,且警告用户创建了新版本。希望用户手动将需要的更改由新版本合并至当前版本。<br />
<br />
===.pacsave===<br />
<br />
如果用户修改了 {{ic|backup}} 中指定的某个文件,那么那个文件将被重命名,带上 {{ic|.pacsave}} 扩展名,且在其他软件包移除之后仍然存在于文件系统中。<br />
<br />
{{注意|使用命令 {{ic|pacman -R}} 中的 {{ic|-n}} 选项会移除指定软件包中的所有文件,因此不会创建 {{ic|.pacsave}} 文件。}}<br />
<br />
== 定位 .pac* 文件==<br />
<br />
首先需要确定这些文件的位置,才能手动维护这些文件。当升级或卸载大量软件包时,可能会错过升级的 *.pac* 的信息。你需要寻找是否产生了 {{ic|*.pac*}} 文件:<br />
<br />
仅搜索绝大多数全局配置文件所存放的位置:<br />
<br />
$ find /etc -regextype posix-extended -regex ".+\.pac(new|save)" 2> /dev/null<br />
<br />
或全盘搜索:<br />
<br />
$ find / -regextype posix-extended -regex ".+\.pac(new|save)" 2> /dev/null<br />
<br />
如果你安装了 [[locate]],还可以使用它来搜索。首先需要更新索引数据库:<br />
<br />
# updatedb<br />
<br />
然后:<br />
<br />
{{bc|$ locate --existing --regex "\.pac(new{{!}}save)$"}}<br />
<br />
或者使用pacman日志来找到它们:<br />
<br />
$ egrep "pac(new|save)" /var/log/pacman.log<br />
<br />
注意:日志不会记录文件系统里现在有哪些文件,也不会记录哪些文件已经被移除。<br />
<br />
== .管理 .pac* 文件 ==<br />
<br />
=== pacdiff ===<br />
Pacman 包含了 ''pacdiff'' 工具管理 pacnew/pacsave 文件。这个工具会搜索所有的 {{ic|pacnew}} 和 {{ic|pacsave}} 文件并询问要执行的操作。默认使用 [[Vim#Merging files|vimdiff]] 工具,可以通过 {{ic|1=DIFFPROG=your_editor pacdiff}} 指定要使用的差异比较工具。参考 [[List of applications/Utilities#Comparison, diff, merge]].<br />
<br />
=== 三方工具 ===<br />
下面一些 [[AUR]] 三方工具可以自动处理这些文件: <br />
<br />
*{{App|dotpac|Basic interactive script with ncurses-based text interface and helpful walkthrough. No merging or auto-merging features.|https://github.com/AladW/dotpac|{{AUR|dotpac}}}}<br />
*{{App|etc-update|''Gentoo''<nowiki>'</nowiki>s utility, compatible with other distributions including Arch. It provides a simple CLI to view, merge and interactively edit changes. Trivial changes, such as comments, can be merged automatically.|https://wiki.gentoo.org/wiki/Handbook:Parts/Portage/Tools#etc-update|{{AUR|etc-update}}}}<br />
*{{App|pacnew-auto|Automatic {{ic|pacnew}} merging using {{Pkg|git}} rebase.|https://github.com/joanrieu/pacnew-auto|{{AUR|pacnew-auto-git}}}}<br />
*{{App|pacnews-git|A simple script aimed at finding all ''.pacnew'' files, then editing them with [[Vim#Merging files|vimdiff]].|https://github.com/pbrisbin/scripts/blob/master/pacnews|{{AUR|pacnews-git}}}}<br />
*{{App|pacfiles-mode|A package for [[Emacs]] to manage and merge ''.pacnew'' files, available in [https://melpa.org/#/pacfiles-mode melpa].|https://github.com/UndeadKernel/pacfiles-mode}}<br />
<br />
== 参阅 ==<br />
<br />
*Arch Linux 论坛: [https://bbs.archlinux.org/viewtopic.php?id=53532 处理 .pacnew 文件]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Pacman/Pacnew_and_Pacsave&diff=591978Pacman/Pacnew and Pacsave2019-12-15T14:43:23Z<p>Foutrelis: Remove pacmarge; no longer supported</p>
<hr />
<div>[[Category:Package management]]<br />
[[cs:Pacman/Pacnew and Pacsave]]<br />
[[de:Pacnew- und Pacsave-Dateien]]<br />
[[es:Pacman (Español)/Pacnew and Pacsave]]<br />
[[fr:Gestion des fichiers de configurations]]<br />
[[it:Pacman/Pacnew and Pacsave]]<br />
[[ja:Pacnew と Pacsave ファイル]]<br />
[[pt:Pacman (Português)/Pacnew and Pacsave]]<br />
[[ru:Pacman (Русский)/Pacnew and Pacsave]]<br />
[[zh-hans:Pacman/Pacnew and Pacsave]]<br />
When ''pacman'' removes a package that has a configuration file, it normally creates a backup copy of that config file and appends ''.pacsave'' to the name of the file. Likewise, when ''pacman'' upgrades a package which includes a new config file created by the maintainer differing from the currently installed file, it saves a ''.pacnew'' file with the new configuration. ''pacman'' provides notice when these files are written.<br />
<br />
== Why these files are created ==<br />
<br />
A ''.pacnew'' file may be created during a package upgrade ({{ic|pacman -Syu}}, {{ic|pacman -Su}} or {{ic|pacman -U}}) to avoid overwriting a file which already exists and was previously modified by the user. When this happens a message like the following will appear in the output of ''pacman'':<br />
<br />
warning: /etc/pam.d/usermod installed as /etc/pam.d/usermod.pacnew<br />
<br />
A ''.pacsave'' file may be created during a package removal ({{ic|pacman -R}}), or by a package upgrade (the package must be removed first). When the pacman database has record that a certain file owned by the package should be backed up it will create a ''.pacsave'' file. When this happens pacman outputs a message like the following:<br />
<br />
warning: /etc/pam.d/usermod saved as /etc/pam.d/usermod.pacsave<br />
<br />
These files require manual intervention from the user and it is good practice to handle them right after every package upgrade or removal. If left unhandled, improper configurations can result in improper function of the software, or the software being unable to run altogether.<br />
<br />
== Package backup files ==<br />
<br />
A package's {{ic|PKGBUILD}} file specifies which files should be preserved or backed up when the package is upgraded or removed. For example, the {{ic|PKGBUILD}} for {{ic|pulseaudio}} contains the following line:<br />
<br />
backup=('etc/pulse/client.conf' 'etc/pulse/daemon.conf' 'etc/pulse/default.pa')<br />
<br />
To prevent any package from overwriting a certain file, see [[Pacman#Skip file from being upgraded]].<br />
<br />
== Types explained ==<br />
<br />
=== .pacnew ===<br />
<br />
For each of the [[#Package backup files]] being upgraded, pacman cross-compares three [[wikipedia:Md5sum|md5sums]] generated from the file's contents: one sum for the version originally installed by the package, one for the version currently in the filesystem, and one for the version in the new package. If the version of the file currently in the filesystem has been modified from the version originally installed by the package, pacman cannot know how to merge those changes with the new version of the file. Therefore, instead of overwriting the modified file when upgrading, pacman saves the new version with a ''.pacnew'' extension and leaves the modified version untouched.<br />
<br />
Going into further detail, the 3-way MD5 sum comparison results in one of the following outcomes:<br />
<br />
; original = ''X'', current = ''X'', new = ''X'' : All three versions of the file have identical contents, so overwriting is not a problem. Overwrite the current version with the new version and do not notify the user (although the file contents are the same, this overwrite will update the filesystem's information regarding the file's installed, modified, and accessed times, as well as ensure that any file permission changes are applied).<br />
<br />
; original = ''X'', current = ''X'', new = ''Y'' : The current version's contents are identical to the original's, but the new version is different. Since the user has not modified the current version and the new version may contain improvements or bugfixes, overwrite the current version with the new version and do not notify the user. This is the only auto-merging of new changes that pacman is capable of performing.<br />
<br />
; original = ''X'', current = ''Y'', new = ''X'' : The original package and the new package both contain exactly the same version of the file, but the version currently in the filesystem has been modified. Leave the current version in place and discard the new version without notifying the user.<br />
<br />
; original = ''X'', current = ''Y'', new = ''Y'' : The new version is identical to the current version. Overwrite the current version with the new version and do not notify the user (although the file contents are the same, this overwrite will update the filesystem's information regarding the file's installed, modified, and accessed times, as well as ensure that any file permission changes are applied).<br />
<br />
; original = ''X'', current = ''Y'', new = ''Z'' : All three versions are different, so leave the current version in place, install the new version with a ''.pacnew'' extension and warn the user about the new version. The user will be expected to manually merge any changes necessary from the new version into the current version.<br />
<br />
Rarely, when an upgraded package includes a backup file the previous version didn't, the situation is correctly handled as X/Y/Y or X/Y/Z, with X being a non-existant value.<br />
<br />
=== .pacsave ===<br />
<br />
If the user has modified one of the files specified in {{ic|backup}} then that file will be renamed with a ''.pacsave'' extension and will remain in the filesystem after the rest of the package is removed.<br />
<br />
{{Note| Use of the {{ic|-n}} option with {{ic|pacman -R}} will result in complete removal of ''all'' files in the specified package, therefore no ''.pacsave'' files will be created.}}<br />
<br />
== Locating .pac* files ==<br />
<br />
Pacman does not deal with ''.pacnew'' files automatically: you must maintain these yourself. A few tools are presented in the next section. To do this manually, you will first need to locate them. When upgrading or removing a large number of packages, updated ''.pac*'' files may be missed. To discover whether any ''.pac*'' files have been installed, use one of the following:<br />
<br />
* To search within {{ic|/etc}} where most global configurations are stored: {{bc|$ find /etc -regextype posix-extended -regex ".+\.pac(new{{!}}save)" 2> /dev/null}} or to search within the entire disk replacing {{ic|/etc}} by {{ic|/}} in the command above.<br />
* If installed, [[locate]] can also be used. First re-index the database: {{bc|# updatedb}} Then run: {{bc|$ locate --existing --regex "\.pac(new{{!}}save)$"}}<br />
* Use pacman's log to find them: {{bc|$ grep --extended-regexp "\.pac(new{{!}}save)" /var/log/pacman.log}} Note that the log does not keep track of the files currently in the filesystem nor the ones that have already been removed; the above command will list all ''.pac*'' files that have ever existed on your system. In order to only get the 10 most recent ''.pac*'' files, pipe the result to {{ic|tail}}.<br />
<br />
== Managing .pac* files ==<br />
<br />
=== pacdiff ===<br />
{{pkg|pacman-contrib}} provides the simple ''pacdiff'' tool for managing ''.pac*'' files. It will search all ''.pacnew'' and ''.pacsave'' files and ask for any actions on them. It uses [[Vim#Merging files|vimdiff]] by default, but you may specify a different tool with {{ic|1=DIFFPROG=''your_editor'' pacdiff}}. See [[List of applications/Utilities#Comparison, diff, merge]] for other common comparison tools.<br />
<br />
=== Third-party utilities ===<br />
A few third-party utilities providing various levels of automation for these tasks are available from the [[AUR]].<br />
<br />
You can use one of the following tools:<br />
<br />
*{{App|dotpac|Basic interactive script with ncurses-based text interface and helpful walkthrough. No merging or auto-merging features.|https://github.com/AladW/dotpac|{{AUR|dotpac}}}}<br />
*{{App|etc-update|''Gentoo''<nowiki>'</nowiki>s utility, compatible with other distributions including Arch. It provides a simple CLI to view, merge and interactively edit changes. Trivial changes, such as comments, can be merged automatically.|https://wiki.gentoo.org/wiki/Handbook:Parts/Portage/Tools#etc-update|{{AUR|etc-update}}}}<br />
*{{App|pacnew-auto|Automatic {{ic|pacnew}} merging using {{Pkg|git}} rebase.|https://github.com/joanrieu/pacnew-auto|{{AUR|pacnew-auto-git}}}}<br />
*{{App|pacnews-git|A simple script aimed at finding all ''.pacnew'' files, then editing them with [[Vim#Merging files|vimdiff]].|https://github.com/pbrisbin/scripts/blob/master/pacnews|{{AUR|pacnews-git}}}}<br />
*{{App|pacfiles-mode|A package for [[Emacs]] to manage and merge ''.pacnew'' files, available in [https://melpa.org/#/pacfiles-mode melpa].|https://github.com/UndeadKernel/pacfiles-mode}}<br />
<br />
== See also ==<br />
<br />
* Arch Linux Forum: [https://bbs.archlinux.org/viewtopic.php?id=53532 Dealing with .pacnew files]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Pacman_(Espa%C3%B1ol)/Pacnew_and_Pacsave_(Espa%C3%B1ol)&diff=591977Pacman (Español)/Pacnew and Pacsave (Español)2019-12-15T14:42:59Z<p>Foutrelis: Remove pacmarge; no longer supported</p>
<hr />
<div>[[Category:Package management (Español)]]<br />
[[cs:Pacman/Pacnew and Pacsave]]<br />
[[de:Pacnew- und Pacsave-Dateien]]<br />
[[en:Pacman/Pacnew and Pacsave]]<br />
[[fr:Gestion des fichiers de configurations]]<br />
[[it:Pacman/Pacnew and Pacsave]]<br />
[[ja:Pacnew と Pacsave ファイル]]<br />
[[pt:Pacman (Português)/Pacnew and Pacsave]]<br />
[[ru:Pacman (Русский)/Pacnew and Pacsave]]<br />
[[zh-hans:Pacman/Pacnew and Pacsave]]<br />
{{TranslationStatus (Español)|Pacman/Pacnew and Pacsave|2018-12-21|523844}}<br />
Cuando ''pacman'' elimina un paquete que tiene un archivo de configuración, normalmente crea una copia de respaldo de ese archivo de configuración y agrega ''.pacsave'' al nombre del archivo. Del mismo modo, cuando ''pacman'' actualiza un paquete que incluye un nuevo archivo de configuración creado por el mantenedor que difiere del archivo que se instala, guarda un archivo ''.pacnew'' con la nueva configuración. ''pacman'' avisa de estas operacoines cuando se escriben dichos archivos.<br />
<br />
== Por qué se crean estos archivos ==<br />
<br />
Se puede crear un archivo '' .pacnew '' durante la actualización de un paquete (con {{ic|pacman -Syu}}, {{ic|pacman -Su}} o {{ic|pacman -U}}) para evitar sobrescribir un archivo que ya existe y fue modificado previamente por el usuario. Cuando esto sucede, aparecerá un mensaje como el siguiente en la salida de ''pacman'':<br />
<br />
advertencia: /etc/pam.d/usermod instalado como /etc/pam.d/usermod.pacnew<br />
<br />
Se puede crear un archivo '' .pacsave '' durante la eliminación de un paquete (con {{ic|pacman -R}}), o mediante una actualización del paquete (el paquete debe eliminarse primero). Cuando la base de datos de pacman tiene registro de que se debe hacer una copia de seguridad de un determinado archivo que pertenece a un paquete, se creará un archivo ''.pacsave''. Cuando esto sucede, pacman envía un mensaje como el siguiente:<br />
<br />
advertencia: /etc/pam.d/usermod guardado como /etc/pam.d/usermod.pacsave<br />
<br />
Estos archivos requieren la intervención manual del usuario y es una buena práctica manejarlos inmediatamente después de cada actualización o eliminación de un paquete. Si no se manejan, las configuraciones incorrectas pueden dar como resultado un mal funcionamiento del software, o que el mismo no se ejecute al completo.<br />
<br />
== Copias de seguridad de archivos de paquetes ==<br />
<br />
El archivo {{ic|PKGBUILD}} de un paquete especifica qué archivos deben conservarse o respaldarse cuando el paquete se actualiza o se elimina. Por ejemplo, {{ic|PKGBUILD}} para {{ic|pulseaudio}} contiene la siguiente línea:<br />
<br />
backup=('etc/pulse/client.conf' 'etc/pulse/daemon.conf' 'etc/pulse/default.pa')<br />
<br />
Para evitar que cualquier paquete sobrescriba un archivo determinado, consulte [[Pacman (Español)#Evitar la instalación de archivos en el sistema]].<br />
<br />
== Explicación de los tipos ==<br />
<br />
=== .pacnew ===<br />
<br />
Para cada uno de las [[#Copias de seguridad de archivos de paquetes]] que se están actualizando, pacman compara tres [[wikipedia:es:md5sum|md5sums]] generados a partir del contenido del archivo: una suma para la versión instalada originalmente por el paquete, otra para la versión actualmente en el sistema de archivos y otra última para la versión en el nuevo paquete. Si la versión del archivo que se encuentra actualmente en el sistema de archivos se modificó con respecto a la versión instalada originalmente por el paquete, pacman no puede saber cómo combinar esos cambios con la nueva versión del archivo. Por lo tanto, en lugar de sobrescribir el archivo modificado al actualizar, pacman guarda la nueva versión con una extensión ''.pacnew'' y deja la versión modificada sin tocar.<br />
<br />
Para más detalles, la comparación de la suma MD5 a tres bandas dará uno de los siguientes resultados:<br />
<br />
; original = ''X'', actual = ''X'', nuevo = ''X'' : las tres versiones del archivo tienen un contenido idéntico, por lo que la sobrescritura no es un problema. Sobrescribe la versión actual con la nueva versión y no lo notifica al usuario (aunque el contenido del archivo es el mismo, esta sobrescritura actualizará la información del sistema de archivos con respecto a los archivos instalados, modificados y tiempos de accesos, y asegurará que cualquier cambio en los permisos del archivo se aplicarán).<br />
<br />
; original = ''X'', actual = ''X'', nuevo = ''Y'' : el contenido de la versión actual es idéntico al del original, pero la nueva versión es diferente. Dado que el usuario no ha modificado la versión actual y la nueva versión puede contener mejoras o correcciones de errores, sobrescribe la versión actual con la nueva versión y no lo notifica al usuario. Esta es la única fusión automática de cambios nuevos que es capaz de realizar pacman.<br />
<br />
; original = ''X'', actual = ''Y'', nuevo = ''X'' : el paquete original y el nuevo paquete contienen exactamente la misma versión del archivo, pero la versión actualmente en el sistema de archivos ha sido modificada. Deja la versión actual en su lugar y descarta la nueva versión sin notificarla al usuario.<br />
<br />
; original = ''X'', actual = ''Y'', nuevo = ''Y'' : la nueva versión es idéntica a la versión actual. Sobrescribe la versión actual con la nueva versión y no lo notifica al usuario (aunque el contenido del archivo es el mismo, esta sobrescritura actualizará la información del sistema de archivos con respecto a los archivos instalados, modificados y tiempos de accesos, y asegurará que cualquier cambio en los permisos del archivo se aplicarán).<br />
<br />
; original = ''X'', actual = ''Y'', nuevo = ''Z'' : las tres versiones son diferentes, así que deja la versión actual en su lugar, instala la nueva versión con una extensión ''.pacnew'' y advierte al usuario sobre la nueva versión. Se espera que el usuario combine manualmente los cambios necesarios de la nueva versión con la versión en vigor.<br />
<br />
=== .pacsave ===<br />
<br />
Si el usuario ha modificado uno de los archivos especificados en {{ic | backup}}, ese archivo cambiará de nombre con una extensión '' .pacsave '' y permanecerá en el sistema de archivos después de que se elimine el resto del paquete.<br />
<br />
{{Nota|el uso de la opción {{ic|-n}} con {{ic|pacman -R}} dará como resultado la eliminación completa de ''todos'' los archivos del paquete especificado, por lo tanto, no se creará ningún archivo ''.pacsave''.}}<br />
<br />
== Localizar archivos .pac* ==<br />
<br />
pacman no trata los archivos ''.pacnew'' automáticamente: deben mantenerse por el usuario. Algunas herramientas se presentan en la siguiente sección. Para hacer esto manualmente, primero necesitará localizarlos. Al actualizar o eliminar una gran cantidad de paquetes, se pueden perder los archivos ''.pac*'' actualizados. Para descubrir si se ha instalado algún archivo ''.pac*'', use una de la órdenes siguientes:<br />
<br />
* Para buscar dentro de {{ic|/etc}} donde se almacenan la mayoría de las configuraciones globales: {{bc|<nowiki>$ find /etc -regextye posix-extended -regex ".+\.pac(new|save)" 2> /dev/null</nowiki>}} o para buscar en todo el disco, sustituya {{ic|/etc}} por {{ic|/}} en la orden anterior<br />
* Si está instalado, [[mlocate (Español)]] también se puede usar. Primero vuelva a indexar la base de datos: {{bc|# updatedb}} Luego ejecute: {{bc|<nowiki>$ locate --existing --regex "\.pac(new|save)$"</nowiki>}}<br />
* Utilice el registro de pacman para encontrarlos: {{bc|<nowiki>$ grep --extended-regexp "pac(new|save)" /var/log/pacman.log</nowiki>}} Tenga en cuenta que el registro no pierde de vista los archivos que se encuentran actualmente en el sistema de archivos ni los que ya se han eliminado; la orden anterior mostrará una lista de todos los archivos ''.pac*'' que hayan existido en su sistema. Para obtener solo los 10 archivos ''.pac*'' más recientes, canalice el resultado con {{ic|tail}}.<br />
<br />
== Gestionar archivos .pacnew ==<br />
<br />
=== pacdiff ===<br />
<br />
{{pkg|pacman-contrib}} proporciona una sencilla herramienta, ''pacdiff'', para gestionar archivos pacnew/pacsave. Buscará todos los archivos '' .pacnew '' y '' .pacsave '' y solicitará cualquier acción sobre ellos. Utiliza [[Vim#Merging files|vimdiff]] de forma predeterminada, pero puede especificar una herramienta diferente con {{ic|1=DIFFPROG=''your_editor'' pacdiff}}. Vea [[List of applications/Utilities#Comparison, diff, merge]] para otras herramientas de comparación comunes.<br />
<br />
=== Utilidades de terceros ===<br />
<br />
En [[AUR (Español)]] dispone de algunas utilidades de terceros que proporcionan varios niveles de automatización para estas tareas.<br />
<br />
Algunas de dichas herramientas son las siguientes:<br />
<br />
*{{App|dotpac|Script interactivo básico con una interfaz de texto basada en ncurses y un tutorial útil. No proporciona características de fusión o fusión automática. |https://github.com/AladW/dotpac|{{AUR|dotpac}}}}<br />
*{{App|etc-update|Puerto de Arch de la utilidad ''etc-update'' de Gentoo, que proporciona un CLI simple para ver, combinar y editar interactivamente los cambios. Los cambios triviales (como los comentarios) pueden ser mezclados automáticamente.|https://wiki.gentoo.org/wiki/Handbook:Parts/Portage/Tools#etc-update|{{AUR|etc-update}}}}<br />
*{{App|pacnew-auto|Fusionar automáticamente {{ic|pacnew}} utilizando rebase de {{Pkg|git}}.|https://github.com/joanrieu/pacnew-auto|{{AUR|pacnew-auto-git}}}}<br />
*{{App|pacnews-git|Un script simple destinado a encontrar todos los archivos ''.pacnew'', para luego editarlos con [[Vim#Merging files|vimdiff]].|https://github.com/pbrisbin/scripts/blob/master/pacnews|{{AUR|pacnews-git}}}}</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Pacman_(Portugu%C3%AAs)/Pacnew_and_Pacsave_(Portugu%C3%AAs)&diff=591976Pacman (Português)/Pacnew and Pacsave (Português)2019-12-15T14:42:14Z<p>Foutrelis: Remove pacmarge; no longer supported</p>
<hr />
<div>[[Category:Package management (Português)]]<br />
[[cs:Pacman/Pacnew and Pacsave]]<br />
[[de:Pacnew- und Pacsave-Dateien]]<br />
[[en:Pacman/Pacnew and Pacsave]]<br />
[[es:Pacman (Español)/Pacnew and Pacsave]]<br />
[[fr:Gestion des fichiers de configurations]]<br />
[[it:Pacman/Pacnew and Pacsave]]<br />
[[ja:Pacnew と Pacsave ファイル]]<br />
[[ru:Pacman (Русский)/Pacnew and Pacsave]]<br />
[[zh-hans:Pacman/Pacnew and Pacsave]]<br />
{{StatusTradução|Pacman/Pacnew and Pacsave|2019-10-13|582907}}<br />
Quando o ''pacman'' remove um pacote que tem um arquivo de configuração, ele normalmente cria uma cópia backup daquele arquivo de configuração e anexa ''.pacsave'' ao nome do arquivo. Da mesma forma, quando o ''pacman'' atualiza um pacote que inclui um novo arquivo de configuração pelo mantenedor, comparando-o com a configuração atualmente instalada, ele salva um arquivo ''.pacnew'' com a nova configuração. O ''pacman'' fornece um aviso quando esses arquivos são escritos.<br />
<br />
== Por que esses arquivos são criados ==<br />
<br />
Um arquivo ''.pacnew'' pode ser criado durante uma atualização de pacote ({{ic|pacman -Syu}}, {{ic|pacman -Su}} ou {{ic|pacman -U}}) para evitar sobrescrever um arquivo que já existe e foi previamente modificado pelo usuário. Quando isso acontecer, uma mensagem como a seguir aparecerá na saída do ''pacman'':<br />
<br />
atenção: /etc/pam.d/usermod instalado como /etc/pam.d/usermod.pacnew<br />
<br />
Um arquivo ''.pacsave'' pode ser criado durante a remoção de um pacote ({{ic|pacman -R}}) ou na atualização de um pacote (o pacote deve ser removido primeiro). Quando a base de dados do pacman possuir registro de que deve-se fazer backup de um certo arquivo de um pacote, ele vai criar um arquivo ''.pacsave''. Quando isso acontece, o pacman emite uma mensagem como a seguir:<br />
<br />
atenção: /etc/pam.d/usermod salvo como /etc/pam.d/usermod.pacsave<br />
<br />
Esses arquivos exigem intervenção manual do usuário e é uma boa prática tratar deles imediatamente a cada atualização ou remoção de pacote. Se não for tratado, configurações inadequadas podem resultar em função inadequada do software ou o software sendo incapaz de funcionar por completo.<br />
<br />
== Arquivos backup do pacote ==<br />
<br />
Um arquivo {{ic|PKGBUILD}} do pacote especifica quais arquivos devem ser preservados ou cujo backup deve ser armazenado quando o pacote é atualizado ou removido. Por exemplo, o {{ic|PKGBUILD}} do {{ic|pulseaudio}} contém a seguinte linha:<br />
<br />
backup=('etc/pulse/client.conf' 'etc/pulse/daemon.conf' 'etc/pulse/default.pa')<br />
<br />
Para evitar que um pacote sobrescreva um certo arquivo, veja [[Pacman (Português)#Pular pacotes para não serem atualizados]].<br />
<br />
== Tipos explicados ==<br />
<br />
=== .pacnew ===<br />
<br />
Para cada um dos [[#Arquivos backup do pacote]] sendo atualizado, o pacman compara três [[wikipedia:pt:Md5sum|md5sums]] gerados do conteúdo do arquivo: uma soma para a versão originalmente instalada pelo pacote, um para a versão atualmente no sistema de arquivo e uma para a versão no novo pacote. Se a versão do arquivo atualmente no sistema de arquivos foi modificada da versão originalmente instalada pelo pacote, o pacman não consegue saber como mesclar essas alterações com a nova versão do arquivo. Portanto, em vez de escrever no arquivo modificado ao atualizar, o pacman salva a nova versão com uma extensão ''.pacnew'' e deixa a versão modificada sem alterá-la.<br />
<br />
Entrando nos detalhes, os resultados da comparação de soma do MD5 em três vias é um dos seguintes:<br />
<br />
; original = ''X'', atual = ''X'', novo = ''X'' : Todas as três versões do arquivo possuem conteúdo idêntico, então sobrescrever não é um problema. Sobrescreve a versão atual com a nova versão e não notifica o usuário (apesar do conteúdo do arquivo ser o mesmo, isso vai sobrescrever as informações do sistema de arquivos a cerca dos tempos de instalação, modificação e acesso do arquivo, bem como garante que qualquer alteração de permissão do arquivo seja aplicada).<br />
<br />
; original = ''X'', atual = ''X'', novo = ''Y'' : O conteúdo da versão atual é idêntico ao da original, mas a nova versão é diferente. Já que o usuário não modificou a versão atual e a nova versão pode conter melhorias ou correções de erros, sobrescreve a versão atual com a nova versão e não notifica o usuário. Esse é a única automesclagem de novas alterações que o pacman é capaz de realizar.<br />
<br />
; original = ''X'', atual = ''Y'', novo = ''X'' : O pacote original e o novo pacote contêm exatamente a mesma versão do arquivo, mas a versão atualmente no sistema foi modificada. Deixa a versão atual no lugar e descarta a nova versão sem notificar o usuário.<br />
<br />
; original = ''X'', atual = ''Y'', novo = ''Y'' : A nova versão é idêntica à versão atual. Sobrescreve a versão atual com a nova versão e não notifica o usuário (apesar do conteúdo do arquivo ser o mesmo, isso vai sobrescrever as informações do sistema de arquivos a cerca dos tempos de instalação, modificação e acesso do arquivo, bem como garante que qualquer alteração de permissão do arquivo seja aplicada).<br />
<br />
; original = ''X'', atual = ''Y'', nova = ''Z'' : Todas as três versões são diferentes, então deixa a versão atual no lugar, instala a nova versão com uma extensão ''.pacnew'' e avisa o usuário sobre a nova versão. Espera-se que o usuário mescle manualmente quaisquer alterações necessárias da nova versão na versão atual.<br />
<br />
Raramente, quando um pacote atualizado inclui um arquivo backup que a versão anterior não incluía, a situação é corretamente lidada como X/Y/Y ou X/Y/Z, com X sendo um valor não existente.<br />
<br />
=== .pacsave ===<br />
<br />
Se o usuário modificou um dos arquivos especificados em {{ic|backup}}, então aquele arquivo será renomeado com a extensão ''.pacsave'' e vai permanecer no sistema de arquivos após o resto do pacote ser removido.<br />
<br />
{{Nota|O uso da opção {{ic|-n}} com {{ic|pacman -R}} vai resultar na remoção completa de ''todos'' os arquivos no pacote especificado, então nenhum arquivo ''.pacsave'' será criado.}}<br />
<br />
== Localizando arquivos .pac* ==<br />
<br />
O pacman não lida com arquivos ''.pacnew'' automaticamente: você deve mantê-los você mesmo. Algumas poucas ferramentas são apresentadas na próxima seção. Para fazer isso manualmente, você primeiro terá que localizá-los. Ao atualizar ou remover um grande número de pacotes, arquivos ''.pac*'' atualizados serão perdidos. Para descobrir se algum arquivo ''.pac*'' foi instalado, use um entre os seguintes:<br />
<br />
* Para procurar no {{ic|/etc}}, onde a maioria das configurações globais estão armazenadas: {{bc|$ find /etc -regextype posix-extended -regex ".+\.pac(new{{!}}save)" 2> /dev/null}} ou pesquisar em todo o disco substituindo {{ic|/etc}} por {{ic|/}} no comando anterior.<br />
* Se instalado, [[locate (Português)|locate]] também pode ser usado. Primeiro reindexe a base de dados: {{bc|# updatedb}}. Então, execute: {{bc|$ locate --existing --regex "\.pac(new{{!}}save)$"}}<br />
* Use o log do pacman para localizá-los: {{bc|$ grep --extended-regexp "\.pac(new{{!}}save)" /var/log/pacman.log}} Note que o log não mantém rastro dos arquivos atualmente no sistema de arquivos nem daqueles que já foram removidos; o comando acima vai listar todos os arquivos ''.pac*'' que já existiram em seu sistema. Para apenas obter os 10 mais recentes arquivos ''.pac*'', faça um ''pipe'' do resultado para {{ic|tail}}.<br />
<br />
== Gerenciando arquivos .pac* ==<br />
<br />
=== pacdiff ===<br />
{{pkg|pacman-contrib}} fornece ''pacdiff'', uma ferramenta simples para gerenciar arquivos pac*. Com isso, pode-se vai pesquisar por todos os arquivos ''.pacnew'' e ''.pacsave'' e pedir por quaisquer ações neles. Ele usa [[Vim#Merging files|vimdiff]] por padrão, mas você pode especificar uma ferramenta diferente com {{ic|1=DIFFPROG=''seu_editor'' pacdiff}}. Veja [[List of applications/Utilities#Comparison, diff, merge]] para outras ferramentas de comparação comum.<br />
<br />
=== Utilitários de terceiros ===<br />
Alguns poucos utilitários de terceiros fornecendo vários níveis de automação para essas ferramentas estão disponíveis no [[AUR (Português)|AUR]].<br />
<br />
Você pode usar uma das seguintes ferramentas:<br />
<br />
*{{App|dotpac|Script interativo básico com interface de texto baseada no ncurses e um passo a passo útil. Nenhum recurso de mesclagem ou automesclagem.|https://github.com/AladW/dotpac|{{AUR|dotpac}}}}<br />
*{{App|etc-update|Utilitário do ''Gentoo'' compatível com outras distribuições, incluindo o Arch. Ele fornece uma CLI simples para ver, mesclar e editar interativamente alterações. Alterações triviais, como comentários, podem ser mescladas automaticamente.|https://wiki.gentoo.org/wiki/Handbook:Parts/Portage/Tools#etc-update|{{AUR|etc-update}}}}<br />
*{{App|pacnew-auto|Mesclagem automática de {{ic|pacnew}} usando ''rebase'' do {{Pkg|git}}.|https://github.com/joanrieu/pacnew-auto|{{AUR|pacnew-auto-git}}}}<br />
*{{App|pacnews-git|Um script simples visando localizar todos os arquivos ''.pacnew'', para então editá-los com [[Vim#Merging files|vimdiff]].|https://github.com/pbrisbin/scripts/blob/master/pacnews|{{AUR|pacnews-git}}}}<br />
*{{App|pacfiles-mode|Um pacote para [[Emacs]] para gerenciar e mesclar arquivos ''.pacnew'', disponível em [https://melpa.org/#/pacfiles-mode melpa].|https://github.com/UndeadKernel/pacfiles-mode}}<br />
<br />
== Veja também ==<br />
<br />
* Fórum do Arch Linux: [https://bbs.archlinux.org/viewtopic.php?id=53532 Dealing with .pacnew files] ("Lidando com arquivos .pacnew")</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Package_Maintainers&diff=496989Package Maintainers2017-11-17T00:13:59Z<p>Foutrelis: Move myself from active TUs to past TUs</p>
<hr />
<div>[[Category:Arch development]]<br />
[[fr:TU]]<br />
[[ja:Trusted Users]]<br />
[[pt:Trusted Users]]<br />
The [https://www.archlinux.org/people/trusted-users/ Trusted Users] serve the following purposes:<br />
# Maintain the ''community'' repository as an intermediary between Arch Linux's [[official repositories]] and the unsupported package collection in the [[AUR]].<br />
# Maintain, manage, and watch over the operation of the [[AUR]].<br />
<br />
== How do I become a TU? ==<br />
The ''minimum'' requirements to becoming a TU are as follows:<br />
* know basic shell scripting<br />
* maintain a few packages in AUR with clean, high-quality PKGBUILDs<br />
* basic community involvement (mailing list, forums, IRC)<br />
* know Google-Fu<br />
* a general idea of the kind of packages you want to maintain (basically, why do you want to become TU?)<br />
<br />
<br />
Even though you could become a TU by merely fulfilling those minimum requirements, the people judging you [https://aur.archlinux.org/trusted-user/TUbylaws.html#_standard_voting_procedure during voting] might expect more of you. Such as:<br />
* involvement in the bug tracker (reporting, research, info)<br />
* patches for Arch projects<br />
* involvement in a few open-source projects (even if they are your own)<br />
<br />
<br />
In case you still feel up to becoming a TU after reading these lists, you should find another TU to sponsor you and write a witty application signed with your GPG key to the aur-general mailing list.<br />
<br />
{{Note|Should the TU you contact decline to sponsor your application, you should make this fact known if you seek sponsorship from another TU.}}<br />
<br />
For more information, please see [https://aur.archlinux.org/trusted-user/TUbylaws.html Trusted User Bylaws] and [[AUR Trusted User Guidelines]].<br />
<br />
== Active Trusted Users ==<br />
{| class="wikitable"<br />
|- style="border-bottom:solid 2px"<br />
|style="font-weight: bold;padding-right:120px"|Nick<br />
|style="font-weight: bold;padding-right:200px"|Name<br />
|style="font-weight: bold;"|E-Mail<br />
|-<br />
|[https://aur.archlinux.org/packages/?K=Alad&SeB=m alad]||[[User:Alad|Alad Wenter]]||nynq ng znvyobk qbg bet (rot13)<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=alucryd&SeB=m alucryd]||Maxime Gauduin||alucryd@archlinux.org<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Ambrevar&SeB=m Ambrevar]||[[User:Ambrevar|Pierre Neidhardt]]||ambrevar@gmail.com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=anatolik&SeB=m anatolik]||Anatol Pomozov||anatol dot pomozov + arch at gmail<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=anthraxx&SeB=m anthraxx]||[[User:anthraxx|Levente Polyak]]||anthraxx [at] archlinux [dot] org<br />
|-<br />
|[https://aur.archlinux.org/packages/?SeB=m&K=arcanis arcanis]||Evgeniy Alekseev||arcanis DOT arch AT gmail DOT com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=ArchangeGabriel&SeB=m ArchangeGabriel]||Bruno Pagani||bruno.n.pagani@gmail.com<br />
|-<br />
|[https://aur.archlinux.org/packages/?SeB=m&K=arojas arojas]||Antonio Rojas||arojas@archlinux.org<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Atsutane&SeB=m Atsutane]||Thorsten Töpper||atsutane {0x40} freethoughts {0x2E} de<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Barthalion&SeB=m Barthalion]||Bartłomiej Piotrowski||spam@bpiotrowski.pl<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=BlackIkeEagle&SeB=m BlackIkeEagle]||[[User:BlackEagle|Ike Devolder]]||ike DOT devolder AT gmail DOT com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=bluewind&SeB=m Bluewind]||Florian Pritz|| bluewind@xinu.at<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=City-busz&SeB=m City-busz]||Balló György||ballogyor+arch at gmail dot com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=ConnorBehan&SeB=m ConnorBehan]||Connor Behan||connor.behan@gmail.com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=lfleischer&SeB=m lfleischer]||Lukas Fleischer||lfleischer at archlinux dot org<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=eworm&SeB=m eworm]||Christian Hesse||mail@eworm.de<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Dragonlord&SeB=m Dragonlord]||[[User:Drag0nl0rd|Jaroslav Lichtblau]]||dragonlord @ aur archlinux org<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=dvzrv&SeB=m dvzrv]||[[User:Davezerave|David Runge]]|| dave@sleepmap.de<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=faidoc&SeB=m Faidoc]||Alexandre Filgueira||alexfilgueira [at] cinnarch [dot] com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=farseerfc&SeB=m farseerfc]||Jiachen Yang||farseerfc[at]gmail[dot]com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=felixonmars&SeB=m felixonmars]||Felix Yan||felixonmars@archlinux.org<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=flexiondotorg&SeB=m flexiondotorg]||Martin Wimpress||[mailto:martin+arch@flexion.org martin+arch@flexion.org]<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Foxboron&SeB=m Foxboron]||Morten Linderud||foxboron@archlinux.org<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=foxxx0&SeB=m foxxx0]||Thore Bödecker||me [at] foxxx0 [dot] de<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=giniu&SeB=m giniu]||[[User:giniu|Andrzej Giniewicz]]||gginiu@gmail.com<br />
|-<br />
|[https://aur.archlinux.org/packages/?SeB=m&K=grazzolini grazzolini]||Giancarlo Razzolini||grazzolini [at] gmail [dot] com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=gtmanfred&SeB=m gtmanfred]||Daniel Wallace||danielwallace gtmanfred com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=heftig&SeB=m heftig]||Jan Steffens||jan.steffens@student.kit.edu<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=jelly&SeB=m jelly]||Jelle van der Waa|| jelle vdwaa nl<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=jleclanche&SeB=m jleclanche]||[[User:jleclanche|Jerome Leclanche]]||jerome''@''leclan''.''ch<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=jsteel&SeB=m jsteel]||Jonathan Steel||jsteel at aur.archlinux.org<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=keenerd&SeB=m keenerd]||Kyle Keen||keenerd@gmail.com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Kyrias&SeB=m Kyrias]||[[User:Kyrias|Johannes Löthberg]]||johannes@kyriasis.com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=lordheavy&SeB=m Lordheavy]||[[User:Lordheavy|Laurent Carlier]]||lordheavym at gmail com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=mtorromeo&SeB=m mtorromeo]||Massimiliano Torromeo||massimiliano.torromeo@gmail.com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Muflone&SeB=m Muflone]||Fabio Castelli||webreg (at) vbsimple.net<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=NicoHood&SeB=m NicoHood]||NicoHood||archlinux (cat) nicohood (dog) de<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=schivmeister&SeB=m schivmeister]||[[User:Schivmeister|Ray Rashif]]||schiv archlinux org<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=schuay&SeB=m schuay]||Jakob Gruber||jakob.gruber@gmail.com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=seblu&SeB=m seblu]||Sébastien Luttringer||s е b l u ''at'' a r c h l і n ux ''dot'' o r g<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=sergej&SeB=m sergej]||[[User:Sergej|Sergej Pupykin]]||pupykin.s+arch@gmail.com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=shibumi&SeB=m shibumi]||[[User:shibumi|Christian Rebischke]]||Chris.Rebischke [at] archlinux [dot] org<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=speps&SeB=m speps]||SpepS||dreamspepser at yahoo dot it<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=stativ&SeB=m stativ]||Lukas Jirkovsky||l.jirkovsky strange_curved_character gmail.com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=svenstaro&SeB=m svenstaro]||[[User:svenstaro|Sven-Hendrik Haase]]||sh@lutzhaase.com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=td123&SeB=m td123]||Thomas Dziedzic||gostrc at gmail<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=tensor5&SeB=m tensor5]||Nicola Squartini||tensor5@gmail.com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=thestinger&SeB=m thestinger]||Daniel Micay||[mailto:danielmicay@gmail.com danielmicay@gmail.com]<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=tredaelli&SeB=m tredaelli]||Timothy Redaelli||timothy.redaelli@gmail.com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=wild&SeB=m wild]||[[User:vild|Dan Printzell]]||[mailto:arch@vild.io arch@vild.io]<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Xyne&SeB=m Xyne]||Xyne||ca . archlinux @ xyne, in reverse order<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=xyproto&SeB=m xyproto]||Alexander Rødseth||rodseth@gmail.com<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=zorun&SeB=m zorun]||Baptiste Jonglez||archlinux bitsofnetworks org<br />
|}<br />
<br />
== Inactive Trusted Users ==<br />
{| class="wikitable"<br />
|- style="border-bottom:solid 2px"<br />
|style="font-weight: bold;padding-right:120px"|Nick<br />
|style="font-weight: bold;padding-right:200px"|Name<br />
|style="font-weight: bold;"|E-Mail<br />
|style="font-weight: bold;"|Comments/Reference<br />
|-<br />
|}<br />
<br />
== Some Past Trusted Users ==<br />
{| class="wikitable"<br />
|- style="border-bottom:solid 2px"<br />
|style="font-weight: bold;padding-right:120px"|Nick<br />
|style="font-weight: bold;padding-right:200px"|Name<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=abhidg&SeB=m abhidg]||Abhishek Dasgupta<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Allan&SeB=m Allan]||Allan McRae<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=anders&SeB=m anders]||Anders Bergh<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=angvp&SeB=m angvp]||[[User:Angvp|Angel Velásquez]]<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=bardo&SeB=m bardo]||Corrado Primier<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=ndr&SeB=m ndr]||Andrea Scarpino<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=bfinch&SeB=m bfinch]||Bob Finch<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=brain0&SeB=m brain0]||Thomas Bächler<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=bjorn&SeB=m bjorn]||[[User:Bjørn|Bjørn Lindeijer]]<br />
|- <br />
|[https://aur.archlinux.org/packages/?K=Cinelli&SeB=m cinelli] ||Federico Cinelli<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=codemac&SeB=m codemac]||Jeff Mickey<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=cmb&SeB=m cmb]||Chris Brannon<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Daenyth&SeB=m Daenyth]||Daenyth Blank<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=DaNiMoTh&SeB=m DaNiMoTh]||JJ. DaNiMoTh<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=dejari&SeB=m dejari]||Leslie P. Polzer<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=dsa&SeB=m dsa]||Douglas Soares de Andrade<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=dtw&SeB=m dtw]||Phil Dillon-Thiselton<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=elasticdog&SeB=m elasticdog]||Aaron Bull Schaefer<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=encelo&SeB=m encelo]||Angelo Theodorou<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=even&SeB=m even] ||Kessia Pinheiro<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=falconindy&SeB=m falconindy]||Dave Reisner<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=foutrelis&SeB=m foutrelis]||Evangelos Foutras<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=filoktetes&SeB=m filoktetes]||Robert Emil Berge<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=firmicus&SeB=m firmicus]||François Charette<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=ganja_guru&SeB=m ganja_guru]||Varun Acharya<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=gcarrier&SeB=m gcarrier]||Geoffroy Carrier<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Ghost1227&SeB=m Ghost1227]||Dan Griffiths<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=gummibaerchen&SeB=m gummibaerchen]||Timm Preetz<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=hdoria&SeB=m hdoria]||Hugo Doria<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=iphitus&SeB=m iphitus]||James Rayner<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=itsbrad212&SeB=m itsbrad212]||Brad Fanella<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=kaitocracy&SeB=m kaitocracy]||Kaiting Chen<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=louipc&SeB=m louipc]||Loui Chang<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=mOLOk&SeB=m mOLOk]||Alessio Bolognino<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=nesl247&SeB=m nesl247]||Alex Heck<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Neverth&SeB=m Neverth]||Mikko Seppälä<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Partition&SeB=m Partition]||Mateusz Herych<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=petelewis&SeB=m petelewis]||Peter Lewis<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=PirateJonno&SeB=m PirateJonno]||Jonathan Conder<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=phrakture&SeB=m phrakture]||Aaron Griffin<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Pierre&SeB=m Pierre]||Pierre Schmitz<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=pizzapunk&SeB=m pizzapunk]||Alexander Fehr<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=pjmattal&SeB=m pjmattal]||Paul Mattal<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=pressh&SeB=m pressh]||Ronald van Haren<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Ranguvar&SeB=m Ranguvar]||Devin Cofer<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Romashka&SeB=m Romashka]||Roman Kyrylych<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=shastry&SeB=m shastry]||Vinay S Shastry<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Snowman&SeB=m Snowman]||Eric Bélanger<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=shinlun&SeB=m shinlun]||Shinlun Hsieh<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=StefanHusmann&SeB=m StefanHusmann]||Stefan Husmann<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=STiAT&SeB=m STiAT]||Georg Grabler<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=swiergot&SeB=m swiergot]||Jaroslaw Swierczynski<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=tardo&SeB=m tardo]||Shehzad Qureshi<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=thatch45&SeB=m thatch45]||Thomas S Hatch<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=thotypous&SeB=m thotypous]||Paulo Matias<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=vegai&SeB=m vegai]||Vesa Kaihlavirta<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=voidnull&SeB=m voidnull]||Giovanni Scafora<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=wizzomafizzo&SeB=m wizzomafizzo]||Callan Barrett<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=wonder&SeB=m wonder]|| Ionut Biru<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Xilon&SeB=m Xilon]||Sebastian Nowicki<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=xterminus&SeB=m xterminus]||Charles Mauch<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=zeus&SeB=m zeus]||Zhukov Pavel<br />
|-<br />
|[https://aur.archlinux.org/packages.php?K=Dicebot&SeB=m Dicebot]||Mihails Strasuns<br />
|}</div>Foutrelishttps://wiki.archlinux.org/index.php?title=DeveloperWiki:Roll_Call&diff=411021DeveloperWiki:Roll Call2015-12-06T04:51:07Z<p>Foutrelis: </p>
<hr />
<div>[[Category:DeveloperWiki]]<br />
<br />
==Developers==<br />
* Aaron Griffin<br />
<br />
* Allan McRae<br />
** Packaging (toolchain)<br />
** Pacman development<br />
<br />
* Anatol Pomozov<br />
* Andreas Radke<br />
* Andrew Gregory<br />
** Pacman development<br />
* Ángel Velásquez<br />
* Antonio Rojas<br />
* Bartłomiej Piotrowski<br />
* Dan McGee<br />
* Daniel Isenmann<br />
* Dave Reisner<br />
* Eric Bélanger<br />
* Evangelos Foutras<br />
** Packaging (Xfce, LLVM/Clang)<br />
** Rebuild automation (arch-rebuilds)<br />
** Might be inactive for some period in 2016 and/or 2017<br />
* Felix Yan<br />
* Florian Pritz<br />
** Packaging<br />
** Serveradmin<br />
** Mirrors<br />
** Mailinglists<br />
* Gaetan Bisson<br />
** Packaging<br />
* Gerardo Pozzi<br />
* Giovanni Scafora<br />
* Guillaume Alaux<br />
* Ionuț Mircea Bîru<br />
* Jan de Groot<br />
* Jan Steffens<br />
* Jürgen Hötzel<br />
* Laurent Carlier<br />
** Packaging (mesa, xorg)<br />
* Lukas Fleischer<br />
* Maxime Gauduin<br />
* Pierre Schmitz<br />
* Ray Rashif<br />
* Rémy Oudompheng<br />
* Ronald van Haren<br />
* Sébastien Luttringer<br />
* Sven-Hendrik Haase<br />
** Packaging (NVIDIA stuff, multimedia stuff)<br />
* Thomas Bächler<br />
* Thomas Dziedzic<br />
* Tobias Powalowski<br />
* Tom Gundersen<br />
<br />
==Trusted Users==<br />
* Alexander Rødseth<br />
* Alexandre Filgueira<br />
* Anatol Pomozov<br />
* Andrzej Giniewicz<br />
* Antonio Rojas<br />
* Balló György<br />
* Bartłomiej Piotrowski<br />
* Christian Hesse<br />
* Connor Behan<br />
* Daniel Micay<br />
* Daniel Wallace<br />
* Evgeniy Alekseev<br />
* Fabio Castelli<br />
** Packaging<br />
* Felix Yan<br />
* Ike Devolder<br />
* Jakob Gruber<br />
* Jan Steffens<br />
* Jaroslav Lichtblau<br />
* Jelle van der Waa<br />
* Jerome Leclanche<br />
* Jiachen Yang<br />
* Johannes Löthberg<br />
* Jonathan Steel<br />
* Kyle Keen<br />
* Laurent Carlier<br />
** Packaging<br />
* Levente Polyak<br />
** Packaging<br />
** Security team<br />
** Reproducible builds<br />
* Lukas Fleischer<br />
* Lukas Jirkovsky<br />
* Martin Wimpress<br />
* Massimiliano Torromeo<br />
* Maxime Gauduin<br />
* Pierre Neidhardt<br />
* Ray Rashif<br />
* Sébastien Luttringer<br />
* Sergej Pupykin<br />
* speps<br />
* Thomas Dziedzic<br />
* Thorsten Töpper<br />
* Timothy Redaelli<br />
* Xyne<br />
* Михаил Страшун<br />
<br />
==Support Staff==<br />
* Christian Rebischke<br />
* Doug Newgard<br />
* Eric Waller<br />
* Jakob Wadsager<br />
* Jason Ryan<br />
** Forum Administration and Moderation<br />
** Wiki Administration<br />
* Johannes Löthberg<br />
* Levente Polyak<br />
** See above (TU)<br />
* Remi Gacogne<br />
* tigrmesh<br />
* WorMzy Tykashi<br />
** Forum moderation<br />
* Xyne</div>Foutrelishttps://wiki.archlinux.org/index.php?title=DeveloperWiki:Roll_Call&diff=411001DeveloperWiki:Roll Call2015-12-06T01:57:49Z<p>Foutrelis: Remove two dev entries from TU section (as per instructions)</p>
<hr />
<div>[[Category:DeveloperWiki]]<br />
<br />
==Developers==<br />
* Aaron Griffin<br />
<br />
* Allan McRae<br />
** Packaging (toolchain)<br />
** Pacman development<br />
<br />
* Anatol Pomozov<br />
* Andreas Radke<br />
* Andrew Gregory<br />
* Ángel Velásquez<br />
* Antonio Rojas<br />
* Bartłomiej Piotrowski<br />
* Dan McGee<br />
* Daniel Isenmann<br />
* Dave Reisner<br />
* Eric Bélanger<br />
* Evangelos Foutras<br />
** Packaging (Xfce)<br />
** Might be inactive for some period in 2016 and/or 2017<br />
* Felix Yan<br />
* Florian Pritz<br />
** Packaging<br />
** Serveradmin<br />
** Mirrors<br />
** Mailinglists<br />
* Gaetan Bisson<br />
** Packaging<br />
<br />
* Gerardo Pozzi<br />
* Giovanni Scafora<br />
* Guillaume Alaux<br />
* Ionuț Mircea Bîru<br />
* Jan de Groot<br />
* Jan Steffens<br />
* Jürgen Hötzel<br />
* Laurent Carlier<br />
* Lukas Fleischer<br />
* Maxime Gauduin<br />
* Pierre Schmitz<br />
* Ray Rashif<br />
* Rémy Oudompheng<br />
* Ronald van Haren<br />
* Sébastien Luttringer<br />
* Sven-Hendrik Haase<br />
** Packaging (NVIDIA stuff, multimedia stuff)<br />
<br />
* Thomas Bächler<br />
* Thomas Dziedzic<br />
* Tobias Powalowski<br />
* Tom Gundersen<br />
<br />
==Trusted Users==<br />
* Alexander Rødseth<br />
* Alexandre Filgueira<br />
* Anatol Pomozov<br />
* Andrzej Giniewicz<br />
* Antonio Rojas<br />
* Balló György<br />
* Bartłomiej Piotrowski<br />
* Christian Hesse<br />
* Connor Behan<br />
* Daniel Micay<br />
* Daniel Wallace<br />
* Evgeniy Alekseev<br />
* Fabio Castelli<br />
** Packaging<br />
* Felix Yan<br />
* Ike Devolder<br />
* Jakob Gruber<br />
* Jan Steffens<br />
* Jaroslav Lichtblau<br />
* Jelle van der Waa<br />
* Jerome Leclanche<br />
* Jiachen Yang<br />
* Johannes Löthberg<br />
* Jonathan Steel<br />
* Kyle Keen<br />
* Laurent Carlier<br />
* Levente Polyak<br />
** Packaging<br />
** Security team<br />
** Reproducible builds<br />
* Lukas Fleischer<br />
* Lukas Jirkovsky<br />
* Martin Wimpress<br />
* Massimiliano Torromeo<br />
* Maxime Gauduin<br />
* Pierre Neidhardt<br />
* Ray Rashif<br />
* Sébastien Luttringer<br />
* Sergej Pupykin<br />
* speps<br />
* Thomas Dziedzic<br />
* Thorsten Töpper<br />
* Timothy Redaelli<br />
* Xyne<br />
* Михаил Страшун<br />
<br />
==Support Staff==<br />
* Christian Rebischke<br />
* Doug Newgard<br />
* Eric Waller<br />
* Jakob Wadsager<br />
* Jason Ryan<br />
** Forum Administration and Moderation<br />
** Wiki Administration<br />
* Johannes Löthberg<br />
* Levente Polyak<br />
** See above (TU)<br />
* Remi Gacogne<br />
* tigrmesh<br />
* WorMzy Tykashi<br />
** Forum moderation<br />
* Xyne</div>Foutrelishttps://wiki.archlinux.org/index.php?title=DeveloperWiki:Roll_Call&diff=411000DeveloperWiki:Roll Call2015-12-06T01:55:46Z<p>Foutrelis: </p>
<hr />
<div>[[Category:DeveloperWiki]]<br />
<br />
==Developers==<br />
* Aaron Griffin<br />
<br />
* Allan McRae<br />
** Packaging (toolchain)<br />
** Pacman development<br />
<br />
* Anatol Pomozov<br />
* Andreas Radke<br />
* Andrew Gregory<br />
* Ángel Velásquez<br />
* Antonio Rojas<br />
* Bartłomiej Piotrowski<br />
* Dan McGee<br />
* Daniel Isenmann<br />
* Dave Reisner<br />
* Eric Bélanger<br />
* Evangelos Foutras<br />
** Packaging (Xfce)<br />
** Might be inactive for some period in 2016 and/or 2017<br />
* Felix Yan<br />
* Florian Pritz<br />
** Packaging<br />
** Serveradmin<br />
** Mirrors<br />
** Mailinglists<br />
* Gaetan Bisson<br />
** Packaging<br />
<br />
* Gerardo Pozzi<br />
* Giovanni Scafora<br />
* Guillaume Alaux<br />
* Ionuț Mircea Bîru<br />
* Jan de Groot<br />
* Jan Steffens<br />
* Jürgen Hötzel<br />
* Laurent Carlier<br />
* Lukas Fleischer<br />
* Maxime Gauduin<br />
* Pierre Schmitz<br />
* Ray Rashif<br />
* Rémy Oudompheng<br />
* Ronald van Haren<br />
* Sébastien Luttringer<br />
* Sven-Hendrik Haase<br />
** Packaging (NVIDIA stuff, multimedia stuff)<br />
<br />
* Thomas Bächler<br />
* Thomas Dziedzic<br />
* Tobias Powalowski<br />
* Tom Gundersen<br />
<br />
==Trusted Users==<br />
* Alexander Rødseth<br />
* Alexandre Filgueira<br />
* Anatol Pomozov<br />
* Andrzej Giniewicz<br />
* Antonio Rojas<br />
* Balló György<br />
* Bartłomiej Piotrowski<br />
* Christian Hesse<br />
* Connor Behan<br />
* Daniel Micay<br />
* Daniel Wallace<br />
* Evangelos Foutras<br />
** Not doing much TU stuff other than maintaining a few packages in [community]; also see above section<br />
* Evgeniy Alekseev<br />
* Fabio Castelli<br />
** Packaging<br />
* Felix Yan<br />
* Florian Pritz<br />
** see above (dev)<br />
* Ike Devolder<br />
* Jakob Gruber<br />
* Jan Steffens<br />
* Jaroslav Lichtblau<br />
* Jelle van der Waa<br />
* Jerome Leclanche<br />
* Jiachen Yang<br />
* Johannes Löthberg<br />
* Jonathan Steel<br />
* Kyle Keen<br />
* Laurent Carlier<br />
* Levente Polyak<br />
** Packaging<br />
** Security team<br />
** Reproducible builds<br />
* Lukas Fleischer<br />
* Lukas Jirkovsky<br />
* Martin Wimpress<br />
* Massimiliano Torromeo<br />
* Maxime Gauduin<br />
* Pierre Neidhardt<br />
* Ray Rashif<br />
* Sébastien Luttringer<br />
* Sergej Pupykin<br />
* speps<br />
* Thomas Dziedzic<br />
* Thorsten Töpper<br />
* Timothy Redaelli<br />
* Xyne<br />
* Михаил Страшун<br />
<br />
==Support Staff==<br />
* Christian Rebischke<br />
* Doug Newgard<br />
* Eric Waller<br />
* Jakob Wadsager<br />
* Jason Ryan<br />
** Forum Administration and Moderation<br />
** Wiki Administration<br />
* Johannes Löthberg<br />
* Levente Polyak<br />
** See above (TU)<br />
* Remi Gacogne<br />
* tigrmesh<br />
* WorMzy Tykashi<br />
** Forum moderation<br />
* Xyne</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Systemd&diff=370490Systemd2015-04-21T18:24:40Z<p>Foutrelis: systemd-tmpfiles-setup.service fails to start at boot: Point to existing article about enabling ACL</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Daemons and system services]]<br />
[[Category:Boot process]]<br />
[[ar:Systemd]]<br />
[[de:Systemd]]<br />
[[el:Systemd]]<br />
[[es:Systemd]]<br />
[[fr:Systemd]]<br />
[[it:Systemd]]<br />
[[ja:Systemd]]<br />
[[pt:Systemd]]<br />
[[ru:Systemd]]<br />
[[zh-CN:Systemd]]<br />
[[zh-TW:Systemd]]<br />
{{Related articles start}}<br />
{{Related|systemd/User}}<br />
{{Related|systemd/Services}}<br />
{{Related|systemd/Timers}}<br />
{{Related|systemd FAQ}}<br />
{{Related|init}}<br />
{{Related|init Rosetta}}<br />
{{Related|Daemons List}}<br />
{{Related|udev}}<br />
{{Related|Improve boot performance}}<br />
{{Related|Allow users to shutdown}}<br />
{{Related articles end}}<br />
<br />
From the [http://freedesktop.org/wiki/Software/systemd project web page]:<br />
<br />
:''systemd'' is a system and service manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and [[D-Bus]] activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux [[cgroups|control groups]], supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic.<br />
<br />
{{Note|1=For a detailed explanation as to why Arch has moved to ''systemd'', see [https://bbs.archlinux.org/viewtopic.php?pid=1149530#p1149530 this forum post].}}<br />
<br />
== Basic systemctl usage ==<br />
<br />
The main command used to introspect and control ''systemd'' is ''systemctl''. Some of its uses are examining the system state and managing the system and services. See {{ic|man 1 systemctl}} for more details.<br />
<br />
{{Tip|<br />
* You can use all of the following ''systemctl'' commands with the {{ic|-H ''user''@''host''}} switch to control a ''systemd'' instance on a remote machine. This will use [[SSH]] to connect to the remote ''systemd'' instance.<br />
* ''systemadm'' is the official graphical frontend for ''systemctl''. It is provided by {{Pkg|systemd-ui}} from the [[official repositories]] or by {{AUR|systemd-ui-git}} from the [[AUR]] for the development version.}}<br />
<br />
=== Analyzing the system state ===<br />
<br />
List running units:<br />
<br />
$ systemctl<br />
<br />
or:<br />
<br />
$ systemctl list-units<br />
<br />
List failed units:<br />
<br />
$ systemctl --failed<br />
<br />
The available unit files can be seen in {{ic|/usr/lib/systemd/system/}} and {{ic|/etc/systemd/system/}} (the latter takes precedence). You can see a list of the installed unit files with:<br />
<br />
$ systemctl list-unit-files<br />
<br />
=== Using units ===<br />
<br />
Units can be, for example, services (''.service''), mount points (''.mount''), devices (''.device'') or sockets (''.socket'').<br />
<br />
When using ''systemctl'', you generally have to specify the complete name of the unit file, including its suffix, for example ''sshd.socket''. There are however a few short forms when specifying the unit in the following ''systemctl'' commands:<br />
<br />
* If you do not specify the suffix, systemctl will assume ''.service''. For example, {{ic|netctl}} and {{ic|netctl.service}} are equivalent.<br />
* Mount points will automatically be translated into the appropriate ''.mount'' unit. For example, specifying {{ic|/home}} is equivalent to {{ic|home.mount}}.<br />
* Similar to mount points, devices are automatically translated into the appropriate ''.device'' unit, therefore specifying {{ic|/dev/sda2}} is equivalent to {{ic|dev-sda2.device}}.<br />
<br />
See {{ic|man systemd.unit}} for details.<br />
<br />
{{Note|Some unit names contain an {{ic|@}} sign (e.g. {{ic|name@''string''.service}}): this means that they are [http://0pointer.de/blog/projects/instances.html instances] of a ''template'' unit, whose actual file name does not contain the {{ic|''string''}} part (e.g. {{ic|name@.service}}). {{ic|''string''}} is called the ''instance identifier'', and is similar to an argument that is passed to the template unit when called with the ''systemctl'' command: in the unit file it will substitute the {{ic|%i}} specifier. <br />
<br />
To be more accurate, ''before'' trying to instantiate the {{ic|name@.suffix}} template unit, ''systemd'' will actually look for a unit with the exact {{ic|name@string.suffix}} file name, although by convention such a "clash" happens rarely, i.e. most unit files containing an {{ic|@}} sign are meant to be templates. Also, if a template unit is called without an instance identifier, it will just fail, since the {{ic|%i}} specifier cannot be substituted.<br />
}}<br />
<br />
{{Tip|<br />
* Most of the following commands also work if multiple units are specified, see {{ic|man systemctl}} for more information. <br />
* A package may offer units for different purposes. If you just installed a package, {{ic|pacman -Qql ''package'' <nowiki>|</nowiki> grep -Fe .service -e .socket}} can be used to check and find them.}}<br />
<br />
'''Start''' a unit immediately:<br />
<br />
# systemctl start ''unit''<br />
<br />
'''Stop''' a unit immediately:<br />
<br />
# systemctl stop ''unit''<br />
<br />
'''Restart''' a unit:<br />
<br />
# systemctl restart ''unit''<br />
<br />
Ask a unit to '''reload''' its configuration:<br />
<br />
# systemctl reload ''unit''<br />
<br />
Show the '''status''' of a unit, including whether it is running or not:<br />
<br />
$ systemctl status ''unit''<br />
<br />
'''Check''' whether a unit is already enabled or not:<br />
<br />
$ systemctl is-enabled ''unit''<br />
<br />
'''Enable''' a unit to be started on '''bootup''':<br />
<br />
# systemctl enable ''unit''<br />
<br />
'''Disable''' a unit to not start during bootup:<br />
<br />
# systemctl disable ''unit''<br />
<br />
'''Mask''' a unit to make it impossible to start it:<br />
<br />
# systemctl mask ''unit''<br />
<br />
'''Unmask''' a unit:<br />
<br />
# systemctl unmask ''unit''<br />
<br />
Show the '''manual page''' associated with a unit (this has to be supported by the unit file):<br />
<br />
$ systemctl help ''unit''<br />
<br />
Reload ''systemd'', scanning for '''new or changed units''':<br />
<br />
# systemctl daemon-reload<br />
<br />
=== Power management ===<br />
<br />
[[polkit]] is necessary for power management as an unprivileged user. If you are in a local ''systemd-logind'' user session and no other session is active, the following commands will work without root privileges. If not (for example, because another user is logged into a tty), ''systemd'' will automatically ask you for the root password.<br />
<br />
Shut down and reboot the system:<br />
<br />
$ systemctl reboot<br />
<br />
Shut down and power-off the system:<br />
<br />
$ systemctl poweroff<br />
<br />
Suspend the system:<br />
<br />
$ systemctl suspend<br />
<br />
Put the system into hibernation:<br />
<br />
$ systemctl hibernate<br />
<br />
Put the system into hybrid-sleep state (or suspend-to-both):<br />
<br />
$ systemctl hybrid-sleep<br />
<br />
== Writing unit files ==<br />
<br />
The syntax of ''systemd'''s [http://www.freedesktop.org/software/systemd/man/systemd.unit.html unit files] is inspired by XDG Desktop Entry Specification ''.desktop'' files, which are in turn inspired by Microsoft Windows ''.ini'' files. Unit files are loaded from two locations. From lowest to highest precedence they are:<br />
<br />
* {{ic|/usr/lib/systemd/system/}}: units provided by installed packages<br />
* {{ic|/etc/systemd/system/}}: units installed by the system administrator<br />
<br />
{{Note|The load paths are completely different when running ''systemd'' in [[systemd/User#How it works|user mode]].}}<br />
<br />
Look at the units installed by your packages for examples, or see [[systemd/Services]].<br />
<br />
{{Tip|Comments prepended with {{ic|#}} may be used in unit-files as well, but only in new lines. Do not use end-line comments after ''systemd'' parameters or the unit will fail to activate.}}<br />
<br />
=== Handling dependencies ===<br />
<br />
With ''systemd'', dependencies can be resolved by designing the unit files correctly. The most typical case is that the unit ''A'' requires the unit ''B'' to be running before ''A'' is started. In that case add {{ic|1=Requires=''B''}} and {{ic|1=After=''B''}} to the {{ic|[Unit]}} section of ''A''. If the dependency is optional, add {{ic|1=Wants=''B''}} and {{ic|1=After=''B''}} instead. Note that {{ic|1=Wants=}} and {{ic|1=Requires=}} do not imply {{ic|1=After=}}, meaning that if {{ic|1=After=}} is not specified, the two units will be started in parallel.<br />
<br />
Dependencies are typically placed on services and not on targets. For example, ''network.target'' is pulled in by whatever service configures your network interfaces, therefore ordering your custom unit after it is sufficient since ''network.target'' is started anyway.<br />
<br />
=== Service types ===<br />
<br />
There are several different start-up types to consider when writing a custom service file. This is set with the {{ic|1=Type=}} parameter in the {{ic|[Service]}} section:<br />
<br />
* {{ic|1=Type=simple}} (default): ''systemd'' considers the service to be started up immediately. The process must not fork. Do not use this type if other services need to be ordered on this service, unless it is socket activated.<br />
* {{ic|1=Type=forking}}: ''systemd'' considers the service started up once the process forks and the parent has exited. For classic daemons use this type unless you know that it is not necessary. You should specify {{ic|1=PIDFile=}} as well so ''systemd'' can keep track of the main process.<br />
* {{ic|1=Type=oneshot}}: this is useful for scripts that do a single job and then exit. You may want to set {{ic|1=RemainAfterExit=yes}} as well so that ''systemd'' still considers the service as active after the process has exited.<br />
* {{ic|1=Type=notify}}: identical to {{ic|1=Type=simple}}, but with the stipulation that the daemon will send a signal to ''systemd'' when it is ready. The reference implementation for this notification is provided by ''libsystemd-daemon.so''.<br />
* {{ic|1=Type=dbus}}: the service is considered ready when the specified {{ic|BusName}} appears on DBus's system bus.<br />
* {{ic|1=Type=idle}}: behavior of idle is very similar to {{ic|1=Type=simple}}; however, actual execution of the service binary is delayed until all jobs are dispatched. This may be used to avoid interleaving of output of shell services with the status output on the console.<br />
<br />
See {{ic|man systemd.service}} for a more detailed explanation.<br />
<br />
=== Editing provided unit files ===<br />
<br />
There are two ways to edit a unit file provided by a package: replace the entire unit file with a new one or create drop-in snippets which are applied on top of the existing unit file. For both methods, you must reload the unit afterwards to apply your changes. This can be done either by editing the unit with {{ic|systemctl edit}} (which reloads the unit automatically) or by reloading all units with:<br />
<br />
# systemctl daemon-reload<br />
<br />
{{Tip|<br />
* You can use ''systemd-delta'' to see which unit files have been overridden or extended and what exactly has been changed.<br />
* Use {{ic|systemctl cat ''unit''}} to view the content of a unit file and all associated drop-in snippets.<br />
* Syntax highlighting for ''systemd'' unit files within [[Vim]] can be enabled by installing {{Pkg|vim-systemd}} from the [[official repositories]].<br />
}}<br />
<br />
==== Replacement unit files ====<br />
<br />
To replace the unit file {{ic|/usr/lib/systemd/system/''unit''}}, create the file {{ic|/etc/systemd/system/''unit''}} and reenable the unit to update the symlinks:<br />
<br />
# systemctl reenable ''unit''<br />
<br />
Alternatively, run<br />
<br />
# systemctl edit --full ''unit''<br />
<br />
This opens {{ic|/etc/systemd/system/''unit''}} in your editor (copying the installed version if it does not exist yet) and automatically reloads it when you finish editing.<br />
<br />
{{Note|Pacman does not update the replacement unit files when the originals are updated, so this method can make system maintenance more difficult. For this reason the next approach is recommended.}}<br />
<br />
==== Drop-in snippets ====<br />
<br />
To create drop-in snippets for the unit file {{ic|/usr/lib/systemd/system/''unit''}}, create the directory {{ic|/etc/systemd/system/''unit''.d/}} and place ''.conf'' files there to override or add new options. ''systemd'' will parse these ''.conf'' files and apply them on top of the original unit.<br />
<br />
The easiest way to do this is to run:<br />
<br />
# systemctl edit ''unit''<br />
<br />
This opens the file {{ic|/etc/systemd/system/''unit''.d/override.conf}} in your text editor (creating it if necessary) and automatically reloads the unit when you are done editing.<br />
<br />
==== Examples ====<br />
<br />
For example, if you simply want to add an additional dependency to a unit, you may create the following file:<br />
<br />
{{hc|/etc/systemd/system/''unit''.d/customdependency.conf|2=<br />
[Unit]<br />
Requires=''new dependency''<br />
After=''new dependency''<br />
}}<br />
<br />
As another example, in order to replace the {{ic|ExecStart}} directive for a unit that is not of type {{ic|oneshot}}, create the following file:<br />
<br />
{{hc|/etc/systemd/system/''unit''.d/customexec.conf|2=<br />
[Service]<br />
ExecStart=<br />
ExecStart=''new command''<br />
}}<br />
<br />
Note how {{ic|ExecStart}} must be cleared before being re-assigned ([https://bugzilla.redhat.com/show_bug.cgi?id=756787#c9]).<br />
<br />
One more example to automatically restart a service:<br />
<br />
{{hc|/etc/systemd/system/''unit''.d/restart.conf|2=<br />
[Service]<br />
Restart=always<br />
RestartSec=30<br />
}}<br />
<br />
== Targets ==<br />
<br />
''systemd'' uses ''targets'' which serve a similar purpose as runlevels but act a little different. Each ''target'' is named instead of numbered and is intended to serve a specific purpose with the possibility of having multiple ones active at the same time. Some ''target''s are implemented by inheriting all of the services of another ''target'' and adding additional services to it. There are ''systemd'' ''target''s that mimic the common SystemVinit runlevels so you can still switch ''target''s using the familiar {{ic|telinit RUNLEVEL}} command.<br />
<br />
=== Get current targets ===<br />
<br />
The following should be used under ''systemd'' instead of running {{ic|runlevel}}:<br />
<br />
$ systemctl list-units --type=target<br />
<br />
=== Create custom target ===<br />
<br />
The runlevels that are assigned a specific purpose on vanilla Fedora installs; 0, 1, 3, 5, and 6; have a 1:1 mapping with a specific ''systemd'' ''target''. Unfortunately, there is no good way to do the same for the user-defined runlevels like 2 and 4. If you make use of those it is suggested that you make a new named ''systemd'' ''target'' as {{ic|/etc/systemd/system/''your target''}} that takes one of the existing runlevels as a base (you can look at {{ic|/usr/lib/systemd/system/graphical.target}} as an example), make a directory {{ic|/etc/systemd/system/''your target''.wants}}, and then symlink the additional services from {{ic|/usr/lib/systemd/system/}} that you wish to enable.<br />
<br />
=== Targets table ===<br />
<br />
{| class="wikitable"<br />
! SysV Runlevel !! systemd Target !! Notes<br />
|-<br />
| 0 || runlevel0.target, poweroff.target || Halt the system.<br />
|-<br />
| 1, s, single || runlevel1.target, rescue.target || Single user mode.<br />
|-<br />
| 2, 4 || runlevel2.target, runlevel4.target, multi-user.target || User-defined/Site-specific runlevels. By default, identical to 3.<br />
|-<br />
| 3 || runlevel3.target, multi-user.target || Multi-user, non-graphical. Users can usually login via multiple consoles or via the network.<br />
|-<br />
| 5 || runlevel5.target, graphical.target || Multi-user, graphical. Usually has all the services of runlevel 3 plus a graphical login.<br />
|-<br />
| 6 || runlevel6.target, reboot.target || Reboot<br />
|-<br />
| emergency || emergency.target || Emergency shell<br />
|-<br />
|}<br />
<br />
=== Change current target ===<br />
<br />
In ''systemd'' targets are exposed via ''target units''. You can change them like this:<br />
<br />
# systemctl isolate graphical.target<br />
<br />
This will only change the current target, and has no effect on the next boot. This is equivalent to commands such as {{ic|telinit 3}} or {{ic|telinit 5}} in Sysvinit.<br />
<br />
=== Change default target to boot into ===<br />
<br />
The standard target is ''default.target'', which is aliased by default to ''graphical.target'' (which roughly corresponds to the old runlevel 5). To change the default target at boot-time, append one of the following [[kernel parameters]] to your bootloader:<br />
<br />
* {{ic|1=systemd.unit=multi-user.target}} (which roughly corresponds to the old runlevel 3),<br />
* {{ic|1=systemd.unit=rescue.target}} (which roughly corresponds to the old runlevel 1).<br />
<br />
Alternatively, you may leave the bootloader alone and change ''default.target''. This can be done using ''systemctl'':<br />
<br />
# systemctl set-default multi-user.target<br />
<br />
To be able to override the previously set ''default.target'', use the force option:<br />
<br />
# systemctl set-default -f multi-user.target<br />
<br />
The effect of this command is output by ''systemctl''; a symlink to the new default target is made at {{ic|/etc/systemd/system/default.target}}.<br />
<br />
== Temporary files ==<br />
<br />
"''systemd-tmpfiles'' creates, deletes and cleans up volatile and temporary files and directories." It reads configuration files in {{ic|/etc/tmpfiles.d/}} and {{ic|/usr/lib/tmpfiles.d/}} to discover which actions to perform. Configuration files in the former directory take precedence over those in the latter directory.<br />
<br />
Configuration files are usually provided together with service files, and they are named in the style of {{ic|/usr/lib/tmpfiles.d/''program''.conf}}. For example, the [[Samba]] daemon expects the directory {{ic|/run/samba}} to exist and to have the correct permissions. Therefore, the {{Pkg|samba}} package ships with this configuration:<br />
<br />
{{hc|/usr/lib/tmpfiles.d/samba.conf|<br />
D /run/samba 0755 root root}}<br />
<br />
Configuration files may also be used to write values into certain files on boot. For example, if you used {{ic|/etc/rc.local}} to disable wakeup from USB devices with {{ic|echo USBE > /proc/acpi/wakeup}}, you may use the following tmpfile instead:<br />
<br />
{{hc|/etc/tmpfiles.d/disable-usb-wake.conf|<br />
w /proc/acpi/wakeup - - - - USBE}}<br />
<br />
See the {{ic|systemd-tmpfiles(8)}} and {{ic|tmpfiles.d(5)}} man pages for details.<br />
<br />
{{Note|This method may not work to set options in {{ic|/sys}} since the ''systemd-tmpfiles-setup'' service may run before the appropriate device modules is loaded. In this case you could check whether the module has a parameter for the option you want to set with {{ic|modinfo ''module''}} and set this option with a [[Kernel modules#Setting module options|config file in /etc/modprobe.d]]. Otherwise you will have to write a [[Udev#About_udev_rules|udev rule]] to set the appropriate attribute as soon as the device appears.}}<br />
<br />
== Timers ==<br />
<br />
A timer is a unit configuration file whose name ends with ''.timer'' and encodes information about a timer controlled and supervised by ''systemd'', for timer-based activation. See [[systemd/Timers]].<br />
<br />
{{Note|Timers can replace ''cron'' functionality to a great extent. See [[systemd/Timers#As a cron replacement]].}}<br />
<br />
== Journal ==<br />
<br />
''systemd'' has its own logging system called the journal; therefore, running a {{ic|syslog}} daemon is no longer required. To read the log, use:<br />
<br />
# journalctl<br />
<br />
In Arch Linux, the directory {{ic|/var/log/journal/}} is a part of the {{Pkg|systemd}} package, and the journal (when {{ic|1=Storage=}} is set to {{ic|auto}} in {{ic|/etc/systemd/journald.conf}}) will write to {{ic|/var/log/journal/}}. If you or some program delete that directory, ''systemd'' will '''not''' recreate it automatically and instead will write its logs to {{ic|/run/systemd/journal}} in a nonpersistent way. However, the folder will be recreated when you set {{ic|1=Storage=persistent}} and run {{ic|systemctl restart systemd-journald}} (or reboot).<br />
<br />
=== Filtering output ===<br />
<br />
''journalctl'' allows you to filter the output by specific fields. Be aware that if there are many messages to display or filtering of large time span has to be done, the output of this command can be delayed for quite some time.<br />
<br />
{{Tip|While the journal is stored in a binary format, the content of stored messages is not modified. This means it is viewable with ''strings'', for example for recovery in an environment which does not have ''systemd'' installed. Example command:<br />
{{ic|$ strings /mnt/arch/var/log/journal/af4967d77fba44c6b093d0e9862f6ddd/system.journal <nowiki>| grep -i</nowiki> ''message''}}<br />
}}<br />
<br />
Examples:<br />
<br />
* Show all messages from this boot: {{bc|# journalctl -b}} However, often one is interested in messages not from the current, but from the previous boot (e.g. if an unrecoverable system crash happened). This is possible through optional offset parameter of the {{ic|-b}} flag: {{ic|journalctl -b -0}} shows messages from the current boot, {{ic|journalctl -b -1}} from the previous boot, {{ic|journalctl -b -2}} from the second previous and so on. See {{ic|man 1 journalctl}} for full description, the semantics is much more powerful.<br />
* Show all messages from date (and optional time): {{bc|1=# journalctl --since="2012-10-30 18:17:16"}}<br />
* Show all messages since 20 minutes ago: {{bc|1=# journalctl --since "20 min ago"}}<br />
* Follow new messages: {{bc|# journalctl -f}}<br />
* Show all messages by a specific executable: {{bc|# journalctl /usr/lib/systemd/systemd}}<br />
* Show all messages by a specific process: {{bc|1=# journalctl _PID=1}}<br />
* Show all messages by a specific unit: {{bc|# journalctl -u netcfg}}<br />
* Show kernel ring buffer: {{bc|1=# journalctl -k}}<br />
* Show auth.log equivalent by filtering on syslog facility: {{bc|1=# journalctl -f -l SYSLOG_FACILITY=10}}<br />
<br />
See {{ic|man 1 journalctl}}, {{ic|man 7 systemd.journal-fields}}, or Lennart's [http://0pointer.de/blog/projects/journalctl.html blog post] for details.<br />
<br />
{{Tip|1=<br />
By default, ''journalctl'' truncates lines longer than screen width, but in some cases, it may be better to enable wrapping instead of truncating. This can be controlled by the {{ic|SYSTEMD_LESS}} [[Environment variables|environment variable]], which contains options passed to [[Core utilities#less|less]] (the default pager) and defaults to {{ic|FRSXMK}} (see {{ic|man 1 less}} and {{ic|man 1 journalctl}} for details).<br />
<br />
By omitting the {{ic|S}} option, the output will be wrapped instead of truncated. For example, start ''journalctl'' as follows:<br />
<br />
$ SYSTEMD_LESS=FRXMK journalctl<br />
<br />
If you would like to set this behaviour as default, [[Environment variables#Per_user|export]] the variable from {{ic|~/.bashrc}} or {{ic|~/.zshrc}}.<br />
}}<br />
<br />
=== Journal size limit ===<br />
<br />
If the journal is persistent (non-volatile), its size limit is set to a default value of 10% of the size of the respective file system. For example, with {{ic|/var/log/journal}} located on a 50 GiB root partition this would lead to 5 GiB of journal data. The maximum size of the persistent journal can be controlled by {{ic|SystemMaxUse}} in {{ic|/etc/systemd/journald.conf}}, so to limit it for example to 50 MiB uncomment and edit the corresponding line to:<br />
<br />
SystemMaxUse=50M<br />
<br />
Refer to {{ic|man journald.conf}} for more info.<br />
<br />
=== Journald in conjunction with syslog ===<br />
<br />
Compatibility with a classic, non-journald aware [[Syslog-ng|syslog]] implementation can be provided by letting ''systemd'' forward all messages via the socket {{ic|/run/systemd/journal/syslog}}. To make the syslog daemon work with the journal, it has to bind to this socket instead of {{ic|/dev/log}} ([http://lwn.net/Articles/474968/ official announcement]). <br />
<br />
As of ''systemd'' 216 the default {{ic|journald.conf}} for forwarding to the socket was changed to {{ic|1=ForwardToSyslog=no}} to avoid system overhead, because [[rsyslog]] or [[syslog-ng]] (since 3.6) pull the messages from the journal by [http://lists.freedesktop.org/archives/systemd-devel/2014-August/022295.html#journald itself]. <br />
<br />
See [[Syslog-ng#Overview]] and [[Syslog-ng#syslog-ng and systemd journal]], or [[rsyslog]] respectively, for details on configuration.<br />
<br />
=== Forward journald to /dev/tty12 ===<br />
<br />
Edit {{ic|/etc/systemd/journald.conf}} to enable forwarding:<br />
<br />
{{hc|/etc/systemd/journald.conf|<nowiki><br />
ForwardToConsole=yes<br />
TTYPath=/dev/tty12<br />
MaxLevelConsole=info<br />
</nowiki>}}<br />
<br />
Then [[restart]] systemd-journald.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Investigating systemd errors ===<br />
<br />
As an example, we will investigate an error with {{ic|systemd-modules-load}} service:<br />
<br />
'''1.''' Lets find the ''systemd'' services which fail to start:<br />
<br />
{{hc|1=$ systemctl --state=failed|2=<br />
systemd-modules-load.service loaded '''failed failed''' Load Kernel Modules<br />
}}<br />
<br />
'''2.''' Ok, we found a problem with {{ic|systemd-modules-load}} service. We want to know more:<br />
{{hc|$ systemctl status systemd-modules-load|2=<br />
systemd-modules-load.service - Load Kernel Modules<br />
Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static)<br />
Active: '''failed''' (Result: exit-code) since So 2013-08-25 11:48:13 CEST; 32s ago<br />
Docs: man:systemd-modules-load.service(8).<br />
man:modules-load.d(5)<br />
Process: '''15630''' ExecStart=/usr/lib/systemd/systemd-modules-load ('''code=exited, status=1/FAILURE''')<br />
}}<br />
If the {{ic|Process ID}} is not listed, just restart the failed service with {{ic|systemctl restart systemd-modules-load}}<br />
<br />
'''3.''' Now we have the process id (PID) to investigate this error in depth. Enter the following command with the current {{ic|Process ID}} (here: 15630):<br />
{{hc|1=$ journalctl _PID=15630|2=<br />
-- Logs begin at Sa 2013-05-25 10:31:12 CEST, end at So 2013-08-25 11:51:17 CEST. --<br />
Aug 25 11:48:13 mypc systemd-modules-load[15630]: '''Failed to find module 'blacklist usblp''''<br />
Aug 25 11:48:13 mypc systemd-modules-load[15630]: '''Failed to find module 'install usblp /bin/false'''' <br />
}}<br />
<br />
'''4.''' We see that some of the kernel module configs have wrong settings. Therefore we have a look at these settings in {{ic|/etc/modules-load.d/}}:<br />
{{hc|$ ls -Al /etc/modules-load.d/|<br />
...<br />
-rw-r--r-- 1 root root 79 1. Dez 2012 blacklist.conf<br />
-rw-r--r-- 1 root root 1 2. Mär 14:30 encrypt.conf<br />
-rw-r--r-- 1 root root 3 5. Dez 2012 printing.conf<br />
-rw-r--r-- 1 root root 6 14. Jul 11:01 realtek.conf<br />
-rw-r--r-- 1 root root 65 2. Jun 23:01 virtualbox.conf<br />
...<br />
}}<br />
<br />
'''5.''' The {{ic|Failed to find module 'blacklist usblp'}} error message might be related to a wrong setting inside of {{ic|blacklist.conf}}. Lets deactivate it with inserting a trailing '''#''' before each option we found via step 3:<br />
{{hc|/etc/modules-load.d/blacklist.conf|<br />
'''#''' blacklist usblp<br />
'''#''' install usblp /bin/false<br />
}}<br />
<br />
'''6.''' Now, try to start {{ic|systemd-modules-load}}:<br />
$ systemctl start systemd-modules-load<br />
If it was successful, this should not prompt anything. If you see any error, go back to step 3 and use the new PID for solving the errors left.<br />
<br />
If everything is ok, you can verify that the service was started successfully with:<br />
{{hc|$ systemctl status systemd-modules-load|2=<br />
systemd-modules-load.service - Load Kernel Modules<br />
Loaded: '''loaded''' (/usr/lib/systemd/system/systemd-modules-load.service; static)<br />
Active: '''active (exited)''' since So 2013-08-25 12:22:31 CEST; 34s ago<br />
Docs: man:systemd-modules-load.service(8)<br />
man:modules-load.d(5)<br />
Process: 19005 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=0/SUCCESS)<br />
Aug 25 12:22:31 mypc systemd[1]: '''Started Load Kernel Modules'''.<br />
}}<br />
<br />
Often you can solve these kind of problems like shown above. For further investigation look at [[#Diagnosing boot problems]].<br />
<br />
=== Diagnosing boot problems ===<br />
<br />
Boot with these parameters on the kernel command line:<br />
{{ic|<nowiki>systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M</nowiki>}}<br />
<br />
[http://freedesktop.org/wiki/Software/systemd/Debugging More Debugging Information].<br />
<br />
=== Diagnosing problems with a specific service ===<br />
<br />
{{Accuracy|This may not catch all errors such as missing libraries, see [[User talk:Alucryd#Plex]]}}<br />
<br />
If some ''systemd'' service misbehaves and you want to get more information about what is going on, set the {{ic|SYSTEMD_LOG_LEVEL}} [[environment variable]] to {{ic|debug}}. For example, to run the ''systemd-networkd'' daemon in debug mode:<br />
<br />
# systemctl stop systemd-networkd<br />
# SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd<br />
<br />
Or, equivalently, modify the service file temporarily for gathering enough output. For example: <br />
<br />
{{hc|/usr/lib/systemd/system/systemd-networkd.service|2=<br />
[Service]<br />
...<br />
Environment=SYSTEMD_LOG_LEVEL=debug<br />
....<br />
}}<br />
<br />
If debug information is required long-term, add the variable the [[#Editing provided unit files|regular]] way.<br />
<br />
=== Shutdown/reboot takes terribly long ===<br />
<br />
If the shutdown process takes a very long time (or seems to freeze) most likely a service not exiting is to blame. ''systemd'' waits some time for each service to exit before trying to kill it. To find out if you are affected, see [http://freedesktop.org/wiki/Software/systemd/Debugging/#shutdowncompleteseventually this article].<br />
<br />
=== Short lived processes do not seem to log any output ===<br />
<br />
If {{ic|journalctl -u foounit}} does not show any output for a short lived service, look at the PID instead. For example, if {{ic|systemd-modules-load.service}} fails, and {{ic|systemctl status systemd-modules-load}} shows that it ran as PID 123, then you might be able to see output in the journal for that PID, i.e. {{ic|journalctl -b _PID&#61;123}}. Metadata fields for the journal such as _SYSTEMD_UNIT and _COMM are collected asynchronously and rely on the {{ic|/proc}} directory for the process existing. Fixing this requires fixing the kernel to provide this data via a socket connection, similar to SCM_CREDENTIALS.<br />
<br />
=== Disabling application crash dumps journaling ===<br />
<br />
Edit the file {{ic|/etc/systemd/coredump.conf}} by adding this line:<br />
<br />
Storage=none<br />
<br />
and reboot your system.<br />
<br />
=== Error message on reboot or shutdown ===<br />
<br />
==== cgroup : option or name mismatch, new: 0x0 "", old: 0x4 "systemd" ====<br />
<br />
See [https://bbs.archlinux.org/viewtopic.php?pid=1372562#p1372562 this thread] for an explanation.<br />
<br />
==== watchdog watchdog0: watchdog did not stop! ====<br />
<br />
See [https://bbs.archlinux.org/viewtopic.php?pid=1372562#p1372562 this thread] for an explanation.<br />
<br />
=== Boot time increasing over time ===<br />
<br />
After using {{ic|systemd-analyze}} a number of users have noticed that their boot time has increased significantly in comparison with what it used to be. After using {{ic|systemd-analyze blame}} [[NetworkManager]] is being reported as taking an unusually large amount of time to start. <br />
<br />
The problem for some users has been due to {{ic|/var/log/journal}} becoming too large. This may have other impacts on performance, such as for {{ic|systemctl status}} or {{ic|journalctl}}. As such the solution is to remove every file within the folder (ideally making a backup of it somewhere, at least temporarily) and then setting a journal file size limit as described in [[#Journal size limit]].<br />
<br />
=== systemd-tmpfiles-setup.service fails to start at boot ===<br />
<br />
Starting with systemd 219, {{ic|/usr/lib/tmpfiles.d/systemd.conf}} specifies ACL attributes for directories under {{ic|/var/log/journal}} and, therefore, requires ACL support to be enabled for the filesystem the journal resides on.<br />
<br />
See [[Access Control Lists#Enabling_ACL]] for instructions on how to enable ACL on the filesystem that houses {{ic|/var/log/journal}}.<br />
<br />
== See also ==<br />
<br />
*[http://www.freedesktop.org/wiki/Software/systemd Official web site]<br />
*[[Wikipedia:systemd|Wikipedia article]]<br />
*[http://0pointer.de/public/systemd-man/ Manual pages]<br />
*[http://freedesktop.org/wiki/Software/systemd/Optimizations systemd optimizations]<br />
*[http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions FAQ]<br />
*[http://www.freedesktop.org/wiki/Software/systemd/TipsAndTricks Tips and tricks]<br />
*[http://0pointer.de/public/systemd-ebook-psankar.pdf systemd for Administrators (PDF)]<br />
*[http://fedoraproject.org/wiki/Systemd About systemd on Fedora Project]<br />
*[http://fedoraproject.org/wiki/How_to_debug_Systemd_problems How to debug systemd problems]<br />
*[http://www.h-online.com/open/features/Control-Centre-The-systemd-Linux-init-system-1565543.html Two] [http://www.h-online.com/open/features/Booting-up-Tools-and-tips-for-systemd-1570630.html part] introductory article in ''The H Open'' magazine.<br />
*[http://0pointer.de/blog/projects/systemd.html Lennart's blog story]<br />
*[http://0pointer.de/blog/projects/systemd-update.html Status update]<br />
*[http://0pointer.de/blog/projects/systemd-update-2.html Status update2]<br />
*[http://0pointer.de/blog/projects/systemd-update-3.html Status update3]<br />
*[http://0pointer.de/blog/projects/why.html Most recent summary]<br />
*[http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet Fedora's SysVinit to systemd cheatsheet]<br />
*[http://wiki.gentoo.org/wiki/Systemd Gentoo Wiki systemd page]<br />
*[[Emacs#Syntax_Highlighting_for_Systemd_Files|Emacs Syntax highlighting for Systemd files]]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Systemd&diff=370482Systemd2015-04-21T17:35:05Z<p>Foutrelis: typo: tunefs -> tune2fs</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Daemons and system services]]<br />
[[Category:Boot process]]<br />
[[ar:Systemd]]<br />
[[de:Systemd]]<br />
[[el:Systemd]]<br />
[[es:Systemd]]<br />
[[fr:Systemd]]<br />
[[it:Systemd]]<br />
[[ja:Systemd]]<br />
[[pt:Systemd]]<br />
[[ru:Systemd]]<br />
[[zh-CN:Systemd]]<br />
[[zh-TW:Systemd]]<br />
{{Related articles start}}<br />
{{Related|systemd/User}}<br />
{{Related|systemd/Services}}<br />
{{Related|systemd/Timers}}<br />
{{Related|systemd FAQ}}<br />
{{Related|init}}<br />
{{Related|init Rosetta}}<br />
{{Related|Daemons List}}<br />
{{Related|udev}}<br />
{{Related|Improve boot performance}}<br />
{{Related|Allow users to shutdown}}<br />
{{Related articles end}}<br />
<br />
From the [http://freedesktop.org/wiki/Software/systemd project web page]:<br />
<br />
:''systemd'' is a system and service manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and [[D-Bus]] activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux [[cgroups|control groups]], supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic.<br />
<br />
{{Note|1=For a detailed explanation as to why Arch has moved to ''systemd'', see [https://bbs.archlinux.org/viewtopic.php?pid=1149530#p1149530 this forum post].}}<br />
<br />
== Basic systemctl usage ==<br />
<br />
The main command used to introspect and control ''systemd'' is ''systemctl''. Some of its uses are examining the system state and managing the system and services. See {{ic|man 1 systemctl}} for more details.<br />
<br />
{{Tip|<br />
* You can use all of the following ''systemctl'' commands with the {{ic|-H ''user''@''host''}} switch to control a ''systemd'' instance on a remote machine. This will use [[SSH]] to connect to the remote ''systemd'' instance.<br />
* ''systemadm'' is the official graphical frontend for ''systemctl''. It is provided by {{Pkg|systemd-ui}} from the [[official repositories]] or by {{AUR|systemd-ui-git}} from the [[AUR]] for the development version.}}<br />
<br />
=== Analyzing the system state ===<br />
<br />
List running units:<br />
<br />
$ systemctl<br />
<br />
or:<br />
<br />
$ systemctl list-units<br />
<br />
List failed units:<br />
<br />
$ systemctl --failed<br />
<br />
The available unit files can be seen in {{ic|/usr/lib/systemd/system/}} and {{ic|/etc/systemd/system/}} (the latter takes precedence). You can see a list of the installed unit files with:<br />
<br />
$ systemctl list-unit-files<br />
<br />
=== Using units ===<br />
<br />
Units can be, for example, services (''.service''), mount points (''.mount''), devices (''.device'') or sockets (''.socket'').<br />
<br />
When using ''systemctl'', you generally have to specify the complete name of the unit file, including its suffix, for example ''sshd.socket''. There are however a few short forms when specifying the unit in the following ''systemctl'' commands:<br />
<br />
* If you do not specify the suffix, systemctl will assume ''.service''. For example, {{ic|netctl}} and {{ic|netctl.service}} are equivalent.<br />
* Mount points will automatically be translated into the appropriate ''.mount'' unit. For example, specifying {{ic|/home}} is equivalent to {{ic|home.mount}}.<br />
* Similar to mount points, devices are automatically translated into the appropriate ''.device'' unit, therefore specifying {{ic|/dev/sda2}} is equivalent to {{ic|dev-sda2.device}}.<br />
<br />
See {{ic|man systemd.unit}} for details.<br />
<br />
{{Note|Some unit names contain an {{ic|@}} sign (e.g. {{ic|name@''string''.service}}): this means that they are [http://0pointer.de/blog/projects/instances.html instances] of a ''template'' unit, whose actual file name does not contain the {{ic|''string''}} part (e.g. {{ic|name@.service}}). {{ic|''string''}} is called the ''instance identifier'', and is similar to an argument that is passed to the template unit when called with the ''systemctl'' command: in the unit file it will substitute the {{ic|%i}} specifier. <br />
<br />
To be more accurate, ''before'' trying to instantiate the {{ic|name@.suffix}} template unit, ''systemd'' will actually look for a unit with the exact {{ic|name@string.suffix}} file name, although by convention such a "clash" happens rarely, i.e. most unit files containing an {{ic|@}} sign are meant to be templates. Also, if a template unit is called without an instance identifier, it will just fail, since the {{ic|%i}} specifier cannot be substituted.<br />
}}<br />
<br />
{{Tip|<br />
* Most of the following commands also work if multiple units are specified, see {{ic|man systemctl}} for more information. <br />
* A package may offer units for different purposes. If you just installed a package, {{ic|pacman -Qql ''package'' <nowiki>|</nowiki> grep -Fe .service -e .socket}} can be used to check and find them.}}<br />
<br />
'''Start''' a unit immediately:<br />
<br />
# systemctl start ''unit''<br />
<br />
'''Stop''' a unit immediately:<br />
<br />
# systemctl stop ''unit''<br />
<br />
'''Restart''' a unit:<br />
<br />
# systemctl restart ''unit''<br />
<br />
Ask a unit to '''reload''' its configuration:<br />
<br />
# systemctl reload ''unit''<br />
<br />
Show the '''status''' of a unit, including whether it is running or not:<br />
<br />
$ systemctl status ''unit''<br />
<br />
'''Check''' whether a unit is already enabled or not:<br />
<br />
$ systemctl is-enabled ''unit''<br />
<br />
'''Enable''' a unit to be started on '''bootup''':<br />
<br />
# systemctl enable ''unit''<br />
<br />
'''Disable''' a unit to not start during bootup:<br />
<br />
# systemctl disable ''unit''<br />
<br />
'''Mask''' a unit to make it impossible to start it:<br />
<br />
# systemctl mask ''unit''<br />
<br />
'''Unmask''' a unit:<br />
<br />
# systemctl unmask ''unit''<br />
<br />
Show the '''manual page''' associated with a unit (this has to be supported by the unit file):<br />
<br />
$ systemctl help ''unit''<br />
<br />
Reload ''systemd'', scanning for '''new or changed units''':<br />
<br />
# systemctl daemon-reload<br />
<br />
=== Power management ===<br />
<br />
[[polkit]] is necessary for power management as an unprivileged user. If you are in a local ''systemd-logind'' user session and no other session is active, the following commands will work without root privileges. If not (for example, because another user is logged into a tty), ''systemd'' will automatically ask you for the root password.<br />
<br />
Shut down and reboot the system:<br />
<br />
$ systemctl reboot<br />
<br />
Shut down and power-off the system:<br />
<br />
$ systemctl poweroff<br />
<br />
Suspend the system:<br />
<br />
$ systemctl suspend<br />
<br />
Put the system into hibernation:<br />
<br />
$ systemctl hibernate<br />
<br />
Put the system into hybrid-sleep state (or suspend-to-both):<br />
<br />
$ systemctl hybrid-sleep<br />
<br />
== Writing unit files ==<br />
<br />
The syntax of ''systemd'''s [http://www.freedesktop.org/software/systemd/man/systemd.unit.html unit files] is inspired by XDG Desktop Entry Specification ''.desktop'' files, which are in turn inspired by Microsoft Windows ''.ini'' files. Unit files are loaded from two locations. From lowest to highest precedence they are:<br />
<br />
* {{ic|/usr/lib/systemd/system/}}: units provided by installed packages<br />
* {{ic|/etc/systemd/system/}}: units installed by the system administrator<br />
<br />
{{Note|The load paths are completely different when running ''systemd'' in [[systemd/User#How it works|user mode]].}}<br />
<br />
Look at the units installed by your packages for examples, or see [[systemd/Services]].<br />
<br />
{{Tip|Comments prepended with {{ic|#}} may be used in unit-files as well, but only in new lines. Do not use end-line comments after ''systemd'' parameters or the unit will fail to activate.}}<br />
<br />
=== Handling dependencies ===<br />
<br />
With ''systemd'', dependencies can be resolved by designing the unit files correctly. The most typical case is that the unit ''A'' requires the unit ''B'' to be running before ''A'' is started. In that case add {{ic|1=Requires=''B''}} and {{ic|1=After=''B''}} to the {{ic|[Unit]}} section of ''A''. If the dependency is optional, add {{ic|1=Wants=''B''}} and {{ic|1=After=''B''}} instead. Note that {{ic|1=Wants=}} and {{ic|1=Requires=}} do not imply {{ic|1=After=}}, meaning that if {{ic|1=After=}} is not specified, the two units will be started in parallel.<br />
<br />
Dependencies are typically placed on services and not on targets. For example, ''network.target'' is pulled in by whatever service configures your network interfaces, therefore ordering your custom unit after it is sufficient since ''network.target'' is started anyway.<br />
<br />
=== Service types ===<br />
<br />
There are several different start-up types to consider when writing a custom service file. This is set with the {{ic|1=Type=}} parameter in the {{ic|[Service]}} section:<br />
<br />
* {{ic|1=Type=simple}} (default): ''systemd'' considers the service to be started up immediately. The process must not fork. Do not use this type if other services need to be ordered on this service, unless it is socket activated.<br />
* {{ic|1=Type=forking}}: ''systemd'' considers the service started up once the process forks and the parent has exited. For classic daemons use this type unless you know that it is not necessary. You should specify {{ic|1=PIDFile=}} as well so ''systemd'' can keep track of the main process.<br />
* {{ic|1=Type=oneshot}}: this is useful for scripts that do a single job and then exit. You may want to set {{ic|1=RemainAfterExit=yes}} as well so that ''systemd'' still considers the service as active after the process has exited.<br />
* {{ic|1=Type=notify}}: identical to {{ic|1=Type=simple}}, but with the stipulation that the daemon will send a signal to ''systemd'' when it is ready. The reference implementation for this notification is provided by ''libsystemd-daemon.so''.<br />
* {{ic|1=Type=dbus}}: the service is considered ready when the specified {{ic|BusName}} appears on DBus's system bus.<br />
* {{ic|1=Type=idle}}: behavior of idle is very similar to {{ic|1=Type=simple}}; however, actual execution of the service binary is delayed until all jobs are dispatched. This may be used to avoid interleaving of output of shell services with the status output on the console.<br />
<br />
See {{ic|man systemd.service}} for a more detailed explanation.<br />
<br />
=== Editing provided unit files ===<br />
<br />
There are two ways to edit a unit file provided by a package: replace the entire unit file with a new one or create drop-in snippets which are applied on top of the existing unit file. For both methods, you must reload the unit afterwards to apply your changes. This can be done either by editing the unit with {{ic|systemctl edit}} (which reloads the unit automatically) or by reloading all units with:<br />
<br />
# systemctl daemon-reload<br />
<br />
{{Tip|<br />
* You can use ''systemd-delta'' to see which unit files have been overridden or extended and what exactly has been changed.<br />
* Use {{ic|systemctl cat ''unit''}} to view the content of a unit file and all associated drop-in snippets.<br />
* Syntax highlighting for ''systemd'' unit files within [[Vim]] can be enabled by installing {{Pkg|vim-systemd}} from the [[official repositories]].<br />
}}<br />
<br />
==== Replacement unit files ====<br />
<br />
To replace the unit file {{ic|/usr/lib/systemd/system/''unit''}}, create the file {{ic|/etc/systemd/system/''unit''}} and reenable the unit to update the symlinks:<br />
<br />
# systemctl reenable ''unit''<br />
<br />
Alternatively, run<br />
<br />
# systemctl edit --full ''unit''<br />
<br />
This opens {{ic|/etc/systemd/system/''unit''}} in your editor (copying the installed version if it does not exist yet) and automatically reloads it when you finish editing.<br />
<br />
{{Note|Pacman does not update the replacement unit files when the originals are updated, so this method can make system maintenance more difficult. For this reason the next approach is recommended.}}<br />
<br />
==== Drop-in snippets ====<br />
<br />
To create drop-in snippets for the unit file {{ic|/usr/lib/systemd/system/''unit''}}, create the directory {{ic|/etc/systemd/system/''unit''.d/}} and place ''.conf'' files there to override or add new options. ''systemd'' will parse these ''.conf'' files and apply them on top of the original unit.<br />
<br />
The easiest way to do this is to run:<br />
<br />
# systemctl edit ''unit''<br />
<br />
This opens the file {{ic|/etc/systemd/system/''unit''.d/override.conf}} in your text editor (creating it if necessary) and automatically reloads the unit when you are done editing.<br />
<br />
==== Examples ====<br />
<br />
For example, if you simply want to add an additional dependency to a unit, you may create the following file:<br />
<br />
{{hc|/etc/systemd/system/''unit''.d/customdependency.conf|2=<br />
[Unit]<br />
Requires=''new dependency''<br />
After=''new dependency''<br />
}}<br />
<br />
As another example, in order to replace the {{ic|ExecStart}} directive for a unit that is not of type {{ic|oneshot}}, create the following file:<br />
<br />
{{hc|/etc/systemd/system/''unit''.d/customexec.conf|2=<br />
[Service]<br />
ExecStart=<br />
ExecStart=''new command''<br />
}}<br />
<br />
Note how {{ic|ExecStart}} must be cleared before being re-assigned ([https://bugzilla.redhat.com/show_bug.cgi?id=756787#c9]).<br />
<br />
One more example to automatically restart a service:<br />
<br />
{{hc|/etc/systemd/system/''unit''.d/restart.conf|2=<br />
[Service]<br />
Restart=always<br />
RestartSec=30<br />
}}<br />
<br />
== Targets ==<br />
<br />
''systemd'' uses ''targets'' which serve a similar purpose as runlevels but act a little different. Each ''target'' is named instead of numbered and is intended to serve a specific purpose with the possibility of having multiple ones active at the same time. Some ''target''s are implemented by inheriting all of the services of another ''target'' and adding additional services to it. There are ''systemd'' ''target''s that mimic the common SystemVinit runlevels so you can still switch ''target''s using the familiar {{ic|telinit RUNLEVEL}} command.<br />
<br />
=== Get current targets ===<br />
<br />
The following should be used under ''systemd'' instead of running {{ic|runlevel}}:<br />
<br />
$ systemctl list-units --type=target<br />
<br />
=== Create custom target ===<br />
<br />
The runlevels that are assigned a specific purpose on vanilla Fedora installs; 0, 1, 3, 5, and 6; have a 1:1 mapping with a specific ''systemd'' ''target''. Unfortunately, there is no good way to do the same for the user-defined runlevels like 2 and 4. If you make use of those it is suggested that you make a new named ''systemd'' ''target'' as {{ic|/etc/systemd/system/''your target''}} that takes one of the existing runlevels as a base (you can look at {{ic|/usr/lib/systemd/system/graphical.target}} as an example), make a directory {{ic|/etc/systemd/system/''your target''.wants}}, and then symlink the additional services from {{ic|/usr/lib/systemd/system/}} that you wish to enable.<br />
<br />
=== Targets table ===<br />
<br />
{| class="wikitable"<br />
! SysV Runlevel !! systemd Target !! Notes<br />
|-<br />
| 0 || runlevel0.target, poweroff.target || Halt the system.<br />
|-<br />
| 1, s, single || runlevel1.target, rescue.target || Single user mode.<br />
|-<br />
| 2, 4 || runlevel2.target, runlevel4.target, multi-user.target || User-defined/Site-specific runlevels. By default, identical to 3.<br />
|-<br />
| 3 || runlevel3.target, multi-user.target || Multi-user, non-graphical. Users can usually login via multiple consoles or via the network.<br />
|-<br />
| 5 || runlevel5.target, graphical.target || Multi-user, graphical. Usually has all the services of runlevel 3 plus a graphical login.<br />
|-<br />
| 6 || runlevel6.target, reboot.target || Reboot<br />
|-<br />
| emergency || emergency.target || Emergency shell<br />
|-<br />
|}<br />
<br />
=== Change current target ===<br />
<br />
In ''systemd'' targets are exposed via ''target units''. You can change them like this:<br />
<br />
# systemctl isolate graphical.target<br />
<br />
This will only change the current target, and has no effect on the next boot. This is equivalent to commands such as {{ic|telinit 3}} or {{ic|telinit 5}} in Sysvinit.<br />
<br />
=== Change default target to boot into ===<br />
<br />
The standard target is ''default.target'', which is aliased by default to ''graphical.target'' (which roughly corresponds to the old runlevel 5). To change the default target at boot-time, append one of the following [[kernel parameters]] to your bootloader:<br />
<br />
* {{ic|1=systemd.unit=multi-user.target}} (which roughly corresponds to the old runlevel 3),<br />
* {{ic|1=systemd.unit=rescue.target}} (which roughly corresponds to the old runlevel 1).<br />
<br />
Alternatively, you may leave the bootloader alone and change ''default.target''. This can be done using ''systemctl'':<br />
<br />
# systemctl set-default multi-user.target<br />
<br />
To be able to override the previously set ''default.target'', use the force option:<br />
<br />
# systemctl set-default -f multi-user.target<br />
<br />
The effect of this command is output by ''systemctl''; a symlink to the new default target is made at {{ic|/etc/systemd/system/default.target}}.<br />
<br />
== Temporary files ==<br />
<br />
"''systemd-tmpfiles'' creates, deletes and cleans up volatile and temporary files and directories." It reads configuration files in {{ic|/etc/tmpfiles.d/}} and {{ic|/usr/lib/tmpfiles.d/}} to discover which actions to perform. Configuration files in the former directory take precedence over those in the latter directory.<br />
<br />
Configuration files are usually provided together with service files, and they are named in the style of {{ic|/usr/lib/tmpfiles.d/''program''.conf}}. For example, the [[Samba]] daemon expects the directory {{ic|/run/samba}} to exist and to have the correct permissions. Therefore, the {{Pkg|samba}} package ships with this configuration:<br />
<br />
{{hc|/usr/lib/tmpfiles.d/samba.conf|<br />
D /run/samba 0755 root root}}<br />
<br />
Configuration files may also be used to write values into certain files on boot. For example, if you used {{ic|/etc/rc.local}} to disable wakeup from USB devices with {{ic|echo USBE > /proc/acpi/wakeup}}, you may use the following tmpfile instead:<br />
<br />
{{hc|/etc/tmpfiles.d/disable-usb-wake.conf|<br />
w /proc/acpi/wakeup - - - - USBE}}<br />
<br />
See the {{ic|systemd-tmpfiles(8)}} and {{ic|tmpfiles.d(5)}} man pages for details.<br />
<br />
{{Note|This method may not work to set options in {{ic|/sys}} since the ''systemd-tmpfiles-setup'' service may run before the appropriate device modules is loaded. In this case you could check whether the module has a parameter for the option you want to set with {{ic|modinfo ''module''}} and set this option with a [[Kernel modules#Setting module options|config file in /etc/modprobe.d]]. Otherwise you will have to write a [[Udev#About_udev_rules|udev rule]] to set the appropriate attribute as soon as the device appears.}}<br />
<br />
== Timers ==<br />
<br />
A timer is a unit configuration file whose name ends with ''.timer'' and encodes information about a timer controlled and supervised by ''systemd'', for timer-based activation. See [[systemd/Timers]].<br />
<br />
{{Note|Timers can replace ''cron'' functionality to a great extent. See [[systemd/Timers#As a cron replacement]].}}<br />
<br />
== Journal ==<br />
<br />
''systemd'' has its own logging system called the journal; therefore, running a {{ic|syslog}} daemon is no longer required. To read the log, use:<br />
<br />
# journalctl<br />
<br />
In Arch Linux, the directory {{ic|/var/log/journal/}} is a part of the {{Pkg|systemd}} package, and the journal (when {{ic|1=Storage=}} is set to {{ic|auto}} in {{ic|/etc/systemd/journald.conf}}) will write to {{ic|/var/log/journal/}}. If you or some program delete that directory, ''systemd'' will '''not''' recreate it automatically and instead will write its logs to {{ic|/run/systemd/journal}} in a nonpersistent way. However, the folder will be recreated when you set {{ic|1=Storage=persistent}} and run {{ic|systemctl restart systemd-journald}} (or reboot).<br />
<br />
=== Filtering output ===<br />
<br />
''journalctl'' allows you to filter the output by specific fields. Be aware that if there are many messages to display or filtering of large time span has to be done, the output of this command can be delayed for quite some time.<br />
<br />
{{Tip|While the journal is stored in a binary format, the content of stored messages is not modified. This means it is viewable with ''strings'', for example for recovery in an environment which does not have ''systemd'' installed. Example command:<br />
{{ic|$ strings /mnt/arch/var/log/journal/af4967d77fba44c6b093d0e9862f6ddd/system.journal <nowiki>| grep -i</nowiki> ''message''}}<br />
}}<br />
<br />
Examples:<br />
<br />
* Show all messages from this boot: {{bc|# journalctl -b}} However, often one is interested in messages not from the current, but from the previous boot (e.g. if an unrecoverable system crash happened). This is possible through optional offset parameter of the {{ic|-b}} flag: {{ic|journalctl -b -0}} shows messages from the current boot, {{ic|journalctl -b -1}} from the previous boot, {{ic|journalctl -b -2}} from the second previous and so on. See {{ic|man 1 journalctl}} for full description, the semantics is much more powerful.<br />
* Show all messages from date (and optional time): {{bc|1=# journalctl --since="2012-10-30 18:17:16"}}<br />
* Show all messages since 20 minutes ago: {{bc|1=# journalctl --since "20 min ago"}}<br />
* Follow new messages: {{bc|# journalctl -f}}<br />
* Show all messages by a specific executable: {{bc|# journalctl /usr/lib/systemd/systemd}}<br />
* Show all messages by a specific process: {{bc|1=# journalctl _PID=1}}<br />
* Show all messages by a specific unit: {{bc|# journalctl -u netcfg}}<br />
* Show kernel ring buffer: {{bc|1=# journalctl -k}}<br />
* Show auth.log equivalent by filtering on syslog facility: {{bc|1=# journalctl -f -l SYSLOG_FACILITY=10}}<br />
<br />
See {{ic|man 1 journalctl}}, {{ic|man 7 systemd.journal-fields}}, or Lennart's [http://0pointer.de/blog/projects/journalctl.html blog post] for details.<br />
<br />
{{Tip|1=<br />
By default, ''journalctl'' truncates lines longer than screen width, but in some cases, it may be better to enable wrapping instead of truncating. This can be controlled by the {{ic|SYSTEMD_LESS}} [[Environment variables|environment variable]], which contains options passed to [[Core utilities#less|less]] (the default pager) and defaults to {{ic|FRSXMK}} (see {{ic|man 1 less}} and {{ic|man 1 journalctl}} for details).<br />
<br />
By omitting the {{ic|S}} option, the output will be wrapped instead of truncated. For example, start ''journalctl'' as follows:<br />
<br />
$ SYSTEMD_LESS=FRXMK journalctl<br />
<br />
If you would like to set this behaviour as default, [[Environment variables#Per_user|export]] the variable from {{ic|~/.bashrc}} or {{ic|~/.zshrc}}.<br />
}}<br />
<br />
=== Journal size limit ===<br />
<br />
If the journal is persistent (non-volatile), its size limit is set to a default value of 10% of the size of the respective file system. For example, with {{ic|/var/log/journal}} located on a 50 GiB root partition this would lead to 5 GiB of journal data. The maximum size of the persistent journal can be controlled by {{ic|SystemMaxUse}} in {{ic|/etc/systemd/journald.conf}}, so to limit it for example to 50 MiB uncomment and edit the corresponding line to:<br />
<br />
SystemMaxUse=50M<br />
<br />
Refer to {{ic|man journald.conf}} for more info.<br />
<br />
=== Journald in conjunction with syslog ===<br />
<br />
Compatibility with a classic, non-journald aware [[Syslog-ng|syslog]] implementation can be provided by letting ''systemd'' forward all messages via the socket {{ic|/run/systemd/journal/syslog}}. To make the syslog daemon work with the journal, it has to bind to this socket instead of {{ic|/dev/log}} ([http://lwn.net/Articles/474968/ official announcement]). <br />
<br />
As of ''systemd'' 216 the default {{ic|journald.conf}} for forwarding to the socket was changed to {{ic|1=ForwardToSyslog=no}} to avoid system overhead, because [[rsyslog]] or [[syslog-ng]] (since 3.6) pull the messages from the journal by [http://lists.freedesktop.org/archives/systemd-devel/2014-August/022295.html#journald itself]. <br />
<br />
See [[Syslog-ng#Overview]] and [[Syslog-ng#syslog-ng and systemd journal]], or [[rsyslog]] respectively, for details on configuration.<br />
<br />
=== Forward journald to /dev/tty12 ===<br />
<br />
Edit {{ic|/etc/systemd/journald.conf}} to enable forwarding:<br />
<br />
{{hc|/etc/systemd/journald.conf|<nowiki><br />
ForwardToConsole=yes<br />
TTYPath=/dev/tty12<br />
MaxLevelConsole=info<br />
</nowiki>}}<br />
<br />
Then [[restart]] systemd-journald.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Investigating systemd errors ===<br />
<br />
As an example, we will investigate an error with {{ic|systemd-modules-load}} service:<br />
<br />
'''1.''' Lets find the ''systemd'' services which fail to start:<br />
<br />
{{hc|1=$ systemctl --state=failed|2=<br />
systemd-modules-load.service loaded '''failed failed''' Load Kernel Modules<br />
}}<br />
<br />
'''2.''' Ok, we found a problem with {{ic|systemd-modules-load}} service. We want to know more:<br />
{{hc|$ systemctl status systemd-modules-load|2=<br />
systemd-modules-load.service - Load Kernel Modules<br />
Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static)<br />
Active: '''failed''' (Result: exit-code) since So 2013-08-25 11:48:13 CEST; 32s ago<br />
Docs: man:systemd-modules-load.service(8).<br />
man:modules-load.d(5)<br />
Process: '''15630''' ExecStart=/usr/lib/systemd/systemd-modules-load ('''code=exited, status=1/FAILURE''')<br />
}}<br />
If the {{ic|Process ID}} is not listed, just restart the failed service with {{ic|systemctl restart systemd-modules-load}}<br />
<br />
'''3.''' Now we have the process id (PID) to investigate this error in depth. Enter the following command with the current {{ic|Process ID}} (here: 15630):<br />
{{hc|1=$ journalctl _PID=15630|2=<br />
-- Logs begin at Sa 2013-05-25 10:31:12 CEST, end at So 2013-08-25 11:51:17 CEST. --<br />
Aug 25 11:48:13 mypc systemd-modules-load[15630]: '''Failed to find module 'blacklist usblp''''<br />
Aug 25 11:48:13 mypc systemd-modules-load[15630]: '''Failed to find module 'install usblp /bin/false'''' <br />
}}<br />
<br />
'''4.''' We see that some of the kernel module configs have wrong settings. Therefore we have a look at these settings in {{ic|/etc/modules-load.d/}}:<br />
{{hc|$ ls -Al /etc/modules-load.d/|<br />
...<br />
-rw-r--r-- 1 root root 79 1. Dez 2012 blacklist.conf<br />
-rw-r--r-- 1 root root 1 2. Mär 14:30 encrypt.conf<br />
-rw-r--r-- 1 root root 3 5. Dez 2012 printing.conf<br />
-rw-r--r-- 1 root root 6 14. Jul 11:01 realtek.conf<br />
-rw-r--r-- 1 root root 65 2. Jun 23:01 virtualbox.conf<br />
...<br />
}}<br />
<br />
'''5.''' The {{ic|Failed to find module 'blacklist usblp'}} error message might be related to a wrong setting inside of {{ic|blacklist.conf}}. Lets deactivate it with inserting a trailing '''#''' before each option we found via step 3:<br />
{{hc|/etc/modules-load.d/blacklist.conf|<br />
'''#''' blacklist usblp<br />
'''#''' install usblp /bin/false<br />
}}<br />
<br />
'''6.''' Now, try to start {{ic|systemd-modules-load}}:<br />
$ systemctl start systemd-modules-load<br />
If it was successful, this should not prompt anything. If you see any error, go back to step 3 and use the new PID for solving the errors left.<br />
<br />
If everything is ok, you can verify that the service was started successfully with:<br />
{{hc|$ systemctl status systemd-modules-load|2=<br />
systemd-modules-load.service - Load Kernel Modules<br />
Loaded: '''loaded''' (/usr/lib/systemd/system/systemd-modules-load.service; static)<br />
Active: '''active (exited)''' since So 2013-08-25 12:22:31 CEST; 34s ago<br />
Docs: man:systemd-modules-load.service(8)<br />
man:modules-load.d(5)<br />
Process: 19005 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=0/SUCCESS)<br />
Aug 25 12:22:31 mypc systemd[1]: '''Started Load Kernel Modules'''.<br />
}}<br />
<br />
Often you can solve these kind of problems like shown above. For further investigation look at [[#Diagnosing boot problems]].<br />
<br />
=== Diagnosing boot problems ===<br />
<br />
Boot with these parameters on the kernel command line:<br />
{{ic|<nowiki>systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M</nowiki>}}<br />
<br />
[http://freedesktop.org/wiki/Software/systemd/Debugging More Debugging Information].<br />
<br />
=== Diagnosing problems with a specific service ===<br />
<br />
{{Accuracy|This may not catch all errors such as missing libraries, see [[User talk:Alucryd#Plex]]}}<br />
<br />
If some ''systemd'' service misbehaves and you want to get more information about what is going on, set the {{ic|SYSTEMD_LOG_LEVEL}} [[environment variable]] to {{ic|debug}}. For example, to run the ''systemd-networkd'' daemon in debug mode:<br />
<br />
# systemctl stop systemd-networkd<br />
# SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd<br />
<br />
Or, equivalently, modify the service file temporarily for gathering enough output. For example: <br />
<br />
{{hc|/usr/lib/systemd/system/systemd-networkd.service|2=<br />
[Service]<br />
...<br />
Environment=SYSTEMD_LOG_LEVEL=debug<br />
....<br />
}}<br />
<br />
If debug information is required long-term, add the variable the [[#Editing provided unit files|regular]] way.<br />
<br />
=== Shutdown/reboot takes terribly long ===<br />
<br />
If the shutdown process takes a very long time (or seems to freeze) most likely a service not exiting is to blame. ''systemd'' waits some time for each service to exit before trying to kill it. To find out if you are affected, see [http://freedesktop.org/wiki/Software/systemd/Debugging/#shutdowncompleteseventually this article].<br />
<br />
=== Short lived processes do not seem to log any output ===<br />
<br />
If {{ic|journalctl -u foounit}} does not show any output for a short lived service, look at the PID instead. For example, if {{ic|systemd-modules-load.service}} fails, and {{ic|systemctl status systemd-modules-load}} shows that it ran as PID 123, then you might be able to see output in the journal for that PID, i.e. {{ic|journalctl -b _PID&#61;123}}. Metadata fields for the journal such as _SYSTEMD_UNIT and _COMM are collected asynchronously and rely on the {{ic|/proc}} directory for the process existing. Fixing this requires fixing the kernel to provide this data via a socket connection, similar to SCM_CREDENTIALS.<br />
<br />
=== Disabling application crash dumps journaling ===<br />
<br />
Edit the file {{ic|/etc/systemd/coredump.conf}} by adding this line:<br />
<br />
Storage=none<br />
<br />
and reboot your system.<br />
<br />
=== Error message on reboot or shutdown ===<br />
<br />
==== cgroup : option or name mismatch, new: 0x0 "", old: 0x4 "systemd" ====<br />
<br />
See [https://bbs.archlinux.org/viewtopic.php?pid=1372562#p1372562 this thread] for an explanation.<br />
<br />
==== watchdog watchdog0: watchdog did not stop! ====<br />
<br />
See [https://bbs.archlinux.org/viewtopic.php?pid=1372562#p1372562 this thread] for an explanation.<br />
<br />
=== Boot time increasing over time ===<br />
<br />
After using {{ic|systemd-analyze}} a number of users have noticed that their boot time has increased significantly in comparison with what it used to be. After using {{ic|systemd-analyze blame}} [[NetworkManager]] is being reported as taking an unusually large amount of time to start. <br />
<br />
The problem for some users has been due to {{ic|/var/log/journal}} becoming too large. This may have other impacts on performance, such as for {{ic|systemctl status}} or {{ic|journalctl}}. As such the solution is to remove every file within the folder (ideally making a backup of it somewhere, at least temporarily) and then setting a journal file size limit as described in [[#Journal size limit]].<br />
<br />
=== systemd-tmpfiles-setup.service fails to start at boot ===<br />
<br />
Starting with systemd 219, {{ic|/usr/lib/tmpfiles.d/systemd.conf}} specifies ACL attributes for directories under {{ic|/var/log/journal}} and, therefore, requires ACL support to be enabled for the filesystem the journal resides on.<br />
<br />
To fix this, you can either add {{ic|acl}} to the default mount options for your filesystem by running {{ic|tune2fs -o acl}} on the partition that contains the journal, or simply specify the {{ic|acl}} option in {{ic|/etc/fstab}}.<br />
<br />
{{Note|Recently created ext3 and ext4 filesystems should already have {{ic|acl}} in their default mount options (you can check with {{ic|tune2fs -l}}).}}<br />
<br />
== See also ==<br />
<br />
*[http://www.freedesktop.org/wiki/Software/systemd Official web site]<br />
*[[Wikipedia:systemd|Wikipedia article]]<br />
*[http://0pointer.de/public/systemd-man/ Manual pages]<br />
*[http://freedesktop.org/wiki/Software/systemd/Optimizations systemd optimizations]<br />
*[http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions FAQ]<br />
*[http://www.freedesktop.org/wiki/Software/systemd/TipsAndTricks Tips and tricks]<br />
*[http://0pointer.de/public/systemd-ebook-psankar.pdf systemd for Administrators (PDF)]<br />
*[http://fedoraproject.org/wiki/Systemd About systemd on Fedora Project]<br />
*[http://fedoraproject.org/wiki/How_to_debug_Systemd_problems How to debug systemd problems]<br />
*[http://www.h-online.com/open/features/Control-Centre-The-systemd-Linux-init-system-1565543.html Two] [http://www.h-online.com/open/features/Booting-up-Tools-and-tips-for-systemd-1570630.html part] introductory article in ''The H Open'' magazine.<br />
*[http://0pointer.de/blog/projects/systemd.html Lennart's blog story]<br />
*[http://0pointer.de/blog/projects/systemd-update.html Status update]<br />
*[http://0pointer.de/blog/projects/systemd-update-2.html Status update2]<br />
*[http://0pointer.de/blog/projects/systemd-update-3.html Status update3]<br />
*[http://0pointer.de/blog/projects/why.html Most recent summary]<br />
*[http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet Fedora's SysVinit to systemd cheatsheet]<br />
*[http://wiki.gentoo.org/wiki/Systemd Gentoo Wiki systemd page]<br />
*[[Emacs#Syntax_Highlighting_for_Systemd_Files|Emacs Syntax highlighting for Systemd files]]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Systemd&diff=370481Systemd2015-04-21T17:28:09Z<p>Foutrelis: Add: Troubleshooting > systemd-tmpfiles-setup.service fails to start at boot</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Daemons and system services]]<br />
[[Category:Boot process]]<br />
[[ar:Systemd]]<br />
[[de:Systemd]]<br />
[[el:Systemd]]<br />
[[es:Systemd]]<br />
[[fr:Systemd]]<br />
[[it:Systemd]]<br />
[[ja:Systemd]]<br />
[[pt:Systemd]]<br />
[[ru:Systemd]]<br />
[[zh-CN:Systemd]]<br />
[[zh-TW:Systemd]]<br />
{{Related articles start}}<br />
{{Related|systemd/User}}<br />
{{Related|systemd/Services}}<br />
{{Related|systemd/Timers}}<br />
{{Related|systemd FAQ}}<br />
{{Related|init}}<br />
{{Related|init Rosetta}}<br />
{{Related|Daemons List}}<br />
{{Related|udev}}<br />
{{Related|Improve boot performance}}<br />
{{Related|Allow users to shutdown}}<br />
{{Related articles end}}<br />
<br />
From the [http://freedesktop.org/wiki/Software/systemd project web page]:<br />
<br />
:''systemd'' is a system and service manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and [[D-Bus]] activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux [[cgroups|control groups]], supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic.<br />
<br />
{{Note|1=For a detailed explanation as to why Arch has moved to ''systemd'', see [https://bbs.archlinux.org/viewtopic.php?pid=1149530#p1149530 this forum post].}}<br />
<br />
== Basic systemctl usage ==<br />
<br />
The main command used to introspect and control ''systemd'' is ''systemctl''. Some of its uses are examining the system state and managing the system and services. See {{ic|man 1 systemctl}} for more details.<br />
<br />
{{Tip|<br />
* You can use all of the following ''systemctl'' commands with the {{ic|-H ''user''@''host''}} switch to control a ''systemd'' instance on a remote machine. This will use [[SSH]] to connect to the remote ''systemd'' instance.<br />
* ''systemadm'' is the official graphical frontend for ''systemctl''. It is provided by {{Pkg|systemd-ui}} from the [[official repositories]] or by {{AUR|systemd-ui-git}} from the [[AUR]] for the development version.}}<br />
<br />
=== Analyzing the system state ===<br />
<br />
List running units:<br />
<br />
$ systemctl<br />
<br />
or:<br />
<br />
$ systemctl list-units<br />
<br />
List failed units:<br />
<br />
$ systemctl --failed<br />
<br />
The available unit files can be seen in {{ic|/usr/lib/systemd/system/}} and {{ic|/etc/systemd/system/}} (the latter takes precedence). You can see a list of the installed unit files with:<br />
<br />
$ systemctl list-unit-files<br />
<br />
=== Using units ===<br />
<br />
Units can be, for example, services (''.service''), mount points (''.mount''), devices (''.device'') or sockets (''.socket'').<br />
<br />
When using ''systemctl'', you generally have to specify the complete name of the unit file, including its suffix, for example ''sshd.socket''. There are however a few short forms when specifying the unit in the following ''systemctl'' commands:<br />
<br />
* If you do not specify the suffix, systemctl will assume ''.service''. For example, {{ic|netctl}} and {{ic|netctl.service}} are equivalent.<br />
* Mount points will automatically be translated into the appropriate ''.mount'' unit. For example, specifying {{ic|/home}} is equivalent to {{ic|home.mount}}.<br />
* Similar to mount points, devices are automatically translated into the appropriate ''.device'' unit, therefore specifying {{ic|/dev/sda2}} is equivalent to {{ic|dev-sda2.device}}.<br />
<br />
See {{ic|man systemd.unit}} for details.<br />
<br />
{{Note|Some unit names contain an {{ic|@}} sign (e.g. {{ic|name@''string''.service}}): this means that they are [http://0pointer.de/blog/projects/instances.html instances] of a ''template'' unit, whose actual file name does not contain the {{ic|''string''}} part (e.g. {{ic|name@.service}}). {{ic|''string''}} is called the ''instance identifier'', and is similar to an argument that is passed to the template unit when called with the ''systemctl'' command: in the unit file it will substitute the {{ic|%i}} specifier. <br />
<br />
To be more accurate, ''before'' trying to instantiate the {{ic|name@.suffix}} template unit, ''systemd'' will actually look for a unit with the exact {{ic|name@string.suffix}} file name, although by convention such a "clash" happens rarely, i.e. most unit files containing an {{ic|@}} sign are meant to be templates. Also, if a template unit is called without an instance identifier, it will just fail, since the {{ic|%i}} specifier cannot be substituted.<br />
}}<br />
<br />
{{Tip|<br />
* Most of the following commands also work if multiple units are specified, see {{ic|man systemctl}} for more information. <br />
* A package may offer units for different purposes. If you just installed a package, {{ic|pacman -Qql ''package'' <nowiki>|</nowiki> grep -Fe .service -e .socket}} can be used to check and find them.}}<br />
<br />
'''Start''' a unit immediately:<br />
<br />
# systemctl start ''unit''<br />
<br />
'''Stop''' a unit immediately:<br />
<br />
# systemctl stop ''unit''<br />
<br />
'''Restart''' a unit:<br />
<br />
# systemctl restart ''unit''<br />
<br />
Ask a unit to '''reload''' its configuration:<br />
<br />
# systemctl reload ''unit''<br />
<br />
Show the '''status''' of a unit, including whether it is running or not:<br />
<br />
$ systemctl status ''unit''<br />
<br />
'''Check''' whether a unit is already enabled or not:<br />
<br />
$ systemctl is-enabled ''unit''<br />
<br />
'''Enable''' a unit to be started on '''bootup''':<br />
<br />
# systemctl enable ''unit''<br />
<br />
'''Disable''' a unit to not start during bootup:<br />
<br />
# systemctl disable ''unit''<br />
<br />
'''Mask''' a unit to make it impossible to start it:<br />
<br />
# systemctl mask ''unit''<br />
<br />
'''Unmask''' a unit:<br />
<br />
# systemctl unmask ''unit''<br />
<br />
Show the '''manual page''' associated with a unit (this has to be supported by the unit file):<br />
<br />
$ systemctl help ''unit''<br />
<br />
Reload ''systemd'', scanning for '''new or changed units''':<br />
<br />
# systemctl daemon-reload<br />
<br />
=== Power management ===<br />
<br />
[[polkit]] is necessary for power management as an unprivileged user. If you are in a local ''systemd-logind'' user session and no other session is active, the following commands will work without root privileges. If not (for example, because another user is logged into a tty), ''systemd'' will automatically ask you for the root password.<br />
<br />
Shut down and reboot the system:<br />
<br />
$ systemctl reboot<br />
<br />
Shut down and power-off the system:<br />
<br />
$ systemctl poweroff<br />
<br />
Suspend the system:<br />
<br />
$ systemctl suspend<br />
<br />
Put the system into hibernation:<br />
<br />
$ systemctl hibernate<br />
<br />
Put the system into hybrid-sleep state (or suspend-to-both):<br />
<br />
$ systemctl hybrid-sleep<br />
<br />
== Writing unit files ==<br />
<br />
The syntax of ''systemd'''s [http://www.freedesktop.org/software/systemd/man/systemd.unit.html unit files] is inspired by XDG Desktop Entry Specification ''.desktop'' files, which are in turn inspired by Microsoft Windows ''.ini'' files. Unit files are loaded from two locations. From lowest to highest precedence they are:<br />
<br />
* {{ic|/usr/lib/systemd/system/}}: units provided by installed packages<br />
* {{ic|/etc/systemd/system/}}: units installed by the system administrator<br />
<br />
{{Note|The load paths are completely different when running ''systemd'' in [[systemd/User#How it works|user mode]].}}<br />
<br />
Look at the units installed by your packages for examples, or see [[systemd/Services]].<br />
<br />
{{Tip|Comments prepended with {{ic|#}} may be used in unit-files as well, but only in new lines. Do not use end-line comments after ''systemd'' parameters or the unit will fail to activate.}}<br />
<br />
=== Handling dependencies ===<br />
<br />
With ''systemd'', dependencies can be resolved by designing the unit files correctly. The most typical case is that the unit ''A'' requires the unit ''B'' to be running before ''A'' is started. In that case add {{ic|1=Requires=''B''}} and {{ic|1=After=''B''}} to the {{ic|[Unit]}} section of ''A''. If the dependency is optional, add {{ic|1=Wants=''B''}} and {{ic|1=After=''B''}} instead. Note that {{ic|1=Wants=}} and {{ic|1=Requires=}} do not imply {{ic|1=After=}}, meaning that if {{ic|1=After=}} is not specified, the two units will be started in parallel.<br />
<br />
Dependencies are typically placed on services and not on targets. For example, ''network.target'' is pulled in by whatever service configures your network interfaces, therefore ordering your custom unit after it is sufficient since ''network.target'' is started anyway.<br />
<br />
=== Service types ===<br />
<br />
There are several different start-up types to consider when writing a custom service file. This is set with the {{ic|1=Type=}} parameter in the {{ic|[Service]}} section:<br />
<br />
* {{ic|1=Type=simple}} (default): ''systemd'' considers the service to be started up immediately. The process must not fork. Do not use this type if other services need to be ordered on this service, unless it is socket activated.<br />
* {{ic|1=Type=forking}}: ''systemd'' considers the service started up once the process forks and the parent has exited. For classic daemons use this type unless you know that it is not necessary. You should specify {{ic|1=PIDFile=}} as well so ''systemd'' can keep track of the main process.<br />
* {{ic|1=Type=oneshot}}: this is useful for scripts that do a single job and then exit. You may want to set {{ic|1=RemainAfterExit=yes}} as well so that ''systemd'' still considers the service as active after the process has exited.<br />
* {{ic|1=Type=notify}}: identical to {{ic|1=Type=simple}}, but with the stipulation that the daemon will send a signal to ''systemd'' when it is ready. The reference implementation for this notification is provided by ''libsystemd-daemon.so''.<br />
* {{ic|1=Type=dbus}}: the service is considered ready when the specified {{ic|BusName}} appears on DBus's system bus.<br />
* {{ic|1=Type=idle}}: behavior of idle is very similar to {{ic|1=Type=simple}}; however, actual execution of the service binary is delayed until all jobs are dispatched. This may be used to avoid interleaving of output of shell services with the status output on the console.<br />
<br />
See {{ic|man systemd.service}} for a more detailed explanation.<br />
<br />
=== Editing provided unit files ===<br />
<br />
There are two ways to edit a unit file provided by a package: replace the entire unit file with a new one or create drop-in snippets which are applied on top of the existing unit file. For both methods, you must reload the unit afterwards to apply your changes. This can be done either by editing the unit with {{ic|systemctl edit}} (which reloads the unit automatically) or by reloading all units with:<br />
<br />
# systemctl daemon-reload<br />
<br />
{{Tip|<br />
* You can use ''systemd-delta'' to see which unit files have been overridden or extended and what exactly has been changed.<br />
* Use {{ic|systemctl cat ''unit''}} to view the content of a unit file and all associated drop-in snippets.<br />
* Syntax highlighting for ''systemd'' unit files within [[Vim]] can be enabled by installing {{Pkg|vim-systemd}} from the [[official repositories]].<br />
}}<br />
<br />
==== Replacement unit files ====<br />
<br />
To replace the unit file {{ic|/usr/lib/systemd/system/''unit''}}, create the file {{ic|/etc/systemd/system/''unit''}} and reenable the unit to update the symlinks:<br />
<br />
# systemctl reenable ''unit''<br />
<br />
Alternatively, run<br />
<br />
# systemctl edit --full ''unit''<br />
<br />
This opens {{ic|/etc/systemd/system/''unit''}} in your editor (copying the installed version if it does not exist yet) and automatically reloads it when you finish editing.<br />
<br />
{{Note|Pacman does not update the replacement unit files when the originals are updated, so this method can make system maintenance more difficult. For this reason the next approach is recommended.}}<br />
<br />
==== Drop-in snippets ====<br />
<br />
To create drop-in snippets for the unit file {{ic|/usr/lib/systemd/system/''unit''}}, create the directory {{ic|/etc/systemd/system/''unit''.d/}} and place ''.conf'' files there to override or add new options. ''systemd'' will parse these ''.conf'' files and apply them on top of the original unit.<br />
<br />
The easiest way to do this is to run:<br />
<br />
# systemctl edit ''unit''<br />
<br />
This opens the file {{ic|/etc/systemd/system/''unit''.d/override.conf}} in your text editor (creating it if necessary) and automatically reloads the unit when you are done editing.<br />
<br />
==== Examples ====<br />
<br />
For example, if you simply want to add an additional dependency to a unit, you may create the following file:<br />
<br />
{{hc|/etc/systemd/system/''unit''.d/customdependency.conf|2=<br />
[Unit]<br />
Requires=''new dependency''<br />
After=''new dependency''<br />
}}<br />
<br />
As another example, in order to replace the {{ic|ExecStart}} directive for a unit that is not of type {{ic|oneshot}}, create the following file:<br />
<br />
{{hc|/etc/systemd/system/''unit''.d/customexec.conf|2=<br />
[Service]<br />
ExecStart=<br />
ExecStart=''new command''<br />
}}<br />
<br />
Note how {{ic|ExecStart}} must be cleared before being re-assigned ([https://bugzilla.redhat.com/show_bug.cgi?id=756787#c9]).<br />
<br />
One more example to automatically restart a service:<br />
<br />
{{hc|/etc/systemd/system/''unit''.d/restart.conf|2=<br />
[Service]<br />
Restart=always<br />
RestartSec=30<br />
}}<br />
<br />
== Targets ==<br />
<br />
''systemd'' uses ''targets'' which serve a similar purpose as runlevels but act a little different. Each ''target'' is named instead of numbered and is intended to serve a specific purpose with the possibility of having multiple ones active at the same time. Some ''target''s are implemented by inheriting all of the services of another ''target'' and adding additional services to it. There are ''systemd'' ''target''s that mimic the common SystemVinit runlevels so you can still switch ''target''s using the familiar {{ic|telinit RUNLEVEL}} command.<br />
<br />
=== Get current targets ===<br />
<br />
The following should be used under ''systemd'' instead of running {{ic|runlevel}}:<br />
<br />
$ systemctl list-units --type=target<br />
<br />
=== Create custom target ===<br />
<br />
The runlevels that are assigned a specific purpose on vanilla Fedora installs; 0, 1, 3, 5, and 6; have a 1:1 mapping with a specific ''systemd'' ''target''. Unfortunately, there is no good way to do the same for the user-defined runlevels like 2 and 4. If you make use of those it is suggested that you make a new named ''systemd'' ''target'' as {{ic|/etc/systemd/system/''your target''}} that takes one of the existing runlevels as a base (you can look at {{ic|/usr/lib/systemd/system/graphical.target}} as an example), make a directory {{ic|/etc/systemd/system/''your target''.wants}}, and then symlink the additional services from {{ic|/usr/lib/systemd/system/}} that you wish to enable.<br />
<br />
=== Targets table ===<br />
<br />
{| class="wikitable"<br />
! SysV Runlevel !! systemd Target !! Notes<br />
|-<br />
| 0 || runlevel0.target, poweroff.target || Halt the system.<br />
|-<br />
| 1, s, single || runlevel1.target, rescue.target || Single user mode.<br />
|-<br />
| 2, 4 || runlevel2.target, runlevel4.target, multi-user.target || User-defined/Site-specific runlevels. By default, identical to 3.<br />
|-<br />
| 3 || runlevel3.target, multi-user.target || Multi-user, non-graphical. Users can usually login via multiple consoles or via the network.<br />
|-<br />
| 5 || runlevel5.target, graphical.target || Multi-user, graphical. Usually has all the services of runlevel 3 plus a graphical login.<br />
|-<br />
| 6 || runlevel6.target, reboot.target || Reboot<br />
|-<br />
| emergency || emergency.target || Emergency shell<br />
|-<br />
|}<br />
<br />
=== Change current target ===<br />
<br />
In ''systemd'' targets are exposed via ''target units''. You can change them like this:<br />
<br />
# systemctl isolate graphical.target<br />
<br />
This will only change the current target, and has no effect on the next boot. This is equivalent to commands such as {{ic|telinit 3}} or {{ic|telinit 5}} in Sysvinit.<br />
<br />
=== Change default target to boot into ===<br />
<br />
The standard target is ''default.target'', which is aliased by default to ''graphical.target'' (which roughly corresponds to the old runlevel 5). To change the default target at boot-time, append one of the following [[kernel parameters]] to your bootloader:<br />
<br />
* {{ic|1=systemd.unit=multi-user.target}} (which roughly corresponds to the old runlevel 3),<br />
* {{ic|1=systemd.unit=rescue.target}} (which roughly corresponds to the old runlevel 1).<br />
<br />
Alternatively, you may leave the bootloader alone and change ''default.target''. This can be done using ''systemctl'':<br />
<br />
# systemctl set-default multi-user.target<br />
<br />
To be able to override the previously set ''default.target'', use the force option:<br />
<br />
# systemctl set-default -f multi-user.target<br />
<br />
The effect of this command is output by ''systemctl''; a symlink to the new default target is made at {{ic|/etc/systemd/system/default.target}}.<br />
<br />
== Temporary files ==<br />
<br />
"''systemd-tmpfiles'' creates, deletes and cleans up volatile and temporary files and directories." It reads configuration files in {{ic|/etc/tmpfiles.d/}} and {{ic|/usr/lib/tmpfiles.d/}} to discover which actions to perform. Configuration files in the former directory take precedence over those in the latter directory.<br />
<br />
Configuration files are usually provided together with service files, and they are named in the style of {{ic|/usr/lib/tmpfiles.d/''program''.conf}}. For example, the [[Samba]] daemon expects the directory {{ic|/run/samba}} to exist and to have the correct permissions. Therefore, the {{Pkg|samba}} package ships with this configuration:<br />
<br />
{{hc|/usr/lib/tmpfiles.d/samba.conf|<br />
D /run/samba 0755 root root}}<br />
<br />
Configuration files may also be used to write values into certain files on boot. For example, if you used {{ic|/etc/rc.local}} to disable wakeup from USB devices with {{ic|echo USBE > /proc/acpi/wakeup}}, you may use the following tmpfile instead:<br />
<br />
{{hc|/etc/tmpfiles.d/disable-usb-wake.conf|<br />
w /proc/acpi/wakeup - - - - USBE}}<br />
<br />
See the {{ic|systemd-tmpfiles(8)}} and {{ic|tmpfiles.d(5)}} man pages for details.<br />
<br />
{{Note|This method may not work to set options in {{ic|/sys}} since the ''systemd-tmpfiles-setup'' service may run before the appropriate device modules is loaded. In this case you could check whether the module has a parameter for the option you want to set with {{ic|modinfo ''module''}} and set this option with a [[Kernel modules#Setting module options|config file in /etc/modprobe.d]]. Otherwise you will have to write a [[Udev#About_udev_rules|udev rule]] to set the appropriate attribute as soon as the device appears.}}<br />
<br />
== Timers ==<br />
<br />
A timer is a unit configuration file whose name ends with ''.timer'' and encodes information about a timer controlled and supervised by ''systemd'', for timer-based activation. See [[systemd/Timers]].<br />
<br />
{{Note|Timers can replace ''cron'' functionality to a great extent. See [[systemd/Timers#As a cron replacement]].}}<br />
<br />
== Journal ==<br />
<br />
''systemd'' has its own logging system called the journal; therefore, running a {{ic|syslog}} daemon is no longer required. To read the log, use:<br />
<br />
# journalctl<br />
<br />
In Arch Linux, the directory {{ic|/var/log/journal/}} is a part of the {{Pkg|systemd}} package, and the journal (when {{ic|1=Storage=}} is set to {{ic|auto}} in {{ic|/etc/systemd/journald.conf}}) will write to {{ic|/var/log/journal/}}. If you or some program delete that directory, ''systemd'' will '''not''' recreate it automatically and instead will write its logs to {{ic|/run/systemd/journal}} in a nonpersistent way. However, the folder will be recreated when you set {{ic|1=Storage=persistent}} and run {{ic|systemctl restart systemd-journald}} (or reboot).<br />
<br />
=== Filtering output ===<br />
<br />
''journalctl'' allows you to filter the output by specific fields. Be aware that if there are many messages to display or filtering of large time span has to be done, the output of this command can be delayed for quite some time.<br />
<br />
{{Tip|While the journal is stored in a binary format, the content of stored messages is not modified. This means it is viewable with ''strings'', for example for recovery in an environment which does not have ''systemd'' installed. Example command:<br />
{{ic|$ strings /mnt/arch/var/log/journal/af4967d77fba44c6b093d0e9862f6ddd/system.journal <nowiki>| grep -i</nowiki> ''message''}}<br />
}}<br />
<br />
Examples:<br />
<br />
* Show all messages from this boot: {{bc|# journalctl -b}} However, often one is interested in messages not from the current, but from the previous boot (e.g. if an unrecoverable system crash happened). This is possible through optional offset parameter of the {{ic|-b}} flag: {{ic|journalctl -b -0}} shows messages from the current boot, {{ic|journalctl -b -1}} from the previous boot, {{ic|journalctl -b -2}} from the second previous and so on. See {{ic|man 1 journalctl}} for full description, the semantics is much more powerful.<br />
* Show all messages from date (and optional time): {{bc|1=# journalctl --since="2012-10-30 18:17:16"}}<br />
* Show all messages since 20 minutes ago: {{bc|1=# journalctl --since "20 min ago"}}<br />
* Follow new messages: {{bc|# journalctl -f}}<br />
* Show all messages by a specific executable: {{bc|# journalctl /usr/lib/systemd/systemd}}<br />
* Show all messages by a specific process: {{bc|1=# journalctl _PID=1}}<br />
* Show all messages by a specific unit: {{bc|# journalctl -u netcfg}}<br />
* Show kernel ring buffer: {{bc|1=# journalctl -k}}<br />
* Show auth.log equivalent by filtering on syslog facility: {{bc|1=# journalctl -f -l SYSLOG_FACILITY=10}}<br />
<br />
See {{ic|man 1 journalctl}}, {{ic|man 7 systemd.journal-fields}}, or Lennart's [http://0pointer.de/blog/projects/journalctl.html blog post] for details.<br />
<br />
{{Tip|1=<br />
By default, ''journalctl'' truncates lines longer than screen width, but in some cases, it may be better to enable wrapping instead of truncating. This can be controlled by the {{ic|SYSTEMD_LESS}} [[Environment variables|environment variable]], which contains options passed to [[Core utilities#less|less]] (the default pager) and defaults to {{ic|FRSXMK}} (see {{ic|man 1 less}} and {{ic|man 1 journalctl}} for details).<br />
<br />
By omitting the {{ic|S}} option, the output will be wrapped instead of truncated. For example, start ''journalctl'' as follows:<br />
<br />
$ SYSTEMD_LESS=FRXMK journalctl<br />
<br />
If you would like to set this behaviour as default, [[Environment variables#Per_user|export]] the variable from {{ic|~/.bashrc}} or {{ic|~/.zshrc}}.<br />
}}<br />
<br />
=== Journal size limit ===<br />
<br />
If the journal is persistent (non-volatile), its size limit is set to a default value of 10% of the size of the respective file system. For example, with {{ic|/var/log/journal}} located on a 50 GiB root partition this would lead to 5 GiB of journal data. The maximum size of the persistent journal can be controlled by {{ic|SystemMaxUse}} in {{ic|/etc/systemd/journald.conf}}, so to limit it for example to 50 MiB uncomment and edit the corresponding line to:<br />
<br />
SystemMaxUse=50M<br />
<br />
Refer to {{ic|man journald.conf}} for more info.<br />
<br />
=== Journald in conjunction with syslog ===<br />
<br />
Compatibility with a classic, non-journald aware [[Syslog-ng|syslog]] implementation can be provided by letting ''systemd'' forward all messages via the socket {{ic|/run/systemd/journal/syslog}}. To make the syslog daemon work with the journal, it has to bind to this socket instead of {{ic|/dev/log}} ([http://lwn.net/Articles/474968/ official announcement]). <br />
<br />
As of ''systemd'' 216 the default {{ic|journald.conf}} for forwarding to the socket was changed to {{ic|1=ForwardToSyslog=no}} to avoid system overhead, because [[rsyslog]] or [[syslog-ng]] (since 3.6) pull the messages from the journal by [http://lists.freedesktop.org/archives/systemd-devel/2014-August/022295.html#journald itself]. <br />
<br />
See [[Syslog-ng#Overview]] and [[Syslog-ng#syslog-ng and systemd journal]], or [[rsyslog]] respectively, for details on configuration.<br />
<br />
=== Forward journald to /dev/tty12 ===<br />
<br />
Edit {{ic|/etc/systemd/journald.conf}} to enable forwarding:<br />
<br />
{{hc|/etc/systemd/journald.conf|<nowiki><br />
ForwardToConsole=yes<br />
TTYPath=/dev/tty12<br />
MaxLevelConsole=info<br />
</nowiki>}}<br />
<br />
Then [[restart]] systemd-journald.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Investigating systemd errors ===<br />
<br />
As an example, we will investigate an error with {{ic|systemd-modules-load}} service:<br />
<br />
'''1.''' Lets find the ''systemd'' services which fail to start:<br />
<br />
{{hc|1=$ systemctl --state=failed|2=<br />
systemd-modules-load.service loaded '''failed failed''' Load Kernel Modules<br />
}}<br />
<br />
'''2.''' Ok, we found a problem with {{ic|systemd-modules-load}} service. We want to know more:<br />
{{hc|$ systemctl status systemd-modules-load|2=<br />
systemd-modules-load.service - Load Kernel Modules<br />
Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static)<br />
Active: '''failed''' (Result: exit-code) since So 2013-08-25 11:48:13 CEST; 32s ago<br />
Docs: man:systemd-modules-load.service(8).<br />
man:modules-load.d(5)<br />
Process: '''15630''' ExecStart=/usr/lib/systemd/systemd-modules-load ('''code=exited, status=1/FAILURE''')<br />
}}<br />
If the {{ic|Process ID}} is not listed, just restart the failed service with {{ic|systemctl restart systemd-modules-load}}<br />
<br />
'''3.''' Now we have the process id (PID) to investigate this error in depth. Enter the following command with the current {{ic|Process ID}} (here: 15630):<br />
{{hc|1=$ journalctl _PID=15630|2=<br />
-- Logs begin at Sa 2013-05-25 10:31:12 CEST, end at So 2013-08-25 11:51:17 CEST. --<br />
Aug 25 11:48:13 mypc systemd-modules-load[15630]: '''Failed to find module 'blacklist usblp''''<br />
Aug 25 11:48:13 mypc systemd-modules-load[15630]: '''Failed to find module 'install usblp /bin/false'''' <br />
}}<br />
<br />
'''4.''' We see that some of the kernel module configs have wrong settings. Therefore we have a look at these settings in {{ic|/etc/modules-load.d/}}:<br />
{{hc|$ ls -Al /etc/modules-load.d/|<br />
...<br />
-rw-r--r-- 1 root root 79 1. Dez 2012 blacklist.conf<br />
-rw-r--r-- 1 root root 1 2. Mär 14:30 encrypt.conf<br />
-rw-r--r-- 1 root root 3 5. Dez 2012 printing.conf<br />
-rw-r--r-- 1 root root 6 14. Jul 11:01 realtek.conf<br />
-rw-r--r-- 1 root root 65 2. Jun 23:01 virtualbox.conf<br />
...<br />
}}<br />
<br />
'''5.''' The {{ic|Failed to find module 'blacklist usblp'}} error message might be related to a wrong setting inside of {{ic|blacklist.conf}}. Lets deactivate it with inserting a trailing '''#''' before each option we found via step 3:<br />
{{hc|/etc/modules-load.d/blacklist.conf|<br />
'''#''' blacklist usblp<br />
'''#''' install usblp /bin/false<br />
}}<br />
<br />
'''6.''' Now, try to start {{ic|systemd-modules-load}}:<br />
$ systemctl start systemd-modules-load<br />
If it was successful, this should not prompt anything. If you see any error, go back to step 3 and use the new PID for solving the errors left.<br />
<br />
If everything is ok, you can verify that the service was started successfully with:<br />
{{hc|$ systemctl status systemd-modules-load|2=<br />
systemd-modules-load.service - Load Kernel Modules<br />
Loaded: '''loaded''' (/usr/lib/systemd/system/systemd-modules-load.service; static)<br />
Active: '''active (exited)''' since So 2013-08-25 12:22:31 CEST; 34s ago<br />
Docs: man:systemd-modules-load.service(8)<br />
man:modules-load.d(5)<br />
Process: 19005 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=0/SUCCESS)<br />
Aug 25 12:22:31 mypc systemd[1]: '''Started Load Kernel Modules'''.<br />
}}<br />
<br />
Often you can solve these kind of problems like shown above. For further investigation look at [[#Diagnosing boot problems]].<br />
<br />
=== Diagnosing boot problems ===<br />
<br />
Boot with these parameters on the kernel command line:<br />
{{ic|<nowiki>systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M</nowiki>}}<br />
<br />
[http://freedesktop.org/wiki/Software/systemd/Debugging More Debugging Information].<br />
<br />
=== Diagnosing problems with a specific service ===<br />
<br />
{{Accuracy|This may not catch all errors such as missing libraries, see [[User talk:Alucryd#Plex]]}}<br />
<br />
If some ''systemd'' service misbehaves and you want to get more information about what is going on, set the {{ic|SYSTEMD_LOG_LEVEL}} [[environment variable]] to {{ic|debug}}. For example, to run the ''systemd-networkd'' daemon in debug mode:<br />
<br />
# systemctl stop systemd-networkd<br />
# SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd<br />
<br />
Or, equivalently, modify the service file temporarily for gathering enough output. For example: <br />
<br />
{{hc|/usr/lib/systemd/system/systemd-networkd.service|2=<br />
[Service]<br />
...<br />
Environment=SYSTEMD_LOG_LEVEL=debug<br />
....<br />
}}<br />
<br />
If debug information is required long-term, add the variable the [[#Editing provided unit files|regular]] way.<br />
<br />
=== Shutdown/reboot takes terribly long ===<br />
<br />
If the shutdown process takes a very long time (or seems to freeze) most likely a service not exiting is to blame. ''systemd'' waits some time for each service to exit before trying to kill it. To find out if you are affected, see [http://freedesktop.org/wiki/Software/systemd/Debugging/#shutdowncompleteseventually this article].<br />
<br />
=== Short lived processes do not seem to log any output ===<br />
<br />
If {{ic|journalctl -u foounit}} does not show any output for a short lived service, look at the PID instead. For example, if {{ic|systemd-modules-load.service}} fails, and {{ic|systemctl status systemd-modules-load}} shows that it ran as PID 123, then you might be able to see output in the journal for that PID, i.e. {{ic|journalctl -b _PID&#61;123}}. Metadata fields for the journal such as _SYSTEMD_UNIT and _COMM are collected asynchronously and rely on the {{ic|/proc}} directory for the process existing. Fixing this requires fixing the kernel to provide this data via a socket connection, similar to SCM_CREDENTIALS.<br />
<br />
=== Disabling application crash dumps journaling ===<br />
<br />
Edit the file {{ic|/etc/systemd/coredump.conf}} by adding this line:<br />
<br />
Storage=none<br />
<br />
and reboot your system.<br />
<br />
=== Error message on reboot or shutdown ===<br />
<br />
==== cgroup : option or name mismatch, new: 0x0 "", old: 0x4 "systemd" ====<br />
<br />
See [https://bbs.archlinux.org/viewtopic.php?pid=1372562#p1372562 this thread] for an explanation.<br />
<br />
==== watchdog watchdog0: watchdog did not stop! ====<br />
<br />
See [https://bbs.archlinux.org/viewtopic.php?pid=1372562#p1372562 this thread] for an explanation.<br />
<br />
=== Boot time increasing over time ===<br />
<br />
After using {{ic|systemd-analyze}} a number of users have noticed that their boot time has increased significantly in comparison with what it used to be. After using {{ic|systemd-analyze blame}} [[NetworkManager]] is being reported as taking an unusually large amount of time to start. <br />
<br />
The problem for some users has been due to {{ic|/var/log/journal}} becoming too large. This may have other impacts on performance, such as for {{ic|systemctl status}} or {{ic|journalctl}}. As such the solution is to remove every file within the folder (ideally making a backup of it somewhere, at least temporarily) and then setting a journal file size limit as described in [[#Journal size limit]].<br />
<br />
=== systemd-tmpfiles-setup.service fails to start at boot ===<br />
<br />
Starting with systemd 219, {{ic|/usr/lib/tmpfiles.d/systemd.conf}} specifies ACL attributes for directories under {{ic|/var/log/journal}} and, therefore, requires ACL support to be enabled for the filesystem the journal resides on.<br />
<br />
To fix this, you can either add {{ic|acl}} to the default mount options for your filesystem by running {{ic|tune2fs -o acl}} on the partition that contains the journal, or simply specify the {{ic|acl}} option in {{ic|/etc/fstab}}.<br />
<br />
{{Note|Recently created ext3 and ext4 filesystems should already have {{ic|acl}} in their default mount options (you can check with {{ic|tunefs -l}}).}}<br />
<br />
== See also ==<br />
<br />
*[http://www.freedesktop.org/wiki/Software/systemd Official web site]<br />
*[[Wikipedia:systemd|Wikipedia article]]<br />
*[http://0pointer.de/public/systemd-man/ Manual pages]<br />
*[http://freedesktop.org/wiki/Software/systemd/Optimizations systemd optimizations]<br />
*[http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions FAQ]<br />
*[http://www.freedesktop.org/wiki/Software/systemd/TipsAndTricks Tips and tricks]<br />
*[http://0pointer.de/public/systemd-ebook-psankar.pdf systemd for Administrators (PDF)]<br />
*[http://fedoraproject.org/wiki/Systemd About systemd on Fedora Project]<br />
*[http://fedoraproject.org/wiki/How_to_debug_Systemd_problems How to debug systemd problems]<br />
*[http://www.h-online.com/open/features/Control-Centre-The-systemd-Linux-init-system-1565543.html Two] [http://www.h-online.com/open/features/Booting-up-Tools-and-tips-for-systemd-1570630.html part] introductory article in ''The H Open'' magazine.<br />
*[http://0pointer.de/blog/projects/systemd.html Lennart's blog story]<br />
*[http://0pointer.de/blog/projects/systemd-update.html Status update]<br />
*[http://0pointer.de/blog/projects/systemd-update-2.html Status update2]<br />
*[http://0pointer.de/blog/projects/systemd-update-3.html Status update3]<br />
*[http://0pointer.de/blog/projects/why.html Most recent summary]<br />
*[http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet Fedora's SysVinit to systemd cheatsheet]<br />
*[http://wiki.gentoo.org/wiki/Systemd Gentoo Wiki systemd page]<br />
*[[Emacs#Syntax_Highlighting_for_Systemd_Files|Emacs Syntax highlighting for Systemd files]]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Chromium/Tips_and_tricks&diff=370070Chromium/Tips and tricks2015-04-18T16:17:05Z<p>Foutrelis: Making Flags Persistent: Remove assumption about what other distros might do</p>
<hr />
<div>[[Category:Web Browser]]<br />
[[ja:Chromium 設定]]<br />
[[zh-CN:Chromium Tips and Tweaks]]<br />
{{Related articles start}}<br />
{{Related|Chromium}}<br />
{{Related|Firefox tweaks}}<br />
{{Related articles end}}<br />
<br />
== Browsing experience ==<br />
=== chrome://xxx ===<br />
A number of tweaks can be accessed via typing ''chrome://xxx'' in the URL field. A complete list is available by typing '''chrome://chrome-urls''' into the URL field. Some of note are listed below:<br />
<br />
* '''chrome://flags''' - access experimental features such as WebGL and rendering webpages with GPU, etc.<br />
* '''chrome://plugins''' - view, enable and disable the currently used Chromium plugins.<br />
* '''chrome://gpu''' - status of different GPU options.<br />
* '''chrome://sandbox''' - indicate sandbox status.<br />
* '''chrome://version''' - display version and switches used to invoke the active {{ic|/usr/bin/chromium}}.<br />
<br />
An automatically updated, complete listing of Chromium switches is available [http://peter.sh/experiments/chromium-command-line-switches/ here].<br />
<br />
=== Broken icons in Download Tab ===<br />
If Chromium shows icon placeholders (icons representing broken documents) instead of appropriate icons in its download tab, the likely cause is that the {{Pkg|gnome-icon-theme}} package is not installed.<br />
<br />
=== Chromium overrides/overwrites Preferences file ===<br />
<br />
If you enabled syncing with a Google Account, then Chromium will override any direct edits to the Preferences file found under {{ic|$HOME/.config/chromium/Default/Preferences}}. To work around this, start Chromium with the {{ic|--disable-sync-preferences}} switch:<br />
$ chromium --disable-sync-preferences<br />
<br />
If Chromium is started in the background when you login in to your desktop environment, make sure the command your desktop environment uses is<br />
$ chromium --disable-sync-preferences --no-startup-window<br />
<br />
=== Search Engines ===<br />
Make sites like wiki.archlinux.org and wikipedia.org easily searchable by first executing a search on those pages, then going to ''Settings > Search'' and click the ''Manage search engines..'' button. From there, "Edit" the Wikipedia entry and change its keyword to "w" (or some other shortcut you prefer). Now searching Wikipedia for "Arch Linux" from the address bar is done simply by entering "w arch linux".<br />
<br />
{{Note| Google search is used automatically when typing something into the URL bar. A hard-coded keyword trigger is also available using the '''?''' prefix.}}<br />
<br />
=== Tmpfs ===<br />
==== Cache in tmpfs ====<br />
{{Note|Chromium actually keeps its cache directory '''separate''' from its browser profile directory.}}<br />
<br />
To limit Chromium from writing its cache to a physical disk, one can define an alternative location via the {{ic|1=--disk-cache-dir=/foo/bar}} flag:<br />
$ chromium --disk-cache-dir=/tmp/cache<br />
<br />
Cache should be considered temporary and will '''not''' be saved after a reboot or hard lock.<br />
<br />
Alternative way, in {{ic|/etc/fstab}}:<br />
tmpfs /home/<USER>/.cache tmpfs noatime,nodev,nosuid,size=400M 0 0<br />
<br />
{{Note|Adjust the size as needed and be careful. If the size is too large and you are using a sync daemon such as [[psd]] on a conventional HDD, it will likely result in very slow start-up times of your graphical system due to long sync back times of the daemon. }}<br />
<br />
==== Profile in tmpfs ====<br />
Relocate the browser profile to a [[Wikipedia:Tmpfs|tmpfs]] filesystem, including {{ic|/tmp}}, or {{ic|/dev/shm}} for improvements in application response as the entire profile is now stored in RAM.<br />
<br />
Use an active profile management script for maximal reliability and ease of use.<br />
<br />
{{AUR|profile-sync-daemon}} is such a script and is directly available from the [[AUR]]. It symlinks and syncs the browser profile directories to RAM. Refer to the [[Profile-sync-daemon]] wiki article for additional information on it.<br />
<br />
===Launch a new browser instance===<br />
When you launch the browser, it first checks if another instance using the same profile is already running. If there is one, the new window is associated with the old instance. To prevent this, you can specifically ask the browser to run with a different profile.<br />
<br />
$ chromium --user-data-dir=<PATH TO A PROFILE><br />
<br />
{{Note|It won't work if you specify a link or even a symlink to your regular chromium profile (typically {{ic|~/.config/chromium/Default}}). If you want to use the same profile as your current one for this new instance, first copy the folder {{ic|~/.config/chromium/Default}} to a directory of your choice, keeping the same {{ic|Default}} name, and launch the browser using the following command by specifying the parent folder of the {{ic|Default}} folder you have just copied.<br />
For example, if you copied the Default folder to {{ic|~/Downloads}}<br />
<br />
{{bc|1=$ chromium --user-data-dir=~/Downloads}}<br />
}}<br />
<br />
===Directly open *.torrent files and magnet links with a torrent client===<br />
By default, Chromium downloads {{ic|*.torrent}} files directly and you need to click the notification from the bottom left corner of the screen in order for the file to be opened with your default torrent client. This can be avoided with the following method:<br />
<br />
* Download a {{ic|*.torrent}} file.<br />
* Right click the notification displayed at the bottom left corner of the screen.<br />
* Check the "Always Open Files of This Type" checkbox.<br />
<br />
For torrent magnet links to open with Deluge automatically when they are clicked, run the following commands:<br />
<br />
{{Note|If you would like to use Transmission instead of Deluge, you can use {{ic|transmission-gtk.desktop}} here instead.}}<br />
<br />
$ gvfs-mime --set x-scheme-handler/magnet deluge.desktop<br />
$ xdg-mime default deluge.desktop x-scheme-handler/magnet<br />
<br />
=== Touch Scrolling on touchscreen devices ===<br />
Chrome and Chromium do not support touchscreen by default. There are a couple settings you can change in the 'flags' portion of chrome to potentially make it work for your device. This has been tested in chromium from the official repositories and google-chrome from the AUR.<br />
<br />
* Browse to {{ic| chrome://flags}} and set everything to default. (You can skip if you want to)<br />
* Switch ''''Enable Touch events'''' to Enabled. {{ic| chrome://flags/#touch-events}}<br />
* Switch ''''Touch Scrolling Mode'''' to sync-touchmove. {{ic| chrome://flags/#touch-scrolling-mode }}<br />
* Restart chrome and touch scrolling should be working. If it does not, it is worth trying the other modes they have.<br />
<br />
'''Known bugs:'''<br />
* Touch Scrolling sometimes stops working after resuming from suspend. Restarting the browser seems to fix it.<br />
* Touching tabs to switch to them is unstable. There is no known fix for this yet.<br />
* You may need to specify which touch device to use. Find your touchscreen device with {{ic| xinput list}} then launch Chromium with the {{ic|1=--touch-devices=x}} parameter where x is the id of your device.<br />
<br />
=== Disable System Tray Icon ===<br />
<br />
Open the URL {{ic|chrome://flags}} in the browser. Disable these flags:<br />
<br />
* {{ic|enable-sync-synced-notifications}}<br />
* {{ic|enable-google-now}}<br />
* {{ic|device-discovery-notifications}}<br />
* {{ic|enable-experimental-notification-ui}} (Chrome/Chromium 34 only)<br />
<br />
Click the restart button at the bottom of the page.<br />
<br />
==Profile Maintenance ==<br />
Chromium uses [[Sqlite]] databases to manage history and the like. Sqlite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks and history related tasks is to defragment and trim unused space from these databases.<br />
<br />
{{AUR|profile-cleaner}} and {{AUR|browser-vacuum}} in the [[AUR]] do just this.<br />
<br />
== Security ==<br />
=== Disable insecure RC4 cipher ===<br />
<br />
Since a while RC4 is declared as insecure, but the cipher is still in Chrome present. You should disable the cipher in Chrome. This can be done by starting chrome from the command line with following option:<br />
<br />
/usr/bin/chromium --cipher-suite-blacklist=0x0001,0x0002,0x0004,0x0005,0x0017,0x0018,0xc002,0xc007,0xc00c,0xc011,0xc016,0xff80,0xff81,0xff82,0xff83<br />
<br />
You can check for that on https://cc.dcsec.uni-hannover.de/ for the supported list if ciphers. Make sure to test it before and after you make the change. <br />
<br />
To make the change persistent, you can modify the {{ic|/etc/chromium/default}} and add the line above. To check, open the website mentioned before. A alternative is to grep inside of your process list for the keyword cipher. <br />
<br />
'''External Information''':<br />
<br />
There is no cleaner way to disable. Also the [https://code.google.com/p/chromium/codesearch#chromium/usr/include/nss/sslproto.h source-code] only show the right hexadecimal value for the single cipher.<br />
basic information with recommendation to disable RC4 on [https://en.wikipedia.org/wiki/RC4 wikipedia RC4]<br />
<br />
[http://blog.pregos.info/2013/11/13/howto-disable-weak-rc4-cipher-in-firefox-chromium-google-chrome-internet-explorer/comment-page-1/#comment-141763 German Blog] showing to disable RC4 in common browsers.<br />
<br />
=== User Agent===<br />
By default Chromium already sends an excessively detailed User Agent, as is viewable via the EFF's [https://panopticlick.eff.org/ Panopticlick] test. That alone makes each browser readily identifiable with high accuracy — and is further exacerbated by the use of non-stable versions, ones not recently provided by Google's release channels, ones customized e.g. by a distribution.<br />
<br />
However, this User Agent can be arbitrarily modified at the start of Chromium's base instance via its {{Ic|<nowiki>--user-agent="[string]"</nowiki>}} parameter.<br />
<br />
For the same User Agent as the stable Chrome release for Linux i686 (at the time of writing the most popular Linux edition of Chrome) one would use:<br />
--user-agent="Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11"<br />
<br />
An official, automatically updated listing of Chromium releases which also shows the included WebKit version is available as the [https://omahaproxy.appspot.com/ OmahaProxy Viewer].<br />
<br />
=== SSL Certificates ===<br />
Chromium doesn't have a SSL certificate manager. It relies on the NSS Shared DB {{ic|~/.pki.nssdb}}. In order to add SSL certificates to the database, users will have to use the shell. <br />
<br />
==== Adding CAcert Certificates for Self-Signed Certificates ====<br />
Grab the CAcerts and create a nssdb if one does not already exist. To do this, first install the {{Pkg|nss}} package, then complete these steps:<br />
{{bc|<nowiki>[[ ! -e $HOME/.pki/nssdb ]] && mkdir -p $HOME/.pki/nssdb && cd $HOME/.pki/nssdb && certutil -N -d sql:.</nowiki>}}<br />
{{Note|Users will need to create a password for the database should it not exist.}}<br />
<br />
{{bc|<nowiki>curl -k -o "cacert-root.crt" "http://www.cacert.org/certs/root.crt"<br />
curl -k -o "cacert-class3.crt" "http://www.cacert.org/certs/class3.crt"<br />
certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org" -i cacert-root.crt <br />
certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org Class 3" -i cacert-class3.crt<br />
</nowiki>}}<br />
<br />
{{Note|Users will need to create a password for the database should it not exist.}}<br />
<br />
Now users may manually import a self-signed certificate.<br />
<br />
==== Example 1: Using a Shell Script Isolate the Certificate from TomatoUSB ====<br />
Below is a simple script that will extract and add a certificate to the user's nssdb:<br />
<br />
#!/bin/sh<br />
#<br />
# usage: import-cert.sh remote.host.name [port]<br />
#<br />
REMHOST=$1<br />
REMPORT=${2:-443}<br />
exec 6>&1<br />
exec > $REMHOST<br />
echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'<br />
certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "$REMHOST" -i $REMHOST <br />
exec 1>&6 6>&-<br />
<br />
Syntax is advertised in the commented lines.<br />
<br />
Reference:<br />
*http://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu<br />
<br />
==== Example 2: Using Firefox to Isolate the Certificate from TomatoUSB ====<br />
The {{Pkg|firefox}} browser can used to save the certificate to a file for manunal import into the DB.<br />
<br />
Using firefox:<br />
#Browse to the target URL.<br />
#Upon seeing the "This Connection is Untrusted" warning screen, click I understand the Risks>Add Exception...<br />
#Click View>Details>Export and save the certificate to a temporary location ({{ic|/tmp/easy.pem}} in this example).<br />
<br />
Now import the certificate for use in Chromium:<br />
certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "easy" -i /tmp/easy.pem<br />
<br />
{{Note|Adjust the name to match that of the certificate. In the example above, "easy" is the name on the certificate.}}<br />
<br />
Reference:<br />
*http://sahissam.blogspot.com/2012/06/new-ssl-certificates-for-tomatousb-and.html<br />
<br />
== Making Flags Persistent ==<br />
{{Note|Starting with {{ic|chromium 42.0.2311.90-1}} only per-user flags are supported.}}<br />
<br />
You can put your flags in a {{ic|chromium-flags.conf}} file under {{ic|$HOME/.config/}} (or under {{ic|$XDG_CONFIG_HOME}} if you have configured that environment variable).<br />
<br />
No special syntax is used; flags are defined as if they were written in a terminal.<br />
<br />
* The arguments are split on whitespace and shell quoting rules apply but no further parsing is performed.<br />
* In case of improper quoting anywhere in the file, a fatal error is raised.<br />
* Flags can be placed in separate lines for readability but it's not required.<br />
* Lines starting with a hash symbol (#) are skipped.<br />
<br />
Below is an example {{ic|chromium-flags.conf}} file that defines the flags {{ic|--start-maximized --incognito}}:<br />
<br />
# This line will be ignored.<br />
--start-maximized<br />
--incognito<br />
<br />
{{Tip|If you have Pepper Flash installed, the launcher will automatically pass the correct flags to Chromium so you don't need to define any {{ic|--ppapi-flash-*}} flags.}}<br />
<br />
{{Warning|The {{ic|chromium-flags.conf}} file is specific to Arch Linux and is supported via a custom launcher script that was added in {{ic|chromium 42.0.2311.90-1}}.}}<br />
<br />
== See also ==<br />
* [[Profile-sync-daemon]] - Systemd service that saves Chromium profile in tmpfs and syncs to disk<br />
* [[Tmpfs#tmpfs|Tmpfs]] - Tmpfs Filesystem in {{ic|/etc/fstab}}<br />
* [https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt Official tmpfs kernel Documentation]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Chromium/Tips_and_tricks&diff=370069Chromium/Tips and tricks2015-04-18T16:14:31Z<p>Foutrelis: Update "Making Flags Persistent" section for changes in chromium 42.0.2311.90-1</p>
<hr />
<div>[[Category:Web Browser]]<br />
[[ja:Chromium 設定]]<br />
[[zh-CN:Chromium Tips and Tweaks]]<br />
{{Related articles start}}<br />
{{Related|Chromium}}<br />
{{Related|Firefox tweaks}}<br />
{{Related articles end}}<br />
<br />
== Browsing experience ==<br />
=== chrome://xxx ===<br />
A number of tweaks can be accessed via typing ''chrome://xxx'' in the URL field. A complete list is available by typing '''chrome://chrome-urls''' into the URL field. Some of note are listed below:<br />
<br />
* '''chrome://flags''' - access experimental features such as WebGL and rendering webpages with GPU, etc.<br />
* '''chrome://plugins''' - view, enable and disable the currently used Chromium plugins.<br />
* '''chrome://gpu''' - status of different GPU options.<br />
* '''chrome://sandbox''' - indicate sandbox status.<br />
* '''chrome://version''' - display version and switches used to invoke the active {{ic|/usr/bin/chromium}}.<br />
<br />
An automatically updated, complete listing of Chromium switches is available [http://peter.sh/experiments/chromium-command-line-switches/ here].<br />
<br />
=== Broken icons in Download Tab ===<br />
If Chromium shows icon placeholders (icons representing broken documents) instead of appropriate icons in its download tab, the likely cause is that the {{Pkg|gnome-icon-theme}} package is not installed.<br />
<br />
=== Chromium overrides/overwrites Preferences file ===<br />
<br />
If you enabled syncing with a Google Account, then Chromium will override any direct edits to the Preferences file found under {{ic|$HOME/.config/chromium/Default/Preferences}}. To work around this, start Chromium with the {{ic|--disable-sync-preferences}} switch:<br />
$ chromium --disable-sync-preferences<br />
<br />
If Chromium is started in the background when you login in to your desktop environment, make sure the command your desktop environment uses is<br />
$ chromium --disable-sync-preferences --no-startup-window<br />
<br />
=== Search Engines ===<br />
Make sites like wiki.archlinux.org and wikipedia.org easily searchable by first executing a search on those pages, then going to ''Settings > Search'' and click the ''Manage search engines..'' button. From there, "Edit" the Wikipedia entry and change its keyword to "w" (or some other shortcut you prefer). Now searching Wikipedia for "Arch Linux" from the address bar is done simply by entering "w arch linux".<br />
<br />
{{Note| Google search is used automatically when typing something into the URL bar. A hard-coded keyword trigger is also available using the '''?''' prefix.}}<br />
<br />
=== Tmpfs ===<br />
==== Cache in tmpfs ====<br />
{{Note|Chromium actually keeps its cache directory '''separate''' from its browser profile directory.}}<br />
<br />
To limit Chromium from writing its cache to a physical disk, one can define an alternative location via the {{ic|1=--disk-cache-dir=/foo/bar}} flag:<br />
$ chromium --disk-cache-dir=/tmp/cache<br />
<br />
Cache should be considered temporary and will '''not''' be saved after a reboot or hard lock.<br />
<br />
Alternative way, in {{ic|/etc/fstab}}:<br />
tmpfs /home/<USER>/.cache tmpfs noatime,nodev,nosuid,size=400M 0 0<br />
<br />
{{Note|Adjust the size as needed and be careful. If the size is too large and you are using a sync daemon such as [[psd]] on a conventional HDD, it will likely result in very slow start-up times of your graphical system due to long sync back times of the daemon. }}<br />
<br />
==== Profile in tmpfs ====<br />
Relocate the browser profile to a [[Wikipedia:Tmpfs|tmpfs]] filesystem, including {{ic|/tmp}}, or {{ic|/dev/shm}} for improvements in application response as the entire profile is now stored in RAM.<br />
<br />
Use an active profile management script for maximal reliability and ease of use.<br />
<br />
{{AUR|profile-sync-daemon}} is such a script and is directly available from the [[AUR]]. It symlinks and syncs the browser profile directories to RAM. Refer to the [[Profile-sync-daemon]] wiki article for additional information on it.<br />
<br />
===Launch a new browser instance===<br />
When you launch the browser, it first checks if another instance using the same profile is already running. If there is one, the new window is associated with the old instance. To prevent this, you can specifically ask the browser to run with a different profile.<br />
<br />
$ chromium --user-data-dir=<PATH TO A PROFILE><br />
<br />
{{Note|It won't work if you specify a link or even a symlink to your regular chromium profile (typically {{ic|~/.config/chromium/Default}}). If you want to use the same profile as your current one for this new instance, first copy the folder {{ic|~/.config/chromium/Default}} to a directory of your choice, keeping the same {{ic|Default}} name, and launch the browser using the following command by specifying the parent folder of the {{ic|Default}} folder you have just copied.<br />
For example, if you copied the Default folder to {{ic|~/Downloads}}<br />
<br />
{{bc|1=$ chromium --user-data-dir=~/Downloads}}<br />
}}<br />
<br />
===Directly open *.torrent files and magnet links with a torrent client===<br />
By default, Chromium downloads {{ic|*.torrent}} files directly and you need to click the notification from the bottom left corner of the screen in order for the file to be opened with your default torrent client. This can be avoided with the following method:<br />
<br />
* Download a {{ic|*.torrent}} file.<br />
* Right click the notification displayed at the bottom left corner of the screen.<br />
* Check the "Always Open Files of This Type" checkbox.<br />
<br />
For torrent magnet links to open with Deluge automatically when they are clicked, run the following commands:<br />
<br />
{{Note|If you would like to use Transmission instead of Deluge, you can use {{ic|transmission-gtk.desktop}} here instead.}}<br />
<br />
$ gvfs-mime --set x-scheme-handler/magnet deluge.desktop<br />
$ xdg-mime default deluge.desktop x-scheme-handler/magnet<br />
<br />
=== Touch Scrolling on touchscreen devices ===<br />
Chrome and Chromium do not support touchscreen by default. There are a couple settings you can change in the 'flags' portion of chrome to potentially make it work for your device. This has been tested in chromium from the official repositories and google-chrome from the AUR.<br />
<br />
* Browse to {{ic| chrome://flags}} and set everything to default. (You can skip if you want to)<br />
* Switch ''''Enable Touch events'''' to Enabled. {{ic| chrome://flags/#touch-events}}<br />
* Switch ''''Touch Scrolling Mode'''' to sync-touchmove. {{ic| chrome://flags/#touch-scrolling-mode }}<br />
* Restart chrome and touch scrolling should be working. If it does not, it is worth trying the other modes they have.<br />
<br />
'''Known bugs:'''<br />
* Touch Scrolling sometimes stops working after resuming from suspend. Restarting the browser seems to fix it.<br />
* Touching tabs to switch to them is unstable. There is no known fix for this yet.<br />
* You may need to specify which touch device to use. Find your touchscreen device with {{ic| xinput list}} then launch Chromium with the {{ic|1=--touch-devices=x}} parameter where x is the id of your device.<br />
<br />
=== Disable System Tray Icon ===<br />
<br />
Open the URL {{ic|chrome://flags}} in the browser. Disable these flags:<br />
<br />
* {{ic|enable-sync-synced-notifications}}<br />
* {{ic|enable-google-now}}<br />
* {{ic|device-discovery-notifications}}<br />
* {{ic|enable-experimental-notification-ui}} (Chrome/Chromium 34 only)<br />
<br />
Click the restart button at the bottom of the page.<br />
<br />
==Profile Maintenance ==<br />
Chromium uses [[Sqlite]] databases to manage history and the like. Sqlite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks and history related tasks is to defragment and trim unused space from these databases.<br />
<br />
{{AUR|profile-cleaner}} and {{AUR|browser-vacuum}} in the [[AUR]] do just this.<br />
<br />
== Security ==<br />
=== Disable insecure RC4 cipher ===<br />
<br />
Since a while RC4 is declared as insecure, but the cipher is still in Chrome present. You should disable the cipher in Chrome. This can be done by starting chrome from the command line with following option:<br />
<br />
/usr/bin/chromium --cipher-suite-blacklist=0x0001,0x0002,0x0004,0x0005,0x0017,0x0018,0xc002,0xc007,0xc00c,0xc011,0xc016,0xff80,0xff81,0xff82,0xff83<br />
<br />
You can check for that on https://cc.dcsec.uni-hannover.de/ for the supported list if ciphers. Make sure to test it before and after you make the change. <br />
<br />
To make the change persistent, you can modify the {{ic|/etc/chromium/default}} and add the line above. To check, open the website mentioned before. A alternative is to grep inside of your process list for the keyword cipher. <br />
<br />
'''External Information''':<br />
<br />
There is no cleaner way to disable. Also the [https://code.google.com/p/chromium/codesearch#chromium/usr/include/nss/sslproto.h source-code] only show the right hexadecimal value for the single cipher.<br />
basic information with recommendation to disable RC4 on [https://en.wikipedia.org/wiki/RC4 wikipedia RC4]<br />
<br />
[http://blog.pregos.info/2013/11/13/howto-disable-weak-rc4-cipher-in-firefox-chromium-google-chrome-internet-explorer/comment-page-1/#comment-141763 German Blog] showing to disable RC4 in common browsers.<br />
<br />
=== User Agent===<br />
By default Chromium already sends an excessively detailed User Agent, as is viewable via the EFF's [https://panopticlick.eff.org/ Panopticlick] test. That alone makes each browser readily identifiable with high accuracy — and is further exacerbated by the use of non-stable versions, ones not recently provided by Google's release channels, ones customized e.g. by a distribution.<br />
<br />
However, this User Agent can be arbitrarily modified at the start of Chromium's base instance via its {{Ic|<nowiki>--user-agent="[string]"</nowiki>}} parameter.<br />
<br />
For the same User Agent as the stable Chrome release for Linux i686 (at the time of writing the most popular Linux edition of Chrome) one would use:<br />
--user-agent="Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11"<br />
<br />
An official, automatically updated listing of Chromium releases which also shows the included WebKit version is available as the [https://omahaproxy.appspot.com/ OmahaProxy Viewer].<br />
<br />
=== SSL Certificates ===<br />
Chromium doesn't have a SSL certificate manager. It relies on the NSS Shared DB {{ic|~/.pki.nssdb}}. In order to add SSL certificates to the database, users will have to use the shell. <br />
<br />
==== Adding CAcert Certificates for Self-Signed Certificates ====<br />
Grab the CAcerts and create a nssdb if one does not already exist. To do this, first install the {{Pkg|nss}} package, then complete these steps:<br />
{{bc|<nowiki>[[ ! -e $HOME/.pki/nssdb ]] && mkdir -p $HOME/.pki/nssdb && cd $HOME/.pki/nssdb && certutil -N -d sql:.</nowiki>}}<br />
{{Note|Users will need to create a password for the database should it not exist.}}<br />
<br />
{{bc|<nowiki>curl -k -o "cacert-root.crt" "http://www.cacert.org/certs/root.crt"<br />
curl -k -o "cacert-class3.crt" "http://www.cacert.org/certs/class3.crt"<br />
certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org" -i cacert-root.crt <br />
certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org Class 3" -i cacert-class3.crt<br />
</nowiki>}}<br />
<br />
{{Note|Users will need to create a password for the database should it not exist.}}<br />
<br />
Now users may manually import a self-signed certificate.<br />
<br />
==== Example 1: Using a Shell Script Isolate the Certificate from TomatoUSB ====<br />
Below is a simple script that will extract and add a certificate to the user's nssdb:<br />
<br />
#!/bin/sh<br />
#<br />
# usage: import-cert.sh remote.host.name [port]<br />
#<br />
REMHOST=$1<br />
REMPORT=${2:-443}<br />
exec 6>&1<br />
exec > $REMHOST<br />
echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'<br />
certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "$REMHOST" -i $REMHOST <br />
exec 1>&6 6>&-<br />
<br />
Syntax is advertised in the commented lines.<br />
<br />
Reference:<br />
*http://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu<br />
<br />
==== Example 2: Using Firefox to Isolate the Certificate from TomatoUSB ====<br />
The {{Pkg|firefox}} browser can used to save the certificate to a file for manunal import into the DB.<br />
<br />
Using firefox:<br />
#Browse to the target URL.<br />
#Upon seeing the "This Connection is Untrusted" warning screen, click I understand the Risks>Add Exception...<br />
#Click View>Details>Export and save the certificate to a temporary location ({{ic|/tmp/easy.pem}} in this example).<br />
<br />
Now import the certificate for use in Chromium:<br />
certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "easy" -i /tmp/easy.pem<br />
<br />
{{Note|Adjust the name to match that of the certificate. In the example above, "easy" is the name on the certificate.}}<br />
<br />
Reference:<br />
*http://sahissam.blogspot.com/2012/06/new-ssl-certificates-for-tomatousb-and.html<br />
<br />
== Making Flags Persistent ==<br />
{{Note|Starting with {{ic|chromium 42.0.2311.90-1}} only per-user flags are supported.}}<br />
<br />
You can put your flags in a {{ic|chromium-flags.conf}} file under {{ic|$HOME/.config/}} (or under {{ic|$XDG_CONFIG_HOME}} if you have configured that environment variable).<br />
<br />
No special syntax is used; flags are defined as if they were written in a terminal.<br />
<br />
* The arguments are split on whitespace and shell quoting rules apply but no further parsing is performed.<br />
* In case of improper quoting anywhere in the file, a fatal error is raised.<br />
* Flags can be placed in separate lines for readability but it's not required.<br />
* Lines starting with a hash symbol (#) are skipped.<br />
<br />
Below is an example {{ic|chromium-flags.conf}} file that defines the flags {{ic|--start-maximized --incognito}}:<br />
<br />
# This line will be ignored.<br />
--start-maximized<br />
--incognito<br />
<br />
{{Tip|If you have Pepper Flash installed, the launcher will automatically pass the correct flags to Chromium so you don't need to define any {{ic|--ppapi-flash-*}} flags.}}<br />
<br />
{{Warning|The {{ic|chromium-flags.conf}} file is specific to Arch Linux and is supported via a custom launcher script that was added in {{ic|chromium 42.0.2311.90-1}}. Other distributions will most likely still read flags from /etc/chromium/default and similar files.}}<br />
<br />
== See also ==<br />
* [[Profile-sync-daemon]] - Systemd service that saves Chromium profile in tmpfs and syncs to disk<br />
* [[Tmpfs#tmpfs|Tmpfs]] - Tmpfs Filesystem in {{ic|/etc/fstab}}<br />
* [https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt Official tmpfs kernel Documentation]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Microcode&diff=341254Microcode2014-10-23T01:50:56Z<p>Foutrelis: New section: Verifying that microcode gets updated on boot.</p>
<hr />
<div>[[Category:CPU]]<br />
[[ja:Microcode]]<br />
== What is a microcode update ==<br />
<br />
[[Wikipedia:Microcode|Processor microcode]] is akin to processor firmware. The kernel is able to update the processor's firmware without the need to update it via a BIOS update.<br />
<br />
:''The microcode data file contains the latest microcode definitions for all Intel processors. Intel releases microcode updates to correct processor behavior as documented in the respective processor specification updates. While the regular approach to getting this microcode update is via a BIOS upgrade, Intel realizes that this can be an administrative hassle. The Linux operating system and VMware ESX products have a mechanism to update the microcode after booting. For example, this file will be used by the operating system mechanism if the file is placed in the /etc/firmware directory of the Linux system.'' ~[https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23082 Intel]<br />
<br />
{{Note|Arch Linux does not use {{ic|/etc/firmware}} to process the update, instead firmware binaries are made available in {{ic|/usr/lib/firmware/*.}}, except the Intel microcode, which is in {{ic|/boot/intel-ucode.img}} }}<br />
<br />
== Updating microcode ==<br />
<br />
For Intel processors, install {{Pkg|intel-ucode}}.<br />
<br />
For AMD processors the microcode updates are available in {{Pkg|linux-firmware}}, which is installed as part of the base system.<br />
<br />
{{Note|<br />
* Microcode updates via software are not persistent. In other words, one needs to apply them at each boot.<br />
}}<br />
<br />
{{warning|With linux 3.17-2 and linux-lts 3.14.21-2 and newer versions, Intel microcode updates are not triggered automatically any more.}}<br />
<br />
=== Enabling Intel Microcode Updates ===<br />
<br />
For recent kernels, you need intel-ucode 20140913 or newer. The updates must be enabled by adding {{ic|/boot/intel-ucode.img}} as the first initrd to your bootloader, in addition to the normal initrd file.<br />
<br />
==== EFI ====<br />
<br />
If you are booting using the EFI boot stub or with EFI handover, simply append two {{ic|1=initrd=}} options:<br />
<br />
{{bc|1=initrd=/intel-ucode.img initrd=/initramfs-linux.img}}<br />
<br />
With Gummiboot, you can use the {{ic|initrd}} option twice in {{ic|/boot/loader/entries/*.conf}}:<br />
<br />
{{bc|title Arch Linux<br />
linux /vmlinuz-linux<br />
initrd /intel-ucode.img<br />
initrd /initramfs-linux.img<br />
options ...}}<br />
<br />
For [[rEFInd]], edit {{ic|/boot/refind_linux.conf}} as per EFI boot stub above, example:<br />
<br />
{{bc|1="Boot with standard options" "ro root=UUID=(...) quiet initrd=/boot/intel-ucode.img initrd=/boot/initramfs-linux.img"}}<br />
<br />
==== Grub ====<br />
<br />
{{expansion|reason=Instructions for grub are missing.}}<br />
<br />
For the time being, you can manually add {{ic|/intel-ucode.img}} in your grub.cfg as follows:<br />
<br />
{{bc|<br />
[...]<br />
echo 'Loading initial ramdisk ...'<br />
initrd /intel-ucode.img /initramfs-linux.img<br />
[...]}}<br />
<br />
Remember that the path to {{ic|/intel-ucode.img}} is relative to the boot partition, just as that of initramfs. This means that if you have a dedicated {{ic|/boot}} partition you should use {{ic|/intel-ucode.img}}; else use {{ic|/boot/intel-ucode.img}}.<br />
<br />
==== Syslinux ====<br />
<br />
Multiple initrd's can be separated by commas in the config file.<br />
<br />
{{bc|LABEL arch<br />
MENU LABEL Arch Linux<br />
LINUX ../vmlinuz-linux<br />
INITRD ../intel-ucode.img,../initramfs-linux.img<br />
APPEND ...}}<br />
<br />
=== Enabling AMD Microcode Updates ===<br />
<br />
On AMD systems, microcode updates are automatically applied at boot time so no further action is needed.<br />
<br />
== Verifying that microcode gets updated on boot ==<br />
<br />
You can check if microcode is successfully updated on boot using the command {{ic|<nowiki>dmesg | grep microcode</nowiki>}}.<br />
<br />
On Intel systems you should see something similar to the following, indicating that microcode is updated early:<br />
<br />
{{bc|<nowiki><br />
[ 0.000000] CPU0 microcode updated early to revision 0x218, date = 2009-04-10<br />
[ 0.588776] microcode: CPU0 sig=0x106c2, pf=0x4, revision=0x218<br />
[ 0.588799] microcode: CPU1 sig=0x106c2, pf=0x4, revision=0x218<br />
[ 0.588977] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba</nowiki>}}<br />
<br />
On AMD systems microcode is updated a bit later in the boot process, so the output would look something like this:<br />
<br />
{{bc|<nowiki><br />
[ 0.807879] microcode: CPU0: patch_level=0x01000098<br />
[ 0.807888] microcode: CPU1: patch_level=0x01000098<br />
[ 0.807983] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba<br />
[ 16.150642] microcode: CPU0: new patch_level=0x010000c7<br />
[ 16.150682] microcode: CPU1: new patch_level=0x010000c7</nowiki>}}<br />
<br />
== Which CPUs accept microcode updates ==<br />
<br />
=== AMD CPUs ===<br />
<br />
According to [http://www.amd64.org/microcode.html AMD's Operating System Research Center], these AMD processor families support microcode updates:<br />
*10h (Barcelona)<br />
*11h (Turion X2 Ultra/Llano)<br />
*12h (Fusion), 14h (Bobcat)<br />
*15h (Bulldozer)<br />
<br />
=== Intel CPUs ===<br />
<br />
According to [http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=21925&keyword=%22microcode%22&lang=eng Intel's download center], the following CPUs support microcode updates:<br />
<br />
*Intel® Atom™ Processor<br />
*Intel® Atom™ processor for Entry Level Desktop PCs<br />
*Intel® Celeron® Desktop Processor<br />
*Intel® Core™ Duo Processor<br />
*Intel® Core™ i3 Desktop Processor<br />
*Intel® Core™ i3 Mobile Processor<br />
*Intel® Core™ i5 Desktop Processor<br />
*Intel® Core™ i5 Mobile Processor<br />
*Intel® Core™ i7 Desktop Processor<br />
*Intel® Core™ i7 Mobile Processor<br />
*Intel® Core™ i7 Mobile Processor Extreme Edition<br />
*Intel® Core™ i7 Processor Extreme Edition<br />
*Intel® Core™ Solo processor<br />
*Intel® Core™2 Duo Desktop Processor<br />
*Intel® Core™2 Duo Mobile Processor<br />
*Intel® Core™2 Extreme Mobile Processor<br />
*Intel® Core™2 Extreme Processor<br />
*Intel® Core™2 Quad Mobile Processor<br />
*Intel® Core™2 Quad Processor<br />
*Intel® Core™2 Solo Processor<br />
*Intel® Pentium® 4 Processor Extreme Edition<br />
*Intel® Pentium® 4 Processors<br />
*Intel® Pentium® D Processor<br />
*Intel® Pentium® M Processor<br />
*Intel® Pentium® Processor Extreme Edition<br />
*Intel® Pentium® Processor for Desktop<br />
*Intel® Pentium® Processor for Mobile<br />
*Intel® Setup and Configuration Software (Intel® SCS)<br />
*Intel® vPro™ technology<br />
*Intel® Xeon® Processor<br />
*Intel® Xeon® Processor 3000 Sequence<br />
*Intel® Xeon® Processor 5000 Sequence<br />
*Intel® Xeon® Processor 6000 Sequence<br />
*Intel® Xeon® Processor 7000 Sequence<br />
*Intel® Xeon® processor E3-1200 Product Family<br />
*Intel® Xeon® processor E5-1600 Product Family<br />
*Intel® Xeon® processor E5-2400 Product Family<br />
*Intel® Xeon® processor E5-2600 Product Family<br />
*Intel® Xeon® processor E5-4600 Product Family<br />
*Intel® Xeon® processor E7-2800 Product Family<br />
*Intel® Xeon® processor E7-4800 Product Family<br />
*Intel® Xeon® processor E7-8800 Product Family<br />
*Intel® Z2460 Smartphone<br />
*Mobile Intel® Celeron® Processors<br />
*Mobile Intel® Pentium® 4 Processors - M</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Microcode&diff=341253Microcode2014-10-23T01:31:43Z<p>Foutrelis: Updating microcode: Mention that AMD microcode updates get applied automatically at boot time.</p>
<hr />
<div>[[Category:CPU]]<br />
[[ja:Microcode]]<br />
== What is a microcode update ==<br />
<br />
[[Wikipedia:Microcode|Processor microcode]] is akin to processor firmware. The kernel is able to update the processor's firmware without the need to update it via a BIOS update.<br />
<br />
:''The microcode data file contains the latest microcode definitions for all Intel processors. Intel releases microcode updates to correct processor behavior as documented in the respective processor specification updates. While the regular approach to getting this microcode update is via a BIOS upgrade, Intel realizes that this can be an administrative hassle. The Linux operating system and VMware ESX products have a mechanism to update the microcode after booting. For example, this file will be used by the operating system mechanism if the file is placed in the /etc/firmware directory of the Linux system.'' ~[https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23082 Intel]<br />
<br />
{{Note|Arch Linux does not use {{ic|/etc/firmware}} to process the update, instead firmware binaries are made available in {{ic|/usr/lib/firmware/*.}}, except the Intel microcode, which is in {{ic|/boot/intel-ucode.img}} }}<br />
<br />
== Updating microcode ==<br />
<br />
For Intel processors, install {{Pkg|intel-ucode}}.<br />
<br />
For AMD processors the microcode updates are available in {{Pkg|linux-firmware}}, which is installed as part of the base system.<br />
<br />
{{Note|<br />
* Microcode updates via software are not persistent. In other words, one needs to apply them at each boot.<br />
}}<br />
<br />
{{warning|With linux 3.17-2 and linux-lts 3.14.21-2 and newer versions, Intel microcode updates are not triggered automatically any more.}}<br />
<br />
=== Enabling Intel Microcode Updates ===<br />
<br />
For recent kernels, you need intel-ucode 20140913 or newer. The updates must be enabled by adding {{ic|/boot/intel-ucode.img}} as the first initrd to your bootloader, in addition to the normal initrd file.<br />
<br />
==== EFI ====<br />
<br />
If you are booting using the EFI boot stub or with EFI handover, simply append two {{ic|1=initrd=}} options:<br />
<br />
{{bc|1=initrd=/intel-ucode.img initrd=/initramfs-linux.img}}<br />
<br />
With Gummiboot, you can use the {{ic|initrd}} option twice in {{ic|/boot/loader/entries/*.conf}}:<br />
<br />
{{bc|title Arch Linux<br />
linux /vmlinuz-linux<br />
initrd /intel-ucode.img<br />
initrd /initramfs-linux.img<br />
options ...}}<br />
<br />
For [[rEFInd]], edit {{ic|/boot/refind_linux.conf}} as per EFI boot stub above, example:<br />
<br />
{{bc|1="Boot with standard options" "ro root=UUID=(...) quiet initrd=/boot/intel-ucode.img initrd=/boot/initramfs-linux.img"}}<br />
<br />
==== Grub ====<br />
<br />
{{expansion|reason=Instructions for grub are missing.}}<br />
<br />
For the time being, you can manually add {{ic|/intel-ucode.img}} in your grub.cfg as follows:<br />
<br />
{{bc|<br />
[...]<br />
echo 'Loading initial ramdisk ...'<br />
initrd /intel-ucode.img /initramfs-linux.img<br />
[...]}}<br />
<br />
Remember that the path to {{ic|/intel-ucode.img}} is relative to the boot partition, just as that of initramfs. This means that if you have a dedicated {{ic|/boot}} partition you should use {{ic|/intel-ucode.img}}; else use {{ic|/boot/intel-ucode.img}}.<br />
<br />
==== Syslinux ====<br />
<br />
Multiple initrd's can be separated by commas in the config file.<br />
<br />
{{bc|LABEL arch<br />
MENU LABEL Arch Linux<br />
LINUX ../vmlinuz-linux<br />
INITRD ../intel-ucode.img,../initramfs-linux.img<br />
APPEND ...}}<br />
<br />
=== Enabling AMD Microcode Updates ===<br />
<br />
On AMD systems, microcode updates are automatically applied at boot time so no further action is needed.<br />
<br />
== Which CPUs accept microcode updates ==<br />
<br />
=== AMD CPUs ===<br />
<br />
According to [http://www.amd64.org/microcode.html AMD's Operating System Research Center], these AMD processor families support microcode updates:<br />
*10h (Barcelona)<br />
*11h (Turion X2 Ultra/Llano)<br />
*12h (Fusion), 14h (Bobcat)<br />
*15h (Bulldozer)<br />
<br />
=== Intel CPUs ===<br />
<br />
According to [http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=21925&keyword=%22microcode%22&lang=eng Intel's download center], the following CPUs support microcode updates:<br />
<br />
*Intel® Atom™ Processor<br />
*Intel® Atom™ processor for Entry Level Desktop PCs<br />
*Intel® Celeron® Desktop Processor<br />
*Intel® Core™ Duo Processor<br />
*Intel® Core™ i3 Desktop Processor<br />
*Intel® Core™ i3 Mobile Processor<br />
*Intel® Core™ i5 Desktop Processor<br />
*Intel® Core™ i5 Mobile Processor<br />
*Intel® Core™ i7 Desktop Processor<br />
*Intel® Core™ i7 Mobile Processor<br />
*Intel® Core™ i7 Mobile Processor Extreme Edition<br />
*Intel® Core™ i7 Processor Extreme Edition<br />
*Intel® Core™ Solo processor<br />
*Intel® Core™2 Duo Desktop Processor<br />
*Intel® Core™2 Duo Mobile Processor<br />
*Intel® Core™2 Extreme Mobile Processor<br />
*Intel® Core™2 Extreme Processor<br />
*Intel® Core™2 Quad Mobile Processor<br />
*Intel® Core™2 Quad Processor<br />
*Intel® Core™2 Solo Processor<br />
*Intel® Pentium® 4 Processor Extreme Edition<br />
*Intel® Pentium® 4 Processors<br />
*Intel® Pentium® D Processor<br />
*Intel® Pentium® M Processor<br />
*Intel® Pentium® Processor Extreme Edition<br />
*Intel® Pentium® Processor for Desktop<br />
*Intel® Pentium® Processor for Mobile<br />
*Intel® Setup and Configuration Software (Intel® SCS)<br />
*Intel® vPro™ technology<br />
*Intel® Xeon® Processor<br />
*Intel® Xeon® Processor 3000 Sequence<br />
*Intel® Xeon® Processor 5000 Sequence<br />
*Intel® Xeon® Processor 6000 Sequence<br />
*Intel® Xeon® Processor 7000 Sequence<br />
*Intel® Xeon® processor E3-1200 Product Family<br />
*Intel® Xeon® processor E5-1600 Product Family<br />
*Intel® Xeon® processor E5-2400 Product Family<br />
*Intel® Xeon® processor E5-2600 Product Family<br />
*Intel® Xeon® processor E5-4600 Product Family<br />
*Intel® Xeon® processor E7-2800 Product Family<br />
*Intel® Xeon® processor E7-4800 Product Family<br />
*Intel® Xeon® processor E7-8800 Product Family<br />
*Intel® Z2460 Smartphone<br />
*Mobile Intel® Celeron® Processors<br />
*Mobile Intel® Pentium® 4 Processors - M</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Microcode&diff=341252Microcode2014-10-23T01:10:02Z<p>Foutrelis: Remove section "How to tell if a microcode update is needed"; contains incorrect information now that microcode is built-in and not a module</p>
<hr />
<div>[[Category:CPU]]<br />
[[ja:Microcode]]<br />
== What is a microcode update ==<br />
<br />
[[Wikipedia:Microcode|Processor microcode]] is akin to processor firmware. The kernel is able to update the processor's firmware without the need to update it via a BIOS update.<br />
<br />
:''The microcode data file contains the latest microcode definitions for all Intel processors. Intel releases microcode updates to correct processor behavior as documented in the respective processor specification updates. While the regular approach to getting this microcode update is via a BIOS upgrade, Intel realizes that this can be an administrative hassle. The Linux operating system and VMware ESX products have a mechanism to update the microcode after booting. For example, this file will be used by the operating system mechanism if the file is placed in the /etc/firmware directory of the Linux system.'' ~[https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23082 Intel]<br />
<br />
{{Note|Arch Linux does not use {{ic|/etc/firmware}} to process the update, instead firmware binaries are made available in {{ic|/usr/lib/firmware/*.}}, except the Intel microcode, which is in {{ic|/boot/intel-ucode.img}} }}<br />
<br />
== Updating microcode ==<br />
<br />
For Intel processors, install {{Pkg|intel-ucode}}.<br />
<br />
For AMD processors the microcode updates are available in {{Pkg|linux-firmware}}, which is installed as part of the base system.<br />
<br />
{{Note|<br />
* Microcode updates via software are not persistent. In other words, one needs to apply them at each boot.<br />
}}<br />
<br />
{{warning|With linux 3.17-2 and linux-lts 3.14.21-2 and newer versions, Intel microcode updates are not triggered automatically any more.}}<br />
<br />
=== Enabling Intel Microcode Updates ===<br />
<br />
For recent kernels, you need intel-ucode 20140913 or newer. The updates must be enabled by adding {{ic|/boot/intel-ucode.img}} as the first initrd to your bootloader, in addition to the normal initrd file.<br />
<br />
==== EFI ====<br />
<br />
If you are booting using the EFI boot stub or with EFI handover, simply append two {{ic|1=initrd=}} options:<br />
<br />
{{bc|1=initrd=/intel-ucode.img initrd=/initramfs-linux.img}}<br />
<br />
With Gummiboot, you can use the {{ic|initrd}} option twice in {{ic|/boot/loader/entries/*.conf}}:<br />
<br />
{{bc|title Arch Linux<br />
linux /vmlinuz-linux<br />
initrd /intel-ucode.img<br />
initrd /initramfs-linux.img<br />
options ...}}<br />
<br />
For [[rEFInd]], edit {{ic|/boot/refind_linux.conf}} as per EFI boot stub above, example:<br />
<br />
{{bc|1="Boot with standard options" "ro root=UUID=(...) quiet initrd=/boot/intel-ucode.img initrd=/boot/initramfs-linux.img"}}<br />
<br />
==== Grub ====<br />
<br />
{{expansion|reason=Instructions for grub are missing.}}<br />
<br />
For the time being, you can manually add {{ic|/intel-ucode.img}} in your grub.cfg as follows:<br />
<br />
{{bc|<br />
[...]<br />
echo 'Loading initial ramdisk ...'<br />
initrd /intel-ucode.img /initramfs-linux.img<br />
[...]}}<br />
<br />
Remember that the path to {{ic|/intel-ucode.img}} is relative to the boot partition, just as that of initramfs. This means that if you have a dedicated {{ic|/boot}} partition you should use {{ic|/intel-ucode.img}}; else use {{ic|/boot/intel-ucode.img}}.<br />
<br />
==== Syslinux ====<br />
<br />
Multiple initrd's can be separated by commas in the config file.<br />
<br />
{{bc|LABEL arch<br />
MENU LABEL Arch Linux<br />
LINUX ../vmlinuz-linux<br />
INITRD ../intel-ucode.img,../initramfs-linux.img<br />
APPEND ...}}<br />
<br />
== Which CPUs accept microcode updates ==<br />
<br />
=== AMD CPUs ===<br />
<br />
According to [http://www.amd64.org/microcode.html AMD's Operating System Research Center], these AMD processor families support microcode updates:<br />
*10h (Barcelona)<br />
*11h (Turion X2 Ultra/Llano)<br />
*12h (Fusion), 14h (Bobcat)<br />
*15h (Bulldozer)<br />
<br />
=== Intel CPUs ===<br />
<br />
According to [http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=21925&keyword=%22microcode%22&lang=eng Intel's download center], the following CPUs support microcode updates:<br />
<br />
*Intel® Atom™ Processor<br />
*Intel® Atom™ processor for Entry Level Desktop PCs<br />
*Intel® Celeron® Desktop Processor<br />
*Intel® Core™ Duo Processor<br />
*Intel® Core™ i3 Desktop Processor<br />
*Intel® Core™ i3 Mobile Processor<br />
*Intel® Core™ i5 Desktop Processor<br />
*Intel® Core™ i5 Mobile Processor<br />
*Intel® Core™ i7 Desktop Processor<br />
*Intel® Core™ i7 Mobile Processor<br />
*Intel® Core™ i7 Mobile Processor Extreme Edition<br />
*Intel® Core™ i7 Processor Extreme Edition<br />
*Intel® Core™ Solo processor<br />
*Intel® Core™2 Duo Desktop Processor<br />
*Intel® Core™2 Duo Mobile Processor<br />
*Intel® Core™2 Extreme Mobile Processor<br />
*Intel® Core™2 Extreme Processor<br />
*Intel® Core™2 Quad Mobile Processor<br />
*Intel® Core™2 Quad Processor<br />
*Intel® Core™2 Solo Processor<br />
*Intel® Pentium® 4 Processor Extreme Edition<br />
*Intel® Pentium® 4 Processors<br />
*Intel® Pentium® D Processor<br />
*Intel® Pentium® M Processor<br />
*Intel® Pentium® Processor Extreme Edition<br />
*Intel® Pentium® Processor for Desktop<br />
*Intel® Pentium® Processor for Mobile<br />
*Intel® Setup and Configuration Software (Intel® SCS)<br />
*Intel® vPro™ technology<br />
*Intel® Xeon® Processor<br />
*Intel® Xeon® Processor 3000 Sequence<br />
*Intel® Xeon® Processor 5000 Sequence<br />
*Intel® Xeon® Processor 6000 Sequence<br />
*Intel® Xeon® Processor 7000 Sequence<br />
*Intel® Xeon® processor E3-1200 Product Family<br />
*Intel® Xeon® processor E5-1600 Product Family<br />
*Intel® Xeon® processor E5-2400 Product Family<br />
*Intel® Xeon® processor E5-2600 Product Family<br />
*Intel® Xeon® processor E5-4600 Product Family<br />
*Intel® Xeon® processor E7-2800 Product Family<br />
*Intel® Xeon® processor E7-4800 Product Family<br />
*Intel® Xeon® processor E7-8800 Product Family<br />
*Intel® Z2460 Smartphone<br />
*Mobile Intel® Celeron® Processors<br />
*Mobile Intel® Pentium® 4 Processors - M</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Microcode&diff=340681Microcode2014-10-19T11:31:45Z<p>Foutrelis: Updating microcode: Limit instructions to Intel systems</p>
<hr />
<div>[[Category:CPU]]<br />
[[ja:Microcode]]<br />
== What is a microcode update ==<br />
<br />
[[Wikipedia:Microcode|Processor microcode]] is akin to processor firmware. The kernel is able to update the processor's firmware without the need to update it via a BIOS update.<br />
<br />
:''The microcode data file contains the latest microcode definitions for all Intel processors. Intel releases microcode updates to correct processor behavior as documented in the respective processor specification updates. While the regular approach to getting this microcode update is via a BIOS upgrade, Intel realizes that this can be an administrative hassle. The Linux operating system and VMware ESX products have a mechanism to update the microcode after booting. For example, this file will be used by the operating system mechanism if the file is placed in the /etc/firmware directory of the Linux system.'' ~[https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23082 Intel]<br />
<br />
{{Note|Arch Linux does not use {{ic|/etc/firmware}} to process the update, instead firmware binaries are made available in {{ic|/usr/lib/firmware/*.}} }}<br />
<br />
== Updating microcode ==<br />
<br />
For Intel processors, install {{Pkg|intel-ucode}}.<br />
<br />
For AMD processors the microcode updates are available in {{Pkg|linux-firmware}}, which is installed as part of the base system.<br />
<br />
{{Note|<br />
* Microcode updates via software are not persistent. In other words, one needs to apply them at each boot.<br />
}}<br />
<br />
{{warning|With linux 3.17-2 and linux-lts 3.14.21-2 and newer versions, Intel microcode updates are not triggered automatically any more.}}<br />
<br />
=== Enabling Intel Microcode Updates ===<br />
<br />
For recent kernels, you need intel-ucode 20140913 or newer. The updates must be enabled by adding {{ic|/boot/intel-ucode.img}} as the first initrd to your bootloader, in addition to the normal initrd file.<br />
<br />
==== EFI ====<br />
<br />
If you are booting using the EFI boot stub or with EFI handover, simply append two {{ic|1=initrd=}} options:<br />
<br />
{{bc|1=initrd=/intel-ucode.img initrd=/initramfs-linux.img}}<br />
<br />
With Gummiboot, you can use the {{ic|initrd}} option twice in {{ic|/boot/loader/entries/*.conf}}:<br />
<br />
{{bc|title Arch Linux<br />
linux /vmlinuz-linux<br />
initrd /intel-ucode.img<br />
initrd /initramfs-linux.img<br />
options ...}}<br />
<br />
==== Grub ====<br />
<br />
{{expansion|reason=Instructions for grub are missing.}}<br />
<br />
For the time being, you can manually add {{ic|/intel-ucode.img}} in your grub.cfg as follows:<br />
<br />
{{bc|<br />
[...]<br />
echo 'Loading initial ramdisk ...'<br />
initrd /intel-ucode.img /initramfs-linux.img<br />
[...]}}<br />
<br />
==== Syslinux ====<br />
<br />
Multiple initrd's can be separated by commas in the config file.<br />
<br />
{{bc|LABEL arch<br />
MENU LABEL Arch Linux<br />
LINUX ../vmlinuz-linux<br />
INITRD ../intel-ucode.img,../initramfs-linux.img<br />
APPEND ...}}<br />
<br />
== How to tell if a microcode update is needed ==<br />
<br />
The best way to tell is to download and install the appropriate microcode update. First load the microcode module using modprobe.<br />
<br />
# modprobe microcode<br />
<br />
Then inspect dmesg, if it reports that an update was applied, the microcode in the BIOS of your motherboard predates the one in either {{Pkg|intel-ucode}} or {{Pkg|linux-firmware}}. Users should therefore use the microcode update!<br />
<br />
Examples, note that in each case, the BIOS on the motherboard is the latest version from each respective vendor:<br />
<br />
Intel X3360:<br />
<br />
{{bc|1=<br />
microcode: CPU0 sig=0x10677, pf=0x10, revision=0x705<br />
microcode: CPU1 sig=0x10677, pf=0x10, revision=0x705<br />
microcode: CPU2 sig=0x10677, pf=0x10, revision=0x705<br />
microcode: CPU3 sig=0x10677, pf=0x10, revision=0x705<br />
microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba<br />
microcode: CPU0 updated to revision 0x70a, date = 2010-09-29<br />
microcode: CPU1 updated to revision 0x70a, date = 2010-09-29<br />
microcode: CPU2 updated to revision 0x70a, date = 2010-09-29<br />
microcode: CPU3 updated to revision 0x70a, date = 2010-09-29<br />
}}<br />
<br />
Intel E5200:<br />
{{bc|1=<br />
microcode: CPU0 sig=0x1067a, pf=0x1, revision=0xa07<br />
microcode: CPU1 sig=0x1067a, pf=0x1, revision=0xa07<br />
microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba<br />
microcode: CPU0 updated to revision 0xa0b, date = 2010-09-28<br />
microcode: CPU1 updated to revision 0xa0b, date = 2010-09-28<br />
}}<br />
<br />
Intel Atom 330:<br />
{{bc|1=<br />
microcode: CPU0 sig=0x106c2, pf=0x8, revision=0x20d<br />
microcode: CPU1 sig=0x106c2, pf=0x8, revision=0x20d<br />
microcode: CPU2 sig=0x106c2, pf=0x8, revision=0x20d<br />
microcode: CPU3 sig=0x106c2, pf=0x8, revision=0x20d<br />
microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba<br />
microcode: CPU0 updated to revision 0x219, date = 2009-04-10<br />
microcode: CPU1 updated to revision 0x219, date = 2009-04-10<br />
microcode: CPU2 updated to revision 0x219, date = 2009-04-10<br />
microcode: CPU3 updated to revision 0x219, date = 2009-04-10<br />
}}<br />
<br />
It is believed that the date returned corresponds to the date that Intel implemented a microcode update. This date does not correspond to the version of the the microcode database included in the package!<br />
<br />
== Which CPUs accept microcode updates ==<br />
<br />
=== AMD CPUs ===<br />
<br />
According to [http://www.amd64.org/microcode.html AMD's Operating System Research Center], these AMD processor families support microcode updates:<br />
*10h (Barcelona)<br />
*11h (Turion X2 Ultra/Llano)<br />
*12h (Fusion), 14h (Bobcat)<br />
*15h (Bulldozer)<br />
<br />
=== Intel CPUs ===<br />
<br />
According to [http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=21925&keyword=%22microcode%22&lang=eng Intel's download center], the following CPUs support microcode updates:<br />
<br />
*Intel® Atom™ Processor<br />
*Intel® Atom™ processor for Entry Level Desktop PCs<br />
*Intel® Celeron® Desktop Processor<br />
*Intel® Core™ Duo Processor<br />
*Intel® Core™ i3 Desktop Processor<br />
*Intel® Core™ i3 Mobile Processor<br />
*Intel® Core™ i5 Desktop Processor<br />
*Intel® Core™ i5 Mobile Processor<br />
*Intel® Core™ i7 Desktop Processor<br />
*Intel® Core™ i7 Mobile Processor<br />
*Intel® Core™ i7 Mobile Processor Extreme Edition<br />
*Intel® Core™ i7 Processor Extreme Edition<br />
*Intel® Core™ Solo processor<br />
*Intel® Core™2 Duo Desktop Processor<br />
*Intel® Core™2 Duo Mobile Processor<br />
*Intel® Core™2 Extreme Mobile Processor<br />
*Intel® Core™2 Extreme Processor<br />
*Intel® Core™2 Quad Mobile Processor<br />
*Intel® Core™2 Quad Processor<br />
*Intel® Core™2 Solo Processor<br />
*Intel® Pentium® 4 Processor Extreme Edition<br />
*Intel® Pentium® 4 Processors<br />
*Intel® Pentium® D Processor<br />
*Intel® Pentium® M Processor<br />
*Intel® Pentium® Processor Extreme Edition<br />
*Intel® Pentium® Processor for Desktop<br />
*Intel® Pentium® Processor for Mobile<br />
*Intel® Setup and Configuration Software (Intel® SCS)<br />
*Intel® vPro™ technology<br />
*Intel® Xeon® Processor<br />
*Intel® Xeon® Processor 3000 Sequence<br />
*Intel® Xeon® Processor 5000 Sequence<br />
*Intel® Xeon® Processor 6000 Sequence<br />
*Intel® Xeon® Processor 7000 Sequence<br />
*Intel® Xeon® processor E3-1200 Product Family<br />
*Intel® Xeon® processor E5-1600 Product Family<br />
*Intel® Xeon® processor E5-2400 Product Family<br />
*Intel® Xeon® processor E5-2600 Product Family<br />
*Intel® Xeon® processor E5-4600 Product Family<br />
*Intel® Xeon® processor E7-2800 Product Family<br />
*Intel® Xeon® processor E7-4800 Product Family<br />
*Intel® Xeon® processor E7-8800 Product Family<br />
*Intel® Z2460 Smartphone<br />
*Mobile Intel® Celeron® Processors<br />
*Mobile Intel® Pentium® 4 Processors - M</div>Foutrelishttps://wiki.archlinux.org/index.php?title=DeveloperWiki:Building_in_a_clean_chroot&diff=245841DeveloperWiki:Building in a clean chroot2013-02-01T11:07:17Z<p>Foutrelis: Remove [core] from the table.</p>
<hr />
<div>[[Category: DeveloperWiki]]<br />
<br />
= Introduction =<br />
<br />
This article is part of the [[DeveloperWiki]].<br />
<br />
= Why =<br />
<br />
Building in a clean chroot prevents missing dependencies in packages, whether due to unwanted linking or packages missing in the depends array in the PKGBUILD. It also allows users to build a package for the stable repositories (core, extra, community) while having packages from [testing] installed.<br />
<br />
= Convenience Way =<br />
To quickly build a package in a chroot without any further tinkering, one can use the helper scripts from the devtools package.<br />
<br />
These helper scripts should be called in the same directory where the PKGBUILD is, just like with makepkg. For instance, {{ic|extra-i686-build}} automatically sets up chroot in {{ic|/var/lib/archbuild}}, updates it, and builds a package for the extra repository. For multilib builds there is just {{ic|multilib-build}} without an architecture.<br />
<br />
{{Tip|Consult the table below for information on which script to use when building for a specific repository and architecture.}}<br />
<br />
{{Note|[core] is omitted because those packages are required to go through [testing] first before landing in [core].}}<br />
<br />
{| class="wikitable"<br />
! Target repository || Architecture || Build script to use<br />
|-<br />
| extra / community || i686 || extra-i686-build<br />
|-<br />
| extra / community || x86_64 || extra-x86_64-build<br />
|-<br />
| testing / community-testing || i686 || testing-i686-build<br />
|-<br />
| testing / community-testing || x86_64 || testing-x86_64-build<br />
|-<br />
| staging / community-staging || i686 || staging-i686-build<br />
|-<br />
| staging / community-staging || x86_64 || staging-x86_64-build<br />
|-<br />
| multilib || x86_64 || multilib-build<br />
|-<br />
| multilib-testing || x86_64 || multilib-testing-build<br />
|-<br />
| multilib-staging || x86_64 || multilib-staging-build<br />
|}<br />
<br />
= Classic Way =<br />
== Setting Up A Chroot ==<br />
<br />
The devtools package provides tools for creating and building within clean chroots. Install it if not done already:<br />
<br />
pacman -S devtools<br />
<br />
To make a clean chroot, create a directory in which the chroot will reside. For example, {{ic|$HOME/chroot}}.<br />
<br />
Now create the chroot:<br />
<br />
CHROOT=$HOME/chroot<br />
mkdir $CHROOT<br />
sudo mkarchroot $CHROOT/root base base-devel sudo<br />
<br />
{{Note|One can also define the CHROOT variable in $HOME/.bashrc using the export command if the location is to be repeatedly used. }}<br />
<br />
Edit {{ic|$CHROOT/root/etc/makepkg.conf}} to set the packager name and any makeflags. Also adjust the mirror list in {{ic|$CHROOT/root/etc/pacman.d/mirrorlist}} and enable '''[testing]''' in {{ic|$CHROOT/root/etc/pacman.conf}} if desired.<br />
<br />
Alternatively, provide a custom{{ic|pacman.conf}} and {{ic|makepkg.conf}} with the following:<br />
<br />
sudo mkarchroot -C <pacman.conf> -M <makepkg.conf> $CHROOT/root base base-devel sudo<br />
<br />
It is recommended however users do not use custom {{ic|pacman.conf}} and {{ic|makepkg.conf}} during the initial creation of clean chroot to ensure no user-specific adjustments are made. ''Use with caution.''<br />
<br />
== Building in the Chroot ==<br />
<br />
Firstly, make sure the chroot is up to date with:<br />
<br />
sudo mkarchroot -u $CHROOT/root<br />
<br />
Then, to build a package in the chroot, run the following from the dir containing the PKGBUILD:<br />
<br />
sudo makechrootpkg -c -r $CHROOT<br />
<br />
A unionfs is used to maintain the clean chroot during building. All installed dependencies or makedepends and other changes made during building are done in $CHROOT/rw. Passing the -c flag to makechrootpkg ensures that this directory is cleaned before building starts.<br />
<br />
= Handling Major Rebuilds =<br />
<br />
The cleanest way to handle a major rebuild is to create a new chroot and build the first package (typically the package for which the rebuild is meant). Then create a local repo inside the new chroot. To do this:<br />
<br />
sudo mkdir $CHROOT/root/repo<br />
sudo chmod 0777 $CHROOT/root/repo<br />
<br />
The chmod statement allows for the coping of package files and for the creation of the local repo as your user rather than root.<br />
<br />
cp <package> $CHROOT/root/repo<br />
cd $CHROOT/root/repo<br />
repo-add local.db.tar.gz <package><br />
<br />
Then add the local repo to {{ic|$CHROOT/root/etc/pacman.conf}}<br />
<br />
[local]<br />
Server = file:///repo<br />
<br />
As long as you add only self built packages to this repo, you can add<br />
<br />
SigLevel = TrustAll<br />
<br />
and update the repo:<br />
<br />
sudo mkarchroot -u $CHROOT/root<br />
<br />
With every additional package rebuilt, copy the package to the local repo directory, add it to the repo database and update the chroot.<br />
<br />
= Alternate Rebuild Handling =<br />
<br />
The above directions will work fine, but they can dirty the "pristine" chroot that makechrootpkg tries to keep in check (that is the point of using unionfs - dirtying a separate 'rw' directory).<br />
<br />
== Using a custom repo ==<br />
Follow the steps above to setup a local repo inside the chroot.<br />
<br />
Build packages using:<br />
sudo makechrootpkg -r $CHROOT -u<br />
The -u will update the chroot before building (-Syu) but updates will be installed to the rw layer, maintaining a clean chroot.<br />
<br />
== Manual package installation ==<br />
Packages can be installed manually to the rw layer of the chroot by using:<br />
sudo makechrootpkg -r $CHROOT -I package-1.0-1-i686.pkg.tar.gz<br />
<br />
== Installation after building ==<br />
Tell makechrootpkg to simply install a package to the rw layer of the chroot after building by passing the -i arg. Unrecognized args get passed to makepkg, so this calls `makepkg` with the -i arg.<br />
sudo makechrootpkg -r $CHROOT -- -i</div>Foutrelishttps://wiki.archlinux.org/index.php?title=DeveloperWiki:Building_in_a_clean_chroot&diff=245839DeveloperWiki:Building in a clean chroot2013-02-01T11:01:34Z<p>Foutrelis: Clarify which archbuild script should be used for each repo.</p>
<hr />
<div>[[Category: DeveloperWiki]]<br />
<br />
= Introduction =<br />
<br />
This article is part of the [[DeveloperWiki]].<br />
<br />
= Why =<br />
<br />
Building in a clean chroot prevents missing dependencies in packages, whether due to unwanted linking or packages missing in the depends array in the PKGBUILD. It also allows users to build a package for the stable repositories (core, extra, community) while having packages from [testing] installed.<br />
<br />
= Convenience Way =<br />
To quickly build a package in a chroot without any further tinkering, one can use the helper scripts from the devtools package.<br />
<br />
These helper scripts should be called in the same directory where the PKGBUILD is, just like with makepkg. For instance, {{ic|extra-i686-build}} automatically sets up chroot in {{ic|/var/lib/archbuild}}, updates it, and builds a package for the extra repository. For multilib builds there is just {{ic|multilib-build}} without an architecture.<br />
<br />
{{Tip|Consult the table below for information on which script to use when building for a specific repository and architecture.}}<br />
<br />
{| class="wikitable"<br />
! Target repository || Architecture || Build script to use<br />
|-<br />
| core / extra / community || i686 || extra-i686-build<br />
|-<br />
| core / extra / community || x86_64 || extra-x86_64-build<br />
|-<br />
| testing / community-testing || i686 || testing-i686-build<br />
|-<br />
| testing / community-testing || x86_64 || testing-x86_64-build<br />
|-<br />
| staging / community-staging || i686 || staging-i686-build<br />
|-<br />
| staging / community-staging || x86_64 || staging-x86_64-build<br />
|-<br />
| multilib || x86_64 || multilib-build<br />
|-<br />
| multilib-testing || x86_64 || multilib-testing-build<br />
|-<br />
| multilib-staging || x86_64 || multilib-staging-build<br />
|}<br />
<br />
= Classic Way =<br />
== Setting Up A Chroot ==<br />
<br />
The devtools package provides tools for creating and building within clean chroots. Install it if not done already:<br />
<br />
pacman -S devtools<br />
<br />
To make a clean chroot, create a directory in which the chroot will reside. For example, {{ic|$HOME/chroot}}.<br />
<br />
Now create the chroot:<br />
<br />
CHROOT=$HOME/chroot<br />
mkdir $CHROOT<br />
sudo mkarchroot $CHROOT/root base base-devel sudo<br />
<br />
{{Note|One can also define the CHROOT variable in $HOME/.bashrc using the export command if the location is to be repeatedly used. }}<br />
<br />
Edit {{ic|$CHROOT/root/etc/makepkg.conf}} to set the packager name and any makeflags. Also adjust the mirror list in {{ic|$CHROOT/root/etc/pacman.d/mirrorlist}} and enable '''[testing]''' in {{ic|$CHROOT/root/etc/pacman.conf}} if desired.<br />
<br />
Alternatively, provide a custom{{ic|pacman.conf}} and {{ic|makepkg.conf}} with the following:<br />
<br />
sudo mkarchroot -C <pacman.conf> -M <makepkg.conf> $CHROOT/root base base-devel sudo<br />
<br />
It is recommended however users do not use custom {{ic|pacman.conf}} and {{ic|makepkg.conf}} during the initial creation of clean chroot to ensure no user-specific adjustments are made. ''Use with caution.''<br />
<br />
== Building in the Chroot ==<br />
<br />
Firstly, make sure the chroot is up to date with:<br />
<br />
sudo mkarchroot -u $CHROOT/root<br />
<br />
Then, to build a package in the chroot, run the following from the dir containing the PKGBUILD:<br />
<br />
sudo makechrootpkg -c -r $CHROOT<br />
<br />
A unionfs is used to maintain the clean chroot during building. All installed dependencies or makedepends and other changes made during building are done in $CHROOT/rw. Passing the -c flag to makechrootpkg ensures that this directory is cleaned before building starts.<br />
<br />
= Handling Major Rebuilds =<br />
<br />
The cleanest way to handle a major rebuild is to create a new chroot and build the first package (typically the package for which the rebuild is meant). Then create a local repo inside the new chroot. To do this:<br />
<br />
sudo mkdir $CHROOT/root/repo<br />
sudo chmod 0777 $CHROOT/root/repo<br />
<br />
The chmod statement allows for the coping of package files and for the creation of the local repo as your user rather than root.<br />
<br />
cp <package> $CHROOT/root/repo<br />
cd $CHROOT/root/repo<br />
repo-add local.db.tar.gz <package><br />
<br />
Then add the local repo to {{ic|$CHROOT/root/etc/pacman.conf}}<br />
<br />
[local]<br />
Server = file:///repo<br />
<br />
As long as you add only self built packages to this repo, you can add<br />
<br />
SigLevel = TrustAll<br />
<br />
and update the repo:<br />
<br />
sudo mkarchroot -u $CHROOT/root<br />
<br />
With every additional package rebuilt, copy the package to the local repo directory, add it to the repo database and update the chroot.<br />
<br />
= Alternate Rebuild Handling =<br />
<br />
The above directions will work fine, but they can dirty the "pristine" chroot that makechrootpkg tries to keep in check (that is the point of using unionfs - dirtying a separate 'rw' directory).<br />
<br />
== Using a custom repo ==<br />
Follow the steps above to setup a local repo inside the chroot.<br />
<br />
Build packages using:<br />
sudo makechrootpkg -r $CHROOT -u<br />
The -u will update the chroot before building (-Syu) but updates will be installed to the rw layer, maintaining a clean chroot.<br />
<br />
== Manual package installation ==<br />
Packages can be installed manually to the rw layer of the chroot by using:<br />
sudo makechrootpkg -r $CHROOT -I package-1.0-1-i686.pkg.tar.gz<br />
<br />
== Installation after building ==<br />
Tell makechrootpkg to simply install a package to the rw layer of the chroot after building by passing the -i arg. Unrecognized args get passed to makepkg, so this calls `makepkg` with the -i arg.<br />
sudo makechrootpkg -r $CHROOT -- -i</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Package_Maintainer_guidelines&diff=245770Package Maintainer guidelines2013-01-31T14:02:05Z<p>Foutrelis: /* TODO list for new Trusted Users */</p>
<hr />
<div>[[Category:Package development]]<br />
[[es:AUR Trusted User Guidelines]]<br />
[[pt:AUR Trusted User Guidelines]]<br />
[[zh-CN:AUR Trusted User Guidelines]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains guidelines for the Arch User Repository's Trusted Users.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Arch User Repository}}<br />
{{Article summary end}}<br />
<br />
The '''Trusted User (TU)''' is a member of the community charged with keeping the AUR in working order. He/she maintains popular packages ([https://mailman.archlinux.org/pipermail/aur-general/2010-September/010649.html communicating with and sending patches upstream as needed]), and votes in administrative matters. A TU is elected from active community members by current TUs in a democratic process. TUs are the only members who have a final say in the direction of the AUR.<br />
<br />
The TUs are governed using the [https://aur.archlinux.org/trusted-user/TUbylaws.html TU bylaws]<br />
<br />
==TODO list for new Trusted Users==<br />
# Read this entire wiki article.<br />
# Read the [https://aur.archlinux.org/trusted-user/TUbylaws.html TU Bylaws].<br />
# Make sure your account details on the [[Arch User Repository|AUR]] are up-to-date and that your sponsor has given you TU status.<br />
# Add yourself to the [[Trusted Users]] page.<br />
# Remind Allan/Andrea to change your account on forums.<br />
# Ask some TU for the #archlinux-tu@freenode key and hang out with us in the channel. You do not have to do this, but it would be neat since this is where most dark secrets are spilled and where many new ideas are conceived.<br />
# If you are not upgraded to a Trusted User group on bug tracker in two days, report this as a bug to Andrea Scarpino (andrea@archlinux.org).<br />
# Send Ionuț Bîru (ibiru@archlinux.org) all the information based on this [https://www.archlinux.org/trustedusers/ template] to have access on dev interface.<br />
# Install the {{pkg|devtools}} package.<br />
# Send an email to Florian Pritz with one SSH public key attached. If you do not have one, use {{ic|ssh-keygen}} to generate one. Check the [[Using SSH Keys]] wiki page for more information about SSH keys.<br />
# Create a PGP key for [[package signing]].<br />
# Send a signed email to all [https://www.archlinux.org/master-keys/ Master Keys owners] including your PGP key and the relative full key fingerprint. Your key needs to be signed at least by three of five master key holders.<br />
# Make the directories {{ic|~/staging/community}} and {{ic|~/staging/community-testing}} (and {{ic|~/staging/multilib}} if you are interested in maintaining multilib packages) on nymeria.archlinux.org. This step is '''important''' as the devtools scripts use this directory to process incoming packages.<br />
# Start contributing!<br />
<br />
==The TU and [unsupported]==<br />
<br />
The TUs should also make an effort to check package submissions in UNSUPPORTED for malicious code and good PKGBUILDing standards. In around 80% of cases the PKGBUILDs in the UNSUPPORTED are very simple and can be quickly checked for sanity and malicious code by the TU team.<br />
<br />
TUs should also check PKGBUILDs for minor mistakes, suggest corrections and improvements. The TU should endeavor to confirm that all pkgs follow the Arch Packaging Guidelines/Standards and in doing so share their skills with other package builders in an effort to raise the standard of package building across the distro.<br />
<br />
TUs are also in an excellent position to document recommended practices.<br />
<br />
==The TU and [community], Guidelines for Package Maintenance==<br />
<br />
=== Rules for Packages Entering the [community] Repo ===<br />
<br />
* Only "popular" packages may enter the repo, as defined by 1% usage from [https://www.archlinux.de/?page=PackageStatistics pkgstats] or 10 votes on the AUR.<br />
<br />
* Automatic exceptions to this rule are:<br />
** i18n packages<br />
** accessibility packages<br />
** drivers<br />
** dependencies of packages who satisfy the definition of popular, including makedeps and optdeps<br />
** packages that are part of a collection and are intended to be distributed together, provided a part of this collection satisfies the definition of popular<br />
<br />
* Any additions not covered by the above criteria must first be proposed on the aur-general mailing list, explaining the reason for the exemption (e.g. renamed package, new package). The agreement of three other TUs is required for the package to be accepted into [community]. Proposed additions from TUs with large numbers of "non-popular" packages are more likely to be rejected.<br />
<br />
* TUs are strongly encouraged to move packages they currently maintain from [community] if they have low usage. No enforcement will be made, although resigning TUs packages may be filtered before adoption can occur.<br />
<br />
=== Accessing and Updating the Repository ===<br />
<br />
The [community] repository now uses '''devtools''' which is the same system used for uploading packages to [core] and [extra], except that it uses another server {{ic|nymeria.archlinux.org}} instead of {{ic|gerolde.archlinux.org}}. Thus most of the instructions in [[DeveloperWiki:HOWTO Be A Packager|Packager Guide]] work without any change. Information which is specific for the [community] repository (like changed URLs) have been put here. The devtools require packagers to [[Arch_Build_System#Set_the_PACKAGER_variable_in_.2Fetc.2Fmakepkg.conf|set the PACKAGER variable]]. This is done in {{ic|/usr/share/devtools/makepkg-{i686,x86_64}.conf}} since the regular configuration file does not get placed in a clean chroot.<br />
<br />
Initially you should do a '''non-recursive checkout''' of the [community] repository:<br />
svn checkout -N svn+ssh://svn-community@nymeria.archlinux.org/srv/repos/svn-community/svn<br />
<br />
This creates a directory named "svn" which contains nothing. It does, however, know that it is an svn checkout. <br />
<br />
For '''checking''' out, '''updating''' all packages or '''adding''' a package see the [[DeveloperWiki:HOWTO Be A Packager|Packager Guide]].<br />
<br />
To '''remove''' a package:<br />
ssh nymeria.archlinux.org /srv/repos/svn-community/dbscripts/db-remove community arch pkgname<br />
<br />
Here and in the following text, arch can be one of i686 or x86_64 which are the two architectures supported by Arch Linux. (What about "any"?)<br />
<br />
When you are done with editing the PKGBUILD, etc, you should '''commit''' the changes ({{ic|svn commit}}).<br />
<br />
When you want to '''release''' a package, first copy the package to the ''staging/community'' directory on nymeria.archlinux.org using scp and then '''tag''' the package by going to the ''pkgname/trunk'' directory and issuing {{ic|archrelease community-arch}}. This makes an svn copy of the trunk entries in a directory named ''community-i686'' or ''community-x86_64'' indicating that this package is in the community repository for that architecture.<br />
<br />
'''''Note:''' In some cases, especially for community packages, an x86_64 TU might bump the pkgrel by .1 (and not +1). This indicates that the change to the PKGBUILD is x86_64 specific and i686 maintainers '''should not''' rebuild the package for i686. When the TU decides to bump the pkgrel, it should be done with the usual increment of +1. However, a previous pkgrel=2.1 must not become pkgrel=3.1 when bumped by the TU and must instead be pkgrel=3. In a nutshell, leave dot (.) releases exclusive to the x86_64 TU's to avoid confusion.''<br />
<br />
Thus the '''process''' of updating a package can be summarised as:<br />
<br />
* '''Update''' the package directory ({{ic|svn update some-package}})<br />
* '''Change''' to the package trunk directory ({{ic|cd some-package/trunk}})<br />
* '''Edit''' the PKGBUILD, make necessary changes and {{ic|makepkg}}. It is recommended to build in a [[DeveloperWiki:Building in a Clean Chroot|clean chroot]].<br />
* '''[[Namcap]]''' the PKGBUILD and the binary pkg.tar.gz.<br />
* '''Commit''', '''Copy''' and '''Tag''' the package using {{ic|communitypkg "commit message"}}. This automates the following:<br />
** '''Commit''' the changes to trunk ({{ic|svn commit}})<br />
** '''Copy''' the package to nymeria.archlinux.org ({{ic|scp pkgname-ver-rel-arch.pkg.tar.xz* nymeria.archlinux.org:staging/community/}})<br />
** '''Tag''' the package ({{ic|archrelease community-{i686,x86_64}}})<br />
* '''Update''' the repository ({{ic|ssh nymeria.archlinux.org /srv/repos/svn-community/dbscripts/db-update}})<br />
<br />
Also see the ''Miscellaneous'' section in the [[DeveloperWiki:HOWTO Be A Packager|Packager Guide]]. For the section ''Avoid having to enter your password all the time'' use nymeria.archlinux.org instead of gerolde.archlinux.org.<br />
<br />
=== Disowning packages ===<br />
If a TU cannot or does not want to maintain a package any longer, a notice should be posted to the AUR Mailing List, so another TU can<br />
maintain it. A package can still be disowned even if no other TU wants to maintain it, but the TUs should try not to drop many packages (they should not take on more than they have time for). If a package has become obsolete or is not used any longer, it can be removed completely as well.<br />
<br />
If a package has been removed completely, it can be uploaded once again (fresh) to UNSUPPORTED, where a regular user can maintain the package instead of the TU.<br />
<br />
=== Moving packages from unsupported to [community] ===<br />
<br />
Follow the normal procedures for adding a package community, but remember to delete the corresponding package from unsupported!<br />
<br />
=== Moving packages from [community] to unsupported ===<br />
<br />
Remove the package using the instructions above and upload your source tarball to the AUR.<br />
<br />
=== Moving packages from [community-testing] to [community] ===<br />
ssh nymeria.archlinux.org /srv/repos/svn-community/dbscripts/db-move community-testing community package<br />
<br />
=== Deleting packages from unsupported ===<br />
There is no point in removing dummy packages, because they will be re-created in an attempt to track dependencies. If someone uploads a<br />
real package then all dependents will point to the correct place.<br />
<br />
=== See also ===<br />
* [[DeveloperWiki#Packaging_Guidelines]]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Thunar&diff=243852Thunar2013-01-15T01:43:53Z<p>Foutrelis: Only ffmpegthumbnailer is supported by the tumbler package from now on.</p>
<hr />
<div>[[Category:File managers]]<br />
[[es:Thunar]]<br />
[[it:Thunar]]<br />
[[pl:Thunar]]<br />
[[ru:Thunar]]<br />
[[zh-CN:Thunar]]<br />
{{Article summary start}}<br />
{{Article summary text|This article discusses every aspect of the file manager named [http://thunar.xfce.org/index.html Thunar].}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Xfce}}: Thunar is installed with a nominal installation of {{Grp|xfce4}}.<br />
{{Article summary text|[[GNOME#Nautilus|Nautilus]]: Thunar is not the only file manager. There are many. For example, Nautilus is the file manager for {{Grp|gnome}}}}.<br />
{{Article summary end}}<br />
<br />
[http://thunar.xfce.org/index.html Thunar] is a file manager that is designed to be fast, lightweight, and easy-to-use. A standard installation of {{Grp|xfce4}} will contain Thunar, but it can be used with other standalone window managers.<br />
<br />
== Installation ==<br />
[[pacman|Install]] the {{pkg|thunar}} package which is available in the [[Official Repositories|official repositories]].<br />
<br />
If you are running [[Xfce|Xfce4]], you probably already have Thunar installed.<br />
<br />
== Automounting ==<br />
Thunar uses [[gvfs]] for automounting, see [[GVFS]] for details on getting it working.<br />
<br />
== Thunar Volume Manager ==<br />
While Thunar can support automatic mounting and unmounting of removable media, the Thunar Volume Manager allows extended functionality, such as automatically running commands or automatically opening a Thunar window for mounted media.<br />
<br />
==== Installation ====<br />
Thunar Volume Manager can be installed from the package {{Pkg|thunar-volman}} in the [[official repositories]].<br />
<br />
==== Configuration ====<br />
It can also be configured to execute certain actions when cameras and audio players are connected. <br />
After installing the plugin:<br />
# Launch Thunar and go to Edit -> Preferences<br />
# Under the 'Advanced' tab, check 'Enable Volume Management'<br />
# Click configure and check the following items:<br />
#* Mount removable drives when hot-pluged.<br />
#* Mount removable media when inserted.<br />
# Also make desired changes (see the example below)<br />
Here's an example setting for making Amarok play an audio CD.<br />
Multimedia - Audio CDs: {{ic|amarok --cdplay %d}}<br />
<br />
== Tips and Tricks ==<br />
=== Using Thunar to browse remote locations ===<br />
Since Xfce 4.8 (Thunar 1.2) it is possible to browse remote locations (such as FTP servers or Samba shares) directly in Thunar, similar to the functionality found in GNOME and KDE. The {{Pkg|gvfs}} and {{Pkg|gvfs-smb}} packages are required to enable this functionality. Both packages are available in the [[official repositories]].<br />
<br />
After a restart of Xfce an additional "Network" entry is added to Thunar's side bar and remote locations can be opened by using the following URI schemes in the location dialog (opened with {{Keypress|Ctrl+L}}): smb://, ftp://, ssh://<br />
<br />
=== Starting in Daemon Mode ===<br />
Thunar may be run in daemon mode. This has several advantages, including a faster startup for Thunar, as well as Thunar running in the background and only opening a window when necessary (for instance, when a flash drive is inserted).<br />
<br />
One option is to autostart it using {{ic|.xinitrc}} or an autostart script (such as [[Openbox]]'s {{ic|autostart}}). It is up to you to decide the best way to start it, and this option can be run from a script or run directly as a command in the terminal.<br />
<br />
To run Thunar in daemon mode, simply add to your autostart script or run from the terminal:<br />
{{bc|$ thunar --daemon &}}<br />
<br />
=== Setting the Icon Theme ===<br />
When using Thunar outside of Gnome or Xfce, certain packages and configurations that control which icons are used may be missing. Window Managers like Awesome and Xmonad do not come with XSettings managers, which is where Thunar looks first for it's icon setting. It is possible to install and run xfce-mcs-manager from a startup script if many Xfce4 and Gnome applications are going to be used. The gtk-icon-theme-name setting for gtk2 can be set for a user by adding something like the following to {{ic|~/.gtkrc-2.0}}:<br />
gtk-icon-theme-name = "Tango"<br />
<br />
Of course, just installing the gnome-icon-theme package will give Thunar an icon theme to use other than the default paper icon for all items.<br />
{{bc|# pacman -S gnome-icon-theme}}<br />
<br />
=== Solving problem with slow cold start ===<br />
Some people still have problems with Thunar taking a long time to start for the first time. This is due to gvfs checking the network, preventing Thunar from starting until gvfs finishes its operations. To change this behaviour, edit {{ic|/usr/share/gvfs/mounts/network.mount}} and change '''AutoMount=true''' to '''AutoMount=false'''.<br />
<br />
== Other plugins and addons ==<br />
Many of these plugins are part of the xfce4-goodies group, so if you have downloaded it, you will probably have all of these anyway.<br />
<br />
=== Thunar Archive Plugin ===<br />
The Thunar Archive Plugin is a frontend to file archive software such as File Roller, Ark, or Xarchiver to allow a simple, consistent interface to opening and decompressing archives.<br />
==== Installation ====<br />
It can be installed by running:<br />
{{bc|# pacman -S thunar-archive-plugin}}<br />
<br />
=== Thunar Media Tags Plugin ===<br />
The media tags plugin will display detailed information about media files. It supports ID3 (the MP3 file format's system) and Ogg/Vorbis tags. It also has a bulk renamer and allows editing of media tags.<br />
==== Installation ====<br />
It can be installed by running:<br />
{{bc|# pacman -S thunar-media-tags-plugin}}<br />
<br />
=== Thunar thumbnails ===<br />
Thunar relies on an external program called [http://git.xfce.org/xfce/tumbler/tree/README tumbler] to generate thumbnails.<br />
{{Pkg|tumbler}} can be installed from the [[official repositories]].<br />
{{bc|# pacman -S tumbler}}<br />
To generate video thumbnails, you also need to install {{Pkg|ffmpegthumbnailer}}.<br />
{{bc|# pacman -S ffmpegthumbnailer}}<br />
<br />
=== Thunar Shares ===<br />
The Thunar Shares Plugin allows you to quickly share a folder using Samba from Thunar without requiring root access.<br />
==== Installation ====<br />
Install [https://aur.archlinux.org/packages.php?ID=24152 thunar-shares-plugin] package from the [[AUR]].<br />
<br />
==== Configuration ====<br />
{{Merge|Samba|These are samba configuration, should merge to [[Samba]] and leave link here.}}<br />
This marks the named objects for automatic export to the environment of subsequently executed commands:<br />
{{bc|<nowiki># export USERSHARES_DIR="/var/lib/samba/usershares"<br />
# export USERSHARES_GROUP="sambashare"</nowiki>}}<br />
This creates the usershares directory in var/lib/samba:<br />
{{bc|<nowiki># mkdir -p ${USERSHARES_DIR}</nowiki>}}<br />
This makes the group sambashare:<br />
{{bc|<nowiki># groupadd ${USERSHARES_GROUP}</nowiki>}}<br />
This changes the owner of the directory and group you just created to root:<br />
{{bc|<nowiki># chown root:${USERSHARES_GROUP} ${USERSHARES_DIR}</nowiki>}}<br />
This changes the permissions of the usershares directory so that users in the group sambashare can read, write and execute files:<br />
{{bc|<nowiki># chmod 01770 ${USERSHARES_DIR}</nowiki>}}<br />
Using your favorite text editor as root, create the file {{ic|/etc/samba/smb.conf}}<br />
{{bc|# joe /etc/samba/smb.conf}}<br />
Use this {{ic|smb.conf}} configuration file: <br />
{{hc|/etc/samba/smb.conf|<nowiki><br />
##This is the main Samba configuration file. You should read the<br />
##smb.conf(5) manual page in order to understand the options listed<br />
##here. Samba has a huge number of configurable options (perhaps too<br />
##many!) most of which are not shown in this example<br />
##<br />
##For a step to step guide on installing, configuring and using samba, <br />
## read the Samba-HOWTO-Collection. This may be obtained from:<br />
## http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf<br />
##<br />
## Many working examples of smb.conf files can be found in the <br />
## Samba-Guide which is generated daily and can be downloaded from: <br />
## http://www.samba.org/samba/docs/Samba-Guide.pdf<br />
##<br />
## Any line which starts with a ; (semi-colon) or a # (hash) <br />
## is a comment and is ignored. In this example we will use a #<br />
## for commentry and a ; for parts of the config file that you<br />
## may wish to enable<br />
##<br />
## NOTE: Whenever you modify this file you should run the command "testparm"<br />
## to check that you have not made any basic syntactic errors. <br />
##<br />
#[global]<br />
# workgroup = WORKGROUP<br />
# security = share<br />
# server string = My Share<br />
# load printers = yes<br />
# log file = /var/log/samba/%m.log<br />
# max log size = 50<br />
# usershare path = /var/lib/samba/usershares<br />
# usershare max shares = 100<br />
# usershare allow guests = yes<br />
# usershare owner only = False<br />
# <br />
#<br />
# #Windows Internet Name Serving Support Section:<br />
#<br />
# #WINS Support - Tells the NMBD component of Samba to enable it's WINS Server<br />
#; wins support = yes<br />
#<br />
## WINS Server - Tells the NMBD components of Samba to be a WINS Client<br />
## Note: Samba can be either a WINS Server, or a WINS Client, but NOT both<br />
#; wins server = w.x.y.z<br />
#<br />
##WINS Proxy - Tells Samba to answer name resolution queries on<br />
## behalf of a non WINS capable client, for this to work there must be<br />
## at least one WINS Server on the network. The default is NO.<br />
#; wins proxy = yes</nowiki>}}<br />
Save the file and then add your user to the group sambashares replacing "your_username" with the name of your user:<br />
{{bc|# usermod -a -G ${USERSHARES_GROUP} your_username}}<br />
Restart Samba:<br />
{{bc|# /etc/rc.d/samba restart}}<br />
Log out and log back in. You should now be able to right click on any directory and share it on the network.<br />
When the error {{ic|You are not the owner of the folder}} appears, simply try to reboot the system.<br />
To have samba start at boot, add samba to daemons in your {{ic|/etc/rc.conf}} file.<br />
For more information, visit the [[Samba]] wiki page.<br />
<br />
== Custom actions ==<br />
This section covers useful custom actions which can be accessed through Edit -> Configure custom actions. More examples are listed in the [http://thunar.xfce.org/pwiki/documentation/custom_actions thunar wiki].<br />
<br />
=== Scan for viruses ===<br />
To use this action you need to have clamav and clamtk installed.<br />
<br />
{| border="1" cellpadding="4" cellspacing="0"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Scan for virus<br />
| clamtk %F || * || Select all<br />
|}<br />
<br /><br />
=== Link to Dropbox ===<br />
{| border="1" cellpadding="4" cellspacing="0"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Link to Dropbox<br />
| ln -s %f /path/to/DropboxFolder || * || Directories, other files<br />
|}<br />
<br />
Please note that when using many custom actions to symlink files and folder to a particular place, it might be useful to put them into the {{ic|Send To}} folder of the context menu to avoid that the menu itself gets bloated. This is fairly easy to achieve and requires a .desktop file in {{ic|~/.local/share/Thunar/sendto}} for each action to perform. Say we want to put the above dropbox symlink action into Send To, we create a {{ic|dropbox_folder.desktop}} with the following content. The new applied action will be active after restarting Thunar.<br />
<br />
[Desktop Entry]<br />
Type=Application<br />
Version=1.0<br />
Encoding=UTF-8<br />
Exec=ln -s %f /path/to/DropboxFolder<br />
Icon=/usr/share/icons/dropbox.png<br />
Name=Dropbox<br />
<br />
== Links and References ==<br />
* [http://thunar.xfce.org/index.html Thunar] project page.<br />
* [http://goodies.xfce.org/projects/thunar-plugins/thunar-volman Thunar Volume Manager] project page.<br />
* [http://goodies.xfce.org/projects/thunar-plugins/thunar-archive-plugin Thunar Archive Plugin] project page.<br />
* [http://goodies.xfce.org/projects/thunar-plugins/thunar-media-tags-plugin Thunar Media Tags Plugin] project page.<br />
*[http://goodies.xfce.org/projects/thunar-plugins/thunar-shares-plugin/ Thunar Shares Plugin] project page.<br />
* This [http://goodies.xfce.org/projects/thunar-plugins/start list] of plugins.</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Thunar&diff=241450Thunar2012-12-24T02:04:42Z<p>Foutrelis: fix package name: gstreamer-libav -> gst-libav</p>
<hr />
<div>[[Category:File managers]]<br />
[[es:Thunar]]<br />
[[it:Thunar]]<br />
[[pl:Thunar]]<br />
[[ru:Thunar]]<br />
[[zh-CN:Thunar]]<br />
{{Article summary start}}<br />
{{Article summary text|This article discusses every aspect of the file manager named [http://thunar.xfce.org/index.html Thunar].}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Xfce}}: Thunar is installed with a nominal installation of {{Grp|xfce4}}.<br />
{{Article summary text|[[GNOME#Nautilus|Nautilus]]: Thunar is not the only file manager. There are many. For example, Nautilus is the file manager for {{Grp|gnome}}}}.<br />
{{Article summary end}}<br />
<br />
[http://thunar.xfce.org/index.html Thunar] is a file manager that is designed to be fast, lightweight, and easy-to-use. A standard installation of {{Grp|xfce4}} will contain Thunar, but it can be used with other standalone window managers.<br />
<br />
== Installation ==<br />
[[pacman|Install]] the {{pkg|thunar}} package which is available in the [[Official Repositories|official repositories]].<br />
<br />
If you are running [[Xfce|Xfce4]], you probably already have Thunar installed.<br />
<br />
== Automounting ==<br />
Thunar uses [[gvfs]] for automounting, see [[GVFS]] for details on getting it working.<br />
<br />
== Thunar Volume Manager ==<br />
While Thunar can support automatic mounting and unmounting of removable media, the Thunar Volume Manager allows extended functionality, such as automatically running commands or automatically opening a Thunar window for mounted media.<br />
<br />
==== Installation ====<br />
Thunar Volume Manager can be installed from the package {{Pkg|thunar-volman}} in the [[official repositories]].<br />
<br />
==== Configuration ====<br />
It can also be configured to execute certain actions when cameras and audio players are connected. <br />
After installing the plugin:<br />
# Launch Thunar and go to Edit -> Preferences<br />
# Under the 'Advanced' tab, check 'Enable Volume Management'<br />
# Click configure and check the following items:<br />
#* Mount removable drives when hot-pluged.<br />
#* Mount removable media when inserted.<br />
# Also make desired changes (see the example below)<br />
Here's an example setting for making Amarok play an audio CD.<br />
Multimedia - Audio CDs: {{ic|amarok --cdplay %d}}<br />
<br />
== Tips and Tricks ==<br />
=== Using Thunar to browse remote locations ===<br />
Since Xfce 4.8 (Thunar 1.2) it is possible to browse remote locations (such as FTP servers or Samba shares) directly in Thunar, similar to the functionality found in GNOME and KDE. The {{Pkg|gvfs}} and {{Pkg|gvfs-smb}} packages are required to enable this functionality. Both packages are available in the [[official repositories]].<br />
<br />
After a restart of Xfce an additional "Network" entry is added to Thunar's side bar and remote locations can be opened by using the following URI schemes in the location dialog (opened with {{Keypress|Ctrl+L}}): smb://, ftp://, ssh://<br />
<br />
=== Starting in Daemon Mode ===<br />
Thunar may be run in daemon mode. This has several advantages, including a faster startup for Thunar, as well as Thunar running in the background and only opening a window when necessary (for instance, when a flash drive is inserted).<br />
<br />
One option is to autostart it using {{ic|.xinitrc}} or an autostart script (such as [[Openbox]]'s {{ic|autostart}}). It is up to you to decide the best way to start it, and this option can be run from a script or run directly as a command in the terminal.<br />
<br />
To run Thunar in daemon mode, simply add to your autostart script or run from the terminal:<br />
{{bc|$ thunar --daemon &}}<br />
<br />
=== Setting the Icon Theme ===<br />
When using Thunar outside of Gnome or Xfce, certain packages and configurations that control which icons are used may be missing. Window Managers like Awesome and Xmonad do not come with XSettings managers, which is where Thunar looks first for it's icon setting. It is possible to install and run xfce-mcs-manager from a startup script if many Xfce4 and Gnome applications are going to be used. The gtk-icon-theme-name setting for gtk2 can be set for a user by adding something like the following to {{ic|~/.gtkrc-2.0}}:<br />
gtk-icon-theme-name = "Tango"<br />
<br />
Of course, just installing the gnome-icon-theme package will give Thunar an icon theme to use other than the default paper icon for all items.<br />
{{bc|# pacman -S gnome-icon-theme}}<br />
<br />
=== Solving problem with slow cold start ===<br />
Some people still have problems with Thunar taking a long time to start for the first time. This is due to gvfs checking the network, preventing Thunar from starting until gvfs finishes its operations. To change this behaviour, edit {{ic|/usr/share/gvfs/mounts/network.mount}} and change '''AutoMount=true''' to '''AutoMount=false'''.<br />
<br />
== Other plugins and addons ==<br />
Many of these plugins are part of the xfce4-goodies group, so if you have downloaded it, you will probably have all of these anyway.<br />
<br />
=== Thunar Archive Plugin ===<br />
The Thunar Archive Plugin is a frontend to file archive software such as File Roller, Ark, or Xarchiver to allow a simple, consistent interface to opening and decompressing archives.<br />
==== Installation ====<br />
It can be installed by running:<br />
{{bc|# pacman -S thunar-archive-plugin}}<br />
<br />
=== Thunar Media Tags Plugin ===<br />
The media tags plugin will display detailed information about media files. It supports ID3 (the MP3 file format's system) and Ogg/Vorbis tags. It also has a bulk renamer and allows editing of media tags.<br />
==== Installation ====<br />
It can be installed by running:<br />
{{bc|# pacman -S thunar-media-tags-plugin}}<br />
<br />
=== Thunar thumbnails ===<br />
Thunar relies on an external program called [http://git.xfce.org/xfce/tumbler/tree/README tumbler] to generate thumbnails.<br />
{{Pkg|tumbler}} can be installed from the [[official repositories]].<br />
{{bc|# pacman -S tumbler}}<br />
To generate video thumbnails, you have to install additional programs. There are two options.<br />
<br />
First, you can install {{Pkg|ffmpegthumbnailer}}.<br />
{{bc|# pacman -S ffmpegthumbnailer}}<br />
Second, you can install {{Pkg|gstreamer}} and {{Pkg|gst-libav}}, just in case {{Pkg|ffmpegthumbnailer}} doesn't work.<br />
{{bc|# pacman -S gstreamer<br />
# pacman -S gst-libav<br />
}}<br />
<br />
=== Thunar Shares ===<br />
The Thunar Shares Plugin allows you to quickly share a folder using Samba from Thunar without requiring root access.<br />
==== Installation ====<br />
Install [https://aur.archlinux.org/packages.php?ID=24152 thunar-shares-plugin] package from the [[AUR]].<br />
<br />
==== Configuration ====<br />
{{Merge|Samba|These are samba configuration, should merge to [[Samba]] and leave link here.}}<br />
This marks the named objects for automatic export to the environment of subsequently executed commands:<br />
{{bc|<nowiki># export USERSHARES_DIR="/var/lib/samba/usershares"<br />
# export USERSHARES_GROUP="sambashare"</nowiki>}}<br />
This creates the usershares directory in var/lib/samba:<br />
{{bc|<nowiki># mkdir -p ${USERSHARES_DIR}</nowiki>}}<br />
This makes the group sambashare:<br />
{{bc|<nowiki># groupadd ${USERSHARES_GROUP}</nowiki>}}<br />
This changes the owner of the directory and group you just created to root:<br />
{{bc|<nowiki># chown root:${USERSHARES_GROUP} ${USERSHARES_DIR}</nowiki>}}<br />
This changes the permissions of the usershares directory so that users in the group sambashare can read, write and execute files:<br />
{{bc|<nowiki># chmod 01770 ${USERSHARES_DIR}</nowiki>}}<br />
Using your favorite text editor as root, create the file {{ic|/etc/samba/smb.conf}}<br />
{{bc|# joe /etc/samba/smb.conf}}<br />
Use this {{ic|smb.conf}} configuration file: <br />
{{hc|/etc/samba/smb.conf|<nowiki><br />
##This is the main Samba configuration file. You should read the<br />
##smb.conf(5) manual page in order to understand the options listed<br />
##here. Samba has a huge number of configurable options (perhaps too<br />
##many!) most of which are not shown in this example<br />
##<br />
##For a step to step guide on installing, configuring and using samba, <br />
## read the Samba-HOWTO-Collection. This may be obtained from:<br />
## http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf<br />
##<br />
## Many working examples of smb.conf files can be found in the <br />
## Samba-Guide which is generated daily and can be downloaded from: <br />
## http://www.samba.org/samba/docs/Samba-Guide.pdf<br />
##<br />
## Any line which starts with a ; (semi-colon) or a # (hash) <br />
## is a comment and is ignored. In this example we will use a #<br />
## for commentry and a ; for parts of the config file that you<br />
## may wish to enable<br />
##<br />
## NOTE: Whenever you modify this file you should run the command "testparm"<br />
## to check that you have not made any basic syntactic errors. <br />
##<br />
#[global]<br />
# workgroup = WORKGROUP<br />
# security = share<br />
# server string = My Share<br />
# load printers = yes<br />
# log file = /var/log/samba/%m.log<br />
# max log size = 50<br />
# usershare path = /var/lib/samba/usershares<br />
# usershare max shares = 100<br />
# usershare allow guests = yes<br />
# usershare owner only = False<br />
# <br />
#<br />
# #Windows Internet Name Serving Support Section:<br />
#<br />
# #WINS Support - Tells the NMBD component of Samba to enable it's WINS Server<br />
#; wins support = yes<br />
#<br />
## WINS Server - Tells the NMBD components of Samba to be a WINS Client<br />
## Note: Samba can be either a WINS Server, or a WINS Client, but NOT both<br />
#; wins server = w.x.y.z<br />
#<br />
##WINS Proxy - Tells Samba to answer name resolution queries on<br />
## behalf of a non WINS capable client, for this to work there must be<br />
## at least one WINS Server on the network. The default is NO.<br />
#; wins proxy = yes</nowiki>}}<br />
Save the file and then add your user to the group sambashares replacing "your_username" with the name of your user:<br />
{{bc|# usermod -a -G ${USERSHARES_GROUP} your_username}}<br />
Restart Samba:<br />
{{bc|# /etc/rc.d/samba restart}}<br />
Log out and log back in. You should now be able to right click on any directory and share it on the network.<br />
When the error {{ic|You are not the owner of the folder}} appears, simply try to reboot the system.<br />
To have samba start at boot, add samba to daemons in your {{ic|/etc/rc.conf}} file.<br />
For more information, visit the [[Samba]] wiki page.<br />
<br />
== Custom actions ==<br />
This section covers useful custom actions which can be accessed through Edit -> Configure custom actions. More examples are listed in the [http://thunar.xfce.org/pwiki/documentation/custom_actions thunar wiki].<br />
<br />
=== Scan for viruses ===<br />
To use this action you need to have clamav and clamtk installed.<br />
<br />
{| border="1" cellpadding="4" cellspacing="0"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Scan for virus<br />
| clamtk %F || * || Select all<br />
|}<br />
<br /><br />
=== Link to Dropbox ===<br />
{| border="1" cellpadding="4" cellspacing="0"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Link to Dropbox<br />
| ln -s %f /path/to/DropboxFolder || * || Directories, other files<br />
|}<br />
<br />
Please note that when using many custom actions to symlink files and folder to a particular place, it might be useful to put them into the {{ic|Send To}} folder of the context menu to avoid that the menu itself gets bloated. This is fairly easy to achieve and requires a .desktop file in {{ic|~/.local/share/Thunar/sendto}} for each action to perform. Say we want to put the above dropbox symlink action into Send To, we create a {{ic|dropbox_folder.desktop}} with the following content. The new applied action will be active after restarting Thunar.<br />
<br />
[Desktop Entry]<br />
Type=Application<br />
Version=1.0<br />
Encoding=UTF-8<br />
Exec=ln -s %f /path/to/DropboxFolder<br />
Icon=/usr/share/icons/dropbox.png<br />
Name=Dropbox<br />
<br />
== Links and References ==<br />
* [http://thunar.xfce.org/index.html Thunar] project page.<br />
* [http://goodies.xfce.org/projects/thunar-plugins/thunar-volman Thunar Volume Manager] project page.<br />
* [http://goodies.xfce.org/projects/thunar-plugins/thunar-archive-plugin Thunar Archive Plugin] project page.<br />
* [http://goodies.xfce.org/projects/thunar-plugins/thunar-media-tags-plugin Thunar Media Tags Plugin] project page.<br />
*[http://goodies.xfce.org/projects/thunar-plugins/thunar-shares-plugin/ Thunar Shares Plugin] project page.<br />
* This [http://goodies.xfce.org/projects/thunar-plugins/start list] of plugins.</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Xfce&diff=241449Xfce2012-12-24T02:03:34Z<p>Foutrelis: fix anchor in thunar thumbnails link</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[cs:Xfce]]<br />
[[de:Xfce]]<br />
[[es:Xfce]]<br />
[[fr:Xfce]]<br />
[[it:Xfce]]<br />
[[ja:Xfce]]<br />
[[pl:Xfce]]<br />
[[ru:Xfce]]<br />
[[tr:Xfce_Masaüstü_Ortamı]]<br />
[[uk:Xfce]]<br />
[[zh-CN:Xfce]]<br />
{{Article summary start}}<br />
{{Article summary text|Xfce is a lightweight desktop environment for Unix-like operating systems. It aims to be fast and lightweight, while still being visually appealing and user friendly. This article covers its installation, configuration, and troubleshooting.}}<br />
{{Article summary text|Xfce uses the [[GTK+]] toolkit.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Graphical user interface overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Thunar}}<br />
{{Article summary wiki|Improve GTK Application Looks}}<br />
{{Article summary wiki|Autostart applications#Graphical}}<br />
{{Article summary end}}<br />
<br />
From [http://www.xfce.org/about/ Xfce - About]:<br />
<br />
:''Xfce embodies the traditional UNIX philosophy of modularity and re-usability. It consists of a number of components that provide the full functionality one can expect of a modern desktop environment. They are packaged separately and you can pick among the available packages to create the optimal personal working environment.''<br />
<br />
== What is Xfce? ==<br />
Xfce is a Desktop Environment, like [[GNOME]] or [[KDE]]. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit, and contains its own development environment (libraries, daemons, etc), similar to other big DEs. Features:<br />
*Lighter on resources than the other major DEs (KDE, GNOME).<br />
*Most settings are exposed via a GUI, Xfce does not try to hide stuff from the user.<br />
*Xfwm has an optional built-in compositor which allows for true transparency and all the benefits of GPU acceleration (minimizes tearing, etc.).<br />
*It works great with multiple monitors.<br />
<br />
==Installation==<br />
<br />
Before starting, make sure you have the [[Xorg|X server]] installed and configured correctly.<br />
<br />
{{Note|Xfce is somewhat modular. That means there is no need for you to run every part, you can pick and choose some of them.}}<br />
<br />
The base Xfce system can be [[pacman|installed]] with the group {{Grp|xfce4}}, available in the [[Official Repositories]]. Pacman will ask you to select the packages to install, but you probably want to get them all by simply pressing {{Keypress|Enter}}. Additional packages, like panel plugins, notifications, and system tools are available in the {{Grp|xfce4-goodies}} group.<br />
<br />
{{Tip|Installing [[Gamin]] (the successor of [[FAM]]) is highly recommended.}}<br />
<br />
In order to get the xfce4-mixer to work with [[ALSA]], you need to install {{Pkg|gstreamer0.10-base-plugins}}. See [[#OSS|below]] for help with [[OSS]].<br />
<br />
== Running Xfce ==<br />
<br />
===Automatically at boot time===<br />
There are two methods to start Xfce (and in fact, any desktop or window manager) at boot time:<br />
<br />
* Run Xfce through a [[Display Manager]]<br />
* Run Xfce automatically using the {{pkg|xorg-xinit}} method at [[Start X at Login]] combining with [[Automatic login to virtual console ]]<br />
<br />
===Manually===<br />
<br />
{{Note|See [[xinitrc]] for details, such as preserving the logind (and/or consolekit) session.}}<br />
<br />
You can execute:<br />
$ startxfce4<br />
from the console, or configure [[xinitrc]] and use xinit or startx.<br />
<br />
If you have not created a {{ic|~/.xinitrc}} yet, do so with:<br />
<br />
$ cp /etc/skel/.xinitrc ~/.xinitrc<br />
<br />
and add the following line:<br />
<br />
exec startxfce4<br />
<br />
Example:<br />
{{hc|~/.xinitrc|<nowiki>#!/bin/sh<br />
<br />
if [ -d /etc/X11/xinit/xinitrc.d ]; then<br />
for f in /etc/X11/xinit/xinitrc.d/*; do<br />
[ -x "$f" ] && . "$f"<br />
done<br />
unset f<br />
fi<br />
<br />
exec startxfce4</nowiki>}}<br />
<br />
{{Note|<br />
*In case you are wondering, {{ic|dbus-launch}} will be launched by the {{ic|xinitrc.d}} code at the beginning of the file. {{ic|dbus-launch}} starts a dbus-daemon instance to provide communication with PolicyKit.<br />
*The proper command for launching Xfce is {{ic|startxfce4}}: do not start {{ic|xfce4-session}} directly, since it is already run by {{ic|startxfce4}} itself.<br />
}}<br />
<br />
===Shutting down, rebooting, and automounting from within Xfce===<br />
See [[General Troubleshooting#Session permissions]].<br />
<br />
If you have no issues shutting down and rebooting but cannot automount external media and disks, you may need to install {{pkg|gvfs}}. See the [[#Removable Devices|Removable Devices]] section.<br />
<br />
====Shutdown & reboot from shutdown menu when using systemd====<br />
If you are using systemd instead of sysvinit, when trying to shutdown or reboot from the shutdown menu of xfce4 it actually logout to DM; installing {{pkg|systemd-sysvcompat}} corrects this misbehavior.<br />
<br />
==Tips and tricks==<br />
===Configuring Xfconf settings===<br />
Xfconf is XFCE's system for storing configuration options, and most XFCE configuration is done by editing settings in Xfconf (one way or another). There are several ways to modify these settings:<br />
* The most obvious and easiest way is to go to "Settings" in the main menu and select the category you want to customize. However, not all customization options are available this way. <br />
* A less user-friendly but more general way is to go to {{bc|Main menu -> Settings -> Settings Editor}} where you can see and modify all the customization options. Any settings modified here will take effect immediately. The Settings Editor can also be launched from the command line by invoking {{ic|xfce4-settings-editor}}.<br />
* Customization can be done completely from the command line using the program {{ic|xfconf-query}}. See [http://docs.xfce.org/xfce/xfconf/xfconf-query the XFCE online documentation] for more information and examples and the rest of this wiki page for more examples. Settings changed here will take effect immediately.<br />
* The settings are stored in XML files in {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/}} which can be edited by hand. However, changes made here will not take effect immediately.<br />
* For more information: [http://docs.xfce.org/xfce/xfconf/start Xfconf documentation]<br />
===Panel===<br />
====How to customize xfce panel background====<br />
Edit {{ic|~/.gtkrc-2.0}}.<br />
Note that you must place the image in the same directory as the configuration, which is {{ic|~/}}. You can not specify the path to the image, or it will not work.<br />
style "panel-background" {<br />
bg_pixmap[NORMAL] = "foo.bar"<br />
bg_pixmap[PRELIGHT] = "foo.bar"<br />
bg_pixmap[ACTIVE] = "foo.bar"<br />
bg_pixmap[SELECTED] = "foo.bar"<br />
bg_pixmap[INSENSITIVE] = "foo.bar"<br />
}<br />
widget_class "*Panel*" style "panel-background"<br />
<br />
==== Replacements for the default 'menu' panel applet ====<br />
The "Ubuntu System Panel" (GNOME) panel applet has similar features to those found in its KDE v4.2 equivalent. It can be added to an Xfce panel via the 'XfApplet' panel applet, which allows GNOME applets to be used in Xfce.<br />
<br />
It is available in the [[Arch User Repository|AUR]] as the {{AUR|usp2}} package.<br />
<br />
====How to remove menu entries from the System menu====<br />
===== Method 1 =====<br />
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:<br />
# Open Terminal (Xfce menu > System > Terminal) and go to the {{ic|/usr/share/applications}} folder: {{bc|$ cd /usr/share/applications}}<br />
# This folder should be full of {{ic|.desktop}} files. To see a list type: {{bc|$ ls}}<br />
# Add {{ic|1=NoDisplay=true}} to the {{ic|.desktop}} file. For example, if you want to hide Firefox, type in the terminal:{{bc|1=$ sudo sh -c 'echo "NoDisplay=true" >> firefox.desktop'}} This command appends the text {{ic|1=NoDisplay=true}} to the end of the {{ic|.desktop}} file.<br />
<br />
===== Method 2 =====<br />
Another method is to copy the entire contents of the global applications directory over to your local applications directory, and then proceed to modify and/or disable unwanted .desktop entries. This will survive application updates that overwrite changes under {{ic|/usr/share/applications/}}.<br />
# In a terminal, copy everything from {{ic|/usr/share/applications}} to {{ic|~/.local/share/applications/}}: {{bc|$ cp /usr/share/applications/* ~/.local/share/applications/}}<br />
# For any entry you wish to hide from the menu, add the {{ic|1=NoDisplay=true}} option: {{bc|1=$ echo "NoDisplay=true" >> ~/.local/share/applications/foo.desktop}}<br />
<br />
You can also edit the application's category by editing the {{ic|.desktop}} file with a text editor and modifying the {{ic|1=Categories=}} line.<br />
<br />
===== Method 3 =====<br />
The third method is the '''cleanest''' and recommended in the [http://wiki.xfce.org/howto/customize-menu Xfce wiki].<br />
<br />
Create the file {{ic|~/.config/menus/xfce-applications.menu}} and copy the following in it:<br />
{{bc|<nowiki><br />
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"<br />
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"><br />
<br />
<Menu><br />
<Name>Xfce</Name><br />
<MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile><br />
<br />
<Exclude><br />
<Filename>xfce4-run.desktop</Filename><br />
<br />
<Filename>exo-terminal-emulator.desktop</Filename><br />
<Filename>exo-file-manager.desktop</Filename><br />
<Filename>exo-mail-reader.desktop</Filename><br />
<Filename>exo-web-browser.desktop</Filename><br />
<br />
<Filename>xfce4-about.desktop</Filename><br />
<Filename>xfhelp4.desktop</Filename><br />
</Exclude><br />
<br />
<Layout><br />
<Merge type="all"/><br />
<Separator/><br />
<br />
<Menuname>Settings</Menuname><br />
<Separator/><br />
<br />
<Filename>xfce4-session-logout.desktop</Filename><br />
</Layout><br />
<br />
</Menu><br />
</nowiki>}}<br />
<br />
The {{ic|<MergeFile>}} tag includes the default Xfce menu in our file. This is important.<br />
<br />
The {{ic|<Exclude>}} tag excludes applications which we do not want to appear in the menu. Here we excluded some Xfce default shortcuts, but you can exclude {{ic|firefox.desktop}} or any other application.<br />
<br />
The {{ic|<Layout>}} tag defines the layout of the menu. The applications can be organized in folders or however we wish. For more details see the aforementioned Xfce wiki page.<br />
<br />
===== Method 4 =====<br />
Alternatively a tool called [http://lxmed.sourceforge.net/ lxmed] can be used. Lxmed is a GUI tool written in Java for editing menu entires in LXDE, but it also works in Xfce4. Lxmed is available in the {{AUR|lxmed}} package from the [[AUR]].<br />
<br />
==== But what do you do with menu entries which do not show up in /usr/share/applications (e.g., apps installed via Wine)? ====<br />
I have found some shortcuts that show in the category “Other” in this directory:<br />
{{ic|~/.local/share/applications/wine/}}.<br />
<br />
====Panel autohide delay====<br />
Add this to {{ic|~/.gtkrc-2.0}}.<br />
style "xfce-panel-window-style"<br />
{<br />
# Time in miliseconds before the panel will unhide on an enter event<br />
XfcePanelWindow::popup-delay = 225<br />
<br />
# Time in miliseconds before the panel will hide on a leave event<br />
XfcePanelWindow::popdown-delay = 350<br />
}<br />
class "XfcePanelWindow" style "xfce-panel-window-style"<br />
<br />
====Panel at desktop level====<br />
<br />
If you want a panel at desktop level (i.e., other windows will stack over it) you need a little hack, ensure you have installed the '''wmctrl''' package.<br />
<br />
Create a script in {{ic|~/.config/xfce4/xfce4-fix-panel}} with this content and make it executable (you can use {{ic|chmod 755 xfce4-fix-panel}}).<br />
<br />
#!/bin/bash<br />
set -e<br />
<br />
function getPanelIdImpl() {<br />
# get panel id<br />
PANEL="`wmctrl -l | sed -n -e '/ xfce4-panel$/ s_ .*$__ p' | sed -n -e $1' p'`"<br />
}<br />
<br />
function getPanelId() {<br />
# eventually await the panel to appear<br />
getPanelIdImpl $1<br />
while [ x = x$PANEL ] ;do<br />
sleep 0.5s<br />
getPanelIdImpl $1<br />
done<br />
}<br />
<br />
function putPanelDown() {<br />
PANEL=""<br />
getPanelId $1<br />
wmctrl -i -r $PANEL -b add,below<br />
}<br />
<br />
# call the program with a list of panel numbers as arguments<br />
# for example, xfce4-fix-panel 1 2 3<br />
# for the first three panels<br />
for i in $* ;do<br />
putPanelDown $i<br />
done<br />
<br />
<br />
Once wrote the script, and tested it, you need to auto-execute it at each login. You can use the {{ic|Session and StartUp -> Application Autostart}} gui.<br />
<br />
This passage will put your panels at desktop level, but if your panel is sticking to a border the maximized windows will not stack over it. You can enable this behavior with the following command, fortunately you need to do this only once. (change the $ID with the panel number of interest)<br />
<br />
xfconf-query -c xfce4-panel -p /panels/panel-$ID/disable-struts -n -t bool -s true<br />
<br />
=== Desktop ===<br />
<br />
==== Use a transparent background for desktop icon titles ====<br />
To change the default white background of desktop icon titles to something more suitable, edit the {{ic|.gtkrc-2.0}} file in your home directory (or create the file if needed) and add the following:<br />
style "xfdesktop-icon-view" {<br />
XfdesktopIconView::label-alpha = 10<br />
base[NORMAL] = "#000000"<br />
base[SELECTED] = "#71B9FF"<br />
base[ACTIVE] = "#71FFAD"<br />
fg[NORMAL] = "#ffffff"<br />
fg[SELECTED] = "#71B9FF"<br />
fg[ACTIVE] = "#71FFAD" }<br />
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"<br />
<br />
==== Hide selected partitions on the desktop ====<br />
If you wish to prevent certain partitions or drives appearing on the desktop, you can create a udev rule, for example {{ic|/etc/udev/rules.d/10-local.rules}}:<br />
<br />
KERNEL=="sda1", ENV{UDISKS_PRESENTATION_HIDE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_PRESENTATION_HIDE}="1"<br />
<br />
Would show all partitions with the exception of sda1 and sda2 on your desktop. Notice, if you are using udisk2 the above will not work, due to the UDISKS_PRESENTATION_HIDE no longer being supported, instead you must use UDISKS_IGNORE as follows<br />
<br />
KERNEL=="sda1", ENV{UDISKS_IGNORE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_IGNORE}="1"<br />
<br />
==== Switch to old desktop right click menu without Thunar things ====<br />
xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0<br />
<br />
==== Adding the kill window shortcut ====<br />
<br />
Xfce does not support the ''kill window'' shortcut directly, but you can add one with a simple script. Ensure you have the '''xorg-xkill''' package installed.<br />
<br />
Create a script in {{ic|~/.config/xfce4/killwindow.sh}} with this content and make it executable (you can use {{ic|chmod 755 killwindow.sh}}).<br />
<br />
xkill -id "`xprop -root -notype | sed -n '/^_NET_ACTIVE_WINDOW/ s/^.*# *\|\,.*$//g p'`"<br />
<br />
Now associate a shortcut using {{ic|Settings -> Keyboard}} to that script.<br />
<br />
=== XFWM4 ===<br />
==== How to enable the compositor in Xfce ====<br />
Xfce comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on. It can be enabled in the Window Manager Tweaks and works on the fly. No additional settings are needed in your {{ic|/etc/xorg.conf}}. To enable and adjust settings, go to:<br />
<br />
Menu --> Settings --> Window Manager Tweaks<br />
<br />
==== Disable window roll-up ====<br />
xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false<br />
<br />
==== Disable/enable automatic resizing/tiling of windows at edge of screen ====<br />
XFWM4 has the ability to "tile" a window automatically when it is moved to the edge of the screen by resizing it to fill the top half of the screen. (The official XFCE website says this feature is disabled by default in XFCE 4.10, but it seems to be enabled by default on Arch Linux.) This behavior can be enabled or disabled in {{ic|Window Manager Tweaks --> Accessibility --> Automatically tile windows when moving toward the screen edge}}, or:<br />
<br />
xfconf-query -c xfwm4 -p /general/tile_on_move -s false # To disable<br />
xfconf-query -c xfwm4 -p /general/tile_on_move -s true # To enable<br />
<br />
=== Commands for the settings manager ===<br />
<br />
There is no official documentation for the commands executed. One must look at {{ic|.desktop}} files {{ic|/usr/share/applications/}} folder. For the people who like to know exactly what is happening, here is a handy list to save the effort:<br />
<br />
xfce4-accessibility-settings<br />
xfce4-power-manager-settings<br />
xfce4-settings-editor<br />
xfdesktop-settings<br />
xfce4-display-settings<br />
xfce4-keyboard-settings<br />
xfce4-mouse-settings<br />
xfce4-session-settings<br />
xfce4-settings-manager<br />
xfce4-appearance-settings<br />
xfwm4-settings<br />
xfwm4-tweaks-settings<br />
xfwm4-workspace-settings<br />
orage -p<br />
<br />
To review all the available setting manager commands run the following in a terminal:<br />
<br />
$ grep '^Exec=' /usr/share/applications/xfce*settings* | sed -e 's_^.*=_ _'<br />
<br />
===Session===<br />
====Customizing Startup Applications====<br />
This includes getting necessary environment variables into the GUI runtime.<br />
<br />
* Copy the file {{ic|/etc/xdg/xfce4/xinitrc}} to {{ic|~/.config/xfce4/}}<br />
* Edit this file. For example, you can add something like this somehwere in the middle:<br />
source $HOME/.bashrc<br />
# start rxvt-unicode server<br />
urxvtd -q -o -f<br />
<br />
====Switch between users====<br />
Xfce4 allows this behavior under the 'action buttons' menu item. Currently, both [[gdm]] and [[Lightdm#User_switching_under_xfce4|lightdm]] provide this functionality.<br />
<br />
==== Modify XML settings files directly ====<br />
It may be useful, especially when upgrading, to manually edit .xml files in the {{ic|~/.config/xfce4/xfconf/}} folder. For application keyboard shortcuts for example, the file is {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml}}. It is faster to copy and paste the XML keys that you want rather than using the GUI.<br />
<br />
===Removable Devices===<br />
If you want an icon appearing on your desktop and in thunar when you plug in external devices, make sure gvfs is installed:<br />
<br />
# pacman -S --needed gvfs<br />
<br />
You could also need to install gvfs-afc (read [https://bbs.archlinux.org/viewtopic.php?pid=889018 this discussion]):<br />
<br />
# pacman -S gvfs-afc<br />
<br />
It is also a good idea to install thunar-volman (included in the {{ic|xfce4-goodies}} group):<br />
<br />
# pacman -S thunar-volman<br />
<br />
Udisk and a udisk wrapper are recommended if you want to automount optical and external drives easily<br />
<br />
* [http://igurublog.wordpress.com/downloads/script-devmon/ devmon] - devmon ([https://aur.archlinux.org/packages.php?ID=45842 AUR]) is a configuration-less bash wrapper script for udisks which automounts optical discs and removable drives. It can also selectively autostart apps or execute commands after mounting, ignore specified devices and volume labels, and unmount removable drives.<br />
<br />
===How to add themes to XFCE===<br />
1. Go to [http://www.xfce-look.org www.xfce-look.org] and click "Themes" in the left navbar. Look around for a theme you want and click "Download".<br />
<br />
2. Go to the directory where you downloaded the tarball/file and extract it using Squeeze/Xarchiver/CLI.<br />
<br />
3. Move the extracted folder to {{ic|/usr/share/themes}} (for all users) or {{ic|~/.themes}} (for just you). Inside {{ic|/usr/share/themes/abc}}, there is a folder that you create called xfwm4 that will contain whatever files that is included with that theme.<br />
<br />
4. GTK theme is available here:<br />
Menu --> Settings --> Appearance<br />
You select your xfwm theme in:<br />
Menu --> Settings --> Window Manager<br />
<br />
=== Cursors ===<br />
Main article: [[X11 Cursors]]<br />
<br />
If you have alternative X cursor themes installed, Xfce can find them with:<br />
Menu --> Settings --> Mouse --> Theme<br />
<br />
=== Icons ===<br />
1. First find and download your desired icon pack. Recommended places to download icons from are [http://www.customize.org Customize.org], [http://opendesktop.org Opendesktop.org] and [http://xfce-look.org/ Xfce-look.org].<br />
<br />
2. Go to the directory where you downloaded the icon pack and extract it. Example {{ic|tar -xzf /home/user/downloads/icon-pack.tar.gz}}.<br />
<br />
3. Move the extracted folder containing the icons to {{ic|/usr/share/icons}} (if you want all users on the system to make use of the icons) or {{ic|~/.icons}} (if only you want to use the icons).<br />
<br />
Optional: run {{ic|gtk-update-icon-cache -f -t ~/.icons/<theme_name>}} to update icon cache<br />
<br />
4. Switch your icons by going to:<br />
Menu --> Settings --> Appearance --> Icons<br />
<br />
When you have icon theme problems, it is also recommended to install the {{Pkg|hicolor-icon-theme}} package if it was not already installed.<br />
<br />
=== Fonts ===<br />
<br />
If you find the standard fonts rather thick and or slightly out of focus open Settings>Appearence click on the Fonts tab and under Hinting: change to Full<br />
<br />
You could also try using a custom DPI setting.<br />
<br />
=== Sound ===<br />
<br />
==== Configuring xfce4-mixer ====<br />
<br />
{{Pkg|xfce4-mixer}} is the GUI mixer app / panel plugin made by the Xfce team. It is part of the xfce4 group, so you probably already have it installed. Xfce 4.6 uses {{Pkg|gstreamer}} as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer. One or more of the gstreamer plugin packages listed as optional dependencies to xfce4-mixer must be installed. Without one of these required plugins packages, the following error arises when clicking on the mixer panel item.<br />
<br />
GStreamer was unable to detect any sound devices. Some sound system specific GStreamer packages may be missing. It may also be a permissions problem.<br />
<br />
(It is probably not a permissions problem. It is no longer required to add audio users to the "audio" group.) Which plugins are needed depends on the hardware. Most people should be fine with {{Pkg|gstreamer0.10-base-plugins}} which can be [[pacman|installed]] from [[Official Repositories]]. <br />
<br />
If the xfce4-mixer panel item was already running before one of the plugins packages was installed, logout and login to see if it worked, or just remove the mixer plugin from the panel and add it again. If that does not work, you might need more or different gstreamer plugins. Try to [[pacman|install]] package {{pkg|gstreamer0.10-good-plugins}} or {{pkg|gstreamer0.10-bad-plugins}}.<br />
<br />
For further details, for example how to set the default sound card, see [[Advanced Linux Sound Architecture]]. Alternatively you can use [[PulseAudio]] together with {{Pkg|pavucontrol}}.<br />
<br />
==== How do I get xfce4-mixer and OSS4 to work together? ====<br />
<br />
If you tried the above section to get {{Pkg|xfce4-mixer}} to work and it does not work at all, then you may have to compile gstreamer0.10-good-plugins yourself. Download the PKGBUILD and other files needed from ABS or [https://projects.archlinux.org/svntogit/packages.git/tree/gstreamer0.10-good/repos here], edit the PKGBUILD, add --enable-oss. <br />
<br />
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \<br />
'''--enable-oss \'''<br />
--disable-static --enable-experimental \<br />
--disable-schemas-install \<br />
--disable-hal \<br />
--with-package-name="GStreamer Good Plugins (Archlinux)" \<br />
--with-package-origin="https://www.archlinux.org/"<br />
<br />
and then run makepkg -i. <br />
<br />
makepkg -i<br />
<br />
Still not working? Try this package in AUR {{AUR|gstreamer0.10-good-plugins-ossv4}}, modify the pkgver to the newest in the PKGBUILD, and it should work.<br />
<br />
Other LINKS: [http://www.4front-tech.com/forum/ OSS forum]<br />
<br />
==== Change volume with keyboard volume buttons ====<br />
<br />
Go to <br />
Settings --> Keyboard<br />
Click the "Application Shortcuts" tab and add click the "Add" button. Add the following by entering the command, then pressing the corresponding button at the next window:<br />
<br />
===== ALSA =====<br />
For the raise volume button:<br />
amixer set Master 5%+<br />
For the lower volume button:<br />
amixer set Master 5%-<br />
For the mute button:<br />
amixer set Master toggle<br />
<br />
You can also run these commands to set the above commands to the standard XF86Audio keys:<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioRaiseVolume -n -t string -s "amixer set Master 5%+ unmute"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioLowerVolume -n -t string -s "amixer set Master 5%- unmute"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioMute -n -t string -s "amixer set Master toggle"<br />
<br />
If {{ic|amixer set Master toggle}} does not work, try the PCM channel ({{ic|amixer set PCM toggle}}) instead.<br />
<br />
The channel must have a "mute" option for the toggle command to work. To check whether or not your Master channel supports toggling mute, run {{ic|alsamixer}} in a terminal and look for the double M's (MM) under the Master channel. If they are not present, then it does not support the mute option. If, for example, you had to change the toggle button to use the PCM channel, make sure to also set the PCM channel as the Mixer Track under Xfce Mixer properties.<br />
<br />
===== OSS =====<br />
Use one of these scripts: http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS<br />
<br />
If using ossvol (recommended), add:<br />
ossvol -i 1<br />
for the volume up button<br />
ossvol -d 1<br />
for the volume down button<br />
ossvol -t<br />
for the mute/unmute button<br />
<br />
===== Xfce4-volumed =====<br />
<br />
[https://aur.archlinux.org/packages.php?ID=31693 xfce4-volumed] daemon from the [[AUR]] automatically maps volume keys of your keyboard to Xfce-mixer. Additionally you get OSD through Xfce4-notifyd when changing volume. Xfce4-volumed does not need any configuration and is started automatically with Xfce.<br />
<br />
{{accuracy|reason=There should be a short explanation of what this does and why it fixes the issue (bug?).}}<br />
<br />
If you use pulseaudio and xfce4-volumed unmute does not work, try this:<br />
<br />
$ xfconf-query -c xfce4-mixer -p /active-card -s `xfconf-query -c xfce4-mixer -p /sound-card`<br />
<br />
===== Volumeicon =====<br />
<br />
{{pkg|volumeicon}} is an alternative to xfce4-volumed in the community repo also handling keybindings and notifications through {{pkg|xfce4-notifyd}}.<br />
<br />
==== Adding startup/boot sound ====<br />
<br />
Arch does not have a built-in startup sound configuration tool, but there is a workaround by adding the following command to your Application Autostart settings:<br />
<br />
aplay /boot/startupsound.wav<br />
<br />
The file location and filename can be whatever you want, but naming it descriptively and putting it in /boot keeps things tidy.<br />
<br />
=== xdg-open integration (Preferred Applications) ===<br />
<br />
Most applications rely on [[xdg-open]] for opening a preferred application for a given file or URL.<br />
<br />
In order for xdg-open and xdg-settings to detect and integrate with the XFCE desktop environment correctly, you need to [[pacman|install]] the {{Pkg|xorg-xprop}} package.<br />
<br />
If you do not do that, your preferred applications preferences (set by exo-preferred-applications) will not be obeyed.<br />
Installing the package and allowing ''xdg-open'' to detect that you are running XFCE makes it forward all calls to ''exo-open'' instead, which correctly uses all your preferred applications preferences.<br />
<br />
To make sure xdg-open integration is working correctly, ask ''xdg-settings'' for the default web browser and see what the result is:<br />
<br />
# xdg-settings get default-web-browser<br />
<br />
If it replies with:<br />
<br />
xdg-settings: unknown desktop environment<br />
<br />
it means that it has failed to detect XFCE as your desktop environment, which is likely due to a missing {{Pkg|xorg-xprop}} package.<br />
<br />
=== Screenshots ===<br />
<br />
XFCE has its own screenshot tool, {{pkg|xfce4-screenshooter}}. It is part of the {{grp|xfce4-goodies}} group.<br />
<br />
==== Using the Print Screen key ====<br />
<br />
Go to:<br />
<br />
XFCE Menu --> Settings --> Keyboard >>> Application Shortcuts.<br />
<br />
Add the "xfce4-screenshooter -f" command to use the "PrintScreen" key in order to take fullscreen screenshots. See screenshooter's man page for other optional arguments.<br />
<br />
Alternatively, an independent screenshot program like [[Taking_a_Screenshot#scrot|scrot]] can be used.<br />
<br />
=== Change mount options ===<br />
<br />
A common problem when automounting USB sticks formatted with fat filesystem is the inability to properly show characters as umlauts, ñ, ß, etc. This may be solved by changing the default iocharset to utf8, which is easily done adding a line to {{ic|/etc/xdg/xfce4/mount.rc}}:<br />
<br />
[vfat]<br />
uid=<auto><br />
shortname=winnt<br />
'''utf8=true'''<br />
# FreeBSD specific option<br />
longnames=true<br />
flush=true<br />
<br />
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files, so be careful.<br />
<br />
It is possible to mount vfat devices with ''flush'' option, so that when copying to USB sticks data flushes more often, thus making thunar's progress bar to stays up until finished. Adding ''async'' instead will speed up write ops, but make sure to use ''Eject'' option in Thunar to unmount the stick. Globally, mount options for storage devices present at boot can be set in [[fstab]], and for other devices in [[udev]] rules.<br />
<br />
===Terminal tango color theme===<br />
Open with your favorite editor<br />
<br />
~/.config/Terminal/terminalrc<br />
<br />
And add(replace) this lines:<br />
<br />
ColorForeground=White<br />
ColorBackground=#323232323232<br />
ColorPalette1=#2e2e34343636<br />
ColorPalette2=#cccc00000000<br />
ColorPalette3=#4e4e9a9a0606<br />
ColorPalette4=#c4c4a0a00000<br />
ColorPalette5=#34346565a4a4<br />
ColorPalette6=#757550507b7b<br />
ColorPalette7=#060698989a9a<br />
ColorPalette8=#d3d3d7d7cfcf<br />
ColorPalette9=#555557575353<br />
ColorPalette10=#efef29292929<br />
ColorPalette11=#8a8ae2e23434<br />
ColorPalette12=#fcfce9e94f4f<br />
ColorPalette13=#72729f9fcfcf<br />
ColorPalette14=#adad7f7fa8a8<br />
ColorPalette15=#3434e2e2e2e2<br />
ColorPalette16=#eeeeeeeeecec<br />
<br />
=== Colour management ===<br />
xfce4-settings-manager does not yet have any colour management / calibration settings, nor is there any specific XFCE program to characterise your monitor.<br />
<br />
==== Loading a profile ====<br />
If you wish to '''load an icc profile''' (that you have previously created or downloaded) to calibrate your display on startup, you can download {{AUR|xcalib}} from [[AUR]], then open the XFCE4 Settings Manager, click Session and Startup icon, the Autostart tab, and add a new entry where the command is {{ic|/usr/bin/xcalib /path/to/your/profile.icc}}. You still need to tell your applications, which display profile should be used to have the displayed images colour managed.<br />
<br />
Another option is dispwin. Dispwin not only calibrates the display, but also sets the _ICC_PROFILE atom in X so that some applications can use a "system" display profile instead of requiring the user to set the display profile manually (GIMP, Inkscape, darktable, UFRaw, etc.).<br />
<br />
See [[ICC_Profiles#Loading_ICC_Profiles]] for more information.<br />
<br />
==== Creating a profile ====<br />
<br />
If you wish to '''create an icc profile''' for your display (ie. characterising/profiling, e.g. with the [[ColorHug]], or some other colorimeter, or a spectrophotometer, or "by eye"), the simplest option may be to install [https://aur.archlinux.org/packages.php?ID=25883 dispcalGUI] from [[AUR]]. <br />
<br />
Another option is to install {{ic|gnome-settings-daemon}} and {{ic|gnome-color-manager}} (available in extra). In order to start the calibration from the command line, first do {{ic|/usr/lib/gnome-settings-daemon/gnome-settings-daemon &}} (note: this might change your keyboard layout and who knows what else, so probably good to do it on a throwaway account), then {{ic|colormgr get-devices}} and look for the "Device ID" line of your monitor. If this is e.g. "xrandr-Lenovo Group Limited", you start calibration with the command {{ic|gcm-calibrate --device "xrandr-Lenovo Group Limited"}}.<br />
{{Note|1=The reason you need gnome-settings-daemon running is because XFCE does not yet have a session component for colord: https://bugzilla.xfce.org/show_bug.cgi?id=8559}}<br />
<br />
See [[ICC Profiles]] for more information.<br />
<br />
=== Multiple Monitors ===<br />
If you have configured X.org so that your display spans multiple monitors, usually when you login to an '''XFCE''' session, it will appear as if your monitors are simple clones of one another. You can use an '''xrandr''' tool to tweak your setup but if this is not called at an appropriate time in the startup sequence, some functionality may be lost with parts of your display being inaccessible to the mouse pointer.<br />
<br />
A better way is to configure XFCE to match your desired display arrangement. However, at present (xfce-settings 4.10), there is no tool available to assist with configuring multiple monitors directly. <br />
<br />
* The ''Settings -> Display'' tool does allow configuration of screen resolution, rotation and enabling individual monitors; '''warning''': ''using this tool to adjust display settings will reset or lose settings made manually for properties not explicitly offered as buttons in the tool (see below)''.<br />
* The ''Settings -> Settings Editor'' allows manipulation of all configuration items in particular the ''displays'' settings which are saved in the file '''displays.xml''' below<br />
~/.config/xfce4/xfconf/xfce-perchannel-xml<br />
* Alternatively, the ''displays.xml'' can be edited using your favourite editor.<br />
<br />
The main requirement for multiple monitors is their arrangement relative to one another. This can be controlled by setting the '''Position''' properties ('''X''' and '''Y''') to suit; an ''(x,y)'' position of ''0,0'' corresponds to the ''top, left'' position of the monitor array. This is the default position for all monitors and if several monitors are enabled they will appear as a cloned display area extending from this point. <br />
<br />
To extend the display area correctly across both monitors:<br />
<br />
* for side-by-side monitors, set the '''X''' property of the rightmost monitor to equal the width of the left-most monitor<br />
* for above-and-below monitors, set the '''Y''' property of the bottom monitor to equal the height of the upper monitor<br />
* for other arrangements, set the '''X''' and '''Y''' properties of each monitor to correspond to your layout<br />
<br />
Measurements are in ''pixels''. As an example, a pair of monitors with nominal dimensions of ''1920x1080'' which are rotated by 90 and placed side-by-side can be configured with a ''displays.xml'' like this:<br />
<br />
<channel name="displays" version="1.0"><br />
<property name="Default" type="empty"><br />
<property name="VGA-1" type="string" value="Idek Iiyama 23&quot;"><br />
<property name="Active" type="bool" value="true"/><br />
<property name="Resolution" type="string" value="1920x1080"/><br />
<property name="RefreshRate" type="double" value="60.000000"/><br />
<property name="Rotation" type="int" value="90"/><br />
<property name="Reflection" type="string" value="0"/><br />
<property name="Primary" type="bool" value="false"/><br />
<property name="Position" type="empty"><br />
<property name="X" type="int" value="0"/><br />
<property name="Y" type="int" value="0"/><br />
</property><br />
</property><br />
<property name="DVI-0" type="string" value="Digital display"><br />
<property name="Active" type="bool" value="true"/><br />
<property name="Resolution" type="string" value="1920x1080"/><br />
<property name="RefreshRate" type="double" value="60.000000"/><br />
<property name="Rotation" type="int" value="90"/><br />
<property name="Reflection" type="string" value="0"/><br />
<property name="Primary" type="bool" value="false"/><br />
<property name="Position" type="empty"><br />
<property name="X" type="int" value="1080"/><br />
<property name="Y" type="int" value="0"/><br />
</property><br />
</property><br />
</property><br />
</channel><br />
<br />
Usually, editing settings in this way requires a logout/login to action them.<br />
<br />
A new method for configuring multiple monitors will be available in the forthcoming xfce-settings 4.12 release.<br />
<br />
=== XDG User Directories ===<br />
freedesktop.org specifies the "well known" user directories like the desktop folder and the music folder. See [[Xdg user directories]] for detailed info.<br />
<br />
== Troubleshooting ==<br />
<br />
=== xfce4-power-manager is not working ===<br />
If you are still using initscripts, check you have added dbus to the {{ic|DAEMONS}} array in {{ic|/etc/[[rc.conf]]}}.<br />
<br />
If you are using Systemd, try to configure power-related [[Wikipedia:Advanced_Configuration_and_Power_Interface|ACPI]] events via options from {{ic|/etc/systemd/logind.conf}} to give control to xfce4-power-manager according [[Wikipedia:Systemd#ACPI_power_management|Systemd]].<br />
<br />
{{hc|/etc/systemd/logind.conf|<nowiki><br />
HandlePowerKey=ignore</nowiki>}}<br />
<br />
=== Xfce4-xkb-plugin settings issue ===<br />
There is a bug in version ''0.5.4.1-1'' which causes xkb-plugin to ''lose keyboard, layout switching and compose key'' settings. As a workaround you may enable ''Use system defaults'' option in keyboard settings. To do so run<br />
xfce4-keyboard-settings<br />
Go to ''Layout'' tab and set the ''Use system defaults'' flag, then reconfigure xkb-plugin.<br />
<br />
=== Thunar does not display any thumbnail ===<br />
<br />
Thunar relies on '''Tumbler''' to generate thumbnails. You can install Tumbler by issuing<br />
<br />
pacman -S tumbler<br />
<br />
More details in [[Thunar#Thunar_thumbnails|Thunar's page]].<br />
<br />
=== Locales ignored with GDM ===<br />
Become superuser and add your locale to /var/lib/AccountsService/users/$USER:<br />
su -c "nano /var/lib/AccountsService/users/$USER"<br />
Replace hu_HU.UTF-8 with your own locale:<br />
[User]<br />
Language=hu_HU.UTF-8<br />
XSession=xfce<br />
You may also do it with sed. Note the backslash before .UTF-8:<br />
su -c "sed -i 's/Language=.*/Language=hu_HU\.UTF-8/' /var/lib/AccountsService/users/$USER"<br />
Restart GDM to take effect.<br />
<br />
=== Restore default settings ===<br />
If for any reason you need to revert back to the default settings, try renaming {{ic|~/.config/xfce4-session/}} and {{ic|~/.config/xfce4/}}<br />
<br />
$ mv ~/.config/xfce4-session/ ~/.config/xfce4-session-bak<br />
$ mv ~/.config/xfce4/ ~/.config/xfce4-bak<br />
<br />
Logout and login for changes to take effect. If upon logging in you get an error window with the heading "Unable to load a failsafe session," see the [[Xfce#Session_failure|Session Failure]] section on this page.<br />
<br />
=== NVIDIA and xfce4-sensors-plugin ===<br />
To detect and use sensors of nvidia gpu you need to install {{AUR|libxnvctrl}} and then recompile {{Pkg|xfce4-sensors-plugin}} package.<br />
<br />
=== Session failure ===<br />
If the window manager does not load correctly (The mouse is a X and you cannot close windows) you maybe got an session error.<br />
To remove a corrupt session you can delete the session folder at the {{ic|.cache}} folder.<br />
# rm -r ~/.cache/sessions/<br />
The easy way to reload the session is to reboot the computer. You can also restart xfce.<br />
<br />
=== Clock/notification area no longer pushed to the right edge of the panel in Xfce 4.10 ===<br />
<br />
This is due to a change in the Window Buttons panel plugin which no longer expands to fill the available space.<br />
<br />
To emulate the old behavior, add a transparent separator between the window buttons and the clock/notification area, setting its expand property.<br />
<br />
=== Preferred Applications preferences have no effect ===<br />
<br />
If you have set your preferred applications with ''exo-preferred-applications'', but they do not seem to be taken into consideration, see [[Xfce#xdg-open_integration_.28Preferred_Applications.29]]<br />
<br />
=== Action Buttons in the panel are missing icons ===<br />
<br />
This happens if icons for some actions (Suspend, Hibernate) are missing from the icon theme, or at least do not have the expected names. First, find out the currently used icon theme in the Settings Manager (→Appearance→Icons). Match this with a subdirectory of {{ic|/usr/share/icons}}. For example, if the icon theme is GNOME, make a note of the directory name {{ic|/usr/share/icons/gnome}}.<br />
<br />
icontheme=/usr/share/icons/gnome<br />
<br />
Make sure that the {{Pkg|xfce4-power-manager}} is installed as this contains the needed icons. Now create symbolic links from the current icon theme into the {{ic|hicolor}} icon theme.<br />
<br />
ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-suspend.png ${icontheme}/16x16/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-hibernate.png ${icontheme}/16x16/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-suspend.png ${icontheme}/22x22/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-hibernate.png ${icontheme}/22x22/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-suspend.png ${icontheme}/24x24/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-hibernate.png ${icontheme}/24x24/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-suspend.png ${icontheme}/48x48/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-hibernate.png ${icontheme}/48x48/actions/system-hibernate.png<br />
<br />
Log out and in again, and you should see icons for all actions.<br />
<br />
=== Enable cedilla ç/Ç instead of ć/Ć ===<br />
<br />
When you select the keyboard layout "U.S., alternative internetional" in Settings --> Keyboard --> Layout to enable accents, the typical combination for the cedilla ' + c results in ć instead of ç.To change this suffice edit files gtk.immodules for gtk-2.0 and immodules.cache for gtk-3.0 in line that contains "cedilla" adding both "en" in the list "az:ca:co:fr:gv:oc:pt:sq:tr:wa" but in alphabetical order, staying that way in /etc/gtk-2.0/gtk.immodules<br />
<br />
"/usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so" <br />
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:en:fr:gv:oc:pt:sq:tr:wa"<br />
<br />
and this in /usr/lib/gtk-3.0/3.0.0/immodules.cache<br />
<br />
"/usr/lib/gtk-3.0/3.0.0/immodules/im-cedilla.so" <br />
"cedilla" "Cedilla" "gtk30" "/usr/share/locale" "az:ca:co:en:fr:gv:oc:pt:sq:tr:wa"<br />
<br />
Then, do<br />
# echo "export GTK_IM_MODULE=cedilla" >> /etc/environment<br />
<br />
Done. Simply just close and reopen the gtk programs like gedit.<br />
<br />
==See also==<br />
* http://docs.xfce.org/ - The complete documentation.<br />
* [http://www.xfce-look.org/ Xfce-Look] - Themes, wallpapers, and more.<br />
* [http://xfce.wikia.com/wiki/Frequently_Asked_Questions Xfce Wikia] - How to edit the auto generated menu with the menu editor<br />
* [http://wiki.xfce.org Xfce Wiki]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Thunar&diff=241448Thunar2012-12-24T02:03:12Z<p>Foutrelis: tumbler now uses gstreamer 1.0</p>
<hr />
<div>[[Category:File managers]]<br />
[[es:Thunar]]<br />
[[it:Thunar]]<br />
[[pl:Thunar]]<br />
[[ru:Thunar]]<br />
[[zh-CN:Thunar]]<br />
{{Article summary start}}<br />
{{Article summary text|This article discusses every aspect of the file manager named [http://thunar.xfce.org/index.html Thunar].}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Xfce}}: Thunar is installed with a nominal installation of {{Grp|xfce4}}.<br />
{{Article summary text|[[GNOME#Nautilus|Nautilus]]: Thunar is not the only file manager. There are many. For example, Nautilus is the file manager for {{Grp|gnome}}}}.<br />
{{Article summary end}}<br />
<br />
[http://thunar.xfce.org/index.html Thunar] is a file manager that is designed to be fast, lightweight, and easy-to-use. A standard installation of {{Grp|xfce4}} will contain Thunar, but it can be used with other standalone window managers.<br />
<br />
== Installation ==<br />
[[pacman|Install]] the {{pkg|thunar}} package which is available in the [[Official Repositories|official repositories]].<br />
<br />
If you are running [[Xfce|Xfce4]], you probably already have Thunar installed.<br />
<br />
== Automounting ==<br />
Thunar uses [[gvfs]] for automounting, see [[GVFS]] for details on getting it working.<br />
<br />
== Thunar Volume Manager ==<br />
While Thunar can support automatic mounting and unmounting of removable media, the Thunar Volume Manager allows extended functionality, such as automatically running commands or automatically opening a Thunar window for mounted media.<br />
<br />
==== Installation ====<br />
Thunar Volume Manager can be installed from the package {{Pkg|thunar-volman}} in the [[official repositories]].<br />
<br />
==== Configuration ====<br />
It can also be configured to execute certain actions when cameras and audio players are connected. <br />
After installing the plugin:<br />
# Launch Thunar and go to Edit -> Preferences<br />
# Under the 'Advanced' tab, check 'Enable Volume Management'<br />
# Click configure and check the following items:<br />
#* Mount removable drives when hot-pluged.<br />
#* Mount removable media when inserted.<br />
# Also make desired changes (see the example below)<br />
Here's an example setting for making Amarok play an audio CD.<br />
Multimedia - Audio CDs: {{ic|amarok --cdplay %d}}<br />
<br />
== Tips and Tricks ==<br />
=== Using Thunar to browse remote locations ===<br />
Since Xfce 4.8 (Thunar 1.2) it is possible to browse remote locations (such as FTP servers or Samba shares) directly in Thunar, similar to the functionality found in GNOME and KDE. The {{Pkg|gvfs}} and {{Pkg|gvfs-smb}} packages are required to enable this functionality. Both packages are available in the [[official repositories]].<br />
<br />
After a restart of Xfce an additional "Network" entry is added to Thunar's side bar and remote locations can be opened by using the following URI schemes in the location dialog (opened with {{Keypress|Ctrl+L}}): smb://, ftp://, ssh://<br />
<br />
=== Starting in Daemon Mode ===<br />
Thunar may be run in daemon mode. This has several advantages, including a faster startup for Thunar, as well as Thunar running in the background and only opening a window when necessary (for instance, when a flash drive is inserted).<br />
<br />
One option is to autostart it using {{ic|.xinitrc}} or an autostart script (such as [[Openbox]]'s {{ic|autostart}}). It is up to you to decide the best way to start it, and this option can be run from a script or run directly as a command in the terminal.<br />
<br />
To run Thunar in daemon mode, simply add to your autostart script or run from the terminal:<br />
{{bc|$ thunar --daemon &}}<br />
<br />
=== Setting the Icon Theme ===<br />
When using Thunar outside of Gnome or Xfce, certain packages and configurations that control which icons are used may be missing. Window Managers like Awesome and Xmonad do not come with XSettings managers, which is where Thunar looks first for it's icon setting. It is possible to install and run xfce-mcs-manager from a startup script if many Xfce4 and Gnome applications are going to be used. The gtk-icon-theme-name setting for gtk2 can be set for a user by adding something like the following to {{ic|~/.gtkrc-2.0}}:<br />
gtk-icon-theme-name = "Tango"<br />
<br />
Of course, just installing the gnome-icon-theme package will give Thunar an icon theme to use other than the default paper icon for all items.<br />
{{bc|# pacman -S gnome-icon-theme}}<br />
<br />
=== Solving problem with slow cold start ===<br />
Some people still have problems with Thunar taking a long time to start for the first time. This is due to gvfs checking the network, preventing Thunar from starting until gvfs finishes its operations. To change this behaviour, edit {{ic|/usr/share/gvfs/mounts/network.mount}} and change '''AutoMount=true''' to '''AutoMount=false'''.<br />
<br />
== Other plugins and addons ==<br />
Many of these plugins are part of the xfce4-goodies group, so if you have downloaded it, you will probably have all of these anyway.<br />
<br />
=== Thunar Archive Plugin ===<br />
The Thunar Archive Plugin is a frontend to file archive software such as File Roller, Ark, or Xarchiver to allow a simple, consistent interface to opening and decompressing archives.<br />
==== Installation ====<br />
It can be installed by running:<br />
{{bc|# pacman -S thunar-archive-plugin}}<br />
<br />
=== Thunar Media Tags Plugin ===<br />
The media tags plugin will display detailed information about media files. It supports ID3 (the MP3 file format's system) and Ogg/Vorbis tags. It also has a bulk renamer and allows editing of media tags.<br />
==== Installation ====<br />
It can be installed by running:<br />
{{bc|# pacman -S thunar-media-tags-plugin}}<br />
<br />
=== Thunar thumbnails ===<br />
Thunar relies on an external program called [http://git.xfce.org/xfce/tumbler/tree/README tumbler] to generate thumbnails.<br />
{{Pkg|tumbler}} can be installed from the [[official repositories]].<br />
{{bc|# pacman -S tumbler}}<br />
To generate video thumbnails, you have to install additional programs. There are two options.<br />
<br />
First, you can install {{Pkg|ffmpegthumbnailer}}.<br />
{{bc|# pacman -S ffmpegthumbnailer}}<br />
Second, you can install {{Pkg|gstreamer}} and {{Pkg|gstreamer-libav}}, just in case {{Pkg|ffmpegthumbnailer}} doesn't work.<br />
{{bc|# pacman -S gstreamer<br />
# pacman -S gstreamer-libav<br />
}}<br />
<br />
=== Thunar Shares ===<br />
The Thunar Shares Plugin allows you to quickly share a folder using Samba from Thunar without requiring root access.<br />
==== Installation ====<br />
Install [https://aur.archlinux.org/packages.php?ID=24152 thunar-shares-plugin] package from the [[AUR]].<br />
<br />
==== Configuration ====<br />
{{Merge|Samba|These are samba configuration, should merge to [[Samba]] and leave link here.}}<br />
This marks the named objects for automatic export to the environment of subsequently executed commands:<br />
{{bc|<nowiki># export USERSHARES_DIR="/var/lib/samba/usershares"<br />
# export USERSHARES_GROUP="sambashare"</nowiki>}}<br />
This creates the usershares directory in var/lib/samba:<br />
{{bc|<nowiki># mkdir -p ${USERSHARES_DIR}</nowiki>}}<br />
This makes the group sambashare:<br />
{{bc|<nowiki># groupadd ${USERSHARES_GROUP}</nowiki>}}<br />
This changes the owner of the directory and group you just created to root:<br />
{{bc|<nowiki># chown root:${USERSHARES_GROUP} ${USERSHARES_DIR}</nowiki>}}<br />
This changes the permissions of the usershares directory so that users in the group sambashare can read, write and execute files:<br />
{{bc|<nowiki># chmod 01770 ${USERSHARES_DIR}</nowiki>}}<br />
Using your favorite text editor as root, create the file {{ic|/etc/samba/smb.conf}}<br />
{{bc|# joe /etc/samba/smb.conf}}<br />
Use this {{ic|smb.conf}} configuration file: <br />
{{hc|/etc/samba/smb.conf|<nowiki><br />
##This is the main Samba configuration file. You should read the<br />
##smb.conf(5) manual page in order to understand the options listed<br />
##here. Samba has a huge number of configurable options (perhaps too<br />
##many!) most of which are not shown in this example<br />
##<br />
##For a step to step guide on installing, configuring and using samba, <br />
## read the Samba-HOWTO-Collection. This may be obtained from:<br />
## http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf<br />
##<br />
## Many working examples of smb.conf files can be found in the <br />
## Samba-Guide which is generated daily and can be downloaded from: <br />
## http://www.samba.org/samba/docs/Samba-Guide.pdf<br />
##<br />
## Any line which starts with a ; (semi-colon) or a # (hash) <br />
## is a comment and is ignored. In this example we will use a #<br />
## for commentry and a ; for parts of the config file that you<br />
## may wish to enable<br />
##<br />
## NOTE: Whenever you modify this file you should run the command "testparm"<br />
## to check that you have not made any basic syntactic errors. <br />
##<br />
#[global]<br />
# workgroup = WORKGROUP<br />
# security = share<br />
# server string = My Share<br />
# load printers = yes<br />
# log file = /var/log/samba/%m.log<br />
# max log size = 50<br />
# usershare path = /var/lib/samba/usershares<br />
# usershare max shares = 100<br />
# usershare allow guests = yes<br />
# usershare owner only = False<br />
# <br />
#<br />
# #Windows Internet Name Serving Support Section:<br />
#<br />
# #WINS Support - Tells the NMBD component of Samba to enable it's WINS Server<br />
#; wins support = yes<br />
#<br />
## WINS Server - Tells the NMBD components of Samba to be a WINS Client<br />
## Note: Samba can be either a WINS Server, or a WINS Client, but NOT both<br />
#; wins server = w.x.y.z<br />
#<br />
##WINS Proxy - Tells Samba to answer name resolution queries on<br />
## behalf of a non WINS capable client, for this to work there must be<br />
## at least one WINS Server on the network. The default is NO.<br />
#; wins proxy = yes</nowiki>}}<br />
Save the file and then add your user to the group sambashares replacing "your_username" with the name of your user:<br />
{{bc|# usermod -a -G ${USERSHARES_GROUP} your_username}}<br />
Restart Samba:<br />
{{bc|# /etc/rc.d/samba restart}}<br />
Log out and log back in. You should now be able to right click on any directory and share it on the network.<br />
When the error {{ic|You are not the owner of the folder}} appears, simply try to reboot the system.<br />
To have samba start at boot, add samba to daemons in your {{ic|/etc/rc.conf}} file.<br />
For more information, visit the [[Samba]] wiki page.<br />
<br />
== Custom actions ==<br />
This section covers useful custom actions which can be accessed through Edit -> Configure custom actions. More examples are listed in the [http://thunar.xfce.org/pwiki/documentation/custom_actions thunar wiki].<br />
<br />
=== Scan for viruses ===<br />
To use this action you need to have clamav and clamtk installed.<br />
<br />
{| border="1" cellpadding="4" cellspacing="0"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Scan for virus<br />
| clamtk %F || * || Select all<br />
|}<br />
<br /><br />
=== Link to Dropbox ===<br />
{| border="1" cellpadding="4" cellspacing="0"<br />
! Name !! Command !! File patterns !! Appears if selection contains<br />
|-<br />
! Link to Dropbox<br />
| ln -s %f /path/to/DropboxFolder || * || Directories, other files<br />
|}<br />
<br />
Please note that when using many custom actions to symlink files and folder to a particular place, it might be useful to put them into the {{ic|Send To}} folder of the context menu to avoid that the menu itself gets bloated. This is fairly easy to achieve and requires a .desktop file in {{ic|~/.local/share/Thunar/sendto}} for each action to perform. Say we want to put the above dropbox symlink action into Send To, we create a {{ic|dropbox_folder.desktop}} with the following content. The new applied action will be active after restarting Thunar.<br />
<br />
[Desktop Entry]<br />
Type=Application<br />
Version=1.0<br />
Encoding=UTF-8<br />
Exec=ln -s %f /path/to/DropboxFolder<br />
Icon=/usr/share/icons/dropbox.png<br />
Name=Dropbox<br />
<br />
== Links and References ==<br />
* [http://thunar.xfce.org/index.html Thunar] project page.<br />
* [http://goodies.xfce.org/projects/thunar-plugins/thunar-volman Thunar Volume Manager] project page.<br />
* [http://goodies.xfce.org/projects/thunar-plugins/thunar-archive-plugin Thunar Archive Plugin] project page.<br />
* [http://goodies.xfce.org/projects/thunar-plugins/thunar-media-tags-plugin Thunar Media Tags Plugin] project page.<br />
*[http://goodies.xfce.org/projects/thunar-plugins/thunar-shares-plugin/ Thunar Shares Plugin] project page.<br />
* This [http://goodies.xfce.org/projects/thunar-plugins/start list] of plugins.</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Installation_guide&diff=213090Installation guide2012-07-15T16:04:03Z<p>Foutrelis: genfstab doesn't have a -r switch either</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
# partition disks<br />
#:* use fdisk, parted, cfdisk, etc<br />
#:* create any stacked block devices like [[lvm|LVM]], [[Dm-crypt_with_LUKS|LUKS]], or [[RAID|RAID]]<br />
# format partitions<br />
#:* mkfs for filesystem of your choosing<br />
# mount the partitions<br />
#:* mount the root partition on /mnt<br />
#:* create dirs for and mount any other partitions (such as {{ic|/mnt/boot}})<br />
# [[configuring network|connect to the internet]]<br />
#:* Assuming a wired connection, running {{ic|dhcpcd}} is sufficient to get a lease<br />
# install the base system<br />
#:* {{ic|pacstrap /mnt base{,-devel} [more packages...]}}<br />
# install a bootloader<br />
#:* [[Syslinux|syslinux]]<br />
#:* [[Grub2|grub]]<br />
# configure system<br />
#:* generate an [[fstab]]: {{ic|genfstab -p /mnt >> /mnt/etc/fstab}}<br />
#:* {{ic|arch-chroot /mnt}}<br />
#:** write hostname to {{ic|/etc/hostname}}<br />
#:** symlink {{ic|/mnt/etc/localtime}} to {{ic|/usr/share/zoneinfo/Zone/SubZone}}<br />
#:** add locale preferences to {{ic|/etc/locale.conf}}<br />
#:** uncomment locales from {{ic|/etc/locale.gen}}, generate them with "locale-gen"<br />
# create the initramfs with [[mkinitcpio]]<br />
#:* configure {{ic|/mnt/etc/mkinitcpio.conf}} as needed<br />
#:* {{ic|arch-chroot /mnt mkinitcpio -p linux}}<br />
# unmount the things you mounted in step 3<br />
# reboot!</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Installation_guide&diff=213089Installation guide2012-07-15T16:00:45Z<p>Foutrelis: pacstrap doesn't have a -r switch anymore</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
# partition disks<br />
#:* use fdisk, parted, cfdisk, etc<br />
#:* create any stacked block devices like [[lvm|LVM]], [[Dm-crypt_with_LUKS|LUKS]], or [[RAID|RAID]]<br />
# format partitions<br />
#:* mkfs for filesystem of your choosing<br />
# mount the partitions<br />
#:* mount the root partition on /mnt<br />
#:* create dirs for and mount any other partitions (such as {{ic|/mnt/boot}})<br />
# [[configuring network|connect to the internet]]<br />
#:* Assuming a wired connection, running {{ic|dhcpcd}} is sufficient to get a lease<br />
# install the base system<br />
#:* {{ic|pacstrap /mnt base{,-devel} [more packages...]}}<br />
# install a bootloader<br />
#:* [[Syslinux|syslinux]]<br />
#:* [[Grub2|grub]]<br />
# configure system<br />
#:* generate an [[fstab]]: {{ic|genfstab -pr /mnt >> /mnt/etc/fstab}}<br />
#:* {{ic|arch-chroot /mnt}}<br />
#:** write hostname to {{ic|/etc/hostname}}<br />
#:** symlink {{ic|/mnt/etc/localtime}} to {{ic|/usr/share/zoneinfo/Zone/SubZone}}<br />
#:** add locale preferences to {{ic|/etc/locale.conf}}<br />
#:** uncomment locales from {{ic|/etc/locale.gen}}, generate them with "locale-gen"<br />
# create the initramfs with [[mkinitcpio]]<br />
#:* configure {{ic|/mnt/etc/mkinitcpio.conf}} as needed<br />
#:* {{ic|arch-chroot /mnt mkinitcpio -p linux}}<br />
# unmount the things you mounted in step 3<br />
# reboot!</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Xfce&diff=199898Xfce2012-05-01T10:59:40Z<p>Foutrelis: /* Clock/notification area no longer pushed to the right edge of the panel in Xfce 4.10 */</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[tr:Xfce_Masaüstü_Ortamı]]<br />
{{i18n|Xfce}}<br />
[[de:Xfce]]<br />
[[fr:Xfce]]<br />
[[pl:XFCE]]<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Xfce is a lightweight desktop environment for Unix-like operating systems. It aims to be fast and lightweight, while still being visually appealing and user friendly. This article covers its installation, configuration, and troubleshooting.}}<br />
{{Article summary text|Xfce uses the [[GTK+]] toolkit.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Graphical user interface overview}}}}<br />
{{Article summary end}}<br />
<br />
From [http://www.xfce.org/about/ Xfce - About]:<br />
<br />
:''Xfce embodies the traditional UNIX philosophy of modularity and re-usability. It consists of a number of components that provide the full functionality one can expect of a modern desktop environment. They are packaged separately and you can pick among the available packages to create the optimal personal working environment.''<br />
<br />
== What is Xfce? ==<br />
Xfce is a Desktop Environment, like [[GNOME]] or [[KDE]]. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit, and contains its own development environment (libraries, daemons, etc), similar to other big DEs.<br />
<br />
==Features==<br />
{{expansion}}<br />
*Lighter on resources than the other major DEs (KDE, GNOME).<br />
*Most settings are exposed via a GUI, Xfce does not try to hide stuff from the user.<br />
*Xfwm has an optional built-in compositor which allows for true transparency and all the benefits of GPU acceleration (minimizes tearing, etc.).<br />
*It works great with multiple monitors.<br />
*Xfce4 is stable, mature software.<br />
<br />
==Installation==<br />
<br />
Before starting, make sure you have the [[Xorg|X server]] installed and configured correctly.<br />
<br />
{{Note|Xfce is somewhat modular. That means there is no need for you to run every part, you can pick and choose some of them.}}<br />
<br />
The base Xfce system can be [[pacman|installed]] with the group {{Grp|xfce4}}, available in the [[Official Repositories]]. Pacman will ask you to select the packages to install, but you probably want to get them all by simply pressing {{Keypress|Enter}}. Additional packages, like panel plugins, are available in the {{Grp|xfce4-goodies}} group. If you wish to admire 'Tips and Tricks' on login, install the {{Pkg|fortune-mod package}}.<br />
<br />
{{Tip|Installing [[Gamin]] (the successor of [[FAM]]) is highly recommended.}}<br />
<br />
In order to get the xfce4-mixer to work with [[ALSA]], you need to install {{Pkg|gstreamer0.10-base-plugins}}. See [[#OSS|below]] for help with [[OSS]].<br />
<br />
== Running Xfce ==<br />
<br />
===Automatically at boot time===<br />
There are two methods to start Xfce (and in fact, any desktop or window manager) at boot time:<br />
<br />
* Run Xfce through a Display Manager<br />
* Run Xfce automatically using [[Bash#Configuration_file_overview|bash_profile]] or [[inittab]]<br />
<br />
See [[Display Manager]] for details about installing and configuring a Display Manager (be sure to configure it properly for [[PolicyKit]]). See [[Start X at Boot]] for configuration instructions on using bash_profile or inittab.<br />
<br />
===Manually===<br />
<br />
You can execute:<br />
$ startxfce4<br />
from the console, or configure [[xinitrc]] and use xinit or startx.<br />
<br />
If you have not created a {{ic|~/.xinitrc}} yet, do so with:<br />
<br />
$ cp /etc/skel/.xinitrc ~/.xinitrc<br />
<br />
and add the following line:<br />
<br />
exec ck-launch-session startxfce4<br />
<br />
Example:<br />
{{hc|~/.xinitrc|<nowiki>#!/bin/sh<br />
<br />
if [ -d /etc/X11/xinit/xinitrc.d ]; then<br />
for f in /etc/X11/xinit/xinitrc.d/*; do<br />
[ -x "$f" ] && . "$f"<br />
done<br />
unset f<br />
fi<br />
<br />
exec ck-launch-session startxfce4</nowiki>}}<br />
<br />
{{Note|<br />
*{{ic|ck-launch-session}} starts a clean ConsoleKit session needed by Xfce for power management, automounting, shutting down, rebooting, etc. ConsoleKit/PolicyKit capable display managers such as gdm do this for you automatically.<br />
*{{pkg|xorg-xdm}} is also ConsoleKit/PolicyKit capable since version 1.1.11. Unless you happen to run an old version, you must '''no''' longer include {{ic|ck-launch-session}} from your .xinitrc or .xsession for xdm.<br />
*In case you are wondering, {{ic|dbus-launch}} will be launched by the {{ic|xinitrc.d}} code at the beginning of the file. {{ic|dbus-launch}} starts a dbus-daemon instance to provide communication with PolicyKit.<br />
*The proper command for launching Xfce is {{ic|startxfce4}}: do not start {{ic|xfce4-session}} directly, since it is already run by {{ic|startxfce4}} itself.}}<br />
{{Note|{{ic|dbus-launch}} should actually be called '''after''' ck-launch-session, otherwise there will be authorization problems when mounting disks as a regular user, see {{Bug|25031}}. For a '''temporary''' workaround you can comment out the {{ic|xinitrc.d}} script at the beginning of the file and '''keep an eye on the evolution of the bug report''' (and possibly voting it).<br />
{{hc|~/.xinitrc [temporary workaround]|<nowiki>#!/bin/sh<br />
<br />
#if [ -d /etc/X11/xinit/xinitrc.d ]; then<br />
# for f in /etc/X11/xinit/xinitrc.d/*; do<br />
# [ -x "$f" ] && . "$f"<br />
# done<br />
# unset f<br />
#fi<br />
<br />
exec ck-launch-session startxfce4</nowiki>}}<br />
There is still no need to start {{ic|dbus-launch}} explicitly since {{ic|startxfce4}} takes care of doing that anyway.}}<br />
<br />
===Shutting down, rebooting, and automounting from within Xfce===<br />
* Make sure that '''dbus''' is enabled in the {{ic|DAEMONS}} array in {{ic|/etc/rc.conf}}.<br />
* If a display manager is used:<br />
** Make sure that you are using {{ic|exec ck-launch-session startxfce4}} in {{ic|~/.xinitrc}} (along with sourcing xinitrc.d scripts, which is done for you in the skel file) '''or''' a ConsoleKit/PolicyKit capable [[display manager]].<br />
* If no display manager is used:<br />
** Make sure you use the bash_profile method to auto-login (not inittab).<br />
** For automounting to work the default Policykit has to be [https://bbs.archlinux.org/viewtopic.php?pid=881377#p881377 edited]. You can also install {{pkg|polkit-gnome}} for authorization.<br />
* If you want to automount removable disk in thunar, install {{pkg|thunar-volman}} and {{pkg|gamin}}, and make sure {{pkg|gvfs}} and {{pkg|gvfs-afc}} is installed, see [https://bbs.archlinux.org/viewtopic.php?id=119992 details] .<br />
<br />
==Tips==<br />
===Panel===<br />
====How to customize xfce panel background====<br />
Edit {{ic|~/.gtkrc-2.0}}.<br />
Note that you must place the image in the same directory as the configuration, which is {{ic|~/}}. You can not specify the path to the image, or it will not work.<br />
style "panel-background" {<br />
bg_pixmap[NORMAL] = "foo.bar"<br />
bg_pixmap[PRELIGHT] = "foo.bar"<br />
bg_pixmap[ACTIVE] = "foo.bar"<br />
bg_pixmap[SELECTED] = "foo.bar"<br />
bg_pixmap[INSENSITIVE] = "foo.bar"<br />
}<br />
widget_class "*Panel*" style "panel-background"<br />
<br />
==== Replacements for the default 'menu' panel applet ====<br />
The "Ubuntu System Panel" (GNOME) panel applet has similar features to those found in its KDE v4.2 equivalent. It can be added to an Xfce panel via the 'XfApplet' panel applet, which allows GNOME applets to be used in Xfce.<br />
<br />
It is available in the [[Arch User Repository|AUR]] as the {{AUR|usp2}} package.<br />
<br />
====How to remove menu entries from the System menu====<br />
===== Method 1 =====<br />
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:<br />
# Open Terminal (Xfce menu > System > Terminal) and go to the {{ic|/usr/share/applications}} folder: {{bc|$ cd /usr/share/applications}}<br />
# This folder should be full of {{ic|.desktop}} files. To see a list type: {{bc|$ ls}}<br />
# Add {{ic|1=NoDisplay=true}} to the {{ic|.desktop}} file. For example, if you want to hide Firefox, type in the terminal:{{bc|1=$ sudo sh -c 'echo "NoDisplay=true" >> firefox.desktop'}} This command appends the text {{ic|1=NoDisplay=true}} to the end of the {{ic|.desktop}} file.<br />
<br />
===== Method 2 =====<br />
Another method is to copy the entire contents of the global applications directory over to your local applications directory, and then proceed to modify and/or disable unwanted .desktop entries. This will survive application updates that overwrite changes under {{ic|/usr/share/applications/}}.<br />
# In a terminal, copy everything from {{ic|/usr/share/applications}} to {{ic|~/.local/share/applications/}}: {{bc|$ cp /usr/share/applications/* ~/.local/share/applications/}}<br />
# For any entry you wish to hide from the menu, add the {{ic|1=NoDisplay=true}} option: {{bc|1=$ echo "NoDisplay=true" >> ~/.local/share/applications/foo.desktop}}<br />
<br />
You can also edit the application's category by editing the {{ic|.desktop}} file with a text editor and modifying the {{ic|1=Categories=}} line.<br />
<br />
===== Method 3 =====<br />
The third method is the '''cleanest''' and recommended in the [http://wiki.xfce.org/howto/customize-menu Xfce wiki].<br />
<br />
Create the file {{ic|~/.config/menus/xfce-applications.menu}} and copy the folowing in it:<br />
{{bc|<nowiki><br />
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"<br />
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"><br />
<br />
<Menu><br />
<Name>Xfce</Name><br />
<MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile><br />
<br />
<Exclude><br />
<Filename>xfrun4.desktop</Filename><br />
<br />
<Filename>exo-terminal-emulator.desktop</Filename><br />
<Filename>exo-file-manager.desktop</Filename><br />
<Filename>exo-mail-reader.desktop</Filename><br />
<Filename>exo-web-browser.desktop</Filename><br />
<br />
<Filename>xfce4-about.desktop</Filename><br />
<Filename>xfhelp4.desktop</Filename><br />
</Exclude><br />
<br />
<Layout><br />
<Merge type="all"/><br />
<Separator/><br />
<br />
<Menuname>Settings</Menuname><br />
<Separator/><br />
<br />
<Filename>xfce4-session-logout.desktop</Filename><br />
</Layout><br />
<br />
</Menu><br />
</nowiki>}}<br />
<br />
The {{ic|<MergeFile>}} tag includes the default Xfce menu in our file. This is important.<br />
<br />
The {{ic|<Exclude>}} tag excludes applications which we do not want to appear in the menu. Here we excluded some Xfce default shortcuts, but you can exclude {{ic|firefox.desktop}} or any other application.<br />
<br />
The {{ic|<Layout>}} tag defines the layout of the menu. The applications can be organized in folders or however we wish. For more details see the aforementioned Xfce wiki page.<br />
===== Method 4 =====<br />
Alternatively a tool called [http://lxmed.sourceforge.net/ lxmed] can be used. Lxmed is a GUI tool written in Java for editing menu entires in LXDE, but it also works in Xfce4. Lxmed is available in the {{AUR|lxmed}} package from the [[AUR]].<br />
<br />
==== But what do you do with menu entries which do not show up in /usr/share/applications (e.g., apps installed via Wine)? ==== <br />
I have found some shortcuts that show in the category “Other” in this directory:<br />
{{ic|~/.local/share/applications/wine/}}.<br />
<br />
====Panel autohide delay====<br />
Add this to {{ic|~/.gtkrc-2.0}}.<br />
style "xfce-panel-window-style"<br />
{<br />
# Time in miliseconds before the panel will unhide on an enter event<br />
XfcePanelWindow::popup-delay = 225<br />
<br />
# Time in miliseconds before the panel will hide on a leave event<br />
XfcePanelWindow::popdown-delay = 350<br />
}<br />
class "XfcePanelWindow" style "xfce-panel-window-style"<br />
<br />
====Panel at desktop level====<br />
<br />
If you want a panel at desktop level (i.e., other windows will stack over it) you need a little hack, ensure you have installed the '''wmctrl''' package.<br />
<br />
Create a script in {{ic|~/.config/xfce4/fixpanels.sh}} with this content and make it executable (you can use {{ic|chmod 755 fixpanels.sh}}).<br />
<br />
#!/bin/bash<br />
set -e<br />
<br />
function getPanelIdImpl() {<br />
# get panel id<br />
PANEL="`wmctrl -l | sed -n -e '/ xfce4-panel$/ s_ .*$__ p' | sed -n -e $1' p'`"<br />
}<br />
<br />
function getPanelId() {<br />
# eventually await the panel to appear<br />
getPanelIdImpl $1<br />
while [ x = x$PANEL ] ;do<br />
sleep 0.5s<br />
getPanelIdImpl $1<br />
done<br />
}<br />
<br />
function putPanelDown() {<br />
PANEL=""<br />
getPanelId $1<br />
wmctrl -i -r $PANEL -b add,below<br />
}<br />
<br />
#Uncomment here the panels you want to put at desktop level. <br />
#putPanelDown 1<br />
#putPanelDown 2<br />
<br />
Once wrote the script, and tested it, you need to auto-execute it at each login. You can use the {{ic|Session and StartUp -> Application Autostart}} gui.<br />
<br />
This passage will put your panels at desktop level, but if your panel is sticking to a border the maximized windows will not stack over it. You can enable this behavior with the following command, fortunately you need to do this only once. (change the $ID with the panel number of interest)<br />
<br />
xfconf-query -c xfce4-panel -p /panels/panel-$ID/disable-struts -n -t bool -s true<br />
<br />
=== Desktop ===<br />
<br />
==== Use a transparent background for desktop icon titles ====<br />
To change the default white background of desktop icon titles to something more suitable, edit the {{ic|.gtkrc-2.0}} file in your home directory (or create the file if needed) and add the following:<br />
style "xfdesktop-icon-view" {<br />
XfdesktopIconView::label-alpha = 10<br />
base[NORMAL] = "#000000"<br />
base[SELECTED] = "#71B9FF"<br />
base[ACTIVE] = "#71FFAD"<br />
fg[NORMAL] = "#ffffff"<br />
fg[SELECTED] = "#71B9FF"<br />
fg[ACTIVE] = "#71FFAD" }<br />
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"<br />
<br />
==== Hide selected partitions on the desktop ====<br />
If you wish to prevent certain partitions or drives appearing on the desktop, you can create a udev rule, for example {{ic|/etc/udev/rules.d/10-local.rules}}:<br />
<br />
KERNEL=="sda1", ENV{UDISKS_IGNORE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_IGNORE}="1"<br />
<br />
Would show all partitions with the exception of sda1 and sda2 on your desktop.<br />
<br />
==== Switch to old desktop right click menu without Thunar things ====<br />
xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0<br />
<br />
==== Adding the kill window shortcut ====<br />
<br />
Xfce does not support the ''kill window'' shortcut directly, but you can add one with a simple script. Ensure you have the '''xorg-xkill''' package installed.<br />
<br />
Create a script in {{ic|~/.config/xfce4/killwindow.sh}} with this content and make it executable (you can use {{ic|chmod 755 killwindow.sh}}).<br />
<br />
xkill -id "`xprop -root -notype | sed -n '/^_NET_ACTIVE_WINDOW/ s/^.*# *\|\,.*$//g p'`"<br />
<br />
Now associate a shortcut using {{ic|Settings -> Keyboard}} to that script.<br />
<br />
=== XFWM4 ===<br />
==== How to enable the compositor in Xfce ====<br />
Xfce comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on. It can be enabled in the Window Manager Tweaks and works on the fly. No additional settings are needed in your {{ic|/etc/xorg.conf}}. To enable and adjust settings, go to:<br />
<br />
Menu --> Settings --> Window Manager Tweaks<br />
<br />
==== Disable window roll-up ====<br />
xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false<br />
<br />
=== Commands for the settings manager ===<br />
<br />
There is no official documentation for the commands executed. One must look at {{ic|.desktop}} files {{ic|/usr/share/applications/}} folder. For the people who like to know exactly what is happening, here is a handy list to save the effort:<br />
<br />
xfce4-accessibility-settings<br />
xfce4-power-manager-settings<br />
xfce4-settings-editor<br />
xfdesktop-settings<br />
xfce4-display-settings<br />
xfce4-keyboard-settings<br />
xfce4-mouse-settings<br />
xfce4-session-settings<br />
xfce4-settings-manager<br />
xfce4-appearance-settings<br />
xfwm4-settings<br />
xfwm4-tweaks-settings<br />
xfwm4-workspace-settings<br />
orage -p<br />
<br />
To review all the available setting manager commands run the following in a terminal:<br />
<br />
$ grep '^Exec=' /usr/share/applications/xfce*settings* | sed -e 's_^.*=_ _'<br />
<br />
===Session===<br />
====Customizing Startup Applications====<br />
This includes getting necessary environment variables into the GUI runtime.<br />
<br />
* Copy the file {{ic|/etc/xdg/xfce4/xinitrc}} to {{ic|~/.config/xfce4/}}<br />
* Edit this file. For example, you can add something like this somehwere in the middle:<br />
source $HOME/.bashrc<br />
# start rxvt-unicode server<br />
urxvtd -q -o -f<br />
<br />
====Switch between users====<br />
It is possible to switch between X sessions thanks to [http://goodies.xfce.org/projects/panel-plugins/xfswitch-plugin xfswitch-plugin ]. It adds an icon to the Xfce panel, and requires gdm to work at the moment.<br />
<br />
xfswitch-plugin is available through [https://aur.archlinux.org/packages.php?ID=40677 AUR ]<br />
<br />
==== Modify XML settings files directly ====<br />
It may be useful, especially when upgrading, to manually edit .xml files in the {{ic|~/.config/xfce4/xfconf/}} folder. For application keyboard shortcuts for example, the file is {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml}}. It is faster to copy and paste the XML keys that you want rather than using the GUI.<br />
<br />
===Removable Devices===<br />
If you want an icon appearing on your desktop and in thunar when you plug in external devices, make sure gvfs is installed:<br />
<br />
# pacman -S --needed gvfs<br />
<br />
You could also need to install gvfs-afc (read [https://bbs.archlinux.org/viewtopic.php?pid=889018 this discussion]):<br />
<br />
# pacman -S gvfs-afc<br />
<br />
It is also a good idea to install thunar-volman (included in the {{ic|xfce4-goodies}} group):<br />
<br />
# pacman -S thunar-volman<br />
<br />
Udisk and a udisk wrapper are recommended if you want to automount optical and external drives easily<br />
<br />
* [http://igurublog.wordpress.com/downloads/script-devmon/ devmon] - devmon ([https://aur.archlinux.org/packages.php?ID=45842 AUR]) is a configuration-less bash wrapper script for udisks which automounts optical discs and removable drives. It can also selectively autostart apps or execute commands after mounting, ignore specified devices and volume labels, and unmount removable drives.<br />
<br />
===How to add themes to XFCE===<br />
1. Go to [http://www.xfce-look.org www.xfce-look.org] and click "Themes" in the left navbar. Look around for a theme you want and click "Download".<br />
<br />
2. Go to the directory where you downloaded the tarball/file and extract it using Squeeze/Xarchiver/CLI.<br />
<br />
3. Move the extracted folder to {{ic|/usr/share/themes}} (for all users) or {{ic|~/.themes}} (for just you). Inside {{ic|/usr/share/themes/abc}}, there is a folder that you create called xfwm4 that will contain whatever files that is included with that theme.<br />
<br />
4. GTK theme is available here:<br />
Menu --> Settings --> Appearance<br />
You select your xfwm theme in:<br />
Menu --> Settings --> Window Manager<br />
<br />
=== Cursors ===<br />
Main article: [[X11 Cursors]]<br />
<br />
If you have alternative X cursor themes installed, Xfce can find them with:<br />
Menu --> Settings --> Mouse --> Theme<br />
<br />
=== Icons ===<br />
1. First find and download your desired icon pack. Recommended places to download icons from are [http://www.customize.org Customize.org], [http://opendesktop.org Opendesktop.org] and [http://xfce-look.org/ Xfce-look.org].<br />
<br />
2. Go to the directory where you downloaded the icon pack and extract it. Example {{ic|tar -xzf /home/user/downloads/icon-pack.tar.gz}}.<br />
<br />
3. Move the extracted folder containing the icons to {{ic|/usr/share/icons}} (if you want all users on the system to make use of the icons) or {{ic|~/.icons}} (if only you want to use the icons).<br />
<br />
Optional: run {{ic|gtk-update-icon-cache -f -t ~/.icons/<theme_name>}} to update icon cache<br />
<br />
4. Switch your icons by going to:<br />
Menu --> Settings --> Appearance --> Icons<br />
<br />
When you have icon theme problems, it's also recommended to install the {{Pkg|hicolor-icon-theme}} package if it wasn't already installed.<br />
<br />
=== Fonts ===<br />
<br />
If you find the standard fonts rather thick and or slightly out of focus open Settings>Appearence click on the Fonts tab and under Hinting: change to Full<br />
<br />
You could also try using a custom DPI setting.<br />
<br />
=== Sound ===<br />
<br />
==== Configuring xfce4-mixer ====<br />
<br />
{{Pkg|xfce4-mixer}} is the GUI mixer app / panel plugin made by the Xfce team. It is part of the xfce4 group, so you probably already have it installed. Xfce 4.6 uses {{Pkg|gstreamer}} as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer. One or more of the gstreamer plugin packages listed as optional dependencies to xfce4-mixer must be installed. Without one of these required plugins packages, the following error arises when clicking on the mixer panel item.<br />
<br />
GStreamer was unable to detect any sound devices. Some sound system specific GStreamer packages may be missing. It may also be a permissions problem.<br />
<br />
(It is probably not a permissions problem. It is no longer required to add audio users to the "audio" group.) Which plugins are needed depends on the hardware. Most people should be fine with {{Pkg|gstreamer0.10-base-plugins}}. <br />
<br />
pacman -S gstreamer0.10-base-plugins<br />
<br />
If the xfce4-mixer panel item was already running before one of the plugins packages was installed, logout and login to see if it worked, or just remove the mixer plugin from the panel and add it again. If that doesn't work, you might need more or different gstreamer plugins. Try to install gstreamer0.10-good-plugins or gstreamer0.10-bad-plugins.<br />
<br />
pacman -S gstreamer0.10-good-plugins<br />
<br />
pacman -S gstreamer0.10-bad-plugins<br />
<br />
For further details, for example how to set the default sound card, see [[Advanced Linux Sound Architecture]]. Alternatively you can use [[PulseAudio]] together with {{Pkg|pavucontrol}}.<br />
<br />
==== How do I get xfce4-mixer and OSS4 to work together? ====<br />
<br />
If you tried the above section to get {{Pkg|xfce4-mixer}} to work and it does not work at all, then you may have to compile gstreamer0.10-good-plugins yourself. Download the PKGBUILD and other files needed from ABS or [http://projects.archlinux.org/svntogit/packages.git/tree/gstreamer0.10-good/repos here], edit the PKGBUILD, add --enable-oss. <br />
<br />
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \<br />
'''--enable-oss \'''<br />
--disable-static --enable-experimental \<br />
--disable-schemas-install \<br />
--disable-hal \<br />
--with-package-name="GStreamer Good Plugins (Archlinux)" \<br />
--with-package-origin="http://www.archlinux.org/"<br />
<br />
and then run makepkg -i. <br />
<br />
makepkg -i<br />
<br />
Still not working? Try this package in AUR [https://aur.archlinux.org/packages.php?ID=17024 gstreamer0.10-good-plugins-ossv4], modify the pkgver to the newest in the PKGBUILD, and it should work.<br />
<br />
Other LINKS: [http://www.4front-tech.com/forum/ OSS forum]<br />
<br />
==== Change volume with keyboard volume buttons ====<br />
<br />
Go to <br />
Settings --> Keyboard<br />
Click the "Application Shortcuts" tab and add click the "Add" button. Add the following by entering the command, then pressing the corresponding button at the next window:<br />
<br />
===== ALSA =====<br />
For the raise volume button:<br />
amixer set Master 5%+<br />
For the lower volume button:<br />
amixer set Master 5%-<br />
For the mute button:<br />
amixer set Master toggle<br />
<br />
You can also run these commands to set the above commands to the standard XF86Audio keys:<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioRaiseVolume -n -t string -s "amixer set Master 5%+"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioLowerVolume -n -t string -s "amixer set Master 5%-"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioMute -n -t string -s "amixer set Master toggle"<br />
<br />
If {{ic|amixer set Master toggle}} does not work, try the PCM channel ({{ic|amixer set PCM toggle}}) instead.<br />
<br />
The channel must have a "mute" option for the toggle command to work. To check whether or not your Master channel supports toggling mute, run {{ic|alsamixer}} in a terminal and look for the double M's (MM) under the Master channel. If they are not present, then it does not support the mute option. If, for example, you had to change the toggle button to use the PCM channel, make sure to also set the PCM channel as the Mixer Track under Xfce Mixer properties.<br />
<br />
===== OSS =====<br />
Use one of these scripts: http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS<br />
<br />
If using ossvol (recommended), add:<br />
ossvol -i 1<br />
for the volume up button<br />
ossvol -d 1<br />
for the volume down button<br />
ossvol -t<br />
for the mute/unmute button<br />
<br />
===== Xfce4-volumed =====<br />
<br />
[https://aur.archlinux.org/packages.php?ID=31693 xfce4-volumed] daemon from the [[AUR]] automatically maps volume keys of your keyboard to Xfce-mixer. Additionally you get OSD through Xfce4-notifyd when changing volume. Xfce4-volumed does not need any configuration and is started automatically with Xfce.<br />
<br />
{{accuracy|reason=There should be a short explanation of what this does and why it fixes the issue (bug?).}}<br />
<br />
If you use pulseaudio and xfce4-volumed unmute doesn't work, try this:<br />
<br />
$ xfconf-query -c xfce4-mixer -p /active-card -s `xfconf-query -c xfce4-mixer -p /sound-card`<br />
<br />
=== Screenshots ===<br />
<br />
==== Using print-screen key ====<br />
<br />
A simple way is to use a command-line screenshot utility:<br />
<br />
# pacman -S scrot<br />
<br />
Then go to:<br />
<br />
XFCE Menu --> Settings --> Keyboard >>> Application Shortcuts.<br />
<br />
Add the "scrot" command to use the "PrintScreen" key.<br />
<br />
All screenshots will be placed in your home folder with unique names (i.e. {{ic|2009-02-19-063052_1280x1024_scrot.png}}).<br />
<br />
====Screenshooter====<br />
<br />
There is also an a screenshot plugin for the Xfce panel, which can be used instead of scrot, that is available in extra:<br />
<br />
# pacman -S xfce4-screenshooter<br />
<br />
You can add a keyboard binding for it using the command<br />
<br />
xfce4-screenshooter -f<br />
<br />
instead of "scrot". You will get a dialog window after pressing "Print" where you can copy the image to the clipboard or save it.<br />
<br />
=== Change mount options ===<br />
<br />
A common problem when automounting USB sticks formatted with fat filesystem is the inability to properly show characters as umlauts, ñ, ß, etc. This may be solved changing the default iocharset to utf8, which is easily done adding a line to {{ic|/etc/xdg/xfce4/mount.rc}}:<br />
<br />
[vfat]<br />
uid=<auto><br />
shortname=winnt<br />
'''utf8=true'''<br />
# FreeBSD specific option<br />
longnames=true<br />
<br />
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files. Be careful.<br />
<br />
It is also recommendable to mount vfat devices with the '''flush''' option, so that when copying to USB sticks data flushes more often, thus making thunar's progress bar to stays up until things are on the disk.<br />
<br />
[vfat]<br />
flush=true<br />
<br />
===Terminal tango color theme===<br />
Open with your favorite editor<br />
<br />
~/.config/Terminal/terminalrc<br />
<br />
And add(replace) this lines:<br />
<br />
ColorForeground=White<br />
ColorBackground=#323232323232<br />
ColorPalette1=#2e2e34343636<br />
ColorPalette2=#cccc00000000<br />
ColorPalette3=#4e4e9a9a0606<br />
ColorPalette4=#c4c4a0a00000<br />
ColorPalette5=#34346565a4a4<br />
ColorPalette6=#757550507b7b<br />
ColorPalette7=#060698989a9a<br />
ColorPalette8=#d3d3d7d7cfcf<br />
ColorPalette9=#555557575353<br />
ColorPalette10=#efef29292929<br />
ColorPalette11=#8a8ae2e23434<br />
ColorPalette12=#fcfce9e94f4f<br />
ColorPalette13=#72729f9fcfcf<br />
ColorPalette14=#adad7f7fa8a8<br />
ColorPalette15=#3434e2e2e2e2<br />
ColorPalette16=#eeeeeeeeecec<br />
<br />
== Troubleshooting ==<br />
<br />
=== User directories (Desktop, Images, etc...) are still in English ===<br />
If your primary language isn't English, you may need to force Xfce changing the name of the user directories buy modifying/creting the two following files (this exemple is for French):<br />
<br />
{{ic|~/.config/user-dirs.locale}}<br />
fr_FR<br />
{{ic|~/.config/user-dirs.dirs}}<br />
XDG_DESKTOP_DIR="$HOME/Bureau"<br />
XDG_DOWNLOAD_DIR="$HOME/Téléchargements"<br />
XDG_TEMPLATES_DIR="$HOME/Exemples"<br />
XDG_PUBLICSHARE_DIR="$HOME/Public"<br />
XDG_DOCUMENTS_DIR="$HOME/Documents"<br />
XDG_MUSIC_DIR="$HOME/Musiques"<br />
XDG_PICTURES_DIR="$HOME/Images"<br />
XDG_VIDEOS_DIR="$HOME/Vidéos"<br />
<br />
=== Unable to open external windows partitions ===<br />
If you have external partitions like a fat32 drive connected via eSata, and launching them from the desktop results in a dialog telling you 'Authentication is required', you need to ensure polkit-gnome is installed and PolicyKit Authentication Agent is started by xfce4.<br />
pacman -S polkit-gnome<br />
Restart xfce4 and go:<br />
Applications Menu > Settings > Sessions and Startup<br />
Check that PolicyKit Authentication Agent is enabled under the Application Autostart tab.<br />
<br />
=== xfce4-power-manager is not working ===<br />
Check you have added dbus to the {{ic|DAEMONS}} array in {{ic|/etc/[[rc.conf]]}}.<br />
<br />
=== Keyboard shortcuts are not working ===<br />
Under Xfce 4.6 there is a problem where the user's [http://bugzilla.xfce.org/show_bug.cgi?id=5639 keyboard shortcuts will intermittently not work]. This is usually the case when the settings helper is either not running or has been started improperly due to a conflict. This bug has been fixed in Xfce 4.8, which replaced 4.6 in the main repositories.<br />
<br />
A workaround is to disable ''xfce4-settings-helper-autostart'' from autostarting in a user's session. The settings helper daemon will start upon loading an Xfce session, anyways. The following two steps seem to have resolved this issue.<br />
<br />
Remove or rename the global autostart .desktop file:<br />
mv /etc/xdg/autostart/xfce4-settings-helper-autostart.desktop /etc/xdg/autostart/xfce4-settings-helper-autostart.desktop.disabled<br />
<br />
Remove or rename the local autostart .desktop file:<br />
mv ~/.config/autostart/xfce4-settings-helper-autostart.desktop ~/.config/autostart/xfce4-settings-helper-autostart.desktop.disabled<br />
<br />
After logging out and logging back in, your shortcut keys should be working fine now.<br />
<br />
=== Xfce4-xkb-plugin settings issue ===<br />
There's a bug in version ''0.5.4.1-1'' which causes xkb-plugin to ''lose keyboard, layout switching and compose key'' settings. As a workaround you may enable ''Use system defaults'' option in keyboard settings. To do so run<br />
xfce4-keyboard-settings<br />
Go to ''Layout'' tab and set the ''Use system defaults'' flag, then reconfigure xkb-plugin.<br />
<br />
=== Thunar does not display any thumbnail ===<br />
<br />
Thunar relies on '''Tumbler''' to generate thumbnails. You can install Tumbler by issuing<br />
<br />
pacman -S tumbler<br />
<br />
More details in [[Thunar#Thunar_Thumbnailers|Thunar's page]].<br />
<br />
=== Locales ignored with GDM ===<br />
Become superuser and add your locale to /var/lib/AccountsService/users/$USER:<br />
su -c "nano /var/lib/AccountsService/users/$USER"<br />
Replace hu_HU.UTF-8 with your own locale:<br />
[User]<br />
Language=hu_HU.UTF-8<br />
XSession=xfce<br />
You may also do it with sed. Note the backslash before .UTF-8:<br />
su -c "sed -i 's/Language=.*/Language=hu_HU\.UTF-8/' /var/lib/AccountsService/users/$USER"<br />
Restart GDM to take effect.<br />
<br />
=== Restore default settings ===<br />
If for any reason you need to revert back to the default settings, try renaming {{ic|~/.config/xfce4-session/}} and {{ic|~/.config/xfce4/}}<br />
<br />
$ mv ~/.config/xfce4-session/ ~/.config/xfce4-session-bak<br />
$ mv ~/.config/xfce4/ ~/.config/xfce4-bak<br />
<br />
Logout and login for changes to take effect.<br />
<br />
=== NVIDIA and xfce4-sensors-plugin ===<br />
To detect and use sensors of nvidia gpu you need to install {{AUR|libxnvctrl}} and then recompile {{Pkg|xfce4-sensors-plugin}} package.<br />
<br />
=== Session failure ===<br />
If the window manager doesn't load correctly (The mouse is a X and you can't close windows) you maybe got an session error.<br />
To remove a corrupt session you can delete the session folder at the {{ic|.cache}} folder.<br />
# rm -r ~/.cache/sessions/<br />
The easy way to reload the session is to reboot the computer. You can also restart xfce.<br />
<br />
=== Clock/notification area no longer pushed to the right edge of the panel in Xfce 4.10 ===<br />
<br />
This is due to a change in the Window Buttons panel plugin which no longer expands to fill the available space.<br />
<br />
To emulate the old behavior, add a transparent separator between the window buttons and the clock/notification area, setting its expand property.<br />
<br />
== Related Articles ==<br />
* [[Thunar]]<br />
* [[Improve GTK Application Looks]]<br />
* [[Autostart applications#Graphical]]<br />
<br />
== External Resources ==<br />
* http://docs.xfce.org/ - The complete documentation.<br />
* [http://www.xfce-look.org/ Xfce-Look] - Themes, wallpapers, and more.<br />
* [http://xfce.wikia.com/wiki/Frequently_Asked_Questions Xfce Wikia] - How to edit the auto generated menu with the menu editor<br />
* [http://wiki.xfce.org Xfce Wiki]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Xfce&diff=199703Xfce2012-04-29T17:20:41Z<p>Foutrelis: /* Troubleshooting */</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[tr:Xfce_Masaüstü_Ortamı]]<br />
{{i18n|Xfce}}<br />
[[de:Xfce]]<br />
[[fr:Xfce]]<br />
[[pl:XFCE]]<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Xfce is a lightweight desktop environment for Unix-like operating systems. It aims to be fast and lightweight, while still being visually appealing and user friendly. This article covers its installation, configuration, and troubleshooting.}}<br />
{{Article summary text|Xfce uses the [[GTK+]] toolkit.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Graphical user interface overview}}}}<br />
{{Article summary end}}<br />
<br />
From [http://www.xfce.org/about/ Xfce - About]:<br />
<br />
:''Xfce embodies the traditional UNIX philosophy of modularity and re-usability. It consists of a number of components that provide the full functionality one can expect of a modern desktop environment. They are packaged separately and you can pick among the available packages to create the optimal personal working environment.''<br />
<br />
== What is Xfce? ==<br />
Xfce is a Desktop Environment, like [[GNOME]] or [[KDE]]. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit, and contains its own development environment (libraries, daemons, etc), similar to other big DEs.<br />
<br />
==Features==<br />
{{expansion}}<br />
*Lighter on resources than the other major DEs (KDE, GNOME).<br />
*Most settings are exposed via a GUI, Xfce does not try to hide stuff from the user.<br />
*Xfwm has an optional built-in compositor which allows for true transparency and all the benefits of GPU acceleration (minimizes tearing, etc.).<br />
*It works great with multiple monitors.<br />
*Xfce4 is stable, mature software.<br />
<br />
==Installation==<br />
<br />
Before starting, make sure you have the [[Xorg|X server]] installed and configured correctly.<br />
<br />
{{Note|Xfce is somewhat modular. That means there is no need for you to run every part, you can pick and choose some of them.}}<br />
<br />
The base Xfce system can be [[pacman|installed]] with the group {{Grp|xfce4}}, available in the [[Official Repositories]]. Pacman will ask you to select the packages to install, but you probably want to get them all by simply pressing {{Keypress|Enter}}. Additional packages, like panel plugins, are available in the {{Grp|xfce4-goodies}} group. If you wish to admire 'Tips and Tricks' on login, install the {{Pkg|fortune-mod package}}.<br />
<br />
{{Tip|Installing [[Gamin]] (the successor of [[FAM]]) is highly recommended.}}<br />
<br />
In order to get the xfce4-mixer to work with [[ALSA]], you need to install {{Pkg|gstreamer0.10-base-plugins}}. See [[#OSS|below]] for help with [[OSS]].<br />
<br />
== Running Xfce ==<br />
<br />
===Automatically at boot time===<br />
There are two methods to start Xfce (and in fact, any desktop or window manager) at boot time:<br />
<br />
* Run Xfce through a Display Manager<br />
* Run Xfce automatically using [[Bash#Configuration_file_overview|bash_profile]] or [[inittab]]<br />
<br />
See [[Display Manager]] for details about installing and configuring a Display Manager (be sure to configure it properly for [[PolicyKit]]). See [[Start X at Boot]] for configuration instructions on using bash_profile or inittab.<br />
<br />
===Manually===<br />
<br />
You can execute:<br />
$ startxfce4<br />
from the console, or configure [[xinitrc]] and use xinit or startx.<br />
<br />
If you have not created a {{ic|~/.xinitrc}} yet, do so with:<br />
<br />
$ cp /etc/skel/.xinitrc ~/.xinitrc<br />
<br />
and add the following line:<br />
<br />
exec ck-launch-session startxfce4<br />
<br />
Example:<br />
{{hc|~/.xinitrc|<nowiki>#!/bin/sh<br />
<br />
if [ -d /etc/X11/xinit/xinitrc.d ]; then<br />
for f in /etc/X11/xinit/xinitrc.d/*; do<br />
[ -x "$f" ] && . "$f"<br />
done<br />
unset f<br />
fi<br />
<br />
exec ck-launch-session startxfce4</nowiki>}}<br />
<br />
{{Note|<br />
*{{ic|ck-launch-session}} starts a clean ConsoleKit session needed by Xfce for power management, automounting, shutting down, rebooting, etc. ConsoleKit/PolicyKit capable display managers such as gdm do this for you automatically.<br />
*{{pkg|xorg-xdm}} is also ConsoleKit/PolicyKit capable since version 1.1.11. Unless you happen to run an old version, you must '''no''' longer include {{ic|ck-launch-session}} from your .xinitrc or .xsession for xdm.<br />
*In case you are wondering, {{ic|dbus-launch}} will be launched by the {{ic|xinitrc.d}} code at the beginning of the file. {{ic|dbus-launch}} starts a dbus-daemon instance to provide communication with PolicyKit.<br />
*The proper command for launching Xfce is {{ic|startxfce4}}: do not start {{ic|xfce4-session}} directly, since it is already run by {{ic|startxfce4}} itself.}}<br />
{{Note|{{ic|dbus-launch}} should actually be called '''after''' ck-launch-session, otherwise there will be authorization problems when mounting disks as a regular user, see {{Bug|25031}}. For a '''temporary''' workaround you can comment out the {{ic|xinitrc.d}} script at the beginning of the file and '''keep an eye on the evolution of the bug report''' (and possibly voting it).<br />
{{hc|~/.xinitrc [temporary workaround]|<nowiki>#!/bin/sh<br />
<br />
#if [ -d /etc/X11/xinit/xinitrc.d ]; then<br />
# for f in /etc/X11/xinit/xinitrc.d/*; do<br />
# [ -x "$f" ] && . "$f"<br />
# done<br />
# unset f<br />
#fi<br />
<br />
exec ck-launch-session startxfce4</nowiki>}}<br />
There is still no need to start {{ic|dbus-launch}} explicitly since {{ic|startxfce4}} takes care of doing that anyway.}}<br />
<br />
===Shutting down, rebooting, and automounting from within Xfce===<br />
* Make sure that '''dbus''' is enabled in the {{ic|DAEMONS}} array in {{ic|/etc/rc.conf}}.<br />
* If a display manager is used:<br />
** Make sure that you are using {{ic|exec ck-launch-session startxfce4}} in {{ic|~/.xinitrc}} (along with sourcing xinitrc.d scripts, which is done for you in the skel file) '''or''' a ConsoleKit/PolicyKit capable [[display manager]].<br />
* If no display manager is used:<br />
** Make sure you use the bash_profile method to auto-login (not inittab).<br />
** For automounting to work the default Policykit has to be [https://bbs.archlinux.org/viewtopic.php?pid=881377#p881377 edited]. You can also install {{pkg|polkit-gnome}} for authorization.<br />
* If you want to automount removable disk in thunar, install {{pkg|thunar-volman}} and {{pkg|gamin}}, and make sure {{pkg|gvfs}} and {{pkg|gvfs-afc}} is installed, see [https://bbs.archlinux.org/viewtopic.php?id=119992 details] .<br />
<br />
==Tips==<br />
===Panel===<br />
====How to customize xfce panel background====<br />
Edit {{ic|~/.gtkrc-2.0}}.<br />
Note that you must place the image in the same directory as the configuration, which is {{ic|~/}}. You can not specify the path to the image, or it will not work.<br />
style "panel-background" {<br />
bg_pixmap[NORMAL] = "foo.bar"<br />
bg_pixmap[PRELIGHT] = "foo.bar"<br />
bg_pixmap[ACTIVE] = "foo.bar"<br />
bg_pixmap[SELECTED] = "foo.bar"<br />
bg_pixmap[INSENSITIVE] = "foo.bar"<br />
}<br />
widget_class "*Panel*" style "panel-background"<br />
<br />
==== Replacements for the default 'menu' panel applet ====<br />
The "Ubuntu System Panel" (GNOME) panel applet has similar features to those found in its KDE v4.2 equivalent. It can be added to an Xfce panel via the 'XfApplet' panel applet, which allows GNOME applets to be used in Xfce.<br />
<br />
It is available in the [[Arch User Repository|AUR]] as the {{AUR|usp2}} package.<br />
<br />
====How to remove menu entries from the System menu====<br />
===== Method 1 =====<br />
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:<br />
# Open Terminal (Xfce menu > System > Terminal) and go to the {{ic|/usr/share/applications}} folder: {{bc|$ cd /usr/share/applications}}<br />
# This folder should be full of {{ic|.desktop}} files. To see a list type: {{bc|$ ls}}<br />
# Add {{ic|1=NoDisplay=true}} to the {{ic|.desktop}} file. For example, if you want to hide Firefox, type in the terminal:{{bc|1=$ sudo sh -c 'echo "NoDisplay=true" >> firefox.desktop'}} This command appends the text {{ic|1=NoDisplay=true}} to the end of the {{ic|.desktop}} file.<br />
<br />
===== Method 2 =====<br />
Another method is to copy the entire contents of the global applications directory over to your local applications directory, and then proceed to modify and/or disable unwanted .desktop entries. This will survive application updates that overwrite changes under {{ic|/usr/share/applications/}}.<br />
# In a terminal, copy everything from {{ic|/usr/share/applications}} to {{ic|~/.local/share/applications/}}: {{bc|$ cp /usr/share/applications/* ~/.local/share/applications/}}<br />
# For any entry you wish to hide from the menu, add the {{ic|1=NoDisplay=true}} option: {{bc|1=$ echo "NoDisplay=true" >> ~/.local/share/applications/foo.desktop}}<br />
<br />
You can also edit the application's category by editing the {{ic|.desktop}} file with a text editor and modifying the {{ic|1=Categories=}} line.<br />
<br />
===== Method 3 =====<br />
The third method is the '''cleanest''' and recommended in the [http://wiki.xfce.org/howto/customize-menu Xfce wiki].<br />
<br />
Create the file {{ic|~/.config/menus/xfce-applications.menu}} and copy the folowing in it:<br />
{{bc|<nowiki><br />
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"<br />
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"><br />
<br />
<Menu><br />
<Name>Xfce</Name><br />
<MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile><br />
<br />
<Exclude><br />
<Filename>xfrun4.desktop</Filename><br />
<br />
<Filename>exo-terminal-emulator.desktop</Filename><br />
<Filename>exo-file-manager.desktop</Filename><br />
<Filename>exo-mail-reader.desktop</Filename><br />
<Filename>exo-web-browser.desktop</Filename><br />
<br />
<Filename>xfce4-about.desktop</Filename><br />
<Filename>xfhelp4.desktop</Filename><br />
</Exclude><br />
<br />
<Layout><br />
<Merge type="all"/><br />
<Separator/><br />
<br />
<Menuname>Settings</Menuname><br />
<Separator/><br />
<br />
<Filename>xfce4-session-logout.desktop</Filename><br />
</Layout><br />
<br />
</Menu><br />
</nowiki>}}<br />
<br />
The {{ic|<MergeFile>}} tag includes the default Xfce menu in our file. This is important.<br />
<br />
The {{ic|<Exclude>}} tag excludes applications which we do not want to appear in the menu. Here we excluded some Xfce default shortcuts, but you can exclude {{ic|firefox.desktop}} or any other application.<br />
<br />
The {{ic|<Layout>}} tag defines the layout of the menu. The applications can be organized in folders or however we wish. For more details see the aforementioned Xfce wiki page.<br />
===== Method 4 =====<br />
Alternatively a tool called [http://lxmed.sourceforge.net/ lxmed] can be used. Lxmed is a GUI tool written in Java for editing menu entires in LXDE, but it also works in Xfce4. Lxmed is available in the {{AUR|lxmed}} package from the [[AUR]].<br />
<br />
==== But what do you do with menu entries which do not show up in /usr/share/applications (e.g., apps installed via Wine)? ==== <br />
I have found some shortcuts that show in the category “Other” in this directory:<br />
{{ic|~/.local/share/applications/wine/}}.<br />
<br />
====Panel autohide delay====<br />
Add this to {{ic|~/.gtkrc-2.0}}.<br />
style "xfce-panel-window-style"<br />
{<br />
# Time in miliseconds before the panel will unhide on an enter event<br />
XfcePanelWindow::popup-delay = 225<br />
<br />
# Time in miliseconds before the panel will hide on a leave event<br />
XfcePanelWindow::popdown-delay = 350<br />
}<br />
class "XfcePanelWindow" style "xfce-panel-window-style"<br />
<br />
====Panel at desktop level====<br />
<br />
If you want a panel at desktop level (i.e., other windows will stack over it) you need a little hack, ensure you have installed the '''wmctrl''' package.<br />
<br />
Create a script in {{ic|~/.config/xfce4/fixpanels.sh}} with this content and make it executable (you can use {{ic|chmod 755 fixpanels.sh}}).<br />
<br />
#!/bin/bash<br />
set -e<br />
<br />
function getPanelIdImpl() {<br />
# get panel id<br />
PANEL="`wmctrl -l | sed -n -e '/ xfce4-panel$/ s_ .*$__ p' | sed -n -e $1' p'`"<br />
}<br />
<br />
function getPanelId() {<br />
# eventually await the panel to appear<br />
getPanelIdImpl $1<br />
while [ x = x$PANEL ] ;do<br />
sleep 0.5s<br />
getPanelIdImpl $1<br />
done<br />
}<br />
<br />
function putPanelDown() {<br />
PANEL=""<br />
getPanelId $1<br />
wmctrl -i -r $PANEL -b add,below<br />
}<br />
<br />
#Uncomment here the panels you want to put at desktop level. <br />
#putPanelDown 1<br />
#putPanelDown 2<br />
<br />
Once wrote the script, and tested it, you need to auto-execute it at each login. You can use the {{ic|Session and StartUp -> Application Autostart}} gui.<br />
<br />
This passage will put your panels at desktop level, but if your panel is sticking to a border the maximized windows will not stack over it. You can enable this behavior with the following command, fortunately you need to do this only once. (change the $ID with the panel number of interest)<br />
<br />
xfconf-query -c xfce4-panel -p /panels/panel-$ID/disable-struts -n -t bool -s true<br />
<br />
=== Desktop ===<br />
<br />
==== Use a transparent background for desktop icon titles ====<br />
To change the default white background of desktop icon titles to something more suitable, edit the {{ic|.gtkrc-2.0}} file in your home directory (or create the file if needed) and add the following:<br />
style "xfdesktop-icon-view" {<br />
XfdesktopIconView::label-alpha = 10<br />
base[NORMAL] = "#000000"<br />
base[SELECTED] = "#71B9FF"<br />
base[ACTIVE] = "#71FFAD"<br />
fg[NORMAL] = "#ffffff"<br />
fg[SELECTED] = "#71B9FF"<br />
fg[ACTIVE] = "#71FFAD" }<br />
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"<br />
<br />
==== Hide selected partitions on the desktop ====<br />
If you wish to prevent certain partitions or drives appearing on the desktop, you can create a udev rule, for example {{ic|/etc/udev/rules.d/10-local.rules}}:<br />
<br />
KERNEL=="sda1", ENV{UDISKS_IGNORE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_IGNORE}="1"<br />
<br />
Would show all partitions with the exception of sda1 and sda2 on your desktop.<br />
<br />
==== Switch to old desktop right click menu without Thunar things ====<br />
xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0<br />
<br />
==== Adding the kill window shortcut ====<br />
<br />
Xfce does not support the ''kill window'' shortcut directly, but you can add one with a simple script. Ensure you have the '''xorg-xkill''' package installed.<br />
<br />
Create a script in {{ic|~/.config/xfce4/killwindow.sh}} with this content and make it executable (you can use {{ic|chmod 755 killwindow.sh}}).<br />
<br />
xkill -id "`xprop -root -notype | sed -n '/^_NET_ACTIVE_WINDOW/ s/^.*# *\|\,.*$//g p'`"<br />
<br />
Now associate a shortcut using {{ic|Settings -> Keyboard}} to that script.<br />
<br />
=== XFWM4 ===<br />
==== How to enable the compositor in Xfce ====<br />
Xfce comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on. It can be enabled in the Window Manager Tweaks and works on the fly. No additional settings are needed in your {{ic|/etc/xorg.conf}}. To enable and adjust settings, go to:<br />
<br />
Menu --> Settings --> Window Manager Tweaks<br />
<br />
==== Disable window roll-up ====<br />
xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false<br />
<br />
=== Commands for the settings manager ===<br />
<br />
There is no official documentation for the commands executed. One must look at {{ic|.desktop}} files {{ic|/usr/share/applications/}} folder. For the people who like to know exactly what is happening, here is a handy list to save the effort:<br />
<br />
xfce4-accessibility-settings<br />
xfce4-power-manager-settings<br />
xfce4-settings-editor<br />
xfdesktop-settings<br />
xfce4-display-settings<br />
xfce4-keyboard-settings<br />
xfce4-mouse-settings<br />
xfce4-session-settings<br />
xfce4-settings-manager<br />
xfce4-appearance-settings<br />
xfwm4-settings<br />
xfwm4-tweaks-settings<br />
xfwm4-workspace-settings<br />
orage -p<br />
<br />
To review all the available setting manager commands run the following in a terminal:<br />
<br />
$ grep '^Exec=' /usr/share/applications/xfce*settings* | sed -e 's_^.*=_ _'<br />
<br />
===Session===<br />
====Customizing Startup Applications====<br />
This includes getting necessary environment variables into the GUI runtime.<br />
<br />
* Copy the file {{ic|/etc/xdg/xfce4/xinitrc}} to {{ic|~/.config/xfce4/}}<br />
* Edit this file. For example, you can add something like this somehwere in the middle:<br />
source $HOME/.bashrc<br />
# start rxvt-unicode server<br />
urxvtd -q -o -f<br />
<br />
====Switch between users====<br />
It is possible to switch between X sessions thanks to [http://goodies.xfce.org/projects/panel-plugins/xfswitch-plugin xfswitch-plugin ]. It adds an icon to the Xfce panel, and requires gdm to work at the moment.<br />
<br />
xfswitch-plugin is available through [https://aur.archlinux.org/packages.php?ID=40677 AUR ]<br />
<br />
==== Modify XML settings files directly ====<br />
It may be useful, especially when upgrading, to manually edit .xml files in the {{ic|~/.config/xfce4/xfconf/}} folder. For application keyboard shortcuts for example, the file is {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml}}. It is faster to copy and paste the XML keys that you want rather than using the GUI.<br />
<br />
===Removable Devices===<br />
If you want an icon appearing on your desktop and in thunar when you plug in external devices, make sure gvfs is installed:<br />
<br />
# pacman -S --needed gvfs<br />
<br />
You could also need to install gvfs-afc (read [https://bbs.archlinux.org/viewtopic.php?pid=889018 this discussion]):<br />
<br />
# pacman -S gvfs-afc<br />
<br />
It is also a good idea to install thunar-volman (included in the {{ic|xfce4-goodies}} group):<br />
<br />
# pacman -S thunar-volman<br />
<br />
Udisk and a udisk wrapper are recommended if you want to automount optical and external drives easily<br />
<br />
* [http://igurublog.wordpress.com/downloads/script-devmon/ devmon] - devmon ([https://aur.archlinux.org/packages.php?ID=45842 AUR]) is a configuration-less bash wrapper script for udisks which automounts optical discs and removable drives. It can also selectively autostart apps or execute commands after mounting, ignore specified devices and volume labels, and unmount removable drives.<br />
<br />
===How to add themes to XFCE===<br />
1. Go to [http://www.xfce-look.org www.xfce-look.org] and click "Themes" in the left navbar. Look around for a theme you want and click "Download".<br />
<br />
2. Go to the directory where you downloaded the tarball/file and extract it using Squeeze/Xarchiver/CLI.<br />
<br />
3. Move the extracted folder to {{ic|/usr/share/themes}} (for all users) or {{ic|~/.themes}} (for just you). Inside {{ic|/usr/share/themes/abc}}, there is a folder that you create called xfwm4 that will contain whatever files that is included with that theme.<br />
<br />
4. GTK theme is available here:<br />
Menu --> Settings --> Appearance<br />
You select your xfwm theme in:<br />
Menu --> Settings --> Window Manager<br />
<br />
=== Cursors ===<br />
Main article: [[X11 Cursors]]<br />
<br />
If you have alternative X cursor themes installed, Xfce can find them with:<br />
Menu --> Settings --> Mouse --> Theme<br />
<br />
=== Icons ===<br />
1. First find and download your desired icon pack. Recommended places to download icons from are [http://www.customize.org Customize.org], [http://opendesktop.org Opendesktop.org] and [http://xfce-look.org/ Xfce-look.org].<br />
<br />
2. Go to the directory where you downloaded the icon pack and extract it. Example {{ic|tar -xzf /home/user/downloads/icon-pack.tar.gz}}.<br />
<br />
3. Move the extracted folder containing the icons to {{ic|/usr/share/icons}} (if you want all users on the system to make use of the icons) or {{ic|~/.icons}} (if only you want to use the icons).<br />
<br />
Optional: run {{ic|gtk-update-icon-cache -f -t ~/.icons/<theme_name>}} to update icon cache<br />
<br />
4. Switch your icons by going to:<br />
Menu --> Settings --> Appearance --> Icons<br />
<br />
When you have icon theme problems, it's also recommended to install the {{Pkg|hicolor-icon-theme}} package if it wasn't already installed.<br />
<br />
=== Fonts ===<br />
<br />
If you find the standard fonts rather thick and or slightly out of focus open Settings>Appearence click on the Fonts tab and under Hinting: change to Full<br />
<br />
You could also try using a custom DPI setting.<br />
<br />
=== Sound ===<br />
<br />
==== Configuring xfce4-mixer ====<br />
<br />
{{Pkg|xfce4-mixer}} is the GUI mixer app / panel plugin made by the Xfce team. It is part of the xfce4 group, so you probably already have it installed. Xfce 4.6 uses {{Pkg|gstreamer}} as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer. One or more of the gstreamer plugin packages listed as optional dependencies to xfce4-mixer must be installed. Without one of these required plugins packages, the following error arises when clicking on the mixer panel item.<br />
<br />
GStreamer was unable to detect any sound devices. Some sound system specific GStreamer packages may be missing. It may also be a permissions problem.<br />
<br />
(It is probably not a permissions problem. It is no longer required to add audio users to the "audio" group.) Which plugins are needed depends on the hardware. Most people should be fine with {{Pkg|gstreamer0.10-base-plugins}}. <br />
<br />
pacman -S gstreamer0.10-base-plugins<br />
<br />
If the xfce4-mixer panel item was already running before one of the plugins packages was installed, logout and login to see if it worked, or just remove the mixer plugin from the panel and add it again. If that doesn't work, you might need more or different gstreamer plugins. Try to install gstreamer0.10-good-plugins or gstreamer0.10-bad-plugins.<br />
<br />
pacman -S gstreamer0.10-good-plugins<br />
<br />
pacman -S gstreamer0.10-bad-plugins<br />
<br />
For further details, for example how to set the default sound card, see [[Advanced Linux Sound Architecture]]. Alternatively you can use [[PulseAudio]] together with {{Pkg|pavucontrol}}.<br />
<br />
==== How do I get xfce4-mixer and OSS4 to work together? ====<br />
<br />
If you tried the above section to get {{Pkg|xfce4-mixer}} to work and it does not work at all, then you may have to compile gstreamer0.10-good-plugins yourself. Download the PKGBUILD and other files needed from ABS or [http://projects.archlinux.org/svntogit/packages.git/tree/gstreamer0.10-good/repos here], edit the PKGBUILD, add --enable-oss. <br />
<br />
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \<br />
'''--enable-oss \'''<br />
--disable-static --enable-experimental \<br />
--disable-schemas-install \<br />
--disable-hal \<br />
--with-package-name="GStreamer Good Plugins (Archlinux)" \<br />
--with-package-origin="http://www.archlinux.org/"<br />
<br />
and then run makepkg -i. <br />
<br />
makepkg -i<br />
<br />
Still not working? Try this package in AUR [https://aur.archlinux.org/packages.php?ID=17024 gstreamer0.10-good-plugins-ossv4], modify the pkgver to the newest in the PKGBUILD, and it should work.<br />
<br />
Other LINKS: [http://www.4front-tech.com/forum/ OSS forum]<br />
<br />
==== Change volume with keyboard volume buttons ====<br />
<br />
Go to <br />
Settings --> Keyboard<br />
Click the "Application Shortcuts" tab and add click the "Add" button. Add the following by entering the command, then pressing the corresponding button at the next window:<br />
<br />
===== ALSA =====<br />
For the raise volume button:<br />
amixer set Master 5%+<br />
For the lower volume button:<br />
amixer set Master 5%-<br />
For the mute button:<br />
amixer set Master toggle<br />
<br />
You can also run these commands to set the above commands to the standard XF86Audio keys:<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioRaiseVolume -n -t string -s "amixer set Master 5%+"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioLowerVolume -n -t string -s "amixer set Master 5%-"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioMute -n -t string -s "amixer set Master toggle"<br />
<br />
If {{ic|amixer set Master toggle}} does not work, try the PCM channel ({{ic|amixer set PCM toggle}}) instead.<br />
<br />
The channel must have a "mute" option for the toggle command to work. To check whether or not your Master channel supports toggling mute, run {{ic|alsamixer}} in a terminal and look for the double M's (MM) under the Master channel. If they are not present, then it does not support the mute option. If, for example, you had to change the toggle button to use the PCM channel, make sure to also set the PCM channel as the Mixer Track under Xfce Mixer properties.<br />
<br />
===== OSS =====<br />
Use one of these scripts: http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS<br />
<br />
If using ossvol (recommended), add:<br />
ossvol -i 1<br />
for the volume up button<br />
ossvol -d 1<br />
for the volume down button<br />
ossvol -t<br />
for the mute/unmute button<br />
<br />
===== Xfce4-volumed =====<br />
<br />
[https://aur.archlinux.org/packages.php?ID=31693 xfce4-volumed] daemon from the [[AUR]] automatically maps volume keys of your keyboard to Xfce-mixer. Additionally you get OSD through Xfce4-notifyd when changing volume. Xfce4-volumed does not need any configuration and is started automatically with Xfce.<br />
<br />
{{accuracy|reason=There should be a short explanation of what this does and why it fixes the issue (bug?).}}<br />
<br />
If you use pulseaudio and xfce4-volumed unmute doesn't work, try this:<br />
<br />
$ xfconf-query -c xfce4-mixer -p /active-card -s `xfconf-query -c xfce4-mixer -p /sound-card`<br />
<br />
=== Screenshots ===<br />
<br />
==== Using print-screen key ====<br />
<br />
A simple way is to use a command-line screenshot utility:<br />
<br />
# pacman -S scrot<br />
<br />
Then go to:<br />
<br />
XFCE Menu --> Settings --> Keyboard >>> Application Shortcuts.<br />
<br />
Add the "scrot" command to use the "PrintScreen" key.<br />
<br />
All screenshots will be placed in your home folder with unique names (i.e. {{ic|2009-02-19-063052_1280x1024_scrot.png}}).<br />
<br />
====Screenshooter====<br />
<br />
There is also an a screenshot plugin for the Xfce panel, which can be used instead of scrot, that is available in extra:<br />
<br />
# pacman -S xfce4-screenshooter<br />
<br />
You can add a keyboard binding for it using the command<br />
<br />
xfce4-screenshooter -f<br />
<br />
instead of "scrot". You will get a dialog window after pressing "Print" where you can copy the image to the clipboard or save it.<br />
<br />
=== Change mount options ===<br />
<br />
A common problem when automounting USB sticks formatted with fat filesystem is the inability to properly show characters as umlauts, ñ, ß, etc. This may be solved changing the default iocharset to utf8, which is easily done adding a line to {{ic|/etc/xdg/xfce4/mount.rc}}:<br />
<br />
[vfat]<br />
uid=<auto><br />
shortname=winnt<br />
'''utf8=true'''<br />
# FreeBSD specific option<br />
longnames=true<br />
<br />
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files. Be careful.<br />
<br />
It is also recommendable to mount vfat devices with the '''flush''' option, so that when copying to USB sticks data flushes more often, thus making thunar's progress bar to stays up until things are on the disk.<br />
<br />
[vfat]<br />
flush=true<br />
<br />
===Terminal tango color theme===<br />
Open with your favorite editor<br />
<br />
~/.config/Terminal/terminalrc<br />
<br />
And add(replace) this lines:<br />
<br />
ColorForeground=White<br />
ColorBackground=#323232323232<br />
ColorPalette1=#2e2e34343636<br />
ColorPalette2=#cccc00000000<br />
ColorPalette3=#4e4e9a9a0606<br />
ColorPalette4=#c4c4a0a00000<br />
ColorPalette5=#34346565a4a4<br />
ColorPalette6=#757550507b7b<br />
ColorPalette7=#060698989a9a<br />
ColorPalette8=#d3d3d7d7cfcf<br />
ColorPalette9=#555557575353<br />
ColorPalette10=#efef29292929<br />
ColorPalette11=#8a8ae2e23434<br />
ColorPalette12=#fcfce9e94f4f<br />
ColorPalette13=#72729f9fcfcf<br />
ColorPalette14=#adad7f7fa8a8<br />
ColorPalette15=#3434e2e2e2e2<br />
ColorPalette16=#eeeeeeeeecec<br />
<br />
== Troubleshooting ==<br />
<br />
=== User directories (Desktop, Images, etc...) are still in English ===<br />
If your primary language isn't English, you may need to force Xfce changing the name of the user directories buy modifying/creting the two following files (this exemple is for French):<br />
<br />
{{ic|~/.config/user-dirs.locale}}<br />
fr_FR<br />
{{ic|~/.config/user-dirs.dirs}}<br />
XDG_DESKTOP_DIR="$HOME/Bureau"<br />
XDG_DOWNLOAD_DIR="$HOME/Téléchargements"<br />
XDG_TEMPLATES_DIR="$HOME/Exemples"<br />
XDG_PUBLICSHARE_DIR="$HOME/Public"<br />
XDG_DOCUMENTS_DIR="$HOME/Documents"<br />
XDG_MUSIC_DIR="$HOME/Musiques"<br />
XDG_PICTURES_DIR="$HOME/Images"<br />
XDG_VIDEOS_DIR="$HOME/Vidéos"<br />
<br />
=== Unable to open external windows partitions ===<br />
If you have external partitions like a fat32 drive connected via eSata, and launching them from the desktop results in a dialog telling you 'Authentication is required', you need to ensure polkit-gnome is installed and PolicyKit Authentication Agent is started by xfce4.<br />
pacman -S polkit-gnome<br />
Restart xfce4 and go:<br />
Applications Menu > Settings > Sessions and Startup<br />
Check that PolicyKit Authentication Agent is enabled under the Application Autostart tab.<br />
<br />
=== xfce4-power-manager is not working ===<br />
Check you have added dbus to the {{ic|DAEMONS}} array in {{ic|/etc/[[rc.conf]]}}.<br />
<br />
=== Keyboard shortcuts are not working ===<br />
Under Xfce 4.6 there is a problem where the user's [http://bugzilla.xfce.org/show_bug.cgi?id=5639 keyboard shortcuts will intermittently not work]. This is usually the case when the settings helper is either not running or has been started improperly due to a conflict. This bug has been fixed in Xfce 4.8, which replaced 4.6 in the main repositories.<br />
<br />
A workaround is to disable ''xfce4-settings-helper-autostart'' from autostarting in a user's session. The settings helper daemon will start upon loading an Xfce session, anyways. The following two steps seem to have resolved this issue.<br />
<br />
Remove or rename the global autostart .desktop file:<br />
mv /etc/xdg/autostart/xfce4-settings-helper-autostart.desktop /etc/xdg/autostart/xfce4-settings-helper-autostart.desktop.disabled<br />
<br />
Remove or rename the local autostart .desktop file:<br />
mv ~/.config/autostart/xfce4-settings-helper-autostart.desktop ~/.config/autostart/xfce4-settings-helper-autostart.desktop.disabled<br />
<br />
After logging out and logging back in, your shortcut keys should be working fine now.<br />
<br />
=== Xfce4-xkb-plugin settings issue ===<br />
There's a bug in version ''0.5.4.1-1'' which causes xkb-plugin to ''lose keyboard, layout switching and compose key'' settings. As a workaround you may enable ''Use system defaults'' option in keyboard settings. To do so run<br />
xfce4-keyboard-settings<br />
Go to ''Layout'' tab and set the ''Use system defaults'' flag, then reconfigure xkb-plugin.<br />
<br />
=== Thunar does not display any thumbnail ===<br />
<br />
Thunar relies on '''Tumbler''' to generate thumbnails. You can install Tumbler by issuing<br />
<br />
pacman -S tumbler<br />
<br />
More details in [[Thunar#Thunar_Thumbnailers|Thunar's page]].<br />
<br />
=== Locales ignored with GDM ===<br />
Become superuser and add your locale to /var/lib/AccountsService/users/$USER:<br />
su -c "nano /var/lib/AccountsService/users/$USER"<br />
Replace hu_HU.UTF-8 with your own locale:<br />
[User]<br />
Language=hu_HU.UTF-8<br />
XSession=xfce<br />
You may also do it with sed. Note the backslash before .UTF-8:<br />
su -c "sed -i 's/Language=.*/Language=hu_HU\.UTF-8/' /var/lib/AccountsService/users/$USER"<br />
Restart GDM to take effect.<br />
<br />
=== Restore default settings ===<br />
If for any reason you need to revert back to the default settings, try renaming {{ic|~/.config/xfce4-session/}} and {{ic|~/.config/xfce4/}}<br />
<br />
$ mv ~/.config/xfce4-session/ ~/.config/xfce4-session-bak<br />
$ mv ~/.config/xfce4/ ~/.config/xfce4-bak<br />
<br />
Logout and login for changes to take effect.<br />
<br />
=== NVIDIA and xfce4-sensors-plugin ===<br />
To detect and use sensors of nvidia gpu you need to install {{AUR|libxnvctrl}} and then recompile {{Pkg|xfce4-sensors-plugin}} package.<br />
<br />
=== Session failure ===<br />
If the window manager doesn't load correctly (The mouse is a X and you can't close windows) you maybe got an session error.<br />
To remove a corrupt session you can delete the session folder at the {{ic|.cache}} folder.<br />
# rm -r ~/.cache/sessions/<br />
The easy way to reload the session is to reboot the computer. You can also restart xfce.<br />
<br />
=== Clock/notification area no longer pushed to the right edge of the panel in Xfce 4.10 ===<br />
<br />
This is due to a change in the Window Buttons panel plugin which no longer expands to fill the available space.<br />
<br />
To emulate the old behavior, add a separator between the window buttons and the clock/notification area, setting its expand property (and possibly selecting the transparent style).<br />
<br />
== Related Articles ==<br />
* [[Thunar]]<br />
* [[Improve GTK Application Looks]]<br />
* [[Autostart applications#Graphical]]<br />
<br />
== External Resources ==<br />
* http://docs.xfce.org/ - The complete documentation.<br />
* [http://www.xfce-look.org/ Xfce-Look] - Themes, wallpapers, and more.<br />
* [http://xfce.wikia.com/wiki/Frequently_Asked_Questions Xfce Wikia] - How to edit the auto generated menu with the menu editor<br />
* [http://wiki.xfce.org Xfce Wiki]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=VirtualBox&diff=164010VirtualBox2011-10-04T23:01:10Z<p>Foutrelis: Remove uneeded troubleshooting subsection; 'linux-headers' is a dependency of the virtualbox package</p>
<hr />
<div>[[Category:Emulators (English)]]<br />
[[Category:Virtualization]]<br />
[[Category:Remote Desktop Protocol (English)]]<br />
[[fr:VirtualBox]]<br />
{{i18n|VirtualBox}}<br />
<br />
This article is about [[Wikipedia:VirtualBox|VirtualBox]] running in Arch, you may also be interested in [[Arch Linux VirtualBox Guest|Arch Linux as a VirtualBox Guest]].<br />
<br />
[http://www.virtualbox.org VirtualBox] is a virtual PC emulator like [[VMware]]. It has many of the features VMware has, as well as some of its own. It is in constant development and new features are implemented all the time. e.g. version 2.2 introduced OpenGL 3D acceleration support for Linux and Solaris guests. It has a nice GUI interface (Qt and/or SDL) or command line tools for managing virtual machines. Headless operation is also supported.<br />
<br />
==Installing==<br />
;{{Package Official|virtualbox}}<br />
This is the basic GPL licensed VirtualBox suite, which can be found in the [community] repository.<br />
<br />
Install the basic package:<br />
# pacman -S virtualbox<br />
<br />
Optionally install {{Package Official|qt}} in order to use the GUI:<br />
# pacman -S qt<br />
<br />
===Installing the VirtualBox extension pack===<br />
VirtualBox requires an extension pack (VirtualBox Oracle VM VirtualBox Extension Pack) in order to provide support for RDP, as well as USB 2.0 and PXE booting for Intel network cards, etc., available at this webpage : [http://www.virtualbox.org/wiki/Downloads VirtualBox Downloads]. This PUEL licensed extension pack is free for personal use.<br />
To install the Extension pack you download and save it to your hard drive and then open the VirtualBox main program. Click on preferences and on the left side click Extensions. On the right side, click the add package icon and then open the folder that has the extension and click to install it.<br />
<br />
Additionally you can install the Extension Pack from the command line using VBoxManage.<br />
<br />
VBoxManage extpack install <tarball> |<br />
uninstall [--force] <name> |<br />
cleanup<br />
As an alternative, you could also use {{Package AUR|virtualbox-ext-oracle}} from the [[AUR]].<br />
<br />
<br />
==Running VirtualBox==<br />
===Basic Setup===<br />
Now, add the desired username to the ''vboxusers'' group:<br />
# gpasswd -a USERNAME vboxusers<br />
<br />
Build the required modules:<br />
# vboxbuild<br />
<br />
Lastly, edit {{Filename|/etc/[[rc.conf]]}} and add {{Codeline|vboxdrv}} to the {{Codeline|MODULES}} array in order to load the VirtualBox drivers at startup:<br />
MODULES=(... ''vboxdrv'')<br />
<br />
To load the module manually:<br />
# modprobe vboxdrv<br />
<br />
To start VirtualBox:<br />
$ virtualbox<br />
<br />
==Configuring==<br />
===Networking===<br />
VirtualBox guests may be networked through various methods; among them, there is [[#NAT]] and [[#Bridged]] networking. Using the [[#NAT]] method is the simplest and the default for new virtual machines.<br />
<br />
In order to use host-only and internal network settings you have to load the {{Codeline|vboxnetadp}} kernel module. The [http://www.virtualbox.org/manual/UserManual.html VirtualBox manual] covers the available options for these two network types. They have been omitted here due to them being, for the most part, OS agnostic.<br />
<br />
====NAT====<br />
From VirtualBox:<br />
* access the VM's ''Settings'' menu;<br />
* click on ''Network'' from the list to the left; finally,<br />
* in the ''Attached to'' drop-down list, select ''NAT''.<br />
<br />
VirtualBox's bundled DHCP server enables the guest system to be configured with DHCP. The NAT IP address on the first card is 10.0.2.0, 10.0.3.0 on the second and so on.<br />
<br />
====Bridged====<br />
Bridged networking may be setup through various methods; among them, there is the native way, which requires minimal setup at the expense of having less control. For other methods, see [[Advanced VirtualBox Networking]]. Since newer versions, VirtualBox can bridge between a guest and a wireless host interface without the help of third party utilities.<br />
<br />
Before continuing, load the required module:<br />
# modprobe vboxnetflt<br />
<br />
From VirtualBox:<br />
* access the VM's ''Settings'' menu;<br />
* click on ''Network'' from the list to the left;<br />
* in the ''Attached to'' drop-down list, select ''Bridged Adapter''; finally,<br />
* in the ''Name'' drop-down list, select the name of the host interface that is connected to the network that the guest OS should be part of.<br />
<br />
Start the virtual machine and configure its network as usual; e.g., DHCP or static.<br />
<br />
===Guest additions===<br />
The Guest Additions make the shared folders feature available, improve video card acceleration support, and enable bi-directional clipboard between the guest and host. Mouse integration is another feature, taking away the need of releasing the mouse after using it in the guest.<br />
<br />
====Arch Linux guests====<br />
<br />
Refer to [[Arch Linux VirtualBox Guest]]<br />
<br />
====Windows guests====<br />
After installing Windows (XP etc.) on your virtual machine, simply select ''Devices &rarr; Install Guest Additions...''<br />
<br />
This will mount the iso image and windows should then automatically launch the guest additions installer. Follow the instructions to the end.<br />
If you have Guest Additions installed for one virtual machine, and you want to install it for another one, there is no need to re-download the .iso. Select ''Devices &rarr; CD/DVD Devices &rarr; Choose virtual CD/DVD drive'' and navigate to ~/.VirtualBox where the image is located. This is the case if you have multiple VMs.<br />
<br />
===Keyboard and mouse between the host and the guest===<br />
*To capture the keyboard and mouse, click the mouse inside the virtual machine display.<br />
*To uncapture, press right {{keypress|Ctrl}}.<br />
<br />
To get seamless mouse integration between host and guest, install the [[#Guest Additions]] inside the guest.<br />
<br />
When generating the guests' {{Filename|xorg.conf}} with {{Codeline|X -configure}}, the InputDevice section may feature the {{Codeline|mouse}} driver. After installing the Guest Additions, replace {{Codeline|mouse}} with {{Codeline|vboxmouse}} and then restart X or reboot the guest.<br />
<br />
Alternatively, add the following to the guest's {{Filename|xorg.conf}}:<br />
<pre><br />
Section "InputDevice"<br />
Identifier "Mouse0"<br />
Driver "vboxmouse"<br />
Option "Protocol" "auto"<br />
Option "Device" "/dev/input/mice"<br />
Option "ZAxisMapping" "4 5 6 7"<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "X.org Configured"<br />
Screen 0 "Screen0" 0 0<br />
InputDevice "Mouse0" "CorePointer"<br />
InputDevice "Keyboard0" "CoreKeyboard"<br />
EndSection<br />
</pre><br />
<br />
===Using full resolution of the host system in the guest===<br />
Set the resolution of your guest in the grub boot script {{Filename|/boot/grub/menu.lst}}, i.e. add the correct vga code to the kernel command line. For a resolution of 1280x1024, this would e.g. look like<br />
# kernel /vmlinuz-linux root=/dev/disk/by-uuid/7bdc5dee-8fb0-4260-bc43-60ac6e4e4a54 ro vga=795<br />
<br />
Add the resolution to {{Filename|/etc/X11/xorg.conf}}, e.g.<br />
<pre><br />
Section "Screen"<br />
...<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1280x1024" "1024x768"<br />
EndSubSection<br />
...<br />
EndSection<br />
</pre><br />
If you experience problems with your resolution dropping back to second lower resolution in the 'Modes' setting, simply omit the second resolution. Example <br />
Modes "1280x1024"<br />
<br />
===Sharing folders between the host and the guest===<br />
In the settings of the virtual machine go to shared folders tab and add the folders you want to share.<br />
<br />
*NOTE: You need to install Guest Additions in order to use this feature.<br />
In a Linux host, ''Devices &rarr; Install Guest Additions''<br />
Yes (when asked to download the CD image)<br />
Mount (when asked to register and mount)<br />
<br />
In a Linux host, create one or more folders for sharing files, then set the shared folders via the virtualbox menu (guest window).<br />
<br />
In a Windows guest, starting with VirtualBox 1.5.0, shared folders are browseable and are therefore visible in Windows Explorer. Open Windows Explorer and look for it under ''My Networking Places &rarr; Entire Network &rarr; VirtualBox Shared Folders''.<br />
<br />
Launch the Windows Explorer (run explorer command) to browse the network places -> expand with the (+) sign : entire network &rarr; VirtualBox shared folders &rarr; '''\\Vboxsvr''' &rarr; then you can now expand all your configured shared folders here, and set up shortcuts for Linux folders in the guest filesystem. You can alternatively use the "Add network place wizard", and browse to "VBoxsvr".<br />
<br />
Alternatively, on the Windows command line, you can also use the following:<br />
net use x: \\VBOXSVR\sharename<br />
<br />
While {{Codeline|VBOXSVR}} is a fixed name, replace {{Codeline|x:}} with the drive letter that you want to use for the share, and sharename with the share name specified with VBoxManage.<br />
<br />
In a Windows guest, to improve loading and saving files (e.g. MS Office) by VirtualBox Shared Folders edit ''c:\windows\system32\drivers\etc\hosts'' as below:<br />
127.0.0.1 localhost vboxsvr<br />
<br />
In a Linux guest, use the following command:<br />
# mount -t vboxsf [-o OPTIONS] sharename mountpoint<br />
(Notes: sharename is optional or same as selected in the VirtualBox-Dialog , mountpoint of the shared directory in the hosts filesystem)<br />
:Automatically mounting a shared folder is possible through the linux-guest {{Filename|/etc/fstab}} file. You may also specify the uid=#,gid=# (where # is replaced by the actual numerical uid and gid) to mount the share with normal user permissions instead of root permissions. (this can be helpful to mount parts of your host {{Filename|~/home}} for use in your Linux-guest. To do this add an entry in the following format to the linux-guest {{Filename|/etc/fstab}}:<br />
<br />
sharename mountpoint vboxsf uid=#,gid=# 0 0<br />
<br />
Replace {{Codeline|sharename}} with the share name specified with VBoxManage, and mountpoint with the path where you want the share to be mounted (e.g. /mnt/share). The usual mount rules apply, that is, create this directory first if it does not exist yet. Note that if you have told VirtualBox to "automatically mount" the shared folder, this step may not be necessary and your folder will be found somewhere under {{Filename|/media}}.<br />
<br />
Beyond the standard options supplied by the mount command, the following are available:<br />
iocharset=CHARSET<br />
to set the character set used for I/O operations (utf8 by default) and<br />
convertcp=CHARSET<br />
to specify the character set used for the shared folder name (utf8 by default).<br />
<br />
===Getting audio to work in the guest machine===<br />
In the machine settings, go to the audio tab and select the correct driver according to your sound system (ALSA, OSS or PulseAudio).<br />
<br />
===Setting up the RAM and video memory for the guest===<br />
You can change the default values by going to ''Settings &rarr; General''.<br />
<br />
===Setting up CD-ROM for the guest===<br />
You can change the default values by going to ''Settings &rarr; CD/DVD-ROM''.<br />
<br />
Check mount CD/DVD drive and select one of the following options.<br />
<br />
===Enabling D3D acceleration in Windows guests===<br />
Recent versions of Virtualbox have support for accelerating OpenGL inside guests. This can be enabled with a simple checkbox in the machine's settings, right below where video ram is set, and installing the Virtualbox guest additions. However, most Windows games use Direct3D (part of DirectX), not OpenGL, and are thus not helped by this method. However, it is possible to gain accelerated Direct3D in your Windows guests by borrowing the d3d libraries from Wine, which translate d3d calls into OpenGL, which is then accelerated. <br />
<br />
After enabling OpenGL acceleration as described above, go to http://www.nongnu.org/wined3d/ in your Windows guest and grab the "Latest version (Installer):". Reboot the guest into safe mode (press F8 before the Windows screen appears but after the Virtualbox screen disappears), and install wined3d, accepting the defaults during the install. (You may check the box for DirectX 10 support if you like, dont touch anything else.) Reboot back to normal mode and you should have accelerated Direct3D. <br />
<br />
{{Note | This hack may or may not work for some games depending on what hardware checks they make and what parts of D3D they use.}}<br />
{{Note | This has only been tried on Windows XP and Windows 7 RC guests AFAIK, and does not work on the Windows 7 guest. If you have experience with this on a different windows version, please add that data here.}}<br />
<br />
==Virtualized OS setup==<br />
Virtualbox needs to be setup to virtualize another operating system.<br />
<br />
===Test a liveCD/DVD===<br />
Click the 'New' button to create a new virtual environment. Name it appropriately and select Operating System type and version. Select base memory size (note: most operating systems will need at least 512MB to function properly). Create a new hard disk image (a hard disk image is a file that will contain the operating system's filesystem and files).<br />
<br />
When the new image has been created, click 'Settings', then CD/DVD-ROM, check 'Mount CD/DVD Drive' then select an ISO image.<br />
<br />
==Maintenance==<br />
<br />
===Rebuild the vboxdrv module===<br />
Note that any time your kernel version changes (due to an upgrade, recompile, etc.) you must also rebuild the VirtualBox kernel modules.<br />
<br />
Ensure that ''linux-headers'' is still installed, and run the following command:<br />
# vboxbuild<br />
<br />
This will build the VirtualBox kernel modules for the ''currently running kernel''; if you have just upgraded your kernel package, reboot before trying to rebuild your kernel modules.<br />
<br />
After rebuilding the module, do not forget to load it with<br />
# modprobe vboxdrv<br />
<br />
''vboxdrv'' and ''vboxnetflt'' should be in the MODULES=() section of your /etc/rc.conf<br />
<br />
If you are using an old virtualbox_bin package built from AUR, run:<br />
# vbox_build_module<br />
<br />
If you need to rebuild the Virtual Box Additions in a guest installation of Arch Linux, use this command:<br />
# rc.d setup rc.vboxadd<br />
<br />
===Compact a disk image===<br />
==== Linux Guests ====<br />
Boot the Linux guest VM and remove all bloat (unwanted packages, temp files, etc.). When satisfied, wipe the freespace using dd or preferably dcfldd:<br />
<br />
$ dcfldd if=/dev/zero of=fillfile bs=4M<br />
<br />
When the fillfile hits the limit of the virtual hdd, the vast majority of user-space (non-reserved blocks) will be filled. Alternatively, run the command as root to get all of them. Example message: "8192 blocks (8192Mb) written.dcfldd:: No space left on device."<br />
<br />
Once this occurs, simply remove the fill file and powerdown the VM:<br />
<br />
$ rm -f fillfile && sudo shutdown -hF now<br />
<br />
{{Note| The -F switch will force a disk check upon a reboot which is advised following the compact operation.}}<br />
<br />
Now compact the disk:<br />
<br />
$ VBoxManage modifyhd /path/to/your.vdi --compact<br />
<br />
==== Windows Guests ====<br />
<br />
See [http://www.mdl4.com/2010/04/virtualbox-compact-a-vdi-in-ubuntu this article].<br />
<br />
===Increase the size of a virtual hard drive for a Windows guest===<br />
{{Warning|This has only been tested with Windows XP and Windows 7 guests.}}<br />
<br />
If you find that you are running out of space due to the small hard drive size you selected when created your VM, you can take the following steps:<br />
<br />
Create a new vdi in ~/.VirtualBox/HardDisks by running:<br />
# cd ~/.VirtualBox/HardDisks<br />
# VBoxManage createhd -filename new.vdi --size 10000<br />
<br />
where size is in mb, in this example 10000MB ~= 10GB, and new.vdi is name of new hard drive to be created.<br />
<br />
Next the old vdi needs to be cloned to the new vdi, this may take some time so wait while it occurs:<br />
# VBoxManage clonehd old.vdi new.vdi --existing<br />
<br />
Detach old harddrive and attach new hard drive, replace VMName with whatever you called your VM:<br />
# VBoxManage modifyvm VMName --hda none<br />
# VBoxManage modifyvm VMName --hda new.vdi<br />
<br />
Boot the VM, run Partition Wizard 5 to resize the partition on the fly, and reboot.<br />
<br />
Remove old vdi from VirtualBox and delete<br />
# VBoxManage closemedium disk old.vdi<br />
# rm old.vdi<br />
<br />
===Windows Xp and Nokia phones===<br />
To get working Windows XP and Nokia phones with Pc Suite mode, Virtualbox needs two simple steps:<br />
<br />
'''1.''' Add a rule to udev with {{Filename|/etc/udev/rules.d/40-permissions.rules}}:<br />
LABEL="usb_serial_start"<br />
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", \<br />
GROUP="usbfs", MODE="0660", GROUP="dialout"<br />
LABEL="usb_serial_end"<br />
<br />
'''2.''' Create the group usbfs and add its user to it<br />
$ sudo groupadd usbfs<br />
$ sudo usermod -a -G usbfs $USER<br />
<br />
After a logout, connect a Nokia phone with PC Suite mode and start Windows XP to test new rule.<br />
<br />
==Migrating from another VM==<br />
The {{Codeline|qemu-img}} program can be used to convert images from one format to another, or add compression or encryption to an image. <br />
# pacman -S qemu<br />
<br />
===Converting from QEMU images===<br />
To convert a QEMU image for use with VirtualBox, first convert it to ''raw'' format, then use VirtualBox's conversion utility to convert and compact it in its native format.<br />
$ qemu-img convert -O raw test.qcow2 test.raw<br />
$ VBoxManage modifyvdi /full/path/to/test.vdi compact<br />
or <br />
$ qemu-img convert -O raw test.qcow2 test.raw<br />
(of course you must have installed qemu package for that)<br />
$ VBoxManage convertfromraw /full/path/to/test.raw /full/path/to/test.vdi<br />
$ VBoxManage modifyvdi /full/path/to/test.vdi compact<br />
<br />
From QEMU 0.12.x on, ''qemu-img'' is able to convert directly to VDI:<br />
$ qemu-img convert -O vdi test.qcow2 test.vdi<br />
and back if necessary.<br />
<br />
===Converting from VMware images ===<br />
You can <br />
$ VBoxManage clonehd source.vmdk target.vdi --format VDI<br />
although recent versions of Virtualbox are able to use (and also create) .vmdk-Images directly.<br />
<br />
==Tips and tricks==<br />
<br />
===Starting Virtual Machines directly without starting the virtualbox console===<br />
I find it useful to start the virtual machines directly rather than start the console. To do this I simply assign a keybinding in .xbindkeysrc to <br />
"VBoxManage startvm '''''vm-name'''''"<br />
'''''keycode'''''<br />
'''''keyname'''''<br />
If you have a space in the vm name, then enclose the vm-name in single apostrophes. For eg.<br />
"VBoxManage startvm 'Windows 7'"<br />
m:0x0 + c:163<br />
XF86Mail<br />
<br />
===Getting Web-cams and other USB devices to detect===<br />
Make sure you filter any devices that are not a keyboard or a mouse so they do not start up at boot and this insures that Windows will detect the device at start-up.<br />
<br />
===Sending a CTRL+ALT+F1 to the Guest===<br />
If your guest O/S is a Linux distro, and you want to open a new tty text shell or exit X via typing {{Keypress|Ctrl}}+{{Keypress|Alt}}+{{Keypress|F1}}, you can easily send this command to the guest O/S simply by hitting your 'Host Key' (usually the {{Keypress|Ctrl}} in the Right side of your keyboard) + {{Keypress|F1}} or {{Keypress|F2}}, etc.<br />
<br />
===Starting VMs at system boot on headless servers===<br />
Add this line to {{Filename|/etc/rc.local}}<br />
exec /bin/su -c 'VBoxManage startvm --type headless <''UUID|NAME''>' ''PREFERED_USER'' >/dev/null 2>&1<br />
Where <UUID|NAME> is the guest identifier, and PREFERRED_USER is the user profile that contains the VM definitions and .vdi files.<br />
<br />
Since exec replaces the currently running process, you will not be able to start a second VM, or execute any other commands, after the exec. Try the following if this is a problem:<br />
su -c 'VBoxHeadless -s <''UUID|NAME''> &' -s /bin/sh ''PREFERED_USER'' >/dev/null 2>&1<br />
Using fully qualified path to su and VBoxHeadless is recommend. Add additional lines like above to start additional VMs. Commands following these in {{Filename|/etc/rc.local}} will be executed. Based on some rooting around in the VirtualBox documentation, I get the impression this will be a little more robust than 'VBoxManage ... --type headless' in future VBox releases.<br />
<br />
To determine the available VMs for a user:<br />
su -c 'VBoxManage list vms' PREFERED_USER<br />
<br />
To save the state of a running VM:<br />
su -c 'VBoxManage controlvm <UUID|NAME> savestate' PREFERED_USER<br />
{{Filename|/etc/rc.local.shutdown}} would be a good spot for this.<br />
<br />
=== Guest management daemon ===<br />
Below is a [[daemon]] for automating guest administration. Guests will be initialized on start, and state-saved on stop, or you will just get a "./vbox_service: line 31: out[${m[1]}]: bad array subscript" message when you run it.<br />
<br />
The configuration file:<br />
{{File|name=/etc/conf.d/vbox_service|content=<nowiki><br />
# Guests to manage:<br />
#VB_GUESTS=('OpenBSD' 'Slackware' 'Windows XP')<br />
#<br />
# Disable a guest by prepending a bang:<br />
#VB_GUESTS=('OpenBSD' 'Slackware' !'Windows XP')<br />
#<br />
# Default value matches none:<br />
VB_GUESTS=()<br />
<br />
# User to run Virtual Box as:<br />
VB_USER='vbox'<br />
</nowiki>}}<br />
<br />
The script:<br />
{{File|name=/etc/rc.d/vbox_service|content=<nowiki><br />
#!/bin/bash<br />
<br />
. /etc/rc.conf<br />
. /etc/rc.d/functions<br />
<br />
unset VB_GUESTS<br />
unset VB_USER<br />
[[ -r /etc/conf.d/vbox_service ]] && . /etc/conf.d/vbox_service<br />
[[ ${VB_GUESTS[@]} ]] || VB_GUESTS=()<br />
[[ ${VB_USER[@]} ]] || VB_USER='vbox'<br />
<br />
<br />
match() {<br />
[[ $REPLY =~ $1 ]] && m=("${BASH_REMATCH[@]}")<br />
}<br />
<br />
<br />
vm_raw() {<br />
local argv=''<br />
printf -v argv ' %q ' "$@"<br />
su -c "/usr/bin/VBoxManage $argv" -s /bin/sh "$VB_USER"<br />
}<br />
<br />
vm_ls() {<br />
local -A out=''<br />
local -i ret=1<br />
<br />
local m=()<br />
while read -r; do<br />
match '^"(.+)" \{(.+)\}$'<br />
out[${m[1]}]=${m[2]}<br />
done < <(vm_raw list vms)<br />
<br />
local i=''<br />
for i in "${VB_GUESTS[@]##!*}"; do<br />
if [[ ${out[$i]} ]]; then<br />
printf ' %q ' "${out[$i]}"<br />
ret=0<br />
fi<br />
done<br />
<br />
return $ret<br />
}<br />
<br />
vm_envinit() {<br />
local m=()<br />
while read -r; do<br />
match '^(.+)="?([^"]+)'<br />
env[$1:${m[1]}]=${m[2]}<br />
done < <(vm_raw showvminfo --machinereadable "$1")<br />
}<br />
<br />
<br />
start() {<br />
if [[ ${env[$1:VMState]} != 'running' ]]; then<br />
vm_raw startvm --type headless "$1"<br />
fi<br />
}<br />
<br />
stop() {<br />
if [[ ${env[$1:VMState]} == 'running' ]]; then<br />
vm_raw controlvm "$1" savestate<br />
fi<br />
}<br />
<br />
restart() {<br />
stop "$1"<br />
sleep 3<br />
start "$1"<br />
}<br />
<br />
usage() {<br />
printf '%s\n' "usage: $0 <start|stop|restart> [name|uuid]..." >&2<br />
}<br />
<br />
<br />
if [[ ! $1 =~ ^(start|stop|restart)$ ]]; then<br />
usage<br />
exit 2<br />
fi<br />
cmd=$1<br />
shift<br />
(($#)) || eval set -- "$(vm_ls)"<br />
<br />
stat_busy "${cmd^}ing VMs:"<br />
trap 'stat_die' ERR<br />
set -Ee<br />
<br />
declare -A env=''<br />
<br />
for i; do<br />
[[ $i ]]<br />
vm_envinit "$i"<br />
stat_append "${env[$i:name]}, "<br />
$cmd "${env[$i:UUID]}" &>/dev/null<br />
done<br />
<br />
stat_done<br />
</nowiki>}}<br />
<br />
===Accessing server on VM from host===<br />
To access apache on a VM from the Host machine ONLY, simply execute the following lines on the Host:<br />
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/HostPort" 8888<br />
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/GuestPort" 80<br />
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/Protocol" TCP<br />
Where 8888 is the port the host should listen on and 80 is the port the VM will send Apache's signal on. <br />
To use a port lower than 1024 on the host machine changes need to be made to the firewall on the host machine. This can also be set up to work with SSH, etc.. by changing "Apache" to whatever service and using different ports. <br />
<br />
Note: "pcnet" refers to the network card of the VM. If you use an Intel card in your VM settings change "pcnet" to "e1000"<br />
<br />
*from [http://mydebian.blogdns.org/?p=111 ]<br />
<br />
===DAEMON Tools===<br />
While VirtualBox can mount ISO images without a problem, there are some image formats which cannot reliably be converted to ISO. For instance, ccd2iso ignores .ccd and .sub files, which can give disk images with broken files. cdemu, fuseiso, and MagicISO will do the same. In this case there is no choice but to use Daemon Tools inside VirtualBox.<br />
<br />
===Using VirtualBox on a USB key===<br />
When using VirtualBox on a USB key, for example to start an installed machine with an ISO image, you will manually have to create VDMKs from the existing drives. However, once the new VMDKs are saved and you move on to another machine, you may experience problems launching an appropriate machine again. To get rid of this issue, you can use the following script to launch VirtualBox. This script will clean up and unregister old VMDK files and it will create new, proper VMDKs for you:<br />
<pre><br />
#!/bin/bash<br />
<br />
# Erase old VMDK entries<br />
rm ~/.VirtualBox/*.vmdk<br />
<br />
# Clean up VBox-Registry<br />
sed -i '/sd/d' ~/.VirtualBox/VirtualBox.xml<br />
<br />
# Remove old harddisks from existing machines<br />
find ~/.VirtualBox/Machines -name \*.xml | while read file; do<br />
line=`grep -e "type\=\"HardDisk\"" -n $file | cut -d ':' -f 1`<br />
if [ -n "$line" ]; then<br />
sed -i ${line}d $file<br />
sed -i ${line}d $file<br />
sed -i ${line}d $file<br />
fi<br />
sed -i "/rg/d" $file<br />
done<br />
<br />
# Delete prev-files created by VirtualBox<br />
find ~/.VirtualBox/Machines -name \*-prev -exec rm '{}' \;<br />
<br />
# Recreate VMDKs<br />
ls -l /dev/disk/by-uuid | cut -d ' ' -f 9,11 | while read ln; do<br />
if [ -n "$ln" ]; then<br />
uuid=`echo "$ln" | cut -d ' ' -f 1`<br />
device=`echo "$ln" | cut -d ' ' -f 2 | cut -d '/' -f 3 | cut -b 1-3`<br />
<br />
# determine whether drive is mounted already<br />
checkstr1=`mount | grep $uuid`<br />
checkstr2=`mount | grep $device`<br />
checkstr3=`ls ~/.VirtualBox/*.vmdk | grep $device`<br />
if [[ -z "$checkstr1" && -z "$checkstr2" && -z "$checkstr3" ]]; then<br />
VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/$device.vmdk -rawdisk /dev/$device -register<br />
fi<br />
fi<br />
done<br />
<br />
# Start VirtualBox<br />
VirtualBox<br />
</pre><br />
Note that your user has to be added to the "disk" group to create VMDKs out of existing drives.<br />
<br />
===phpVirtualBox===<br />
An open source, AJAX implementation of the VirtualBox user interface written in PHP. As a modern web interface, it allows you to access and control remote VirtualBox instances. Much of its verbage and some of its code is based on the (inactive) vboxweb project. It allows the administrator to remotely, graphically, administer their virtual machines without having to log in to their headless VirtualBox servers.<br />
<br />
This requires the PUEL edition for VirtualBox (may be wrong).<br />
<br />
See [[PhpVirtualBox]] for more information about the Arch-specific installation process.<br />
<br />
An installation guide is available here:<br />
http://code.google.com/p/phpvirtualbox/wiki/Installation<br />
<br />
Arch Linux users should uncomment these 2 extensions in ''/etc/php/php.ini''<br />
extension=json.so<br />
extension=soap.so<br />
<br />
===Integrate into GTK environment===<br />
Assuming you are using a GTK theme inside an environment such as Gnome or Openbox you may want to integrate the theme used by virtualbox into your default theme. This can be done by running ''qtconfig'' and selecting GTK+ as GUI style.<br />
<br />
==Troubleshooting==<br />
===OpenBSD===<br />
Some people with older computers can have trouble running an OpenBSD VM, manifesting as bunch of segmentation faults and total unusability. Starting VirtualBox with the -norawr0 argument may solve the problem. You can do it like this:<br />
$ VBoxSDL -norawr0 -vm NameOfYourOpenBSDVM<br />
<br />
See also [[PhpVirtualBox]]<br />
<br />
==External links==<br />
* [http://www.virtualbox.org/manual/UserManual.html VirtualBox User Manual]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=VirtualBox&diff=164009VirtualBox2011-10-04T22:58:55Z<p>Foutrelis: rc.d setup vboxdrv -> vboxbuild</p>
<hr />
<div>[[Category:Emulators (English)]]<br />
[[Category:Virtualization]]<br />
[[Category:Remote Desktop Protocol (English)]]<br />
[[fr:VirtualBox]]<br />
{{i18n|VirtualBox}}<br />
<br />
This article is about [[Wikipedia:VirtualBox|VirtualBox]] running in Arch, you may also be interested in [[Arch Linux VirtualBox Guest|Arch Linux as a VirtualBox Guest]].<br />
<br />
[http://www.virtualbox.org VirtualBox] is a virtual PC emulator like [[VMware]]. It has many of the features VMware has, as well as some of its own. It is in constant development and new features are implemented all the time. e.g. version 2.2 introduced OpenGL 3D acceleration support for Linux and Solaris guests. It has a nice GUI interface (Qt and/or SDL) or command line tools for managing virtual machines. Headless operation is also supported.<br />
<br />
==Installing==<br />
;{{Package Official|virtualbox}}<br />
This is the basic GPL licensed VirtualBox suite, which can be found in the [community] repository.<br />
<br />
Install the basic package:<br />
# pacman -S virtualbox<br />
<br />
Optionally install {{Package Official|qt}} in order to use the GUI:<br />
# pacman -S qt<br />
<br />
===Installing the VirtualBox extension pack===<br />
VirtualBox requires an extension pack (VirtualBox Oracle VM VirtualBox Extension Pack) in order to provide support for RDP, as well as USB 2.0 and PXE booting for Intel network cards, etc., available at this webpage : [http://www.virtualbox.org/wiki/Downloads VirtualBox Downloads]. This PUEL licensed extension pack is free for personal use.<br />
To install the Extension pack you download and save it to your hard drive and then open the VirtualBox main program. Click on preferences and on the left side click Extensions. On the right side, click the add package icon and then open the folder that has the extension and click to install it.<br />
<br />
Additionally you can install the Extension Pack from the command line using VBoxManage.<br />
<br />
VBoxManage extpack install <tarball> |<br />
uninstall [--force] <name> |<br />
cleanup<br />
As an alternative, you could also use {{Package AUR|virtualbox-ext-oracle}} from the [[AUR]].<br />
<br />
<br />
==Running VirtualBox==<br />
===Basic Setup===<br />
Now, add the desired username to the ''vboxusers'' group:<br />
# gpasswd -a USERNAME vboxusers<br />
<br />
Build the required modules:<br />
# vboxbuild<br />
<br />
Lastly, edit {{Filename|/etc/[[rc.conf]]}} and add {{Codeline|vboxdrv}} to the {{Codeline|MODULES}} array in order to load the VirtualBox drivers at startup:<br />
MODULES=(... ''vboxdrv'')<br />
<br />
To load the module manually:<br />
# modprobe vboxdrv<br />
<br />
To start VirtualBox:<br />
$ virtualbox<br />
<br />
===Solving the impossible rc.d setup vboxdrv===<br />
<br />
In some cases, when VirtualBox is freshly installed, you cannot compile the module and some error message appears, like:<br />
<br />
<pre><br />
# vboxbuild<br />
:: Unloading VirtualBox kernel modules [DONE]<br />
:: Recompiling VirtualBox kernel modules [BUSY]<br />
Look at /var/log/vbox-install.log to find out what went wrong<br />
Look at /var/log/vbox-install.log to find out what went wrong<br />
Look at /var/log/vbox-install.log to find out what went wrong<br />
[DONE]<br />
:: Reloading VirtualBox kernel modules}</pre><br />
<br />
with the evocated log file saying:<br />
<pre>Makefile:169: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.<br />
cp: cannot stat `/tmp/vboxdrv-Module.symvers': No such file or directory<br />
Makefile:94: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.<br />
cp: cannot stat `/tmp/vboxdrv-Module.symvers': No such file or directory<br />
Makefile:90: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.</pre><br />
<br />
A solution is to install headers of your kernel:<br />
<br />
pacman -S linux-headers<br />
or, if you use the LTS version:<br />
pacman -S kernel26-lts-headers<br />
<br />
Then it could be useful to reboot your computer (but maybe not necessary, try) and following previous steps, your virtual machine should run.<br />
<br />
==Configuring==<br />
===Networking===<br />
VirtualBox guests may be networked through various methods; among them, there is [[#NAT]] and [[#Bridged]] networking. Using the [[#NAT]] method is the simplest and the default for new virtual machines.<br />
<br />
In order to use host-only and internal network settings you have to load the {{Codeline|vboxnetadp}} kernel module. The [http://www.virtualbox.org/manual/UserManual.html VirtualBox manual] covers the available options for these two network types. They have been omitted here due to them being, for the most part, OS agnostic.<br />
<br />
====NAT====<br />
From VirtualBox:<br />
* access the VM's ''Settings'' menu;<br />
* click on ''Network'' from the list to the left; finally,<br />
* in the ''Attached to'' drop-down list, select ''NAT''.<br />
<br />
VirtualBox's bundled DHCP server enables the guest system to be configured with DHCP. The NAT IP address on the first card is 10.0.2.0, 10.0.3.0 on the second and so on.<br />
<br />
====Bridged====<br />
Bridged networking may be setup through various methods; among them, there is the native way, which requires minimal setup at the expense of having less control. For other methods, see [[Advanced VirtualBox Networking]]. Since newer versions, VirtualBox can bridge between a guest and a wireless host interface without the help of third party utilities.<br />
<br />
Before continuing, load the required module:<br />
# modprobe vboxnetflt<br />
<br />
From VirtualBox:<br />
* access the VM's ''Settings'' menu;<br />
* click on ''Network'' from the list to the left;<br />
* in the ''Attached to'' drop-down list, select ''Bridged Adapter''; finally,<br />
* in the ''Name'' drop-down list, select the name of the host interface that is connected to the network that the guest OS should be part of.<br />
<br />
Start the virtual machine and configure its network as usual; e.g., DHCP or static.<br />
<br />
===Guest additions===<br />
The Guest Additions make the shared folders feature available, improve video card acceleration support, and enable bi-directional clipboard between the guest and host. Mouse integration is another feature, taking away the need of releasing the mouse after using it in the guest.<br />
<br />
====Arch Linux guests====<br />
<br />
Refer to [[Arch Linux VirtualBox Guest]]<br />
<br />
====Windows guests====<br />
After installing Windows (XP etc.) on your virtual machine, simply select ''Devices &rarr; Install Guest Additions...''<br />
<br />
This will mount the iso image and windows should then automatically launch the guest additions installer. Follow the instructions to the end.<br />
If you have Guest Additions installed for one virtual machine, and you want to install it for another one, there is no need to re-download the .iso. Select ''Devices &rarr; CD/DVD Devices &rarr; Choose virtual CD/DVD drive'' and navigate to ~/.VirtualBox where the image is located. This is the case if you have multiple VMs.<br />
<br />
===Keyboard and mouse between the host and the guest===<br />
*To capture the keyboard and mouse, click the mouse inside the virtual machine display.<br />
*To uncapture, press right {{keypress|Ctrl}}.<br />
<br />
To get seamless mouse integration between host and guest, install the [[#Guest Additions]] inside the guest.<br />
<br />
When generating the guests' {{Filename|xorg.conf}} with {{Codeline|X -configure}}, the InputDevice section may feature the {{Codeline|mouse}} driver. After installing the Guest Additions, replace {{Codeline|mouse}} with {{Codeline|vboxmouse}} and then restart X or reboot the guest.<br />
<br />
Alternatively, add the following to the guest's {{Filename|xorg.conf}}:<br />
<pre><br />
Section "InputDevice"<br />
Identifier "Mouse0"<br />
Driver "vboxmouse"<br />
Option "Protocol" "auto"<br />
Option "Device" "/dev/input/mice"<br />
Option "ZAxisMapping" "4 5 6 7"<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "X.org Configured"<br />
Screen 0 "Screen0" 0 0<br />
InputDevice "Mouse0" "CorePointer"<br />
InputDevice "Keyboard0" "CoreKeyboard"<br />
EndSection<br />
</pre><br />
<br />
===Using full resolution of the host system in the guest===<br />
Set the resolution of your guest in the grub boot script {{Filename|/boot/grub/menu.lst}}, i.e. add the correct vga code to the kernel command line. For a resolution of 1280x1024, this would e.g. look like<br />
# kernel /vmlinuz-linux root=/dev/disk/by-uuid/7bdc5dee-8fb0-4260-bc43-60ac6e4e4a54 ro vga=795<br />
<br />
Add the resolution to {{Filename|/etc/X11/xorg.conf}}, e.g.<br />
<pre><br />
Section "Screen"<br />
...<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1280x1024" "1024x768"<br />
EndSubSection<br />
...<br />
EndSection<br />
</pre><br />
If you experience problems with your resolution dropping back to second lower resolution in the 'Modes' setting, simply omit the second resolution. Example <br />
Modes "1280x1024"<br />
<br />
===Sharing folders between the host and the guest===<br />
In the settings of the virtual machine go to shared folders tab and add the folders you want to share.<br />
<br />
*NOTE: You need to install Guest Additions in order to use this feature.<br />
In a Linux host, ''Devices &rarr; Install Guest Additions''<br />
Yes (when asked to download the CD image)<br />
Mount (when asked to register and mount)<br />
<br />
In a Linux host, create one or more folders for sharing files, then set the shared folders via the virtualbox menu (guest window).<br />
<br />
In a Windows guest, starting with VirtualBox 1.5.0, shared folders are browseable and are therefore visible in Windows Explorer. Open Windows Explorer and look for it under ''My Networking Places &rarr; Entire Network &rarr; VirtualBox Shared Folders''.<br />
<br />
Launch the Windows Explorer (run explorer command) to browse the network places -> expand with the (+) sign : entire network &rarr; VirtualBox shared folders &rarr; '''\\Vboxsvr''' &rarr; then you can now expand all your configured shared folders here, and set up shortcuts for Linux folders in the guest filesystem. You can alternatively use the "Add network place wizard", and browse to "VBoxsvr".<br />
<br />
Alternatively, on the Windows command line, you can also use the following:<br />
net use x: \\VBOXSVR\sharename<br />
<br />
While {{Codeline|VBOXSVR}} is a fixed name, replace {{Codeline|x:}} with the drive letter that you want to use for the share, and sharename with the share name specified with VBoxManage.<br />
<br />
In a Windows guest, to improve loading and saving files (e.g. MS Office) by VirtualBox Shared Folders edit ''c:\windows\system32\drivers\etc\hosts'' as below:<br />
127.0.0.1 localhost vboxsvr<br />
<br />
In a Linux guest, use the following command:<br />
# mount -t vboxsf [-o OPTIONS] sharename mountpoint<br />
(Notes: sharename is optional or same as selected in the VirtualBox-Dialog , mountpoint of the shared directory in the hosts filesystem)<br />
:Automatically mounting a shared folder is possible through the linux-guest {{Filename|/etc/fstab}} file. You may also specify the uid=#,gid=# (where # is replaced by the actual numerical uid and gid) to mount the share with normal user permissions instead of root permissions. (this can be helpful to mount parts of your host {{Filename|~/home}} for use in your Linux-guest. To do this add an entry in the following format to the linux-guest {{Filename|/etc/fstab}}:<br />
<br />
sharename mountpoint vboxsf uid=#,gid=# 0 0<br />
<br />
Replace {{Codeline|sharename}} with the share name specified with VBoxManage, and mountpoint with the path where you want the share to be mounted (e.g. /mnt/share). The usual mount rules apply, that is, create this directory first if it does not exist yet. Note that if you have told VirtualBox to "automatically mount" the shared folder, this step may not be necessary and your folder will be found somewhere under {{Filename|/media}}.<br />
<br />
Beyond the standard options supplied by the mount command, the following are available:<br />
iocharset=CHARSET<br />
to set the character set used for I/O operations (utf8 by default) and<br />
convertcp=CHARSET<br />
to specify the character set used for the shared folder name (utf8 by default).<br />
<br />
===Getting audio to work in the guest machine===<br />
In the machine settings, go to the audio tab and select the correct driver according to your sound system (ALSA, OSS or PulseAudio).<br />
<br />
===Setting up the RAM and video memory for the guest===<br />
You can change the default values by going to ''Settings &rarr; General''.<br />
<br />
===Setting up CD-ROM for the guest===<br />
You can change the default values by going to ''Settings &rarr; CD/DVD-ROM''.<br />
<br />
Check mount CD/DVD drive and select one of the following options.<br />
<br />
===Enabling D3D acceleration in Windows guests===<br />
Recent versions of Virtualbox have support for accelerating OpenGL inside guests. This can be enabled with a simple checkbox in the machine's settings, right below where video ram is set, and installing the Virtualbox guest additions. However, most Windows games use Direct3D (part of DirectX), not OpenGL, and are thus not helped by this method. However, it is possible to gain accelerated Direct3D in your Windows guests by borrowing the d3d libraries from Wine, which translate d3d calls into OpenGL, which is then accelerated. <br />
<br />
After enabling OpenGL acceleration as described above, go to http://www.nongnu.org/wined3d/ in your Windows guest and grab the "Latest version (Installer):". Reboot the guest into safe mode (press F8 before the Windows screen appears but after the Virtualbox screen disappears), and install wined3d, accepting the defaults during the install. (You may check the box for DirectX 10 support if you like, dont touch anything else.) Reboot back to normal mode and you should have accelerated Direct3D. <br />
<br />
{{Note | This hack may or may not work for some games depending on what hardware checks they make and what parts of D3D they use.}}<br />
{{Note | This has only been tried on Windows XP and Windows 7 RC guests AFAIK, and does not work on the Windows 7 guest. If you have experience with this on a different windows version, please add that data here.}}<br />
<br />
==Virtualized OS setup==<br />
Virtualbox needs to be setup to virtualize another operating system.<br />
<br />
===Test a liveCD/DVD===<br />
Click the 'New' button to create a new virtual environment. Name it appropriately and select Operating System type and version. Select base memory size (note: most operating systems will need at least 512MB to function properly). Create a new hard disk image (a hard disk image is a file that will contain the operating system's filesystem and files).<br />
<br />
When the new image has been created, click 'Settings', then CD/DVD-ROM, check 'Mount CD/DVD Drive' then select an ISO image.<br />
<br />
==Maintenance==<br />
<br />
===Rebuild the vboxdrv module===<br />
Note that any time your kernel version changes (due to an upgrade, recompile, etc.) you must also rebuild the VirtualBox kernel modules.<br />
<br />
Ensure that ''linux-headers'' is still installed, and run the following command:<br />
# vboxbuild<br />
<br />
This will build the VirtualBox kernel modules for the ''currently running kernel''; if you have just upgraded your kernel package, reboot before trying to rebuild your kernel modules.<br />
<br />
After rebuilding the module, do not forget to load it with<br />
# modprobe vboxdrv<br />
<br />
''vboxdrv'' and ''vboxnetflt'' should be in the MODULES=() section of your /etc/rc.conf<br />
<br />
If you are using an old virtualbox_bin package built from AUR, run:<br />
# vbox_build_module<br />
<br />
If you need to rebuild the Virtual Box Additions in a guest installation of Arch Linux, use this command:<br />
# rc.d setup rc.vboxadd<br />
<br />
===Compact a disk image===<br />
==== Linux Guests ====<br />
Boot the Linux guest VM and remove all bloat (unwanted packages, temp files, etc.). When satisfied, wipe the freespace using dd or preferably dcfldd:<br />
<br />
$ dcfldd if=/dev/zero of=fillfile bs=4M<br />
<br />
When the fillfile hits the limit of the virtual hdd, the vast majority of user-space (non-reserved blocks) will be filled. Alternatively, run the command as root to get all of them. Example message: "8192 blocks (8192Mb) written.dcfldd:: No space left on device."<br />
<br />
Once this occurs, simply remove the fill file and powerdown the VM:<br />
<br />
$ rm -f fillfile && sudo shutdown -hF now<br />
<br />
{{Note| The -F switch will force a disk check upon a reboot which is advised following the compact operation.}}<br />
<br />
Now compact the disk:<br />
<br />
$ VBoxManage modifyhd /path/to/your.vdi --compact<br />
<br />
==== Windows Guests ====<br />
<br />
See [http://www.mdl4.com/2010/04/virtualbox-compact-a-vdi-in-ubuntu this article].<br />
<br />
===Increase the size of a virtual hard drive for a Windows guest===<br />
{{Warning|This has only been tested with Windows XP and Windows 7 guests.}}<br />
<br />
If you find that you are running out of space due to the small hard drive size you selected when created your VM, you can take the following steps:<br />
<br />
Create a new vdi in ~/.VirtualBox/HardDisks by running:<br />
# cd ~/.VirtualBox/HardDisks<br />
# VBoxManage createhd -filename new.vdi --size 10000<br />
<br />
where size is in mb, in this example 10000MB ~= 10GB, and new.vdi is name of new hard drive to be created.<br />
<br />
Next the old vdi needs to be cloned to the new vdi, this may take some time so wait while it occurs:<br />
# VBoxManage clonehd old.vdi new.vdi --existing<br />
<br />
Detach old harddrive and attach new hard drive, replace VMName with whatever you called your VM:<br />
# VBoxManage modifyvm VMName --hda none<br />
# VBoxManage modifyvm VMName --hda new.vdi<br />
<br />
Boot the VM, run Partition Wizard 5 to resize the partition on the fly, and reboot.<br />
<br />
Remove old vdi from VirtualBox and delete<br />
# VBoxManage closemedium disk old.vdi<br />
# rm old.vdi<br />
<br />
===Windows Xp and Nokia phones===<br />
To get working Windows XP and Nokia phones with Pc Suite mode, Virtualbox needs two simple steps:<br />
<br />
'''1.''' Add a rule to udev with {{Filename|/etc/udev/rules.d/40-permissions.rules}}:<br />
LABEL="usb_serial_start"<br />
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", \<br />
GROUP="usbfs", MODE="0660", GROUP="dialout"<br />
LABEL="usb_serial_end"<br />
<br />
'''2.''' Create the group usbfs and add its user to it<br />
$ sudo groupadd usbfs<br />
$ sudo usermod -a -G usbfs $USER<br />
<br />
After a logout, connect a Nokia phone with PC Suite mode and start Windows XP to test new rule.<br />
<br />
==Migrating from another VM==<br />
The {{Codeline|qemu-img}} program can be used to convert images from one format to another, or add compression or encryption to an image. <br />
# pacman -S qemu<br />
<br />
===Converting from QEMU images===<br />
To convert a QEMU image for use with VirtualBox, first convert it to ''raw'' format, then use VirtualBox's conversion utility to convert and compact it in its native format.<br />
$ qemu-img convert -O raw test.qcow2 test.raw<br />
$ VBoxManage modifyvdi /full/path/to/test.vdi compact<br />
or <br />
$ qemu-img convert -O raw test.qcow2 test.raw<br />
(of course you must have installed qemu package for that)<br />
$ VBoxManage convertfromraw /full/path/to/test.raw /full/path/to/test.vdi<br />
$ VBoxManage modifyvdi /full/path/to/test.vdi compact<br />
<br />
From QEMU 0.12.x on, ''qemu-img'' is able to convert directly to VDI:<br />
$ qemu-img convert -O vdi test.qcow2 test.vdi<br />
and back if necessary.<br />
<br />
===Converting from VMware images ===<br />
You can <br />
$ VBoxManage clonehd source.vmdk target.vdi --format VDI<br />
although recent versions of Virtualbox are able to use (and also create) .vmdk-Images directly.<br />
<br />
==Tips and tricks==<br />
<br />
===Starting Virtual Machines directly without starting the virtualbox console===<br />
I find it useful to start the virtual machines directly rather than start the console. To do this I simply assign a keybinding in .xbindkeysrc to <br />
"VBoxManage startvm '''''vm-name'''''"<br />
'''''keycode'''''<br />
'''''keyname'''''<br />
If you have a space in the vm name, then enclose the vm-name in single apostrophes. For eg.<br />
"VBoxManage startvm 'Windows 7'"<br />
m:0x0 + c:163<br />
XF86Mail<br />
<br />
===Getting Web-cams and other USB devices to detect===<br />
Make sure you filter any devices that are not a keyboard or a mouse so they do not start up at boot and this insures that Windows will detect the device at start-up.<br />
<br />
===Sending a CTRL+ALT+F1 to the Guest===<br />
If your guest O/S is a Linux distro, and you want to open a new tty text shell or exit X via typing {{Keypress|Ctrl}}+{{Keypress|Alt}}+{{Keypress|F1}}, you can easily send this command to the guest O/S simply by hitting your 'Host Key' (usually the {{Keypress|Ctrl}} in the Right side of your keyboard) + {{Keypress|F1}} or {{Keypress|F2}}, etc.<br />
<br />
===Starting VMs at system boot on headless servers===<br />
Add this line to {{Filename|/etc/rc.local}}<br />
exec /bin/su -c 'VBoxManage startvm --type headless <''UUID|NAME''>' ''PREFERED_USER'' >/dev/null 2>&1<br />
Where <UUID|NAME> is the guest identifier, and PREFERRED_USER is the user profile that contains the VM definitions and .vdi files.<br />
<br />
Since exec replaces the currently running process, you will not be able to start a second VM, or execute any other commands, after the exec. Try the following if this is a problem:<br />
su -c 'VBoxHeadless -s <''UUID|NAME''> &' -s /bin/sh ''PREFERED_USER'' >/dev/null 2>&1<br />
Using fully qualified path to su and VBoxHeadless is recommend. Add additional lines like above to start additional VMs. Commands following these in {{Filename|/etc/rc.local}} will be executed. Based on some rooting around in the VirtualBox documentation, I get the impression this will be a little more robust than 'VBoxManage ... --type headless' in future VBox releases.<br />
<br />
To determine the available VMs for a user:<br />
su -c 'VBoxManage list vms' PREFERED_USER<br />
<br />
To save the state of a running VM:<br />
su -c 'VBoxManage controlvm <UUID|NAME> savestate' PREFERED_USER<br />
{{Filename|/etc/rc.local.shutdown}} would be a good spot for this.<br />
<br />
=== Guest management daemon ===<br />
Below is a [[daemon]] for automating guest administration. Guests will be initialized on start, and state-saved on stop, or you will just get a "./vbox_service: line 31: out[${m[1]}]: bad array subscript" message when you run it.<br />
<br />
The configuration file:<br />
{{File|name=/etc/conf.d/vbox_service|content=<nowiki><br />
# Guests to manage:<br />
#VB_GUESTS=('OpenBSD' 'Slackware' 'Windows XP')<br />
#<br />
# Disable a guest by prepending a bang:<br />
#VB_GUESTS=('OpenBSD' 'Slackware' !'Windows XP')<br />
#<br />
# Default value matches none:<br />
VB_GUESTS=()<br />
<br />
# User to run Virtual Box as:<br />
VB_USER='vbox'<br />
</nowiki>}}<br />
<br />
The script:<br />
{{File|name=/etc/rc.d/vbox_service|content=<nowiki><br />
#!/bin/bash<br />
<br />
. /etc/rc.conf<br />
. /etc/rc.d/functions<br />
<br />
unset VB_GUESTS<br />
unset VB_USER<br />
[[ -r /etc/conf.d/vbox_service ]] && . /etc/conf.d/vbox_service<br />
[[ ${VB_GUESTS[@]} ]] || VB_GUESTS=()<br />
[[ ${VB_USER[@]} ]] || VB_USER='vbox'<br />
<br />
<br />
match() {<br />
[[ $REPLY =~ $1 ]] && m=("${BASH_REMATCH[@]}")<br />
}<br />
<br />
<br />
vm_raw() {<br />
local argv=''<br />
printf -v argv ' %q ' "$@"<br />
su -c "/usr/bin/VBoxManage $argv" -s /bin/sh "$VB_USER"<br />
}<br />
<br />
vm_ls() {<br />
local -A out=''<br />
local -i ret=1<br />
<br />
local m=()<br />
while read -r; do<br />
match '^"(.+)" \{(.+)\}$'<br />
out[${m[1]}]=${m[2]}<br />
done < <(vm_raw list vms)<br />
<br />
local i=''<br />
for i in "${VB_GUESTS[@]##!*}"; do<br />
if [[ ${out[$i]} ]]; then<br />
printf ' %q ' "${out[$i]}"<br />
ret=0<br />
fi<br />
done<br />
<br />
return $ret<br />
}<br />
<br />
vm_envinit() {<br />
local m=()<br />
while read -r; do<br />
match '^(.+)="?([^"]+)'<br />
env[$1:${m[1]}]=${m[2]}<br />
done < <(vm_raw showvminfo --machinereadable "$1")<br />
}<br />
<br />
<br />
start() {<br />
if [[ ${env[$1:VMState]} != 'running' ]]; then<br />
vm_raw startvm --type headless "$1"<br />
fi<br />
}<br />
<br />
stop() {<br />
if [[ ${env[$1:VMState]} == 'running' ]]; then<br />
vm_raw controlvm "$1" savestate<br />
fi<br />
}<br />
<br />
restart() {<br />
stop "$1"<br />
sleep 3<br />
start "$1"<br />
}<br />
<br />
usage() {<br />
printf '%s\n' "usage: $0 <start|stop|restart> [name|uuid]..." >&2<br />
}<br />
<br />
<br />
if [[ ! $1 =~ ^(start|stop|restart)$ ]]; then<br />
usage<br />
exit 2<br />
fi<br />
cmd=$1<br />
shift<br />
(($#)) || eval set -- "$(vm_ls)"<br />
<br />
stat_busy "${cmd^}ing VMs:"<br />
trap 'stat_die' ERR<br />
set -Ee<br />
<br />
declare -A env=''<br />
<br />
for i; do<br />
[[ $i ]]<br />
vm_envinit "$i"<br />
stat_append "${env[$i:name]}, "<br />
$cmd "${env[$i:UUID]}" &>/dev/null<br />
done<br />
<br />
stat_done<br />
</nowiki>}}<br />
<br />
===Accessing server on VM from host===<br />
To access apache on a VM from the Host machine ONLY, simply execute the following lines on the Host:<br />
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/HostPort" 8888<br />
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/GuestPort" 80<br />
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/Protocol" TCP<br />
Where 8888 is the port the host should listen on and 80 is the port the VM will send Apache's signal on. <br />
To use a port lower than 1024 on the host machine changes need to be made to the firewall on the host machine. This can also be set up to work with SSH, etc.. by changing "Apache" to whatever service and using different ports. <br />
<br />
Note: "pcnet" refers to the network card of the VM. If you use an Intel card in your VM settings change "pcnet" to "e1000"<br />
<br />
*from [http://mydebian.blogdns.org/?p=111 ]<br />
<br />
===DAEMON Tools===<br />
While VirtualBox can mount ISO images without a problem, there are some image formats which cannot reliably be converted to ISO. For instance, ccd2iso ignores .ccd and .sub files, which can give disk images with broken files. cdemu, fuseiso, and MagicISO will do the same. In this case there is no choice but to use Daemon Tools inside VirtualBox.<br />
<br />
===Using VirtualBox on a USB key===<br />
When using VirtualBox on a USB key, for example to start an installed machine with an ISO image, you will manually have to create VDMKs from the existing drives. However, once the new VMDKs are saved and you move on to another machine, you may experience problems launching an appropriate machine again. To get rid of this issue, you can use the following script to launch VirtualBox. This script will clean up and unregister old VMDK files and it will create new, proper VMDKs for you:<br />
<pre><br />
#!/bin/bash<br />
<br />
# Erase old VMDK entries<br />
rm ~/.VirtualBox/*.vmdk<br />
<br />
# Clean up VBox-Registry<br />
sed -i '/sd/d' ~/.VirtualBox/VirtualBox.xml<br />
<br />
# Remove old harddisks from existing machines<br />
find ~/.VirtualBox/Machines -name \*.xml | while read file; do<br />
line=`grep -e "type\=\"HardDisk\"" -n $file | cut -d ':' -f 1`<br />
if [ -n "$line" ]; then<br />
sed -i ${line}d $file<br />
sed -i ${line}d $file<br />
sed -i ${line}d $file<br />
fi<br />
sed -i "/rg/d" $file<br />
done<br />
<br />
# Delete prev-files created by VirtualBox<br />
find ~/.VirtualBox/Machines -name \*-prev -exec rm '{}' \;<br />
<br />
# Recreate VMDKs<br />
ls -l /dev/disk/by-uuid | cut -d ' ' -f 9,11 | while read ln; do<br />
if [ -n "$ln" ]; then<br />
uuid=`echo "$ln" | cut -d ' ' -f 1`<br />
device=`echo "$ln" | cut -d ' ' -f 2 | cut -d '/' -f 3 | cut -b 1-3`<br />
<br />
# determine whether drive is mounted already<br />
checkstr1=`mount | grep $uuid`<br />
checkstr2=`mount | grep $device`<br />
checkstr3=`ls ~/.VirtualBox/*.vmdk | grep $device`<br />
if [[ -z "$checkstr1" && -z "$checkstr2" && -z "$checkstr3" ]]; then<br />
VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/$device.vmdk -rawdisk /dev/$device -register<br />
fi<br />
fi<br />
done<br />
<br />
# Start VirtualBox<br />
VirtualBox<br />
</pre><br />
Note that your user has to be added to the "disk" group to create VMDKs out of existing drives.<br />
<br />
===phpVirtualBox===<br />
An open source, AJAX implementation of the VirtualBox user interface written in PHP. As a modern web interface, it allows you to access and control remote VirtualBox instances. Much of its verbage and some of its code is based on the (inactive) vboxweb project. It allows the administrator to remotely, graphically, administer their virtual machines without having to log in to their headless VirtualBox servers.<br />
<br />
This requires the PUEL edition for VirtualBox (may be wrong).<br />
<br />
See [[PhpVirtualBox]] for more information about the Arch-specific installation process.<br />
<br />
An installation guide is available here:<br />
http://code.google.com/p/phpvirtualbox/wiki/Installation<br />
<br />
Arch Linux users should uncomment these 2 extensions in ''/etc/php/php.ini''<br />
extension=json.so<br />
extension=soap.so<br />
<br />
===Integrate into GTK environment===<br />
Assuming you are using a GTK theme inside an environment such as Gnome or Openbox you may want to integrate the theme used by virtualbox into your default theme. This can be done by running ''qtconfig'' and selecting GTK+ as GUI style.<br />
<br />
==Troubleshooting==<br />
===OpenBSD===<br />
Some people with older computers can have trouble running an OpenBSD VM, manifesting as bunch of segmentation faults and total unusability. Starting VirtualBox with the -norawr0 argument may solve the problem. You can do it like this:<br />
$ VBoxSDL -norawr0 -vm NameOfYourOpenBSDVM<br />
<br />
See also [[PhpVirtualBox]]<br />
<br />
==External links==<br />
* [http://www.virtualbox.org/manual/UserManual.html VirtualBox User Manual]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Package_Maintainers&diff=150182Package Maintainers2011-07-29T13:32:12Z<p>Foutrelis: </p>
<hr />
<div>[[Category:Arch development (English)]]<br />
[[fr:TU]]<br />
The '''Trusted Users''' serve the following purposes:<br />
# Maintain {{Codeline|[community]}} as an intermediary between Arch Linux's [[Official Repositories]] and the unsupported package collection in the [[AUR]].<br />
# Maintain, manage, and watch over the operation of the [[AUR]].<br />
<br />
For more information, please see [http://aur.archlinux.org/trusted-user/TUbylaws.html Trusted User Bylaws].<br />
<br />
== Active Trusted Users ==<br />
{|<br />
|- style="border-bottom:solid 2px"<br />
|style="font-weight: bold;padding-right:120px"|Nick<br />
|style="font-weight: bold;padding-right:200px"|Name<br />
|style="font-weight: bold;"|E-Mail<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=angvp&SeB=m angvp]||[[User:Angvp|Angel Velásquez]]||angvp archlinux dot org<br />
|-<br />
|-<br />
|[http://aur.archlinux.org/packages.php?SeB=m&K=Atsutane Atsutane] ||Thorsten Töpper||atsutane {0x40} freethoughts {0x2E} de<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=bluewind&SeB=m Bluewind]||Florian Pritz || bluewind@xinu.at<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=cmb&SeB=m cmb]||Chris Brannon||cmbrannon79 at gmail dot com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=cryptocrack&SeB=m cryptocrack]||Lukas Fleischer||archlinux at cryptocrack dot de<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=Daenyth&SeB=m Daenyth]||Daenyth Blank||Daenyth+Arch gmail com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=Dragonlord&SeB=m Dragonlord]||[[User:Dragonlord|Jaroslav Lichtblau]]||tu dragonlord cz<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=falconindy&SeB=m falconindy]||Dave Reisner||d[at]falconindy[dot]com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=foutrelis&SeB=m foutrelis]||Evangelos Foutras||evangelos@foutrelis.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=heftig&SeB=m heftig]||Jan Steffens||jan.steffens@student.kit.edu<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=itsbrad212&SeB=m itsbrad212]||Brad Fanella||bradfanella@archlinux.us<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=jelly&SeB=m jelly]||Jelle van der Waa || jelle vdwaa nl<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=kaitocracy&SeB=m kaitocracy]||[[User:kaitocracy|Kaiting Chen]]||kaitocracy@gmail.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=lordheavy&SeB=m Lordheavy]||[[User:Lordheavy|Laurent Carlier]]||lordheavym at gmail com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=louipc&SeB=m louipc]||[[User:louipc|Loui Chang]]||louipc dot ist at gmail company<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=ornitorrincos&SeB=m ornitorrincos]||Imanol Celaya||ilcra1989@gmail.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=Partition&SeB=m Partition]||Mateusz Herych||heniekk at gmail dot com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=petelewis&SeB=m petelewis]||Peter Lewis||plewis at aur dot archlinux dot org<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=PirateJonno&SeB=m PirateJonno]||Jonathan Conder||jonno dot conder at gmail dot com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=pressh&SeB=m pressh]||Ronald van Haren||ronald.archlinux.org<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=schivmeister&SeB=m schivmeister]||[[User:Schivmeister|Ray Rashif]]||schiv archlinux org<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=schuay&SeB=m schuay]||Jakob Gruber||jakob.gruber@gmail.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=sergej&SeB=m sergej]||Sergej Pupykin||pupykins@gmail.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=stativ&SeB=m stativ]||Lukas Jirkovsky||l.jirkovsky strange_curved_character gmail.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=StefanHusmann&SeB=m StefanHusmann]||Stefan Husmann||Stefan-husmann@t-online.de<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=svenstaro&SeB=m svenstaro]||[[User:svenstaro|Sven-Hendrik Haase]]||sh@lutzhaase.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=td123&SeB=m td123]||Thomas Dziedzic||gostrc at gmail<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=vegai&SeB=m vegai]||Vesa Kaihlavirta||vpkaihla@gmail.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?SeB=m&K=Xyne Xyne]||<--||ca . archlinux @ xyne, in reverse order<br />
|}<br />
<br />
== Inactive Trusted Users ==<br />
{|<br />
|- style="border-bottom:solid 2px"<br />
|style="font-weight: bold;padding-right:120px"|Nick<br />
|style="font-weight: bold;padding-right:200px"|Name<br />
|style="font-weight: bold;"|E-Mail<br />
|style="font-weight: bold;"|Comments/Reference<br />
|-<br />
<br />
|-<br />
|}<br />
<br />
== Some Past Trusted Users ==<br />
{|<br />
|- style="border-bottom:solid 2px"<br />
|style="font-weight: bold;padding-right:120px"|Nick<br />
|style="font-weight: bold;padding-right:200px"|Name<br />
|-<br />
|abhidg||Abhishek Dasgupta<br />
|-<br />
|Allan||Allan McRae<br />
|-<br />
|anders||Anders Bergh<br />
|-<br />
|bardo||Corrado Primier<br />
|-<br />
|bash||Andrea Scarpino<br />
|-<br />
|bfinch||Bob Finch<br />
|-<br />
|brain0||Thomas Bächler<br />
|-<br />
|bjorn||[[User:Bjørn|Bjørn Lindeijer]]<br />
|-<br />
|codemac||Jeff Mickey<br />
|-<br />
|DaNiMoTh||JJ. DaNiMoTh<br />
|-<br />
|dejari||Leslie P. Polzer<br />
|-<br />
|dsa||Douglas Soares de Andrade<br />
|-<br />
|dtw||Phil Dillon-Thiselton<br />
|-<br />
|elasticdog||Aaron Bull Schaefer<br />
|-<br />
|encelo||Angelo Theodorou<br />
|-<br />
|even ||Kessia Pinheiro<br />
|-<br />
|filoktetes||Robert Emil Berge<br />
|-<br />
|firmicus||François Charette<br />
|-<br />
|ganja_guru||Varun Acharya<br />
|-<br />
|Ghost1227||Dan Griffiths<br />
|-<br />
|gcarrier||Geoffroy Carrier<br />
|-<br />
|gummibaerchen||Timm Preetz<br />
|-<br />
|hdoria||Hugo Doria<br />
|-<br />
|iphitus||James Rayner<br />
|-<br />
|mOLOk||Alessio Bolognino<br />
|-<br />
|nesl247||Alex Heck<br />
|-<br />
|Neverth||Mikko Seppälä<br />
|-<br />
|phrakture||Aaron Griffin<br />
|-<br />
|Pierre||Pierre Schmitz<br />
|-<br />
|pizzapunk||Alexander Fehr<br />
|-<br />
|pjmattal||Paul Mattal<br />
|-<br />
|Ranguvar||Devin Cofer<br />
|-<br />
|Romashka||Roman Kyrylych<br />
|-<br />
|shastry||Vinay S Shastry<br />
|-<br />
|Snowman||Eric Bélanger<br />
|-<br />
|shinlun||Shinlun Hsieh<br />
|-<br />
|STiAT||Georg Grabler<br />
|-<br />
|swiergot||Jaroslaw Swierczynski<br />
|-<br />
|tardo||Shehzad Qureshi<br />
|-<br />
|thotypous||Paulo Matias<br />
|-<br />
|voidnull||Giovanni Scafora<br />
|-<br />
|wizzomafizzo||Callan Barrett<br />
|-<br />
|wonder || Ionut Biru<br />
|-<br />
|Xilon||Sebastian Nowicki<br />
|-<br />
|xterminus||Charles Mauch<br />
|-<br />
|zeus||Zhukov Pavel<br />
|}</div>Foutrelishttps://wiki.archlinux.org/index.php?title=DeveloperWiki:Repo_Cleanup&diff=140204DeveloperWiki:Repo Cleanup2011-05-07T00:00:36Z<p>Foutrelis: </p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
= Extra package cleanup =<br />
<br />
== Goals and ideas ==<br />
* A cleanup of the extra repository<br />
* Currently we have 441 orphans packages in [extra] (any, i686, x86_64)<br />
* Reduce the packaging work load of the developers<br />
* Minimise the number of apps per task<br />
* TUs are easier to appoint and find, it makes sense to move some of the workload to the community repo<br />
* Games should all go to community (except those that come with KDE and Gnome)<br />
<br />
== Packages list ==<br />
This packages will be moved to Unsupported, if you want to keep it in [extra] simply cross it out. Adoption is not required (but would be nice).<br />
If you are a TU and you want to maintain a package in [community] DO NOT cross it out, but add it to [[DeveloperWiki:Repo_Cleanup#Candidate_to_.5Bcommunity.5D]]<br />
<br />
* abcde<br />
* <s>archlinux-artwork</s> - artwork<br />
* <s>archlinux-themes-slim</s> - artwork<br />
* <s>archlinux-wallpaper</s> - artwork<br />
* aria2<br />
* <s>artwiz-fonts</s><br />
* <s>aspell-*</s> - languages support<br />
* <s>atkmm-docs</s> - part of the atkmm package<br />
* <s>aufs2</s> - needed by aufs2-util<br />
* <s>banshee</s><br />
* bladeenc<br />
* bs<br />
* <s>chkrootkit</s><br />
* <s>chromium</s> - adopted by me (foutrelis)<br />
* <s>clang-analyzer</s> - part of the llvm package<br />
* cscope<br />
* dosbox<br />
* <s>eog-plugins</s> - recently updated, ioni/heftig should adopt it<br />
* <s>eric4-plugins</s> - should be adopted by the eric4 maintainer.<br />
* ettercap-gtk<br />
* <s>festival-english</s> - voices for festival<br />
* <s>festival-us</s> - voices for festival<br />
* <s>gcdmaster</s>- part of the cdrdao package<br />
* <s>gnome-alsamixer</s><br />
* gnupod<br />
* <s>gperf</s> - makedependence of various packages<br />
* gptfdisk<br />
* gqmpeg<br />
* gtk-theme-switch2<br />
* <s>gtkmm3-docs</s> - parf ot the gtkmm3 package<br />
* <s>haskell-platform</s> - up to Vesa<br />
* <s>haskell-tar</s> - up to Vesa<br />
* <s>hunspell-hu</s> - languages support<br />
* <s>hunspell-ln</s> - languages support<br />
* <s>hyphen-hu</s> - languages support<br />
* <s>hyphen-nl</s> - languages support<br />
* icecast<br />
* <s>imap</s> - needed by php<br />
* <s>ipod-sharp</s><br />
* <s>iptraf-ng</s><br />
* <s>ispell</s> - needed by hunspell-de<br />
* <s>kernel26-manpages</s> - part of the kernel26 package<br />
* kmldonkey<br />
* kmplayer<br />
* krusader<br />
* <s>laptop-mode-tools</s> - keep this, Andrea<br />
* libbtctl<br />
* <s>llvm-ocaml</s> - part of the llvm package<br />
* <s>ltrace</s> - adopted by me (foutrelis)<br />
* <s>mailman</s> - keep this, Andrea<br />
* mc<br />
* <s>meld</s><br />
* <s>mm-common</s> - needed by gtkmm3<br />
* monotone<br />
* <s>mythes-hu</s> - languages support<br />
* <s>mythes-nl</s> - languages support<br />
* nbsmtp<br />
* nickle<br />
* nppangband<br />
* numlockx<br />
* <s>obconf</s> - keep this for OpenBox users, Andrea<br />
* perl-text-csv<br />
* <s>perl-text-patch</s> - needed by perl-alien-sdl<br />
* proftpd<br />
* python-gtkglext<br />
* <s>qt3-doc</s> - part of the qt3 package<br />
* <s>ruby-docs</s> - part of the ruby package<br />
* <s>slim-themes</s> - themes for slim<br />
* speedcrunch<br />
* tango-icon-theme-extras<br />
* <s>texi2html</s> - needed by qemu<br />
* <s>ttf-cheapskate</s><br />
* <s>ttf-fireflysung</s> - keep this for i18n support, Eric<br />
* <s>ttf-tibetan-machine</s> - keep this for i18n support, Eric<br />
* <s>ttf-ubraille</s> - keep this for blind users, Andrea<br />
* vbetool<br />
* vim-a<br />
* vim-bufexplorer<br />
* vim-colorsamplerpack<br />
* vim-doxygentoolkit<br />
* vim-guicolorscheme<br />
* vim-minibufexpl<br />
* vim-omnicppcomplete<br />
* vim-project<br />
* vim-taglist<br />
* vim-vcscommand<br />
* vim-workspace<br />
* xchat-gnome<br />
* <s>xf86-input-wacom</s> - up to Jan<br />
* <s>xorg-xfontsel</s> - up to Jan<br />
* <s>xorg-xlsfonts</s> - up to Jan<br />
* <s>xorg-xvidtune</s> - up to Jan<br />
<br />
== Candidate to [community] ==<br />
<br />
abcde - (schuay)<br />
<br />
mc - (schuay)<br />
<br />
chromium - just switched to chromium from being a long time ff user, I would be more then happy to maintain it (td123)<br />
<br />
aria2 - I have used this occasionally in the past for torrents, so I would be willing to maintain this fine utility (td123)<br />
<br />
dosbox - Good stuff (svenstaro)<br />
<br />
vim-a - (svenstaro)<br />
<br />
vim-bufexplorer - (svenstaro)<br />
<br />
vim-colorsamplerpack - (svenstaro)<br />
<br />
vim-doxygentoolkit - (svenstaro)<br />
<br />
vim-guicolorscheme - (svenstaro)<br />
<br />
vim-minibufexpl - (svenstaro)<br />
<br />
vim-omnicppcomplete - (svenstaro)<br />
<br />
vim-project - (svenstaro)<br />
<br />
vim-taglist - (svenstaro)<br />
<br />
vim-vcscommand - (svenstaro)<br />
<br />
vim-workspace - (svenstaro)<br />
<br />
= Issues =</div>Foutrelishttps://wiki.archlinux.org/index.php?title=DeveloperWiki:Repo_Cleanup&diff=140203DeveloperWiki:Repo Cleanup2011-05-06T23:57:12Z<p>Foutrelis: </p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
= Extra package cleanup =<br />
<br />
== Goals and ideas ==<br />
* A cleanup of the extra repository<br />
* Currently we have 441 orphans packages in [extra] (any, i686, x86_64)<br />
* Reduce the packaging work load of the developers<br />
* Minimise the number of apps per task<br />
* TUs are easier to appoint and find, it makes sense to move some of the workload to the community repo<br />
* Games should all go to community (except those that come with KDE and Gnome)<br />
<br />
== Packages list ==<br />
This packages will be moved to Unsupported, if you want to keep it in [extra] simply cross it out. Adoption is not required (but would be nice).<br />
If you are a TU and you want to maintain a package in [community] DO NOT cross it out, but add it to [[DeveloperWiki:Repo_Cleanup#Candidate_to_.5Bcommunity.5D]]<br />
<br />
* abcde<br />
* <s>archlinux-artwork</s> - artwork<br />
* <s>archlinux-themes-slim</s> - artwork<br />
* <s>archlinux-wallpaper</s> - artwork<br />
* aria2<br />
* <s>artwiz-fonts</s><br />
* <s>aspell-*</s> - languages support<br />
* <s>atkmm-docs</s> - part of the atkmm package<br />
* <s>aufs2</s> - needed by aufs2-util<br />
* <s>banshee</s><br />
* bladeenc<br />
* bs<br />
* <s>chkrootkit</s><br />
* <s>chromium</s> - adopted by me (foutrelis)<br />
* <s>clang-analyzer</s> - part of the llvm package<br />
* cscope<br />
* dosbox<br />
* <s>eog-plugins</s> - recently updated, ioni/heftig should adopt it<br />
* <s>eric4-plugins</s> - should be adopted by the eric4 maintainer.<br />
* ettercap-gtk<br />
* <s>festival-english</s> - voices for festival<br />
* <s>festival-us</s> - voices for festival<br />
* <s>gcdmaster</s>- part of the cdrdao package<br />
* <s>gnome-alsamixer</s><br />
* gnupod<br />
* <s>gperf</s> - makedependence of various packages<br />
* gptfdisk<br />
* gqmpeg<br />
* gtk-theme-switch2<br />
* <s>gtkmm3-docs</s> - parf ot the gtkmm3 package<br />
* <s>haskell-platform</s> - up to Vesa<br />
* <s>haskell-tar</s> - up to Vesa<br />
* <s>hunspell-hu</s> - languages support<br />
* <s>hunspell-ln</s> - languages support<br />
* <s>hyphen-hu</s> - languages support<br />
* <s>hyphen-nl</s> - languages support<br />
* icecast<br />
* <s>imap</s> - needed by php<br />
* <s>ipod-sharp</s><br />
* <s>iptraf-ng</s><br />
* <s>ispell</s> - needed by hunspell-de<br />
* <s>kernel26-manpages</s> - part of the kernel26 package<br />
* kmldonkey<br />
* kmplayer<br />
* krusader<br />
* <s>laptop-mode-tools</s> - keep this, Andrea<br />
* libbtctl<br />
* <s>llvm-ocaml</s> - part of the llvm package<br />
* ltrace<br />
* <s>mailman</s> - keep this, Andrea<br />
* mc<br />
* <s>meld</s><br />
* <s>mm-common</s> - needed by gtkmm3<br />
* monotone<br />
* <s>mythes-hu</s> - languages support<br />
* <s>mythes-nl</s> - languages support<br />
* nbsmtp<br />
* nickle<br />
* nppangband<br />
* numlockx<br />
* <s>obconf</s> - keep this for OpenBox users, Andrea<br />
* perl-text-csv<br />
* <s>perl-text-patch</s> - needed by perl-alien-sdl<br />
* proftpd<br />
* python-gtkglext<br />
* <s>qt3-doc</s> - part of the qt3 package<br />
* <s>ruby-docs</s> - part of the ruby package<br />
* <s>slim-themes</s> - themes for slim<br />
* speedcrunch<br />
* tango-icon-theme-extras<br />
* <s>texi2html</s> - needed by qemu<br />
* <s>ttf-cheapskate</s><br />
* <s>ttf-fireflysung</s> - keep this for i18n support, Eric<br />
* <s>ttf-tibetan-machine</s> - keep this for i18n support, Eric<br />
* <s>ttf-ubraille</s> - keep this for blind users, Andrea<br />
* vbetool<br />
* vim-a<br />
* vim-bufexplorer<br />
* vim-colorsamplerpack<br />
* vim-doxygentoolkit<br />
* vim-guicolorscheme<br />
* vim-minibufexpl<br />
* vim-omnicppcomplete<br />
* vim-project<br />
* vim-taglist<br />
* vim-vcscommand<br />
* vim-workspace<br />
* xchat-gnome<br />
* <s>xf86-input-wacom</s> - up to Jan<br />
* <s>xorg-xfontsel</s> - up to Jan<br />
* <s>xorg-xlsfonts</s> - up to Jan<br />
* <s>xorg-xvidtune</s> - up to Jan<br />
<br />
== Candidate to [community] ==<br />
<br />
abcde - (schuay)<br />
<br />
mc - (schuay)<br />
<br />
chromium - just switched to chromium from being a long time ff user, I would be more then happy to maintain it (td123)<br />
<br />
aria2 - I have used this occasionally in the past for torrents, so I would be willing to maintain this fine utility (td123)<br />
<br />
dosbox - Good stuff (svenstaro)<br />
<br />
vim-a - (svenstaro)<br />
<br />
vim-bufexplorer - (svenstaro)<br />
<br />
vim-colorsamplerpack - (svenstaro)<br />
<br />
vim-doxygentoolkit - (svenstaro)<br />
<br />
vim-guicolorscheme - (svenstaro)<br />
<br />
vim-minibufexpl - (svenstaro)<br />
<br />
vim-omnicppcomplete - (svenstaro)<br />
<br />
vim-project - (svenstaro)<br />
<br />
vim-taglist - (svenstaro)<br />
<br />
vim-vcscommand - (svenstaro)<br />
<br />
vim-workspace - (svenstaro)<br />
<br />
= Issues =</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Package_Maintainers&diff=124580Package Maintainers2010-12-09T14:49:11Z<p>Foutrelis: Unobfuscate my email.</p>
<hr />
<div>[[Category:Arch development (English)]]<br />
The '''Trusted Users''' serve the following purposes:<br />
# Maintain {{Codeline|[community]}} as an intermediary between Arch Linux's [[Official Repositories]] and the unsupported package collection in the [[AUR]].<br />
# Maintain, manage, and watch over the operation of the [[AUR]].<br />
<br />
For more information, please see [http://aur.archlinux.org/trusted-user/TUbylaws.html Trusted User Bylaws].<br />
<br />
== Active Trusted Users ==<br />
{|<br />
|- style="border-bottom:solid 2px"<br />
|style="font-weight: bold;padding-right:120px"|Nick<br />
|style="font-weight: bold;padding-right:200px"|Name<br />
|style="font-weight: bold;"|E-Mail<br />
|-<br />
|[http://aur.archlinux.org/packages.php?SeB=m&K=Atsutane Atsutane] ||Thorsten Töpper||atsutane {0x40} freethoughts {0x2E} de<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=bash&SeB=m bash]||Andrea Scarpino||andrea archlinux org<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=bluewind&SeB=m Bluewind]||Florian Pritz || florian@server-speed.net<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=cmb&SeB=m cmb]||Chris Brannon||cmbrannon79 at gmail dot com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=cryptocrack&SeB=m cryptocrack]||Lukas Fleischer||archlinux at cryptocrack dot de<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=Daenyth&SeB=m Daenyth]||Daenyth Blank||Daenyth+Arch gmail com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=Dragonlord&SeB=m Dragonlord]||[[User:Dragonlord|Jaroslav Lichtblau]]||tu dragonlord cz<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=elasticdog&SeB=m elasticdog]||Aaron Schaefer||aaron [at] elasticdog dot com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=foutrelis&SeB=m foutrelis]||Evangelos Foutras||foutrelis@gmail.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=heftig&SeB=m heftig]||Jan Steffens||jan.steffens@student.kit.edu<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=itsbrad212&SeB=m itsbrad212]||Brad Fanella||bradfanella@archlinux.us<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=kaitocracy&SeB=m kaitocracy]||[[User:kaitocracy|Kaiting Chen]]||kaitocracy@gmail.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=lordheavy&SeB=m Lordheavy]||[[User:Lordheavy|Laurent Carlier]]||lordheavym at gmail com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=louipc&SeB=m louipc]||[[User:louipc|Loui Chang]]||louipc dot ist at gmail company<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=ornitorrincos&SeB=m ornitorrincos]||Imanol Celaya||ilcra1989@gmail.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=Partition&SeB=m Partition]||Mateusz Herych||heniekk at gmail dot com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=petelewis&SeB=m petelewis]||Peter Lewis||pete at muddygoat dot org<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=PirateJonno&SeB=m PirateJonno]||Jonathan Conder||jonno dot conder at gmail dot com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=pressh&SeB=m pressh]||Ronald van Haren||ronald.archlinux.org<br />
|-<br />
|[http://aur.archlinux.org/packages.php?SeB=m&K=Ranguvar Ranguvar] ||Devin Cofer||ranguvar {AT] archlinux {DOT] us<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=schivmeister&SeB=m schivmeister]||[[User:Schivmeister|Ray Rashif]]||schiv archlinux org<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=schuay&SeB=m schuay]||Jakob Gruber||jakob.gruber@gmail.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=sergej&SeB=m sergej]||Sergej Pupykin||pupykins@gmail.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=stativ&SeB=m stativ]||Lukas Jirkovsky||l.jirkovsky strange_curved_character gmail.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=StefanHusmann&SeB=m StefanHusmann]||Stefan Husmann||Stefan-husmann@t-online.de<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=svenstaro&SeB=m svenstaro]||[[User:svenstaro|Sven-Hendrik Haase]]||sh@lutzhaase.com<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=td123&SeB=m td123]||Thomas Dziedzic||gostrc at gmail<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=vegai&SeB=m vegai]||Vesa Kaihlavirta||vpkaihla@gmail.com<br />
|-<br />
|[http://www.archlinux.org/packages/?repo=Community&limit=50&maintainer=ibiru&sort=pkgname wonder]||Ionuț Bîru||ibiru@archlinux.org<br />
|-<br />
|[http://aur.archlinux.org/packages.php?SeB=m&K=Xyne Xyne]||<--||ca . archlinux @ xyne, in reverse order<br />
|}<br />
<br />
== Inactive Trusted Users ==<br />
{|<br />
|- style="border-bottom:solid 2px"<br />
|style="font-weight: bold;padding-right:120px"|Nick<br />
|style="font-weight: bold;padding-right:200px"|Name<br />
|style="font-weight: bold;"|E-Mail<br />
|style="font-weight: bold;"|Comments/Reference<br />
|-<br />
|[http://aur.archlinux.org/packages.php?K=angvp&SeB=m angvp]||[[User:Angvp|Angel Velásquez]]||angvp archlinux dot com dot ve||No Internet access at home <br />
|-<br />
<br />
|}<br />
<br />
== Some Past Trusted Users ==<br />
{|<br />
|- style="border-bottom:solid 2px"<br />
|style="font-weight: bold;padding-right:120px"|Nick<br />
|style="font-weight: bold;padding-right:200px"|Name<br />
|-<br />
|abhidg||Abhishek Dasgupta<br />
|-<br />
|Allan||Allan McRae<br />
|-<br />
|anders||Anders Bergh<br />
|-<br />
|bardo||Corrado Primier<br />
|-<br />
|bfinch||Bob Finch<br />
|-<br />
|brain0||Thomas Bächler<br />
|-<br />
|bjorn||Bjørn Lindeijer<br />
|-<br />
|codemac||Jeff Mickey<br />
|-<br />
|DaNiMoTh||JJ. DaNiMoTh<br />
|-<br />
|dejari||Leslie P. Polzer<br />
|-<br />
|dsa||Douglas Soares de Andrade<br />
|-<br />
|dtw||Phil Dillon-Thiselton<br />
|-<br />
|encelo||Angelo Theodorou<br />
|-<br />
|even ||Kessia Pinheiro<br />
|-<br />
|filoktetes||Robert Emil Berge<br />
|-<br />
|firmicus||François Charette<br />
|-<br />
|ganja_guru||Varun Acharya<br />
|-<br />
|Ghost1227||Dan Griffiths<br />
|-<br />
|gcarrier||Geoffroy Carrier<br />
|-<br />
|gummibaerchen||Timm Preetz<br />
|-<br />
|hdoria||Hugo Doria<br />
|-<br />
|iphitus||James Rayner<br />
|-<br />
|mOLOk||Alessio Bolognino<br />
|-<br />
|nesl247||Alex Heck<br />
|-<br />
|Neverth||Mikko Seppälä<br />
|-<br />
|phrakture||Aaron Griffin<br />
|-<br />
|Pierre||Pierre Schmitz<br />
|-<br />
|pizzapunk||Alexander Fehr<br />
|-<br />
|pjmattal||Paul Mattal<br />
|-<br />
|Romashka||Roman Kyrylych<br />
|-<br />
|shastry||Vinay S Shastry<br />
|-<br />
|Snowman||Eric Bélanger<br />
|-<br />
|shinlun||Shinlun Hsieh<br />
|-<br />
|STiAT||Georg Grabler<br />
|-<br />
|swiergot||Jaroslaw Swierczynski<br />
|-<br />
|tardo||Shehzad Qureshi<br />
|-<br />
|thotypous||Paulo Matias<br />
|-<br />
|voidnull||Giovanni Scafora<br />
|-<br />
|wizzomafizzo||Callan Barrett<br />
|-<br />
|Xilon||Sebastian Nowicki<br />
|-<br />
|xterminus||Charles Mauch<br />
|-<br />
|zeus||Zhukov Pavel<br />
|}</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Python/Virtual_environment&diff=121428Python/Virtual environment2010-11-15T21:58:57Z<p>Foutrelis: Random fixes (mostly typos).</p>
<hr />
<div>[[Category:Development (English)]]<br />
<br />
==Introduction==<br />
''virtualenv'' is a Python tool written by Ian Bicking and used to create isolated environments for Python in which you can install packages without interfering with the other virtualenvs nor with the system Python's packages.<br />
The present article covers the installation of the ''virtualenv'' package and its companion command line utility ''virtualenvwrapper'' designed by Doug Hellmann to (greatly) improve your work flow. A quick how-to to help you to begin working inside virtual environment is then provided.<br />
<br />
==Virtual Environments at a glance==<br />
''virtualenv'' is a tool designated to address the problem of dealing with packages' dependencies while maintaining different versions that suit projects' needs. For example, if you work on two Django web sites, say one that needs Django 1.2 while the other needs the good old 0.96. You have no way to keep both versions if you install them into /usr/lib/python2/site-packages . Thanks to virtualenv it's possible, by creating two isolated environments, to have the two development environment to play along nicely.<br />
<br />
''vitualenvwrapper'' takes ''virtualenv'' a step further by providing convenient commands you can invoke from your favorite console.<br />
<br />
<br />
== Virtualenv ==<br />
<br />
Currently ''virtualenv'' only supports Python up to version 2.7. If you really need virtual environment on Python 3, check out the [http://bitbucket.org/brandon/virtualenv3 virtualenv3] project on Bitbucket.<br />
<br />
===Installation===<br />
Simply install python-virtualenv from the community repository and you're done:<br />
# pacman -S python-virtualenv<br />
<br />
===Basic Usage===<br />
An extended tutorial on how use ''virtualenv'' for sandboxing can be found [http://wiki.pylonshq.com/display/pylonscookbook/Using+a+Virtualenv+Sandbox here].<br />
<br />
The typical use case is:<br />
* Create a folder for the new virtualenv:<br />
$ mkdir ~/.virtualenvs/my_env<br />
* Create the virtualenv, here without package inheritance from the system's installation: <br />
$ virtualenv --no-site-pacakges ~/.virtualenvs/my_env<br />
* Activate the virtualenv: <br />
$ source ~/.virtualenvs/my_env/bin/activate<br />
* Install some package inside the virtualenv (say, Django):<br />
(my_env)$ easy_install django<br />
* Do your things<br />
* Leave the virtualenv:<br />
(my_env)$ deactivate<br />
<br />
== Virtualenvwrapper ==<br />
<br />
''virtualenvwrapper'' allows more natural command line interaction with your virtualenvs by exposing several useful commands to create, activate and remove virtualenvs. Like ''virtualenv'', this package does not currently support Python 3.x.<br />
<br />
===Installation===<br />
Install python-virtualenvwrapper from community. If you have not installed python-virtualenv yet, it will be installed now as a dependency.<br />
# pacman -S python-virtualenvwrapper<br />
<br />
Now add the following lines to your .bashrc:<br />
export WORKON_HOME=~/.virtualenvs<br />
source /usr/bin/virtualenvwrapper.sh<br />
<br />
Re-open your console and create the WORKON_HOME folder:<br />
$ mkdir $WORKON_HOME<br />
<br />
===Basic Usage===<br />
The main information source on virtualenvwrapper usage (and extension capability) is Doug Hellmann's [http://www.doughellmann.com/docs/virtualenvwrapper/ page].<br />
<br />
* Create the virtualenv:<br />
$ mkvirtualenv --no-site-pacakges my_env<br />
* Activate the virtualenv:<br />
$ workon my_enve<br />
* Install some package inside the virtualenv (say, Django):<br />
$ (my_env)$ easy_install django<br />
* Do your things<br />
* Leave the virtualenv: <br />
(my_env)$ deactivate<br />
<br />
== See Also ==<br />
<ul><br />
<li>[http://pypi.python.org/pypi/virtualenv virtualenv Pypi page]</li><br />
<li>[http://wiki.pylonshq.com/display/pylonscookbook/Using+a+Virtualenv+Sandbox Tutorial for virtualenv]</li><br />
<li>[http://www.doughellmann.com/docs/virtualenvwrapper/ virtualenvwrapper page at Doug Hellmann's]</li><br />
</ul></div>Foutrelishttps://wiki.archlinux.org/index.php?title=Tint&diff=116845Tint2010-09-12T13:50:36Z<p>Foutrelis: /* PKGBUILD from AUR */</p>
<hr />
<div>[[Category:Eye candy (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
<br />
==Introduction==<br />
From the project's [http://code.google.com/p/ttm/ homepage]:<br />
<br />
''ttm is a simple panel/taskbar intentionally made for openbox3, but should also work with other window managers. It's still in early development so please report bugs :)''<br />
<br />
===Features===<br />
* background button-border effect (see screenshot)<br />
* font shadow<br />
* option to center tasks<br />
* option to change panel width/height<br />
* tasks do now squeeze (more or less) when they hit panel edge<br />
* middle-click closes window<br />
* left-click toggles shade<br />
<br />
===Requirements===<br />
In order to grab the latest (svn) snapshot of tint's source code, you'll need to install subversion (a versioning system):<br />
# pacman -S subversion<br />
<br />
==Installation==<br />
<br />
=== PKGBUILD from AUR ===<br />
<br />
Tint's [http://aur.archlinux.org/packages.php?ID=40739 PKGBUILD] is now available in [[AUR]]. Build it with [[Makepkg]] and install with pacman.<br />
<br />
The config file will be created on tint's first run at .config/tint/tintrc<br />
<br />
=== Compiling from source ===<br />
Open your favourite terminal and enter:<br />
$ svn checkout http://ttm.googlecode.com/svn/trunk/ ttm<br />
$ cd ./ttm/src<br />
$ make<br />
$ sudo make install<br />
Now copy the sample config:<br />
$ cd ..<br />
$ mkdir -p ~/.config/tint/<br />
$ cp config_sample ~/.config/tint/tintrc<br />
<br />
=== Other Installation Methods ===<br />
Edit your /etc/pacman.conf and add:<br />
<br />
[rfad]<br />
# Repository made by haxit | Contact: requiem [at] archlinux.us for package suggestions!<br />
Server = http://web.ncf.ca/ey723/archlinux/repo/<br />
<br />
And then run the following:<br />
<br />
pacman -S tint<br />
<br />
== Running Tint ==<br />
<br />
You should now be able to launch tint as you would any other application (e.g. Alt+F2 -> tint). To run it at startup, you can add it to the ~/.xinitrc, or ~/.config/openbox/autostart.sh file, for example:<br />
<br />
xscreensaver -no-splash &<br />
eval `cat $HOME/.fehbg` &<br />
conky &<br />
visibility &<br />
'''''tint &'''''<br />
exec openbox-session<br />
<br />
== Other Resources ==<br />
<br />
[http://tint2.googlecode.com/files/tint-0.6.pdf Tint 0.6 Documentation (PDF)]<br />
<br />
[http://tint2.googlecode.com/files/tint2-0.7.pdf Tint2 0.7 Documentation (PDF)]</div>Foutrelishttps://wiki.archlinux.org/index.php?title=AMD_Catalyst&diff=114627AMD Catalyst2010-08-22T02:13:39Z<p>Foutrelis: [new_xvba] is not needed.</p>
<hr />
<div>[[Category: Graphics (English)]]<br />
[[Category: X Server (English)]]<br />
[[Category: HOWTOs (English)]]<br />
{{i18n|ATI Catalyst}}<br />
{{Article summary start}}<br />
{{Article summary text|An overview of ATI's proprietary "Catalyst" video card driver.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|ATI}}<br />
{{Article summary wiki|Intel}}<br />
{{Article summary wiki|NVIDIA}}<br />
{{Article summary wiki|Xorg}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|cchtml.com - Unofficial Wiki for the ATI Linux Driver|http://wiki.cchtml.com/index.php/Main_Page}}<br />
{{Article summary link|Unofficial ATI Linux Driver Bugzilla|http://ati.cchtml.com/query.cgi}}<br />
{{Article summary end}}<br />
Formerly known as ''fglrx'', ATI has rebranded their proprietary Linux driver, which is now known as ''Catalyst''. Currently, only the package name has changed, while the kernel module retains its original ''fglrx'' name, therefore any mention of fglrx below is specifically in reference to the kernel module, ''not the package.''<br />
<br />
==Naming conventions==<br />
ATI's [[Wikipedia:Radeon|Radeon]] brand follows a naming scheme that relates each product to a market segment. Within this article, readers will see both ''product'' names (e.g. HD 4850, X1900) and ''code'' or ''core'' names (e.g. RV770, R580). Traditionally, a ''product series'' will correspond to a ''core series'' (e.g. the "X1000" product series includes the X1300, X1600, X1800, and X1900 products which utilize the "R500" core series &ndash; including the RV515, RV530, R520, and R580 cores).<br />
<br />
For a table of core and product series, see [[Wikipedia:Comparison of AMD graphics processing units]].<br />
<br />
== Supported devices ==<br />
Since v. '''9.4''', the proprietary ATI driver '''supports only R600 and newer devices''' (that means, '''HD2xxx''' and '''newer'''). For older cards, you can only use '''xf86-video-ati'''.<br />
<br />
== Installation ==<br />
Catalyst was once a precompiled package offered by Arch in the <code>extra</code> repository, but as of March 2009, official support has been dropped because of dissatisfaction with the quality and speed of development of the proprietary driver. The [http://aur.archlinux.org/packages.php?ID=29111 catalyst driver] is available on AUR.<br />
<br />
=== Stock and Custom Kernels ===<br />
<br />
You can build [http://aur.archlinux.org/packages.php?ID=29111 AUR's catalyst] package via [[makepkg]] (recommended) or by using popular AUR's packages manager like bauerbill/yaourt.<br />
<br />
{{Note| You may get an error about the Catalyst package conflicting with ''libgl''. In that case, run the following code to remove libgl without checking dependencies (Catalyst provides libgl package, so this is safe):<br />
# pacman -Rd libgl<br />
After doing this you can install catalyst package using ie. # pacman -U /patch/to/builded/catalyst_package.tar.xz}}<br />
<br />
After installing package you probably need to configure xorg. Using provided '''aticonfig''' tool is recommended:<br />
<pre><br />
# aticonfig --initial<br />
(or for Dual Head: # aticonfig --initial=dual-head)<br />
# aticonfig -v<br />
</pre><br />
And add '''nomodeset''' to your kernel line in /boot/grub/menu.lst , ie.:<br />
<code>kernel /boot/vmlinuz26 root=/dev/sda1 ro nomodeset</code><br />
Plus add '''fglrx''' to the MODULES list in /etc/rc.conf."<br />
<br />
You may now reboot your system, or just load fglrx module with:<br />
# modprobe fglrx<br />
and restart/start X.<br />
<br />
Now if you have got x86_64 architecture system and want to use some 32-bit opengl programs or wine games you will have to install [http://aur.archlinux.org/packages.php?ID=24824 AUR's lib32-catalyst-utils]<br />
<br />
Since version 10.6 arch's catalyst package is providing simple script/command called '''catalyst_build_module''' which is able to compile and install fglrx module for every kernel you are using. This command is called with every catalyst's package install/update.<br />
You may also run it manually as root to build fglrx module for kernel you are currently running.<br />
<br />
If you are using '''more than one kernel''' - you can simply build fglrx module for whatever kernel you've got without even booting that kernel, do it as root with this command:<br />
# catalyst_build_module ''kernel_version''<br />
where ''kernel_version'' is version of kernel for which you want to build fglrx module, more precise example:<br />
# catalyst_build_module 2.6.35-rc4-rc<br />
<br />
You may also use this command:<br />
# catalyst_build_module all<br />
to build fglrx module for every working system's kernel.<br />
<br />
Use '''catalyst_build_module remove''' command to remove every unused fglrx module:<br />
# catalyst_build_module remove<br />
<br />
catalyst_build_module is storing all informations about compilling/installig fglrx module in '''log''' file placed in /var/log/catalys-install.log. But you don't need to remember it, you will be informed about that fact whenever installation fails.<br />
<br />
If you '''aren't using stock kernel''' (kernel26) at all - you can remove it from dependency array (depends=) in catalyst's PKGBUILD.<br />
<br />
''If you need more information on catalyst, visit [http://bbs.archlinux.org/viewtopic.php?id=57084 this thread] or create a new one, and ask there.''<br />
<br />
<br />
==== Automatic re-compilation of fglrx module with every kernel update (important) ====<br />
<br />
Since version 10.7-3 catalyst is '''optionally''' providing 'automatic re-compilation of fglrx module with every kernel update' functionality. It is done by a '''fglrx hook''' on [[mkinitcpio]] with combination of forcing to update package '''kernel26-headers''' in first place.<br />
<br />
The hook will call '''catalyst_build_module''' command to update fglrx module for the version of your new kernel, and additionally it will call '''catalyst_build_module remove''' command to remove unneeded flgrx module(s).<br />
<br />
This auto re-compilation functionality is '''bypassing Arch Way by making entries in system's config files''' (adding fglrx to HOOKS list of /etc/mkinitcpio.conf and adding kernel26-headers to SyncFirst list of /etc/pacman.conf) so it cannot be enabled by default. '''Although it's recommended to use this feature''' - especially for people who like comfort or for those who aren't sure will they remember to run 'catalyst_build_module new_kernel_version' after every main kernel update.<br />
<br />
It's very easy to enable this functionality, just run this command as root:<br />
# catalyst_build_module auto<br />
You can also turn it off with:<br />
# catalyst_build_module autooff<br />
<br />
{{Note| If you are using this functionality it's '''important''' to look at the installation process of kernel26 (or any other kernel) package. fglrx hook will tell you is everything all right.}}<br />
{{Note| If your '''custom kernel''' is using some '''non-standard mkinitcpio configuration file''' (ie. kernel26-zen is using /etc/mkinitcpio-zen.conf) you'll have to manually add '''fglrx''' to HOOKS array so it can be auto-recompiled with kernel's update.}}<br />
{{Note| If you '''aren't using stock kernel26''' at all and still wanna use auto recompilation you should remove kernel26-headers from SyncFirst list of /etc/pacman.conf after running 'catalyst_build_module auto'.}}<br />
<br />
===== Troubleshooting =====<br />
There is some '''disadvantage of using automatic re-compilation''' - but should exist only with catalyst < 10.7-2 when kernel26 got some main update (ie. 2.6.34->2.6.35, not 2.6.34.1->2.6.34.2) because package kernel26-headers is installed after kernel26 installation, and so fglrx hook have no headers to build fglrx module. In that situation run:<br />
# catalyst_build_module ''new_kernel_version''<br />
ie. # catalyst_build_module 2.6.35-ARCH<br />
just after main kernel26/kernel26-headers update.<br />
<br />
=== Catalyst's repositories ===<br />
<br />
There are some unofficial repositories containing the newest (or older) catalyst packages along with the appropriate libs and software in order to use the driver.<br />
<br />
{{Note| If you want to know what packages are inside any given repository you need to first add repository to pacman.conf and then list repository with pacman -Sl command, ie.:<br />
# pacman -Sl catalyst<br />
}}<br />
==== Main repository ====<br />
There is a repository called '''[catalyst]''' which contains '''newest stable catalyst driver''' and some additional packages like '''patched xorg-server'''.<br />
This repository should now work with any kernel and with multiple-kernels systems (read [http://wiki.archlinux.org/index.php/ATI_Catalyst#Stock_and_Custom_Kernels Stock and Custom Kernels] section) and it is updated most frequently.<br />
To use it you need as root:<br />
<br />
'''1)''' Edit /etc/pacman.conf and add those lines above all other repositories:<br />
<br />
For i686 systems:<br />
[catalyst]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst/i686<br />
<br />
For x86_64 systems:<br />
[catalyst]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst/x86_64<br />
<br />
ie. for x86_64 systems pacman.conf should look like:<br />
<br />
(...)<br />
[catalyst]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst/x86_64<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
(...)<br />
<br />
'''2)''' Update repositories and packages with:<br />
# pacman -Syy<br />
# pacman -Suu<br />
<br />
'''3)''' Remove libgl package and install catalyst:<br />
# pacman -Rd libgl<br />
# pacman -S catalyst<br />
<br />
'''4)''' '''Don't forget''' to prepare your /etc/X11/xorg.conf for catalyst. Use aticonfig --initial if you don't have prepared xorg.conf.<br />
Also add fglrx module to MODULES array in /etc/rc.conf<br />
<br />
'''5) Reboot'''<br />
<br />
[catalyst] repo brings package called '''catalyst-module-only''' which provides working fglrx module for stock ARCH kernel. It is directed to people who are getting problems with compilation.<br />
Note versioning of this package - ie. '''10.7'''-'''34''' is telling with which catalyst (here '''10.7''') it is working and which ARCH stock kernel (here 2.6.'''34'''-ARCH) it supports.<br />
<br />
For '''x86_64''' users '''[catalyst]''' provides lib32-catalyst-utils package needed to run 32-bit opengl applications and wine games.<br />
<br />
Repository also contains '''xvba-video''' package so you may easily use '''video acceleration''' described [http://wiki.archlinux.org/index.php/ATI_Catalyst#Video_acceleration below].<br />
<br />
<br />
===== Troubleshooting =====<br />
<br />
====== Black/grey/white boxes/artifacts mainly in firefox/thunderbird ======<br />
With catalyst 10.6 AMD/ATi announce new method of 2D acceleration for radeons, that funcionality has fixed problems with maximizing/resizing windows. Unfortunately this step causes bugs for some users. To turn on old (slower xaa) method of 2d rendering please kill your desktop environment and Xserver and type this command as root:<br />
aticonfig --set-pcs-str=DDX,ForceXAA,TRUE<br />
<br />
If you do that '''it's better to use one of patched xorg-server packages''' delivered by [catalyst] repository.<br />
<br />
'''[catalyst]''' repository contains [http://catalyst.apocalypsus.net/tarball/xorg-server-backclear.tar.gz xorg-server-backclear] (patched with backclear patch) and [http://aur.archlinux.org/packages.php?ID=36328 xorg-server-1.8-'''catalyst-maximize-fix'''] (patched with fedora patch) packages. Both this patches are fixing problems with '''maximizing/resizing''' but they are doing it in different way - you may choose which patched xserver is best for you. To remove xorg-server and install xorg-server-backclear just type:<br />
# pacman -Rd xorg-server<br />
# pacman -S xorg-server-backclear<br />
Similar with xorg-server-1.8-catalyst-maximize-fix.<br />
<br />
====== Xserver segmentation fault ======<br />
Rebuild your xorg.conf with:<br />
aticonfig --initial<br />
or: <br />
aticonfig --initial --force<br />
(if its still not woking then remove /etc/X11/xorg.conf and use one of these two commands mentioned above)<br />
<br />
====== Keyboard/mouse not working ======<br />
Please remember that old hal's input config''' doesn't work with new xorg-server'''.<br />
<br />
Well it should work out of the box with provided with xorg-server 1.8 package files: /etc/X11/xorg.conf.d/'''10-evdev.conf''' and /etc/X11/xorg.conf.d/'''10-quirks.conf'''<br />
but it could happen that's not working / fitting to you so read more here [http://wiki.archlinux.org/index.php/Xorg Arch's Xorg wiki] or here [https://fedoraproject.org/wiki/Input_device_configuration Fedora's wiki for Input device configuration] but don't forget that in archlinux we are using '''/etc/X11/xorg.conf.d''' directory instead of fedora's /etc/xorg.conf.d<br />
<br />
{{Warning| '''Do not''' add any new xserver Section into your /etc/X11/xorg.conf - this file is still used by catalyst - i mean ie dont add any Section "InputClass" into xorg.conf because when you do this both aticonfig and amdcccle wont start cause of parsing xorg.conf error (just use /etc/X11/xorg.conf.d directory for it)}}<br />
<br />
==== Archive repositories ====<br />
<br />
'''[catalyst-10.5]''' repository works fine with 2.6.34-ARCH kernel and xserver 1.8. xorg-server package here is patched with backclear patch, and xorg-server-1.8-catalyst-maximize-fix package is patched with fedora's backfill patch.<br />
<br />
For i686:<br />
[catalyst-10.5]<br />
http://catalyst.apocalypsus.net/repo/catalyst/i686<br />
For x86_64:<br />
[catalyst-10.5]<br />
http://catalyst.apocalypsus.net/repo/catalyst/x86_64<br />
<br />
<br />
{{Note| Archive repositories listed below '''work only with kernel 2.6.33-ARCH and xserver 1.7'''. You may find xserver 1.7 packages in '''[xorg17]''' repository mentioned below. If you are using kernel other than 2.6.33-ARCH please use one of [http://catalyst.apocalypsus.net/tarball/ archive tarballs] to build catalyst for your kernel.<br />
}}<br />
<br />
<br />
'''[xorg17] repository''' contains xserver 1.7 packages, use it only if you are experiencing problems with newer xserver 1.8.<br />
<br />
'''[xorg17]''' repository contains [http://catalyst.apocalypsus.net/tarball/xorg-server-1.7-backclear.tar.gz xorg-server-backclear] (patched with backclear patch) and [http://aur.archlinux.org/packages.php?ID=35686 xorg-server-1.7-catalyst-maximize-fix] (patched with fedora patch) packages. Both this patches fix problems with '''maximizing/resizing''' but they are doing it in different way - you may choose which patched xserver is best for you. To remove xorg-server and install xorg-server-backclear just type:<br />
# pacman -Rd xorg-server<br />
# pacman -S xorg-server-backclear<br />
Similar with xorg-server-1.7-catalyst-maximize-fix<br />
<br />
To use [xorg17] repo please put those lines at the top of all other repositories in '''/etc/pacman.conf''':<br />
<br />
For i686:<br />
[xorg17]<br />
Server = http://catalyst.apocalypsus.net/repo/xorg17/i686<br />
<br />
For x86_64:<br />
[xorg17]<br />
Server = http://catalyst.apocalypsus.net/repo/xorg17/x86_64<br />
<br />
<br />
'''catalyst-10.6''' works well with xserver-1.7, got opengl 3.3/4 support, brings new 2D acceleration support, got some problems with gamma, wine games, and texturing in basing on q3a engine games:<br />
<br />
For i686:<br />
[catalyst-10.6]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst-archive/i686<br />
<br />
For x86_64:<br />
[catalyst-10.6]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst-archive/x86_64<br />
<br />
<br />
If you are experiencing known bugs/errors (ie. lots of artifacts) with catalyst 10.6 you may still use older '''catalyst-10.5''' or '''catalyst-10.4''' or '''catalyst-10.3''' repositories.<br />
<br />
'''catalyst-10.5''' and '''catalyst-10.4''' repositories contain [http://aur.archlinux.org/packages.php?ID=26687 xorg-server] (for this repositories patched with backclear patch) and [http://aur.archlinux.org/packages.php?ID=35686 xorg-server-1.7-catalyst-maximize-fix] (patched with fedora patch) packages. Both this patches fix problems with '''maximizing/resizing''' but they are doing it in different way - you may choose which patched xserver is best for you. To remove xorg-server and install xorg-server-1.7-catalyst-maximize-fix just type:<br />
# pacman -Rd xorg-server<br />
# pacman -S xorg-server-1.7-catalyst-maximize-fix<br />
<br />
<br />
'''catalyst-10.5''' works well with xserver-1.7, got opengl 3.3/4 support, but still got some problems with gamma, wine games, and texturing in basing on q3a engine games:<br />
<br />
For i686:<br />
[catalyst-10.5]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst-archive/i686<br />
<br />
For x86_64:<br />
[catalyst-10.5]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst-archive/x86_64<br />
<br />
'''catalyst-10.5''' repository also contains '''libva-sds''', '''mplayer-vaapi''' and '''xvba-video''' packages so you may easily use '''video acceleration''' described [http://wiki.archlinux.org/index.php/ATI_Catalyst#Video_acceleration below].<br />
<br />
<br />
If you don't like catalyst-10.5 you may still use older '''catalyst 10.4''' which work well with xserver-1.7, but still got some problems with gamma and wine games:<br />
<br />
For i686:<br />
[catalyst-10.4]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst-archive/i686<br />
<br />
For x86_64:<br />
[catalyst-10.4]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst-archive/x86_64<br />
<br />
<br />
Or '''catalyst-10.3'''. Catalyst 10.3 is still using old''' xserver 1.6''', which is also provided by '''[catalyst-10.3]''' repository.<br />
<br />
To use '''catalyst-10.3''' you need as root:<br />
<br />
'''1)''' Edit /etc/pacman.conf and add those lines above all other repositories:<br />
For i686:<br />
[catalyst-10.3]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst-archive/i686<br />
<br />
For x86_64:<br />
[catalyst-10.3]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst-archive/x86_64<br />
<br />
'''2)''' Sync and downgrade packages with this commands<br />
# pacman -Syy<br />
# pacman -Suu<br />
<br />
'''3)''' Remove xf86-video-ati and ati-dri packages if you have them installed.<br />
<br />
'''4)''' (Recommended) If you dont like speed of xorg-server - remove it:<br />
# pacman -Rd xorg-server<br />
and try xorg-server-catalyst-maximize-fix:<br />
# pacman -S xorg-server-catalyst-maximize-fix<br />
<br />
'''5)''' Remove libgl and install catalyst:<br />
# pacman -Rd libgl<br />
# pacman -S catalyst<br />
'''6)''' '''Don't forget''' to prepare your /etc/X11/xorg.conf for catalyst. Use aticonfig --initial if you don't have prepared xorg.conf.<br />
Also add fglrx module to MODULES array in /etc/rc.conf<br />
<br />
'''7)''' Reboot<br />
<br />
=== ATI/AMD Installer ===<br />
{{Warning| Using the installer from ati.com/amd.com is NOT recommended for inexperienced users! Doing so may cause file conflicts and X failures. The packages available through pacman are configured specifically for Arch Linux and so should be used instead.}}<br />
<br />
If you have attempted a manual install from the official installer, and are finding that nothing works correctly anymore, there should be an uninstall script placed at /usr/share/ati - run that, then try the pacman packages.<br />
<br />
If you ''must'' use the installer from ATI/AMD for some reason, the following steps '''might''' work for you:<br />
<br />
*Download AMD/ATI driver installer from the official site only.<br />
*Make it executable.<br />
*Execute a terminal emulator (e.g Konsole) and be root.<br />
*Install mesa package<br />
pacman -S mesa<br />
*(Re)Install Xorg <br />
*Check for other required things for ATI/AMD installer listed on their website<br />
#pacman -Q | grep NameOfPackage<br />
*Use aticonfig as described below to update xorg.conf<br />
*Add ModulesPath into xorg.conf pointing at fglrx.so module if necessary<br />
<br />
== Configuration ==<br />
ATI provides the <code>aticonfig</code> tool to create new basic <code>xorg.conf</code> file or modify an existing <code>xorg.conf</code> file and configure essentially every aspect of the card. For a complete list of <code>aticonfig</code> options, run:<br />
$ aticonfig --help<br />
<br />
If you want to create new xorg.conf file with specific for your system options, run the following command to generate one:<br />
# Xorg -configure<br />
<br />
{{Warning| '''Xorg -configure''' isn't actually recommended - sometimes it doesn't work good with catalyst and could cause your Xserver to break at start with black screen of death. So use it only if you are 100% sure of what you are doing. In most cases '''aticonfig --initiall''' mentioned below should build working xorg.conf file and Xserver should automatically and correctly detect all your input devices.}}<br />
<br />
The simplest way to use <code>aticonfig</code> to adapt your <code>xorg.conf</code> file is listed in the examples at the end of the output if you run <code>aticonfig</code> without any command-line parameters:<br />
Examples:<br />
1. Setting up fglrx for the first time.<br />
Single head : aticonfig --initial --input=/etc/X11/xorg.conf<br />
Dual head : aticonfig --initial=dual-head --screen-layout=above<br />
This command will generate a dual head configuration<br />
file with the second screen located above the first<br />
screen.<br />
<br />
Just adapt one of those two lines for your personal setup.<br />
<br />
{{Warning| Please check the generated xorg.conf file before you copy it to /etc/X11/xorg.conf and happily startx or reboot. Otherwise, you'll probably get a locked blank screen and won't be able to use your system anymore.}} The config files generated by preceding steps are sometimes incorrect. If you want, you can compare the generated files to one of the [http://wiki.archlinux.org/index.php?title=Xorg7#Sample_Xorg.conf_Files Sample Xorg.conf files] listed on the Xorg wiki page.<br />
<br />
Please ensure that in the "Screen" section you have "DefaultDepth 24" and there is a "DRI" section with "Mode 666" in it. The fglrx driver needs those lines to work, but the generated files by preceding programs don't have it. Without those lines, you might get an unresponsive black screen after reboot. Besides, since most of the parts are now automatically detected in modern Xorg, you don't need to write so many things in xorg.conf as you did before with ancient Xorg versions.<br />
So, some config sections/values in the generated xorg.conf are redundant.<br />
<br />
Here is a minimal working example:<br />
<pre><br />
Section "ServerLayout"<br />
Identifier "X.org Configured"<br />
Screen 0 "Screen0" 0 0<br />
InputDevice "Mouse0" "CorePointer"<br />
InputDevice "Keyboard0" "CoreKeyboard"<br />
EndSection<br />
<br />
Section "Files"<br />
RgbPath "/usr/share/X11/rgb"<br />
ModulePath "/usr/lib/xorg/modules"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/100dpi:unscaled"<br />
FontPath "/usr/share/fonts/75dpi:unscaled"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/Type1"<br />
EndSection<br />
<br />
Section "Module"<br />
Load "extmod"<br />
Load "dbe"<br />
Load "xtrap"<br />
Load "record"<br />
Load "dri"<br />
Load "glx"<br />
Load "GLcore"<br />
Load "freetype"<br />
EndSection<br />
<br />
Section "InputDevice"<br />
Identifier "Keyboard0"<br />
Driver "kbd"<br />
EndSection<br />
<br />
Section "InputDevice"<br />
Identifier "Mouse0"<br />
Driver "mouse"<br />
Option "Protocol" "auto"<br />
Option "Device" "/dev/input/mice"<br />
Option "ZAxisMapping" "4 5 6 7"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card0"<br />
Driver "fglrx"<br />
VendorName "ATI Technologies Inc"<br />
BoardName "Radeon Mobility X1400"<br />
BusID "PCI:1:0:0"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "DRI"<br />
Mode 0666<br />
EndSection<br />
</pre><br />
<br />
Next, make sure the fglrx module and any needed agp modules are loaded. <br />
# modprobe fglrx <br />
<br />
Add them to the '''MODULES''' array of your /etc/rc.conf to ensure that they load when you boot. <br />
<br />
Finally, run Xorg with <code>startx</code> or by using GDM/KDM and verify that direct rendering is enabled by running the following command in a terminal:<br />
$ glxinfo | grep direct<br />
<br />
If it says "direct rendering: yes" then you're good to go! If the glxinfo command is not found, you may need to install the mesa package as well.<br />
<br />
{{Warning| In recent versions of Xorg, the paths of libs are changed. So, sometimes '''libGL.so''' cannot be correctly loaded even if it's installed. Don't forget to check this if your GL is not working. Please read "Troubleshooting" section for details.}}<br />
<br />
== Video acceleration ==<br />
'''[http://en.wikipedia.org/wiki/Video_Acceleration_API Video Acceleration API] (VA API)''' is an open source software library ("libVA") and API specification which enables and provides access to '''graphics hardware (GPU) acceleration''' for video processing on Linux and UNIX based operating systems.<br />
The main motivation for VA API is to enable hardware accelerated video decode at various entry-points (VLD, IDCT, Motion Compensation, deblocking) for the prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/WMV3).<br />
<br />
In November 2009, VA-API gained a new proprietary '''xvba-video''' backend which allows VA-API powered applications to take advantage of AMD Radeon's UVD2 chipsets via the [http://en.wikipedia.org/wiki/XvBA XvBA (X-Video Bitstream Acceleration API designed by AMD)] library.<br />
<br />
XvBA support and xvba-video is still under development, however in nowadays it is '''working very well in most cases''' and with '''mplayer''' (and mplayer front-ends), so feel free to check it. You have to build [http://aur.archlinux.org/packages.php?ID=31723 xvba-video] package and install mplayer-vaapi (available in community repository) & libva (available in extra repository) packages.<br />
Then just set your video player to use vaapi:gl as video output.<br />
<br />
Ie. for '''mplayer''':<br />
$ mplayer -vo vaapi:gl -va vaapi movie.avi<br />
<br />
Ie. for '''smplayer''':<br />
Options -> Preferences -> General -> Video (tab) -> Output driver: User Defined : vaapi:gl<br />
Options -> Preferences -> General -> Video (tab) -> Double buffering '''on'''<br />
Options -> Preferences -> Advanced -> Options for MPlayer -> Options: -va vaapi<br />
Options -> Preferences -> General -> General -> Screenshots -> Turn screenshots '''off'''<br />
<br />
Don't forget to enable v-sync in '''amdcccle''':<br />
3D -> More Settings -> Wait for vertical refresh = Always On<br />
<br />
Note: If you are using '''compiz/kwin''' please note that the only way to '''avoid video flickering''' is to watch videos in '''full-screen''', and only when '''Unredirect Fullscreen is off'''.<br />
<br />
In '''compiz''' you need to set '''Redirected Direct Rendering''' in General Options of ccsm.<br />
<br />
Its off by default in '''kwin''', but if you see flickering you need to add UnredirectFullscreen=off line to [Compositing] section in ~/.kde4/share/config/kwinrc file.<br />
<br />
If its still flickering try to disable this option in ccsm (or change UnredirectFullscreen=off to UnredirectFullscreen=on in kwinrc).<br />
<br />
=== Troubleshooting ===<br />
==== Problems with video colours ====<br />
You may still use vaapi:gl to avoid video flickering, but without video acceleration<br />
<br />
Run '''mplayer''' without '''-va vaapi''' switch.<br />
<br />
For '''smplayer''' remove '''-va vaapi''' from Options -> Preferences -> Advanced -> Options for MPlayer -> Options: -va vaapi<br />
<br />
Plus for '''smplayer''' you may now safely turn screenshots on.<br />
<br />
== Troubleshooting (catalyst) ==<br />
<br />
=== Rectangle/Checkerbox corruption with OpenGL programs ===<br />
''This was fixed in catalyst '' 8.9.'' It may occur though in later versions.''<br />
<br />
OpenGL programs like e.g. blender in windowed mode, show a rectangle/checkerbox corruption.<br />
This can be solved by using a Virtual display setting with a multiple of 64 bigger than your actual resolution like 1664 instead 1600 for width:<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
SubSection "Display"<br />
Depth 24<br />
Virtual 1664 1200<br />
EndSubSection<br />
EndSection<br />
<br />
===Black screen with complete lockups / hangs after reboot or startx===<br />
<br />
==== Faulty or corrupted amdpcsdb database ====<br />
Fglrx and its Catalyst Control Center stores data on a database called '''amdpcsdb''', located under '''/etc/ati'''. It isn't human readable, but only parsable by Catalyst Control Center. Sometimes, after updates, the settings in there aren't compatible with the new version of fglrx, so you end up with a black screen when starting X. <br />
<br />
So, there is one thing to do.<br />
<br />
Boot to init3, add the number 3 at the end of the menu.lst kernel options:<br />
# rm /etc/ati/amdpcsdb<br />
and restart Xorg (or even reboot).<br />
<br />
{{Warning|Be careful. If you have saved settings through Catalyst Control Center, which are stored under that file, they may now have been lost. You should edit xorg.conf instead, by using '''aticonfig'''.}}<br />
<br />
Be careful though. '''aticonfig''' stores its settings in '''amdpcsdb''' database like Catalyst Control Center. If you want that they're stored in xorg.conf instead, each time you use the aticonfig tool, add '''--input=/etc/X11/xorg.conf''' in the end of the command options as well.<br />
<br />
==== Faulty ACPI hardware calls ====<br />
It is possible that fglrx doesn't cooperate well with the system's ACPI hardware calls, so it autodisables itself and there is no screen output. <br />
<br />
So try to run this:<br />
aticonfig --acpi-services=off<br />
<br />
==== nForce 4 Incompatibility ====<br />
Starting with 9.10 onward, the fglrx drivers are incompatible with nForce 4 chipsets. Use the open source drivers until a fix is created.<br />
<br />
See [http://ati.cchtml.com/show_bug.cgi?id=1794 bug report].<br />
<br />
===KDM disappears after logout===<br />
If you are running the '''catalyst''' proprietary driver and you get a console (tty1) instead of the expected KDM greeting when you log out, you must instruct KDM to restart the X server after each logout:<br />
$ sudo nano /usr/share/config/kdm/kdmrc<br />
<br />
Uncomment the following line under the section titled [X-:*-Core]:<br />
TerminateServer=True<br />
<br />
KDM should now appear when you log out of KDE.<br />
<br />
=== Bad screen resolution at login manager ===<br />
If the resolution for your login manager is for example 1600x1200 and you want 1280x1024 you can fix it by using a xorg.conf (newer X-servers using the open source drivers normally don't need a xorg.conf, so if you don't have a xorg.conf you need to create one). In the "Screen" section add a modes lines:<br />
Section "Screen"<br />
Identifier "aticonfig-Screen[0]-0"<br />
Device "aticonfig-Device[0]-0"<br />
Monitor "aticonfig-Monitor[0]-0"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1280x1024" "2048x1536"#<-add this line to change the default login screen resolution<br />
EndSubSection<br />
EndSection<br />
The first argument of modes is the resolution, which will be used by default. The second argument is the maximum resolution supported by your monitor. This is needed so that you are able to choose higher screen resolutions using for example the KDE systemsettings.<br />
<br />
===Direct Rendering Doesn't Work===<br />
This problem may occur when using the proprietary '''catalyst''' driver. <br />
<br />
{{Warning|Make sure that you own a '''R6xx''' ('''HD2xxx''') or newer card or the driver '''won't''' be enabled. You may encounter that error if you try to enable your display by using catalyst and a card older than the R6xx ones.}}<br />
<br />
{{Warning|This error would also appear if you haven't '''rebooted''' your system after the installation or upgrade of catalyst. The system needs to load the fglrx.ko module in order to make the driver work.}}<br />
<br />
If you have problem with direct rendering, run:<br />
$ LIBGL_DEBUG=verbose glxinfo > /dev/null<br />
at the command prompt. At the very start of the output, it'll usually give you a nice error message saying why you don't have direct rendering.<br />
<br />
Common errors, and their solutions, are:<br />
'''libGL error: XF86DRIQueryDirectRenderingCapable returned false'''<br />
<br />
* Ensure that you are loading the correct agp modules for your AGP chipset before you load the fglrx kernel module. To determine which agp modules you'll need, run <code>hwdetect --show-agp</code>, then ensure that all modules listed from that command are in the <code>MODULES=</code> array in rc.conf, '''before''' fglrx.<br />
'''libGL error: failed to open DRM: Operation not permitted'''<br />
'''libGL error: reverting to (slow) indirect rendering'''<br />
<br />
* For this, make sure you have the following section in your <code>xorg.conf</code> somewhere:<br />
Section "DRI"<br />
Mode 0666<br />
EndSection<br />
<br />
'''libGL: OpenDriver: trying /usr/lib/xorg/modules/dri//fglrx_dri.so'''<br />
'''libGL error: dlopen /usr/lib/xorg/modules/dri//fglrx_dri.so failed (/usr/lib/xorg/modules/dri//fglrx_dri.so: cannot open shared object file: No such file or directory)'''<br />
'''libGL error: unable to find driver: fglrx_dri.so'''<br />
<br />
* Something hasn't been installed correctly. If the paths in the error message are <code>/usr/X11R6/lib/modules/dri/fglrx_dri.so</code>, then ensure you've logged completely out of your system, then back in. If you're using a graphical login manager (gdm, kdm, xdm), ensure that /etc/profile is sourced every time you log in. This is usually accomplished by adding <code>source /etc/profile</code> into <code>~/.xsession</code> or <code>~/.xinitrc</code>, but may vary between login managers.<br />
<br />
* If the paths above in your error message _are_ <code>/usr/lib/xorg/modules/dri/fglrx_dri.so</code>, then something hasn't been correctly installed. Try reinstalling the <code>catalyst</code> package.<br />
<br />
Errors such as:<br />
'''fglrx: libGL version undetermined - OpenGL module is using glapi fallback'''<br />
could be caused by having multiple versions of <code>libGL.so</code> on your system. Run:<br />
$ sudo updatedb<br />
$ locate libGL.so<br />
<br />
This should return the following output:<br />
$ locate libGL.so<br />
/usr/lib/libGL.so<br />
/usr/lib/libGL.so.1<br />
/usr/lib/libGL.so.1.2<br />
$<br />
<br />
These are the only three libGL.so files you should have on your system. If you have any more (e.g. <code>/usr/X11R6/lib/libGL.so.1.2</code>), then remove them. This should fix your problem. <br />
<br />
You might not get any error to indicate that this is a problem. If you are using X11R7, make sure you do '''not''' have these files on your system:<br />
/usr/X11R6/lib/libGL.so.1.2<br />
/usr/X11R6/lib/libGL.so.1<br />
<br />
===Hibernate/Sleep Issues===<br />
<br />
==== Video fails to enter suspend/hibernate ====<br />
If <code>fglrx</code> returns an error when attempting to suspend through hibernate scripts, a solution may be to add the following line to your "Device" section in <code>/etc/X11/xorg.conf</code>, which should allow the <tt>fglrx</tt> module to enter suspend mode.<br />
Option "UseInternalAGPGart" "no"<br />
<br />
==== Video fails to resume from suspend2ram ====<br />
ATI's proprietary <tt>catalyst</tt> driver cannot resume from suspend if the framebuffer is enabled. To disable the framebuffer, add '''vga=0''' to your kernel options in <code>/boot/grub/menu.lst</code>, 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 />
===System Freezes/Hard locks===<br />
* To prevent system lockups, try adding the following lines to your fglrx "Device" section in <code>xorg.conf</code><br />
Option "UseInternalAGPGART" "no"<br />
Option "KernelModuleParm" "agplock=0" # AGP locked user pages: disabled<br />
<br />
{{Note|Neither option is necessary anymore since 8.24.18 because ATI has removed the internal AGP GART support from the driver.}}<br />
<br />
* As well, the <code>radeonfb</code> framebuffer drivers have been known in the past to cause problems of this nature. If your kernel has radeonfb support compiled in, you may want to try a different kernel and see if this helps. <br />
<br />
===Hardware Conflicts===<br />
Radeon cards used in conjunction with some versions of the nForce3 chipset (e.g. nForce 3 250Gb) won't have 3D acceleration. Currently the cause of this issue is unknown, but some sources indicate that it may be possible to get acceleration with this combination of hardware by booting Windows with the drivers from nVIDIA and then rebooting the system. This can be verified by issuing in a root console the following command:<br />
dmesg | grep agp<br />
<br />
If you get something similar to this (using an nForce3-based system)<br />
agpgart: Detected AGP bridge 0<br />
agpgart: Setting up Nforce3 AGP.<br />
agpgart: aperture base > 4G<br />
<br />
and also if issuing this command...<br />
tail -n 100 /var/log/Xorg.0.log | grep agp<br />
<br />
...gets something similar to:<br />
(EE) fglrx(0): [agp] unable to acquire AGP, error "xf86_ENODEV"<br />
<br />
Then you have this bug.<br />
<br />
Some sources indicate that in some situations, downgrading the motherboard BIOS may help, but this cannot be verified in all cases. Also, a bad BIOS downgrade can render your hardware useless, so beware.<br />
<br />
See bug http://bugzilla.kernel.org/show_bug.cgi?id=6350 for more information and a potential fix.<br />
<br />
===Temporary hangs when playing video===<br />
This problem may occur when using the proprietary '''catalyst''' driver.<br />
<br />
If you experience temporary hangs lasting from a few seconds to several minutes occuring randomly during playback with mplayer, check /var/log/messages.log for output like:<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium [<f8bc628c>] ? ip_firegl_ioctl+0x1c/0x30 [fglrx]<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium [<c0197038>] ? vfs_ioctl+0x78/0x90<br />
Nov 28 18:31:56 pandemonium [<c01970b7>] ? do_vfs_ioctl+0x67/0x2f0<br />
Nov 28 18:31:56 pandemonium [<c01973a6>] ? sys_ioctl+0x66/0x70<br />
Nov 28 18:31:56 pandemonium [<c0103ef3>] ? sysenter_do_call+0x12/0x33<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium =======================<br />
<br />
Adding the nopat kerneloption to /boot/grub/menu.lst and rebooting fixed the problem at least for me.<br />
<br />
===After a kernel upgrade: X doesn't start/modprobe doesn't find fglrx===<br />
Reinstall the catalyst drivers.<br />
<br />
Or since catalyst 10.6-3 use:<br />
# catalyst_build_module<br />
<br />
===Catalyst 10.6/10.7 : black/grey/white boxes/artifacts in firefox/thunderbird===<br />
With catalyst 10.6 AMD/ATi announce new method of 2D acceleration for radeons, unfortunately this step causes bugs for some users. To turn on old (slower xaa) method of 2d rendering please kill your desktop environment and Xserver and type this command as root:<br />
aticonfig --set-pcs-str=DDX,ForceXAA,TRUE<br />
Now you'll probably need patched xorg-server to fix problems with resizing/maximizing windows, read about it ie. [http://wiki.archlinux.org/index.php/ATI_Catalyst#Black.2Fgrey.2Fwhite_boxes.2Fartifacts_mainly_in_firefox.2Fthunderbird here].</div>Foutrelishttps://wiki.archlinux.org/index.php?title=Talk:AMD_Catalyst&diff=114374Talk:AMD Catalyst2010-08-18T19:35:19Z<p>Foutrelis: </p>
<hr />
<div>I love you guys for putting this wiki entry together and maintaining the repositories with the Catalyst driver and the patched mplayer with support for hardware acceleration. It would have taken me many, many hours to make it work as flawlessly as it does.<br />
<br />
[[User:Foutrelis|Foutrelis]] 06:11, 21 June 2010 (EDT)<br />
<br />
== XvBA-Video Repository ==<br />
<br />
Note to editors: DO NOT REMOVE that since it works and helps users getting it working!<br />
<br />
----<br />
<br />
Why keep it around if the information is obsolete now?<br />
<br />
[[User:Foutrelis|Foutrelis]] 15:35, 18 August 2010 (EDT)</div>Foutrelis