https://wiki.archlinux.org/api.php?action=feedcontributions&user=Jose1711&feedformat=atomArchWiki - User contributions [en]2024-03-29T14:47:02ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:SSHFS&diff=783770Talk:SSHFS2023-07-27T18:11:04Z<p>Jose1711: /* Add example using dpipe to do a reverse sshfs mount */ new section</p>
<hr />
<div>== Chrooting users ==<br />
<br />
In my short experiences, chrooting a sftp user (with <code>ForceCommand sftp-internal</code> and <code>ChrootDirectory /path/to/dir</code>) requires that the <code>Subsystem sftp &lt;...&gt;</code> declaration use <code>sftp-internal</code>. If I'm wrong, please tell me, or else I will change the wiki to match (in a few days). -- [[User:Izzette|Izzette]] ([[User talk:Izzette|talk]]) 01:51, 9 June 2016 (UTC)<br />
<br />
== Add workaround ==<br />
<br />
Maybe it will be useful to explain the option <code>-o workaround=rename</code> in order to overwrite file in the mounted system using kate, gedit, etc. Also when mounted using <code>fstab</code><br />
<br />
{{Unsigned|21:39, 10 June 2016 (UTC)|PogMat}}<br />
<br />
== Outdated/invalid option - default_permissions ?==<br />
mount option "default_permissions" is not in man page. Outdated wiki or wrong man page ? Or is "default_permissions" something general and not fuse releated? Thanks for clarification.<br />
[[User:Ua4000|Ua4000]] ([[User talk:Ua4000|talk]])<br />
<br />
== Add example using dpipe to do a reverse sshfs mount ==<br />
<br />
Sometimes a reverse SSHFS mount can be useful. This is well described here: https://blog.dhampir.no/content/reverse-sshfs-mounts-fs-push. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 18:11, 27 July 2023 (UTC)</div>Jose1711https://wiki.archlinux.org/index.php?title=Talk:Limits.conf&diff=774618Talk:Limits.conf2023-04-03T16:02:49Z<p>Jose1711: /* Not working for me (nofiles and additional change required in systemd files) */ re</p>
<hr />
<div>== Including systemd issues ==<br />
<br />
I think we should discuss setting limits via limits.conf and through systemd files on the same page, since it's basically the same issue. That would mean renaming this page, however, since it wouldn't be limited (ha ha) to the limits.conf file. Any objection to just calling this page "System limits" and including systemd settings on this page as well? [[User:Chowbok|Chowbok]] ([[User talk:Chowbok|talk]]) 00:16, 6 August 2019 (UTC)<br />
<br />
: Can you sandbox this first? ⟨[[User:Sweyn78|Sweyn78]]⟩ 04:38, 6 August 2019 (UTC)<br />
<br />
== nofile limit ==<br />
<br />
Wiki suggests that providing<br />
* hard nofile 65536<br />
will increasse the nofile limit, but it does not. One has to additionally add a soft limit with the same values. Can someone verify this? [[User:Leuko|Leuko]] ([[User talk:Leuko|talk]]) 15:55, 16 June 2021 (UTC)<br />
<br />
: Hard limits are a hard cap, not an active value. You have to set a soft limit to actually see an effect. Soft limits can be set during runtime; hard limits cannot. -- [[User:Sweyn78|Sweyn78]] ([[User talk:Sweyn78|talk]]) 21:22, 11 July 2022 (UTC)<br />
<br />
== Not working for me (nofiles and additional change required in systemd files) ==<br />
<br />
I put the following into {{ic|/etc/security/limits.conf}}:<br />
myuser hard nofile 4096<br />
myuser soft nofile 4096<br />
<br />
and yet the actual {{ic|nofiles}} limit remained unchanged (1024). I then followed the steps https://unix.stackexchange.com/a/370652 and this made it work. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 08:07, 28 March 2023 (UTC)<br />
<br />
: Did you read the note in the first paragraph? It states literally that.<br />
: [[User:Hanabishi|Hanabishi]] ([[User talk:Hanabishi|talk]]) 10:03, 28 March 2023 (UTC)<br />
<br />
:: Yes, I did read that. The way I understood it though is: "if you're configuring limits for system service, check out those files". To me it came as a surprise that those files also affect the limits seen on console in a normal login session. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 10:45, 28 March 2023 (UTC)<br />
<br />
::: You are wrong. Normal login session does respect {{ic|limits.conf}}. In case you are using the real [[Linux console]] (tty).<br />
::: As for terminal emulators, they are obviously inherit from a graphical environment. Considering that [[display manager]]s and [[desktop environment]]s are usually start via systemd services, such behavior is fairly expected.<br />
::: Again: '''all child processes of a systemd service will inherit its configuration'''. Maybe the initial note should be improved to better explain this fact.<br />
::: Also worth mentioning that any systemd service can define its own limits inside a unit file, overriding the globals. So this is even more trickier than you may think. But details about [[systemd]] is out of scope for this article, I guess.<br />
::: [[User:Hanabishi|Hanabishi]] ([[User talk:Hanabishi|talk]]) 11:55, 28 March 2023 (UTC)<br />
<br />
:::: Wrong in what way? Before I added this section I checked it (reverted the changes in systemd files, rebooted) and the issue indeed manifested itself on an actual (textual) console. And since that stackexchange question (and several others) exists I think I may not the only one having issues to grasp the concept. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 12:17, 28 March 2023 (UTC)<br />
<br />
::::: Well, can't confirm, {{ic|limits.conf}} works for me in tty. Even without a reboot, changes are applied on user log in. Systemd limits have no effect here.<br />
::::: Just to be sure, you are talking about the real tty using physically connected keyboard and monitor, not a remote connection like SSH or something?<br />
::::: [[User:Hanabishi|Hanabishi]] ([[User talk:Hanabishi|talk]]) 12:39, 28 March 2023 (UTC)<br />
<br />
:::::: Yep, talking about pressing Ctrl-Alt-F2 and getting an ugly terminal with a limited support of characters (512 I believe). I will try to test more and on more machines too. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 14:18, 28 March 2023 (UTC)<br />
<br />
::::::: My bad, had a typo in {{ic|limits.conf}} ({{ic|sort}} instead of {{ic|soft}}. Sorry about that. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 16:02, 3 April 2023 (UTC)</div>Jose1711https://wiki.archlinux.org/index.php?title=Talk:Limits.conf&diff=774063Talk:Limits.conf2023-03-28T14:18:36Z<p>Jose1711: /* Not working for me (nofiles and additional change required in systemd files) */ re</p>
<hr />
<div>== Including systemd issues ==<br />
<br />
I think we should discuss setting limits via limits.conf and through systemd files on the same page, since it's basically the same issue. That would mean renaming this page, however, since it wouldn't be limited (ha ha) to the limits.conf file. Any objection to just calling this page "System limits" and including systemd settings on this page as well? [[User:Chowbok|Chowbok]] ([[User talk:Chowbok|talk]]) 00:16, 6 August 2019 (UTC)<br />
<br />
: Can you sandbox this first? ⟨[[User:Sweyn78|Sweyn78]]⟩ 04:38, 6 August 2019 (UTC)<br />
<br />
== nofile limit ==<br />
<br />
Wiki suggests that providing<br />
* hard nofile 65536<br />
will increasse the nofile limit, but it does not. One has to additionally add a soft limit with the same values. Can someone verify this? [[User:Leuko|Leuko]] ([[User talk:Leuko|talk]]) 15:55, 16 June 2021 (UTC)<br />
<br />
: Hard limits are a hard cap, not an active value. You have to set a soft limit to actually see an effect. Soft limits can be set during runtime; hard limits cannot. -- [[User:Sweyn78|Sweyn78]] ([[User talk:Sweyn78|talk]]) 21:22, 11 July 2022 (UTC)<br />
<br />
== Not working for me (nofiles and additional change required in systemd files) ==<br />
<br />
I put the following into {{ic|/etc/security/limits.conf}}:<br />
myuser hard nofile 4096<br />
myuser soft nofile 4096<br />
<br />
and yet the actual {{ic|nofiles}} limit remained unchanged (1024). I then followed the steps https://unix.stackexchange.com/a/370652 and this made it work. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 08:07, 28 March 2023 (UTC)<br />
<br />
: Did you read the note in the first paragraph? It states literally that.<br />
: [[User:Hanabishi|Hanabishi]] ([[User talk:Hanabishi|talk]]) 10:03, 28 March 2023 (UTC)<br />
<br />
:: Yes, I did read that. The way I understood it though is: "if you're configuring limits for system service, check out those files". To me it came as a surprise that those files also affect the limits seen on console in a normal login session. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 10:45, 28 March 2023 (UTC)<br />
<br />
::: You are wrong. Normal login session does respect {{ic|limits.conf}}. In case you are using the real [[Linux console]] (tty).<br />
::: As for terminal emulators, they are obviously inherit from a graphical environment. Considering that [[display manager]]s and [[desktop environment]]s are usually start via systemd services, such behavior is fairly expected.<br />
::: Again: '''all child processes of a systemd service will inherit its configuration'''. Maybe the initial note should be improved to better explain this fact.<br />
::: Also worth mentioning that any systemd service can define its own limits inside a unit file, overriding the globals. So this is even more trickier than you may think. But details about [[systemd]] is out of scope for this article, I guess.<br />
::: [[User:Hanabishi|Hanabishi]] ([[User talk:Hanabishi|talk]]) 11:55, 28 March 2023 (UTC)<br />
<br />
:::: Wrong in what way? Before I added this section I checked it (reverted the changes in systemd files, rebooted) and the issue indeed manifested itself on an actual (textual) console. And since that stackexchange question (and several others) exists I think I may not the only one having issues to grasp the concept. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 12:17, 28 March 2023 (UTC)<br />
<br />
::::: Well, can't confirm, {{ic|limits.conf}} works for me in tty. Even without a reboot, changes are applied on user log in. Systemd limits have no effect here.<br />
::::: Just to be sure, you are talking about the real tty using physically connected keyboard and monitor, not a remote connection like SSH or something?<br />
::::: [[User:Hanabishi|Hanabishi]] ([[User talk:Hanabishi|talk]]) 12:39, 28 March 2023 (UTC)<br />
<br />
:::::: Yep, talking about pressing Ctrl-Alt-F2 and getting an ugly terminal with a limited support of characters (512 I believe). I will try to test more and on more machines too. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 14:18, 28 March 2023 (UTC)</div>Jose1711https://wiki.archlinux.org/index.php?title=Talk:Limits.conf&diff=774061Talk:Limits.conf2023-03-28T12:17:24Z<p>Jose1711: /* Not working for me (nofiles and additional change required in systemd files) */ re</p>
<hr />
<div>== Including systemd issues ==<br />
<br />
I think we should discuss setting limits via limits.conf and through systemd files on the same page, since it's basically the same issue. That would mean renaming this page, however, since it wouldn't be limited (ha ha) to the limits.conf file. Any objection to just calling this page "System limits" and including systemd settings on this page as well? [[User:Chowbok|Chowbok]] ([[User talk:Chowbok|talk]]) 00:16, 6 August 2019 (UTC)<br />
<br />
: Can you sandbox this first? ⟨[[User:Sweyn78|Sweyn78]]⟩ 04:38, 6 August 2019 (UTC)<br />
<br />
== nofile limit ==<br />
<br />
Wiki suggests that providing<br />
* hard nofile 65536<br />
will increasse the nofile limit, but it does not. One has to additionally add a soft limit with the same values. Can someone verify this? [[User:Leuko|Leuko]] ([[User talk:Leuko|talk]]) 15:55, 16 June 2021 (UTC)<br />
<br />
: Hard limits are a hard cap, not an active value. You have to set a soft limit to actually see an effect. Soft limits can be set during runtime; hard limits cannot. -- [[User:Sweyn78|Sweyn78]] ([[User talk:Sweyn78|talk]]) 21:22, 11 July 2022 (UTC)<br />
<br />
== Not working for me (nofiles and additional change required in systemd files) ==<br />
<br />
I put the following into {{ic|/etc/security/limits.conf}}:<br />
myuser hard nofile 4096<br />
myuser soft nofile 4096<br />
<br />
and yet the actual {{ic|nofiles}} limit remained unchanged (1024). I then followed the steps https://unix.stackexchange.com/a/370652 and this made it work. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 08:07, 28 March 2023 (UTC)<br />
<br />
: Did you read the note in the first paragraph? It states literally that.<br />
: [[User:Hanabishi|Hanabishi]] ([[User talk:Hanabishi|talk]]) 10:03, 28 March 2023 (UTC)<br />
<br />
:: Yes, I did read that. The way I understood it though is: "if you're configuring limits for system service, check out those files". To me it came as a surprise that those files also affect the limits seen on console in a normal login session. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 10:45, 28 March 2023 (UTC)<br />
<br />
::: You are wrong. Normal login session does respect {{ic|limits.conf}}. In case you are using the real [[Linux console]] (tty).<br />
::: As for terminal emulators, they are obviously inherit from a graphical environment. Considering that [[display manager]]s and [[desktop environment]]s are usually start via systemd services, such behavior is fairly expected.<br />
::: Again: '''all child processes of a systemd service will inherit its configuration'''. Maybe the initial note should be improved to better explain this fact.<br />
::: Also worth mentioning that any systemd service can define its own limits inside a unit file, overriding the globals. So this is even more trickier than you may think. But details about [[systemd]] is out of scope for this article, I guess.<br />
::: [[User:Hanabishi|Hanabishi]] ([[User talk:Hanabishi|talk]]) 11:55, 28 March 2023 (UTC)<br />
<br />
:::: Wrong in what way? Before I added this section I checked it (reverted the changes in systemd files, rebooted) and the issue indeed manifested itself on an actual (textual) console. And since that stackexchange question (and several others) exists I think I may not the only one having issues to grasp the concept. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 12:17, 28 March 2023 (UTC)</div>Jose1711https://wiki.archlinux.org/index.php?title=Talk:Limits.conf&diff=774051Talk:Limits.conf2023-03-28T10:45:39Z<p>Jose1711: /* Not working for me (nofiles and additional change required in systemd files) */ add response</p>
<hr />
<div>== Including systemd issues ==<br />
<br />
I think we should discuss setting limits via limits.conf and through systemd files on the same page, since it's basically the same issue. That would mean renaming this page, however, since it wouldn't be limited (ha ha) to the limits.conf file. Any objection to just calling this page "System limits" and including systemd settings on this page as well? [[User:Chowbok|Chowbok]] ([[User talk:Chowbok|talk]]) 00:16, 6 August 2019 (UTC)<br />
<br />
: Can you sandbox this first? ⟨[[User:Sweyn78|Sweyn78]]⟩ 04:38, 6 August 2019 (UTC)<br />
<br />
== nofile limit ==<br />
<br />
Wiki suggests that providing<br />
* hard nofile 65536<br />
will increasse the nofile limit, but it does not. One has to additionally add a soft limit with the same values. Can someone verify this? [[User:Leuko|Leuko]] ([[User talk:Leuko|talk]]) 15:55, 16 June 2021 (UTC)<br />
<br />
: Hard limits are a hard cap, not an active value. You have to set a soft limit to actually see an effect. Soft limits can be set during runtime; hard limits cannot. -- [[User:Sweyn78|Sweyn78]] ([[User talk:Sweyn78|talk]]) 21:22, 11 July 2022 (UTC)<br />
<br />
== Not working for me (nofiles and additional change required in systemd files) ==<br />
<br />
I put the following into {{ic|/etc/security/limits.conf}}:<br />
myuser hard nofile 4096<br />
myuser soft nofile 4096<br />
<br />
and yet the actual {{ic|nofiles}} limit remained unchanged (1024). I then followed the steps https://unix.stackexchange.com/a/370652 and this made it work. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 08:07, 28 March 2023 (UTC)<br />
<br />
: Did you read the note in the first paragraph? It states literally that.<br />
: [[User:Hanabishi|Hanabishi]] ([[User talk:Hanabishi|talk]]) 10:03, 28 March 2023 (UTC)<br />
<br />
:: Yes, I did read that. The way I understood it though is: "if you're configuring limits for system service, check out those files". To me it came as a surprise that those files also affect the limits seen on console in a normal login session. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 10:45, 28 March 2023 (UTC)</div>Jose1711https://wiki.archlinux.org/index.php?title=Talk:Limits.conf&diff=774038Talk:Limits.conf2023-03-28T08:07:52Z<p>Jose1711: /* Not working for me (nofiles and additional change required in systemd files) */ add signature</p>
<hr />
<div>== Including systemd issues ==<br />
<br />
I think we should discuss setting limits via limits.conf and through systemd files on the same page, since it's basically the same issue. That would mean renaming this page, however, since it wouldn't be limited (ha ha) to the limits.conf file. Any objection to just calling this page "System limits" and including systemd settings on this page as well? [[User:Chowbok|Chowbok]] ([[User talk:Chowbok|talk]]) 00:16, 6 August 2019 (UTC)<br />
<br />
: Can you sandbox this first? ⟨[[User:Sweyn78|Sweyn78]]⟩ 04:38, 6 August 2019 (UTC)<br />
<br />
== nofile limit ==<br />
<br />
Wiki suggests that providing<br />
* hard nofile 65536<br />
will increasse the nofile limit, but it does not. One has to additionally add a soft limit with the same values. Can someone verify this? [[User:Leuko|Leuko]] ([[User talk:Leuko|talk]]) 15:55, 16 June 2021 (UTC)<br />
<br />
: Hard limits are a hard cap, not an active value. You have to set a soft limit to actually see an effect. Soft limits can be set during runtime; hard limits cannot. -- [[User:Sweyn78|Sweyn78]] ([[User talk:Sweyn78|talk]]) 21:22, 11 July 2022 (UTC)<br />
<br />
== Not working for me (nofiles and additional change required in systemd files) ==<br />
<br />
I put the following into {{ic|/etc/security/limits.conf}}:<br />
myuser hard nofile 4096<br />
myuser soft nofile 4096<br />
<br />
and yet the actual {{ic|nofiles}} limit remained unchanged (1024). I then followed the steps https://unix.stackexchange.com/a/370652 and this made it work. --[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 08:07, 28 March 2023 (UTC)</div>Jose1711https://wiki.archlinux.org/index.php?title=Talk:Limits.conf&diff=774037Talk:Limits.conf2023-03-28T08:07:33Z<p>Jose1711: /* Not working for me (nofiles and additional change required in systemd files) */ new section</p>
<hr />
<div>== Including systemd issues ==<br />
<br />
I think we should discuss setting limits via limits.conf and through systemd files on the same page, since it's basically the same issue. That would mean renaming this page, however, since it wouldn't be limited (ha ha) to the limits.conf file. Any objection to just calling this page "System limits" and including systemd settings on this page as well? [[User:Chowbok|Chowbok]] ([[User talk:Chowbok|talk]]) 00:16, 6 August 2019 (UTC)<br />
<br />
: Can you sandbox this first? ⟨[[User:Sweyn78|Sweyn78]]⟩ 04:38, 6 August 2019 (UTC)<br />
<br />
== nofile limit ==<br />
<br />
Wiki suggests that providing<br />
* hard nofile 65536<br />
will increasse the nofile limit, but it does not. One has to additionally add a soft limit with the same values. Can someone verify this? [[User:Leuko|Leuko]] ([[User talk:Leuko|talk]]) 15:55, 16 June 2021 (UTC)<br />
<br />
: Hard limits are a hard cap, not an active value. You have to set a soft limit to actually see an effect. Soft limits can be set during runtime; hard limits cannot. -- [[User:Sweyn78|Sweyn78]] ([[User talk:Sweyn78|talk]]) 21:22, 11 July 2022 (UTC)<br />
<br />
== Not working for me (nofiles and additional change required in systemd files) ==<br />
<br />
I put the following into {{ic|/etc/security/limits.conf}}:<br />
myuser hard nofile 4096<br />
myuser soft nofile 4096<br />
<br />
and yet the actual {{ic|nofiles}} limit remained unchanged (1024). I then followed the steps https://unix.stackexchange.com/a/370652 and this made it work.</div>Jose1711https://wiki.archlinux.org/index.php?title=X11vnc&diff=662912X11vnc2021-04-19T20:29:30Z<p>Jose1711: Fix typo</p>
<hr />
<div>[[Category:Security]]<br />
[[Category:Remote desktop]]<br />
[[ja:X11vnc]]<br />
[[zh-hans:X11vnc]]<br />
{{Related articles start}}<br />
{{Related|TigerVNC}}<br />
{{Related articles end}}<br />
[[Wikipedia:x11vnc|x11vnc]] is a VNC server, it allows one to view remotely and interact with real X displays (i.e. a display corresponding to a physical monitor, keyboard, and mouse) with any VNC viewer. While it is not developed any longer by its original author Karl Runge, ''LibVNC'' and the GitHub community have taken over the development.<br />
<br />
''x11vnc'' does not create an extra display (or X desktop) for remote control. Instead, it shows in real time the existing X11 display, unlike ''Xvnc'', part of [[TigerVNC]], which is an alternatives VNC server available in the [[official repositories]].<br />
<br />
Also note that x11vnc is not shipped with a client viewer. Any VNC viewer should do the job and be compatible with the x11vnc server while not necessarily using all its functionalities. TigerVNC's ''vncviewer'' is a recommended client.<br />
<br />
== Setting up x11vnc ==<br />
<br />
=== Installation ===<br />
<br />
Install {{Pkg|x11vnc}} from the official repositories.<br />
<br />
=== Starting ===<br />
<br />
First, start X either by ''startx'' or through a [[display manager]]. You may need to set up X to [[Headless With X|run headless]] too.<br />
<br />
Then, run the following command, all available options are explained in {{man|1|x11vnc}}.<br />
$ x11vnc -display :0<br />
<br />
Another option is to place the x11vnc command line in a script which is called at login, for example:<br />
<br />
x11vnc -wait 50 -noxdamage -passwd PASSWORD -display :0 -forever -o /var/log/x11vnc.log -bg<br />
<br />
{{Note|The password "PASSWORD" above is not secured; anyone who can run {{ic|ps}} on the machine will see it. Also note that {{ic|/var/log/x11vnc.log}} needs to be created manually and its ownership needs to match that of the user who will run it.}}<br />
<br />
==== Setting X authority ====<br />
<br />
You may set an X authority file for the VNC server. This is accomplished by using the {{ic|-auth}} argument followed by the appropriate file, which will depend on how your X server was started. Generally, assigning an X authority file requires running ''x11vnc'' as root.<br />
<br />
===== Start X =====<br />
<br />
$ x11vnc -display :0 -auth ~/.Xauthority<br />
If that fails, you may have to run instead (as root):<br />
# x11vnc -display :0 -auth /home/''user''/.Xauthority<br />
Where ''user'' is the username of the user who is running the X server.<br />
<br />
===== Running from xinetd =====<br />
<br />
X11vnc can be run using a xinetd service, which only starts X11vnc once a user connects.<br />
<br />
Create an xinetd service entry for x11vnc, for example:<br />
<br />
{{hc|/etc/xinetd/x11vnc|<nowiki><br />
service x11vncservice<br />
{<br />
port = 5900<br />
type = UNLISTED<br />
socket_type = stream<br />
protocol = tcp<br />
wait = no<br />
user = root<br />
server = /usr/bin/x11vnc<br />
server_args = -inetd -o /var/log/x11vnc.log -noxdamage -display :0 -auth guess<br />
disable = no<br />
}<br />
</nowiki>}}<br />
<br />
After reloading {{ic|xinetd.service}}, X11vnc will start once a client connects to port 5900.<br />
<br />
===== Systemd =====<br />
<br />
To run x11vnc when system boots, create the override with {{ic|systemctl edit x11vnc.service}}. The content should be like the following<br />
<br />
{{hc|head=/etc/systemd/system/x11vnc.service.d/override.conf|output=<br />
[Service]<br />
ExecStart=<br />
ExecStart=/usr/bin/x11vnc -many -display :0 -no6 -rfbport 5901 -auth /var/run/lightdm/root/:0<br />
<br />
[Install]<br />
WantedBy=graphical.target<br />
}}<br />
<br />
Replace the second ExecStart with the command you run interactively. Run {{ic|systemctl enable x11vnc.service}} if you need.<br />
<br />
===== GDM =====<br />
<br />
{{Note|Newer GDM packages ship with Xwayland as the default display server backend. The following instructions, however, only apply when using Xorg (else {{ic|.Xauthority}} is not created, and ''x11vnc'' fails to start). You are therefore advised to uncomment {{ic|<nowiki>#WaylandEnable=false</nowiki>}} setting in {{ic|/etc/gdm/custom.conf}} in order to proceed.}} <br />
<br />
# x11vnc -display :0 -auth /var/lib/gdm/:0.Xauth<br />
<br />
Newer versions of GDM uses /run/user. Example for user 120 (gdm), used for login screen.<br />
<br />
# x11vnc -display :0 -auth /run/user/120/gdm/Xauthority<br />
<br />
or see [[#Troubleshooting|Troubleshooting]] section below<br />
<br />
===== Lightdm =====<br />
<br />
Running from the bash:<br />
<br />
# x11vnc -display :0 -auth /var/run/lightdm/root/\:0<br />
<br />
===== LXDM =====<br />
<br />
# x11vnc -display :0 -auth /var/run/lxdm/lxdm-\:0.auth<br />
<br />
===== SDDM =====<br />
<br />
SDDM uses an unpredictable UUID for the auth file [https://github.com/sddm/sddm/issues/622] therefore one needs to:<br />
<br />
# x11vnc -display :0 -auth $(find /var/run/sddm/ -type f)<br />
<br />
Embedding this into a systemd .service file will require a trick to evaluate the find command as shown here [https://gist.github.com/nickjacob/9909574].<br />
<br />
===== SLIM =====<br />
<br />
# x11vnc -display :0 -auth /var/run/slim.auth<br />
<br />
{{Warning|This will set up VNC with NO PASSWORD. This means that ANYBODY who has access to the network the computer is on CAN SEE YOUR XSERVER. It is a fairly simple matter to tunnel your VNC connection through SSH to avoid this. Or, simply set a password, as described below.}}<br />
<br />
{{Note|The password will only encrypt the login process itself. The transmission is still unencrypted[https://web.archive.org/web/20091228031116/https://security.web.cern.ch/security/ssh/encrypt_vnc.htm].}}<br />
<br />
=== Setting a password ===<br />
<br />
Running:<br />
<br />
$ x11vnc -usepw<br />
<br />
uses the password found in {{ic|~/.vnc/passwd}}, where the password is obscured with a fixed key in a VNC compatible format, or alternatively in {{ic|~/.vnc/passwdfile}}, where the first line of the file contains the password.<br />
If none of these files can be located, it prompts the user for a password which is saved in {{ic|~/.vnc/passwd}} and is used right away.<br />
<br />
The VNC viewer should then prompt for a password when connecting.<br />
<br />
=== Running constantly ===<br />
<br />
By default, x11vnc will accept the first VNC session and shutdown when the session disconnects.<br />
In order to avoid that, start x11vnc with either the {{ic|-many}} or the {{ic|-forever}} argument, like this:<br />
$ x11vnc -many -display :0<br />
<br />
It is also possible to use the following command :<br />
<br />
$ x11vnc --loop<br />
<br />
this will restart the server once the session is finished<br />
<br />
=== Accessing ===<br />
<br />
Get a VNC client on another computer, and type in the IP address of the computer running x11vnc. Hit connect, and you should be set.<br />
<br />
If you are attempting to access a VNC server / computer (running x11vnc) from outside of its network then you will need to ensure that it has port 5900 forwarded.<br />
<br />
== SSH Tunnel ==<br />
<br />
You need to have [[SSH]] installed and configured.<br />
<br />
Use the {{ic|-localhost}} flag with x11vnc for it to bind to the local interface. Once that is done, you can use SSH to tunnel the port; then, connect to VNC through SSH.<br />
<br />
Simple example (from http://www.karlrunge.com/x11vnc/index.html#tunnelling ):<br />
$ ssh -t -L 5900:localhost:5900 remote_host 'x11vnc -localhost -display :0'<br />
<br />
(You will likely have to provide passwords/passphrases to login from your current location into your remote_host Unix account; we assume you have a login account on remote_host and it is running the SSH server)<br />
<br />
And then in another terminal window on your current machine run the command:<br />
<br />
$ vncviewer -PreferredEncoding=ZRLE localhost:0<br />
<br />
== Troubleshooting ==<br />
<br />
1. You can check your ip address and make sure port 5900 is forwarded by visiting [http://www.realvnc.com/cgi-bin/nettest.cgi this]{{Dead link|2020|04|03|status=404}} website.<br />
<br />
{{Accuracy}}<br />
<br />
2. Tested only on [[GNOME]] + [[GDM]]<br />
<br />
If you cannot start the tunnel, and get error like XOpenDisplay(":0") failed,<br />
Check if you have a {{ic|~/.Xauthority}} directory.<br />
If that does not exist, You can create one easily (Actually a symlink to actual one) by running command given below as normal user NOT ROOT OR USING [[Sudo]] as below:<br />
<br />
$ ln -sv $(dirname $(xauth info | awk '/Authority file/{print $3}')) ~/.Xauthority<br />
<br />
then try above [[#SSH Tunnel|tunneling]] example and it should work fine.<br />
Further if you want this to be automatically done each time [[Xorg]] is restarted, create the [[xprofile]] file & make is executable as below<br />
<br />
$ ln -sf $(dirname $(xauth info | awk '/Authority file/{print $3}')) ~/.Xauthority<br />
<br />
3.''' GNOME 3''' and '''x11vnc'''<br />
<br />
If you are using GNOME 3 and x11vnc and you get the following errors<br />
<br />
*** XOpenDisplay failed (:0) <br />
<br />
*** x11vnc was unable to open the X DISPLAY: ":0", it cannot continue.<br />
<br />
Try running x11vnc like<br />
<br />
$ x11vnc -noxdamage -many -display :0 -auth /var/run/gdm/$(sudo ls /var/run/gdm | grep $(whoami))/database -forever -bg<br />
<br />
Please update if this works / not works for any other [[display manager]] or [[desktop environment]].<br />
<br />
=== Screensaver problem ===<br />
<br />
If screensaver starts every 1-2 second, start x11vnc with {{ic|-nodpms}} key.<br />
<br />
=== IPv6 port different from IPv4 port ===<br />
<br />
The default behavior for the command:<br />
$ x11vnc -display :0 -rfbport 5908<br />
is for the server to listen to TCP port 5908 and TCP6 port 59'''00'''.<br />
For the server to listen to the same TCP6 port, also use the {{ic|-rfbportv6}} option to force the IPv6 listening port.<br />
For example:<br />
$ x11vnc -display :0 -rfbport 5908 -rfbportv6 5908<br />
<br />
=== Copying and Pasting ===<br />
<br />
If copying and pasting does not work as expected, particularly if pasting to the<br />
remote side is not working or clipboard behaviour is not as expected, try adding<br />
{{ic|-xkb}}:<br />
<br />
$ x11vnc -xkb -display :0<br />
<br />
Although the documentation does not indicate {{ic|-xkb}} specifically for<br />
clipboard problems, it resolved an issue where vim complained that there was<br />
nothing in the {{ic|*}} register.<br />
<br />
== Tips and tricks ==<br />
<br />
{{Style|Use [[Template:ic]].}}<br />
<br />
=== Run x11vnc "system-wide" in (GDM and GNOME Shell) ===<br />
<br />
{{Note|This instructions will work only if you are using GDM and GNOME shell in Xorg}} <br />
<br />
If you want to run x11vnc in GDM to login and then you want to run x11vnc in a GNOME shell user session for a "system-wide" x11vnc you can acomplish that with the following steps<br />
<br />
First we need to create a systemd service to launch a x11vnc server in GDM<br />
<br />
{{hc|/etc/systemd/system/x11vnc-gdm.service|<nowiki><br />
<br />
[Unit]<br />
Description=x11vnc server for GDM<br />
After=display-manager.service<br />
<br />
[Service]<br />
ExecStart=<br />
ExecStart=/usr/bin/x11vnc -many -shared -display :0 -auth /run/user/120/gdm/Xauthority -noxdamage -rfbauth USER_HOME/.vnc/passwd<br />
Restart=on-failure<br />
RestartSec=3<br />
<br />
[Install]<br />
WantedBy=graphical.target<br />
<br />
</nowiki>}}<br />
<br />
This will start a x11vnc server protected by the password stored at USER_HOME/.vnc/passwd that shows the GDM to any connected VNC client, however as you may notice, if you click in any of the users, as soon as you login all the VNC clients will show a black screen <br />
<br />
To fix this we need to create another systemd service that will start another x11vnc server in the GNOME Shell session as soon as you login<br />
<br />
{{hc|/etc/systemd/system/x11vnc-gnome-shell-YOUR_USER|<nowiki><br />
<br />
[Unit]<br />
Description=x11vnc server for Gnome shell session of YOUR_USER<br />
<br />
[Service]<br />
User=YOUR_USER<br />
Type=simple<br />
ExecStartPre=/bin/sh -c 'while ! pgrep -U "YOUR_USER" Xorg; do sleep 2; done'<br />
ExecStart=/bin/sh -c 'sudo systemctl stop x11vnc-gdm.service && /usr/bin/x11vnc -many -shared -display :1 -auth USER_HOME/.Xauthority -rfbauth USER_HOME/.vnc/passwd'<br />
Restart=on-failure<br />
RestartSec=3<br />
<br />
[Install]<br />
WantedBy=graphical.target<br />
<br />
</nowiki>}}<br />
<br />
Now, you need to keep in mind 3 things<br />
<br />
'''First''', as you may notice in the "ExecStart" part of the systemd service the command that executes can be separated in two tasks, first it stops the x11vnc-gdm.service (killing the gdm x11vnc server) and then it starts the x11vnc server for the user in the GNOME shell session, this was done like this because if you keep running the GDM x11vnc server in the background, the new x11vnc server for the user, is going to use the next available port, and you would need to change your client connection settings to connect either to the GDM x11vnc server or for your user specific x11vnc server, a setup like this is usefull because the GDM x11vnc server stops as soon as you login into your account.<br />
<br />
'''Second''', you need to create a service like this for each user that you want to have this functionallity, dont forget to replace the "YOUR_USER" and "USER_HOME" with your actual username.<br />
<br />
'''Third''', you need to keep in mind that you might need to change the "-display :X" part of the command to match your system setings, you can view your current display executing the following command.<br />
<br />
$ echo $DISPLAY<br />
<br />
use the output of the command to match the systemd service.<br />
<br />
Now, as you might notice, the x11vnc-gnome-shell systemd service is executed as your (probably) unprivigiled user, this presents a problem if we want to stop the x11vnc-gdm.service so we need to allow the user to stop the GDM service, this is acomplished using sudo, but we need to allow the execution of only that specific command without a password, we can do that with the following steps<br />
<br />
execute visudo as root<br />
<br />
$ visudo<br />
<br />
at the end of the file add the following line and save your changes<br />
<br />
YOUR_USER ALL=(root) NOPASSWD: /usr/bin/systemctl stop x11vnc-gdm.service<br />
<br />
Now you now simply need to enable both systemd services as root<br />
<br />
$ systemctl enable x11vnc-gdm.service<br />
<br />
$ systemctl enable x11vnc-gnome-shell-YOUR_USER.service<br />
<br />
When you restart your computer both of them will start running and you can connect to your GDM and GNOME Shell using VNC<br />
<br />
=== Run x11vnc "system-wide" in (SDDM and PLASMA) ===<br />
<br />
To run x11vnc when system boots into SDDM, if the aformentioned methods dont't work for you, just {{ic|systemctl edit x11vnc.service}} like this:<br />
<br />
{{hc|head=/etc/systemd/system/x11vnc.service.d/override.conf|output=<br />
<br />
[Service]<br />
ExecStart=<br />
ExecStart=/bin/bash -c "/usr/bin/x11vnc -auth /var/run/sddm/* -display :0 -forever -loop -noxdamage -repeat -rfbauth /home/YOUR_USER/.vnc/passwd -shared"<br />
<br />
[Install]<br />
WantedBy=graphical.target<br />
}}<br />
<br />
Remember to change "YOUR_USER" in the path, or use the preferred auth method. Disable the old x11vnc.service and execute {{ic|systemctl daemon-reload}}, followed by {{ic|systemctl enable x11vnc.service}}<br />
<br />
=== Change x11vnc password in each boot ===<br />
<br />
A setup like this could be useful is if you need to share your desktop with several people that you dont trust and you dont want to manually change the password every time, a setup like this would generate boot-unique passwords so if you share your password with someone, you only need to reboot your computer (or re-run the systemd service) and the password would change<br />
<br />
The new generated password will be stored as PLAIN TEXT in the /home/$USER/.vnc/autovncpass so it can be accesed simply by using<br />
<br />
$ cat /home/$USER/.vnc/autovncpass<br />
<br />
Keep in mind that storing the password as plain text could represent a security threat, '''USE THIS AT YOUR OWN RISK'''.<br />
<br />
Anyway, if you want to acomplish this, complete the following steps:<br />
<br />
First install {{Pkg|expect}} from the official repositories.<br />
<br />
Then, create the following script anywhere in your home directory<br />
<br />
{{hc|~/Automatic-x11vnc-Password-Changer.exp|<nowiki><br />
<br />
#!/usr/bin/expect -f<br />
<br />
set timeout -1<br />
<br />
log_user 0<br />
<br />
#Change your username here<br />
set USER "YOUR_USER" <br />
<br />
#First we need to generate the password, if you want to <br />
#change te password generation, change the "openssl rand -hex 4" line<br />
<br />
set NewVNCPassword [exec openssl rand -hex 4]<br />
<br />
#Now we invoke x11vnc to change the password<br />
<br />
spawn x11vnc --storepasswd<br />
<br />
match_max 100000<br />
<br />
expect -exact "Enter VNC password: "<br />
<br />
send -- "$NewVNCPassword\r"<br />
<br />
expect -exact "\r<br />
Verify password: "<br />
<br />
send -- "$NewVNCPassword\r"<br />
<br />
expect -exact "\r<br />
Write password to /home/$USER/.vnc/passwd? \[y\]/n "<br />
<br />
send -- "y\r"<br />
<br />
expect eof<br />
<br />
#Save the Password to the /home/$USER/.vnc/ directory as plaintext, <br />
<br />
exec echo "$NewVNCPassword" > /home/$USER/.vnc/autovncpass<br />
<br />
</nowiki>}}<br />
<br />
Now we need to create a systemd unit file that will execute the script at boot time<br />
<br />
{{hc|/etc/systemd/system/vnc-automatic-password-changer.service |<nowiki><br />
<br />
[Unit]<br />
Description=x11vnc automatic password changer<br />
Before=display-manager.service<br />
<br />
[Service]<br />
User=YOUR_USER<br />
Type=oneshot<br />
ExecStart=/PATH/TO/THE/SCRIPT/Automatic-x11vnc-Password-Changer.exp <br />
<br />
[Install]<br />
WantedBy=graphical.target<br />
<br />
</nowiki>}}<br />
<br />
Finally you just need to start/enable the systemd service using systemctl and the password will change<br />
<br />
you can access the current password by using <br />
<br />
$ cat /home/$USER/.vnc/autovncpass<br />
<br />
== See also ==<br />
<br />
* [http://www.karlrunge.com/x11vnc/ original author site]<br />
* https://github.com/LibVNC/x11vnc<br />
* [[Wikipedia:x11vnc]]</div>Jose1711https://wiki.archlinux.org/index.php?title=TigerVNC&diff=662911TigerVNC2021-04-19T20:25:57Z<p>Jose1711: Fix typo</p>
<hr />
<div>[[Category:Remote desktop]]<br />
[[Category:Servers]]<br />
[[de:VNC]]<br />
[[es:TigerVNC]]<br />
[[ja:TigerVNC]]<br />
[[zh-hans:TigerVNC]]<br />
{{Related articles start}}<br />
{{Related|x11vnc}}<br />
{{Related articles end}}<br />
<br />
[http://tigervnc.org/ TigerVNC] is an implementation of the [[Wikipedia:Virtual Network Computing|Virtual Network Computing]] (VNC) protocol. This article focuses on the server functionality.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|tigervnc}} package.<br />
<br />
== Running vncserver for virtual (headless) sessions ==<br />
<br />
=== Initial setup ===<br />
<br />
{{Note|Linux systems can have as many VNC servers as memory allows, all of which will be running in parallel to each other.}}<br />
<br />
For a quick start, see the steps below. Users are encouraged to read the vncserver man page for the complete list of configuration options.<br />
<br />
# Create a password using {{ic|vncpasswd}} which will store the hashed password in {{ic|~/.vnc/passwd}}.<br />
# Edit {{ic|/etc/tigervnc/vncserver.users}} to define user mappings. Each user defined in this file will have a corresponding port on which its session will run. The number in the file corresponds to a TCP port. By default, :1 is TCP port 5901 (5900+1). If another parallel server is needed, a second instance can then run on the next highest, free port, i.e 5902 (5900+2).<br />
# Create {{ic|~/.vnc/config}} and at a minimum, define the type of session desired with a line like {{ic|1=session=foo}} where foo corresponds to which ever DE is to run. One can see which DEs are available on the system by seeing their corresponding {{ic|.desktop}} files within {{ic|/usr/share/xsessions/}}.<br />
For example:<br />
<br />
{{hc|~/.vnc/config|2=<br />
session=lxqt<br />
geometry=1920x1080<br />
localhost<br />
alwaysshared}}<br />
<br />
=== Starting and stopping tigervnc ===<br />
<br />
[[Start]] {{ic|vncserver@.service}} and optionally [[enable]] it to run at boot time/shutdown. Note that the display number needs to be specified following the literal @ sign. For :1 it would look like this:<br />
# systemctl start vncserver@:1<br />
<br />
{{Note|Direct calls to {{ic|/usr/bin/vncserver}} are not supported as they will not establish a proper session scope. The systemd service is the only supported method of using TigerVNC. See: [https://github.com/TigerVNC/tigervnc/issues/1096 Issue #1096].}}<br />
<br />
== Expose the local display directly ==<br />
<br />
Tigervnc comes with libvnc.so which can be directly load during X initialization which provides better performance.<br />
Create a following file and restart X:<br />
{{hc|/etc/X11/xorg.conf.d/10-vnc.conf|<br />
Section "Module"<br />
Load "vnc"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Option "UserPasswdVerifier" "VncAuth"<br />
Option "PasswordFile" "/root/.vnc/passwd"<br />
EndSection}}<br />
<br />
== Running x0vncserver to directly control the local display ==<br />
<br />
{{pkg|tigervnc}} also provides {{ic|x0vncserver}} which allows direct control over a physical X session. After defining a session password using the ''vncpasswd'' tool, invoke the server like so:<br />
$ x0vncserver -rfbauth ~/.vnc/passwd<br />
<br />
For more information, see {{man|1|x0vncserver}}.<br />
<br />
{{Note|<br />
* [[x11vnc]] is an alternative VNC server which can also provide direct control of the current X session.<br />
* {{ic|x0vncserver}} does not currently support clipboard sharing between the client and the server (even with the help of {{ic|autocutsel}}). See: [https://github.com/TigerVNC/tigervnc/issues/529 Issue #529].}}<br />
<br />
=== Starting x0vncserver via xprofile ===<br />
<br />
A simple way to start ''x0vncserver'' is adding a line in one of the [[xprofile]] files such as:<br />
<br />
{{hc|~/.xprofile|<br />
...<br />
x0vncserver -rfbauth ~/.vnc/passwd &}}<br />
<br />
=== Starting and stopping x0vncserver via systemd ===<br />
<br />
In order to have a VNC Server running ''x0vncserver'', which is the easiest way for most users to quickly have remote access to the current desktop, create a systemd unit as follows replacing the user and the options with the desired ones:<br />
<br />
{{hc|~/.config/systemd/user/x0vncserver.service|2=<br />
[Unit]<br />
Description=Remote desktop service (VNC)<br />
<br />
[Service]<br />
Type=simple<br />
# wait for Xorg started by ${USER}<br />
ExecStartPre=/bin/sh -c 'while ! pgrep -U "$USER" Xorg; do sleep 2; done'<br />
ExecStart=/usr/bin/x0vncserver -rfbauth %h/.vnc/passwd<br />
# or login with your username & password<br />
#ExecStart=/usr/bin/x0vncserver -PAMService=login -PlainUsers=${USER} -SecurityTypes=TLSPlain<br />
<br />
[Install]<br />
WantedBy=default.target}}<br />
<br />
[[Start]] and [[enable]] the service {{ic|x0vncserver.service}} in [[Systemd/User]] mode, i.e. with the {{ic|--user}} parameter.<br />
<br />
== Running Xvnc with XDMCP for on demand sessions ==<br />
<br />
One can use ''systemd'' socket activation in combination with [[XDMCP]] to automatically spawn VNC servers for each user who attempts to login, so there is no need to set up one server/port per user. This setup uses the display manager to authenticate users and login, so there is no need for VNC passwords. The downside is that users cannot leave a session running on the server and reconnect to it later.<br />
<br />
To get this running, first set up [[XDMCP]] and make sure the display manager is running.<br />
Then create:<br />
{{hc|/etc/systemd/system/xvnc.socket|2=<br />
[Unit]<br />
Description=XVNC Server<br />
<br />
[Socket]<br />
ListenStream=5900<br />
Accept=yes<br />
<br />
[Install]<br />
WantedBy=sockets.target}}<br />
{{hc|/etc/systemd/system/xvnc@.service|2=<br />
[Unit]<br />
Description=XVNC Per-Connection Daemon<br />
<br />
[Service]<br />
ExecStart=-/usr/bin/Xvnc -inetd -query localhost -geometry 1920x1080 -once -SecurityTypes=None<br />
User=nobody<br />
StandardInput=socket<br />
StandardError=syslog}}<br />
Use systemctl to [[start]] and [[enable]] {{ic|xvnc.socket}}. Now any number of users can get unique desktops by connecting to port 5900.<br />
<br />
If the VNC server is exposed to the internet, add the {{ic|-localhost}} option to {{ic|Xvnc}} in {{ic|xvnc@.service}} (note that {{ic|-query localhost}} and {{ic|-localhost}} are different switches) and follow [[#Accessing vncserver via SSH tunnels]]. Since we only select a user after connecting, the VNC server runs as user ''nobody'' and uses {{ic|Xvnc}} directly instead of the {{ic|vncserver}} script, so any options in {{ic|~/.vnc}} are ignored. Optionally, [[autostart]] ''vncconfig'' so that the clipboard works (''vncconfig'' exits immediately in non-VNC sessions). One way is to create:<br />
{{hc|/etc/X11/xinit/xinitrc.d/99-vncconfig.sh|<br />
#!/bin/sh<br />
vncconfig -nowin &}}<br />
<br />
== Connecting to vncserver ==<br />
<br />
{{Warning|The default's TigerVNC security method is not secure, it lacks identity verification and will not prevent man-in-the-middle attack during the connection setup. Make sure you understand the security settings of your server and do not connect insecurely to a vncserver outside of a trusted LAN.}}<br />
<br />
{{Note|By default, TigerVNC uses the ''TLSVnc'' authentication/encryption method unless specifically instructed via the {{ic|SecurityTypes}} parameter. With ''TLSVnc'', there is standard VNC authentication and traffic is encrypted with GNUTLS but the identity of the server is not verified. TigerVNC supports alternative security schemes such as ''X509Vnc'' that combines standard VNC authentication with GNUTLS encryption and server identification, this is the recommended mode for a secure connection.<br />
<br />
When {{ic|SecurityTypes}} on the server is set to a non-encrypted option as high-priority (such as ''None'', ''VncAuth'', ''Plain'', ''TLSNone'', ''TLSPlain'', ''X509None'', ''X509Plain''); which is ill-advised, then it is not possible to use encryption. When running ''vncviewer'', it is safer to explicitly set {{ic|SecurityTypes}} and not accept any unencrypted traffic. Any other mode is to be used only when [[#Accessing vncserver via SSH tunnels]]. }}<br />
<br />
Any number of clients can connect to a vncserver. A simple example is given below where vncserver is running on 10.1.10.2 port 5901, or :1 in shorthand notation:<br />
$ vncviewer 10.1.10.2:1<br />
<br />
=== Passwordless authentication ===<br />
<br />
The {{ic|-passwd}} switch allows one to define the location of the server's {{ic|~/.vnc/passwd}} file. It is expected that the user has access to this file on the server through [[SSH]] or through physical access. In either case, place that file on the client's file system in a safe location, i.e. one that has read access ONLY to the expected user.<br />
<br />
$ vncviewer -passwd ''/path/to/server-passwd-file''<br />
<br />
The password can also be provided directly.<br />
<br />
{{Note|The password below is not secured; anyone who can run {{ic|ps}} on the machine will see it.}}<br />
<br />
$ vncviewer -passwd <(echo MYPASSWORD | vncpasswd -f)<br />
<br />
=== Example GUI-based clients ===<br />
<br />
* {{Pkg|gtk-vnc}}<br />
* {{Pkg|krdc}}<br />
* {{Pkg|vinagre}}<br />
* [[remmina]]<br />
* {{Pkg|virt-viewer}}<br />
* {{AUR|vncviewer-jar}}<br />
<br />
TigerVNC's vncviewer also has a simple GUI when run without any parameters:<br />
$ vncviewer<br />
<br />
== Accessing vncserver via SSH tunnels ==<br />
<br />
For servers offering SSH connection, an advantage of this method is that it is not necessary to open any other port than the already opened SSH port to the outside, since the VNC traffic is tunneled through the SSH port.<br />
<br />
=== On the server ===<br />
<br />
On the server side, ''vncserver'' or ''x0vncserver'' must be run.<br />
<br />
When running either one of these, it is recommended to use the {{ic|localhost}} option in {{ic|~/.vnc/config}} or the {{ic|-localhost}} switch (for ''x0vncserver'') since it allows connections from the localhost only and by analogy, only from users ssh'ed and authenticated on the box. For example:<br />
<br />
{{hc|~/.vnc/config|2=<br />
session=lxqt<br />
geometry=1920x1080<br />
localhost<br />
alwaysshared}}<br />
<br />
Make sure to [[Start]] or [[Restart]] the {{ic|vncserver@.service}}, for example (see also [[#Initial setup]]):<br />
# systemctl start vncserver@:1<br />
<br />
or for ''x0vncserver'':<br />
$ x0vncserver '''-localhost''' -SecurityTypes none<br />
<br />
=== On the client ===<br />
<br />
The VNC server has been setup on the remote machine to only accept local connections.<br />
Now, the client must open a secure shell with the remote machine (10.1.10.2 in this example) and create a tunnel from the client port, for instance 9901, to the remote server 5901 port. For more details on this feature, see [[OpenSSH#Forwarding other ports]] and {{man|1|ssh}}.<br />
<br />
$ ssh 10.1.10.2 -L 9901:localhost:5901<br />
<br />
Once connected via SSH, leave this shell window open since it is acting as the secured tunnel with the server. Alternatively, directly run SSH in the background using the {{ic|-f}} option. On the client side, to connect via this encrypted tunnel, point the ''vncviewer'' to the forwarded client port on the localhost.<br />
<br />
$ vncviewer localhost:9901<br />
<br />
What happens in practice is that the vncviewer connects locally to port 9901 which is tunneled to the server's localhost port 5901. The connection is established to the right port within the secure shell.<br />
<br />
{{Tip|It is possible, with a one-liner, to keep the port forwarding active during the connection and close it right after:<br />
{{bc|$ ssh -fL 9901:localhost:5901 10.1.10.2 sleep 10; vncviewer localhost:9901}}<br />
What it does is that the {{ic|-f}} switch will make ssh go in the background, it will still be alive executing {{ic|sleep 10}}. vncviewer is then executed and ssh remains open in the background as long as vncviewer makes use of the tunnel. ssh will close once the tunnel is dropped which is the wanted behavior.<br />
<br />
Alternatively, vncviewer's {{ic|-via}} switch provides a shortcut for the above command:<br />
{{bc|$ vncviewer -via 10.1.10.2 localhost::5901}}<br />
(Notice the double colon – vncviewer's syntax is {{ic|[host]:[display#]}} or {{ic|[host]::[port]}}.)<br />
}}<br />
<br />
=== Connecting to a vncserver from Android devices over SSH ===<br />
<br />
To connect to a VNC server over SSH using an Android device as a client, consider having the following setup:<br />
# SSH running on the server<br />
# vncserver running on server (with {{ic|-localhost}} flag for security)<br />
# SSH client on the Android device: ''ConnectBot'' is a popular choice and will be used in this guide as an example<br />
# VNC client on the Android device: ''androidVNC'' used here<br />
<br />
In ''ConnectBot'', connect to the desired machine. Tap the options key, select ''Port Forwards'' and add a port:<br />
Type: Local<br />
Source port: 5901<br />
Destination: 127.0.0.1:5901<br />
<br />
In ''androidVNC'' connect to the VNC port, this is the local address following the SSH connection:<br />
Password: the vncserver password<br />
Address: 127.0.0.1<br />
Port: 5901<br />
<br />
== Tips and tricks ==<br />
<br />
=== Connecting to an OSX system ===<br />
<br />
See https://help.ubuntu.com/community/AppleRemoteDesktop. Tested with Remmina.<br />
<br />
=== Recommended security settings ===<br />
<br />
If not [[#Accessing vncserver via SSH tunnels]] where the identification and the encryption are handled via SSH, it is recommended to use ''X509Vnc'', as ''TLSVnc'' lacks identity verification.<br />
<br />
$ vncserver -x509key ''/path/to/key.pem'' -x509cert ''/path/to/cert.pem'' -SecurityTypes X509Vnc :1<br />
<br />
Issuing x509 certificates is beyond the scope of this guide. However, [[wikipedia:Let's Encrypt|Let's Encrypt]] provides an easy way to do so. Alternatively, one can issue certificates using [[OpenSSL]], share the public key with the client and specify it with the {{ic|-X509CA}} parameter. An example is given below the server is running on 10.1.10.2:<br />
$ vncviewer 10.1.10.2 -X509CA ''/path/to/cert.pem''<br />
<br />
=== Toggling fullscreen ===<br />
<br />
This can be done through vnc client's menu. By default, vnc client's mkey is {{ic|F8}}.<br />
<br />
=== Workaround for mouse back and forward buttons not working ===<br />
<br />
The VNC protocol currently only uses 7 mouse buttons (left, middle, right, scroll up, scroll down, scroll left, scroll right) which means if your mouse has a back and a forward button these are not usable and input will be ignored.<br />
<br />
[https://www.bedroomlan.org/projects/evrouter/ evrouter] can be used to work around this limitation by sending keyboard key presses when clicking the mouse back/forward buttons. Optionally xte found in {{Pkg|xautomation}} and {{Pkg|xbindkeys}} can be used on the server to map the keyboard key presses back to mouse button clicks if needed.<br />
<br />
==== Substituting mouse back/forward buttons with keyboard keys XF86Back/XF86Forward ====<br />
<br />
This method is simple and suitable if you only need a way to navigate backward/forward while using web browsers or file browsers for example.<br />
<br />
Install {{AUR|evrouter}} and {{Pkg|xautomation}} on the client. Configure evrouter, see [[Mouse buttons#evrouter]] and evrouter man pages for instructions and tips on how to find the correct device name, window name, button names etc. Example config:<br />
{{hc|~/.evrouterrc|Window "OtherComputer:0 - TigerVNC": # Window title used as filter<br />
<br />
# Using Shell to avoid repeating key presses (see evrouter manual)<br />
"USB mouse" "/dev/input/by-id/usb-Mouse-name-event-mouse" none key/275 "Shell/xte 'key XF86Back'"<br />
"USB mosue" "/dev/input/by-id/usb-Mouse-name-event-mouse" none key/276 "Shell/xte 'key XF86Forward'"<br />
<br />
# Use XKey below instead if repeating keys is desired (see evrouter manual)<br />
#"Logitech Gaming Mouse G400" "/dev/input/by-id/usb-Logitech_Gaming_Mouse_G400-event-mouse" none key/275 "XKey/XF86Back"<br />
#"Logitech Gaming Mouse G400" "/dev/input/by-id/usb-Logitech_Gaming_Mouse_G400-event-mouse" none key/276 "XKey/XF86Forward"}}<br />
<br />
Start evrouter on the client. With above configuration keyboard key XF86Back is sent to the VNC server when clicking the back button on the mouse, and XF86Forward is sent when clicking the forward button.<br />
<br />
==== Mapping the keyboard key presses back to mouse button clicks on the server ====<br />
<br />
If needed it's possible to map the keyboard keys back to mouse button clicks on the server. In this case it might be a good idea to use keyboard keys which are never on the client or server. In the example below keyboard keys XF86Launch8/XF86Launch9 are used as mouse buttons 8/9.<br />
<br />
Evrouter configuration on the client:<br />
{{hc|~/.evrouterrc|Window "OtherComputer:0 - TigerVNC": # Window title<br />
<br />
# Using Shell to avoid repeating key presses (see evrouter manual)<br />
"USB mouse" "/dev/input/by-id/usb-Mouse-name-event-mouse" none key/275 "Shell/xte 'key XF86Launch8'"<br />
"USB mosue" "/dev/input/by-id/usb-Mouse-name-event-mouse" none key/276 "Shell/xte 'key XF86Launch9'"}}<br />
<br />
Install {{Pkg|xautomation}} and {{Pkg|xbindkeys}} on the server. Configure xbindkeys to map keyboard keys XF86Launch8/XF86Launch9 to mouse buttons 8/9 with xte.<br />
{{hc|~/.xbindkeysrc|<br />
"xte 'mouseclick 8'"<br />
XF86Launch8<br />
<br />
"xte 'mouseclick 9'"<br />
XF86Launch9<br />
}}<br />
Start xbindkeys {{ic|$ xbindkeys -f ~/.xbindkeysrc}}. The server will now map XF86Launch8/XF86Launch9 to mouse buttons 8/9.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Terminals in vncserver start in / (root dir) ===<br />
<br />
This is a known issue introduced upstream. See: https://github.com/TigerVNC/tigervnc/issues/1108<br />
<br />
=== Unable to type '<' character ===<br />
<br />
If pressing {{ic|<}} on a remote client emits the {{ic|>}} character, try remapping the incoming key [https://insaner.com/blog/2013/05.html#20130422063137]{{Dead link|2020|04|03|status=404}}:<br />
<br />
$ x0vncserver -RemapKeys="0x3c->0x2c"<br />
<br />
=== Black rectangle instead of window ===<br />
<br />
Most probably this is due to the application strictly requiring the composite Xorg extension. For example webkit based app: midori, psi-plus, etc.<br />
<br />
Restart vncserver in this case using something like following:<br />
<br />
$ vncserver -geometry ... -depth 24 :1 +extension Composite<br />
<br />
It looks like Composite extension in VNC will work only with 24bit depth.<br />
<br />
=== No mouse cursor ===<br />
<br />
If no mouse cursor is visible when using {{ic|x0vncserver}}, start vncviewer as follows:<br />
<br />
$ vncviewer DotWhenNoCursor=1 <server><br />
<br />
Or put {{ic|DotWhenNoCursor<nowiki>=</nowiki>1}} in the tigervnc configuration file, which is at {{ic|~/.vnc/default.tigervnc}} by default.<br />
<br />
=== Copying clipboard content from the remote machine ===<br />
<br />
If copying from the remote machine to the local machine does not work, run {{ic|autocutsel}} on the server, as mentioned in [https://bbs.archlinux.org/viewtopic.php?id=101243]:<br />
<br />
$ autocutsel -fork<br />
<br />
Now press F8 to display the VNC menu popup, and select {{ic|Clipboard: local -> remote}} option.<br />
<br />
=== "Authentication is required to create a color managed device" dialog when launching GNOME 3 ===<br />
<br />
A workaround is to create a "vnc" group and add the gdm user and any other users using vnc to that group.<br />
Modify {{ic|/etc/polkit-1/rules.d/gnome-vnc.rules}} with the following[https://github.com/TurboVNC/turbovnc/issues/47]:<br />
<br />
polkit.addRule(function(action, subject) {<br />
if ((action.id == "org.freedesktop.color-manager.create-device" ||<br />
action.id == "org.freedesktop.color-manager.create-profile" ||<br />
action.id == "org.freedesktop.color-manager.delete-device" ||<br />
action.id == "org.freedesktop.color-manager.delete-profile" ||<br />
action.id == "org.freedesktop.color-manager.modify-device" ||<br />
action.id == "org.freedesktop.color-manager.modify-profile") &&<br />
subject.isInGroup("vnc")) {<br />
return polkit.Result.YES;<br />
}<br />
});<br />
<br />
=== No window decoration / borders / titlebars / cannot move windows around ===<br />
<br />
Start a window manager to fix an empty xterm frame. E.g. on xfce, run `xfwm4 &` in the terminal.<br />
<br />
=== systemd service unit run as user ===<br />
<br />
$ sudo nano /usr/lib/systemd/system/tigervnc@.service<br />
<br />
[Unit]<br />
Description=Remote desktop service (VNC)<br />
After=syslog.target network.target<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/sbin/runuser -l USERNAME -c "/usr/bin/vncserver %i"<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
To start service for example on display 9:<br />
$ sudo systemctl start tigervnc@:9<br />
<br />
You maybe want to enable this at boot:<br />
$ sudo systemctl enable tigervnc@:9<br />
<br />
== See also ==<br />
<br />
* https://github.com/TigerVNC/tigervnc</div>Jose1711https://wiki.archlinux.org/index.php?title=Talk:TigerVNC&diff=662910Talk:TigerVNC2021-04-19T20:24:19Z<p>Jose1711: /* Gnome - black screen if same user is already connected locally */ new section</p>
<hr />
<div>== The config file is missing? ==<br />
<br />
The "Initial setup" section contains this phrase:<br />
<br />
> Edit /etc/tigervnc/vncserver.users to define user mappings. <br />
<br />
But after installing the tigervnc package the file does not exist in the FS. Should I create it first?<br />
<br />
[[User:Kuba-orlik|Kuba-orlik]] ([[User talk:Kuba-orlik|talk]]) 15:33, 30 September 2020 (UTC)<br />
<br />
: Kuba-orlik, please sign you edits with four tildes. Update your system, suspect you have an old version of tigervnc since that file is provided by the package [[User:Graysky|Graysky]] ([[User talk:Graysky|talk]]) 08:41, 29 September 2020 (UTC)<br />
<br />
: I have the version `1.10.1-2` installed, although I can't find the file with `pacman -F vncserver.users`. I think that it might be caused by the fact that I use Manjaro and it's packaged differently there. [[User:Kuba-orlik|Kuba-orlik]] ([[User talk:Kuba-orlik|talk]]) 15:35, 30 September 2020 (UTC)<br />
<br />
== Gnome - black screen if same user is already connected locally ==<br />
<br />
Took me a while to find so maybe you could consider adding a new troubleshooting section. Apparently having {{ic|1=session=gnome}} in {{ic|.vnc/config}} is not a good idea if a local Gnome session is running under the same user. More details at https://github.com/TigerVNC/tigervnc/issues/1126<br />
[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 20:24, 19 April 2021 (UTC)</div>Jose1711https://wiki.archlinux.org/index.php?title=Talk:Monitorix&diff=659158Talk:Monitorix2021-04-11T20:30:44Z<p>Jose1711: Add new section: Use conf.d for configuration</p>
<hr />
<div>== Use conf.d for configuration ==<br />
<br />
According to the author of monitorix {{ic|/etc/monitorix/monitorix.conf}} should not be modified directly but instead a separate file should be created in {{ic|conf.d/}} as described in [https://www.monitorix.org/faq.html#Q107 FAQ107]. Citing the author: "if you modify the main configuration file you are either forced to upgrade it on every new release or you are ending up with an obsolete {{ic|monitorix.conf}}".<br />
<br />
[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 20:30, 11 April 2021 (UTC)</div>Jose1711https://wiki.archlinux.org/index.php?title=Parental_control&diff=655862Parental control2021-03-23T11:38:41Z<p>Jose1711: add thyme</p>
<hr />
<div>[[Category:Security]]<br />
[[ja:ペアレンタルコントロール]]<br />
Several methods exist to protect and limit child activity on a computer.<br />
<br />
{{Note|Any security features will be effective only on the level you enforce them. For example, even after installing a parental control application in the operating system, the child may bypass it by downloading and booting any Linux distribution live image.}}<br />
<br />
== Applications ==<br />
<br />
* {{App|timekpr-next|A program controlling use of user accounts. It can limit by access duration with the daemon ''timed'', and configure at what time users can log in. A client in the traybar warns the users about their time running out, while administration is done in a graphical GTK GUI.|https://launchpad.net/timekpr-next|{{AUR|timekpr-next}}}}<br />
* {{App|timeoutd|A lightweight alternative to timekpr, it scans {{ic|/var/run/utmp}} every minute and checks {{ic|/etc/timeouts}} for an entry matching a restricted user. Restrictions are based on idle time, login time, maximum time, and time of day.|https://github.com/sohonet/timeoutd|{{AUR|timeoutd}}}}<br />
* {{App|logkeys|A daemon that logs keypresses into a logfile for later inspection. The log file resides by default in {{ic|/var/log}}, but it is recommended to move it to an encrypted partition; it will for example contain every password entered in the system. Use the --keymap option if using a localized, non-US keyboard. For supervision purposes, the {{ic|--no-func-keys}} option is recommended.|https://github.com/kernc/logkeys|{{AUR|logkeys}}}}<br />
* [[DansGuardian]]. If you wish, you might even set up an Arch based router running DansGuardian and enforce all other devices in your physical network to connect to the internet through this router.<br />
* {{App|thyme|While being primarily a time-tracking tool (helping one to achieve better productivity) it can also give a quick idea of what your kids are doing on the computer. Logs are only stored locally.|https://github.com/sourcegraph/thyme|{{AUR|https://aur.archlinux.org/packages/thyme-git/}}}}<br />
<br />
== Whitelist with Tinyproxy and Firehol ==<br />
<br />
The following description will enable you to filter any user's access to the internet with a whitelist of url-s using {{AUR|firehol}} and {{pkg|tinyproxy}} (or {{AUR|tinyproxy-git}}).<br />
<br />
{{ic|/etc/tinyproxy/tinyproxy.conf}} consists of the following changes:<br />
<br />
FilterURLs On<br />
FilterDefaultDeny Yes<br />
Filter "/etc/tinyproxy/whitelist"<br />
<br />
{{ic|/etc/tinyproxy/whitelist}} should hold the url's that will be only allowed accessed by selected users. A silly example:<br />
<br />
(www|wiki|static).archlinux.org<br />
google.com<br />
{{ic|/etc/firehol/firehol.conf}} should contain the following line:<br />
transparent_proxy "80 443" 8888 "nobody root bin myaccount"<br />
where myaccount is my account that should no be filtered by Tinyproxy.<br />
<br />
== OpenDNS Parental Control ==<br />
<br />
[https://www.opendns.com/home-internet-security/ OpenDNS] provides free DNS services as an alternative to your ISP's default servers. Furthermore, they provide optional filtering capabilities. Different levels of filtering is possible; see the OpenDNS main page for details.<br />
<br />
For dynamic IP addresses, it is a good idea to keep them updated on OpenDNS. Use {{Pkg|ddclient}} and edit {{ic|/etc/ddclient/ddclient.conf}} as follows:<br />
<br />
# OpenDNS.com account-configuration<br />
use=web, web=myip.dnsomatic.com<br />
server=updates.opendns.com<br />
protocol=dyndns2<br />
login=myopendns@email.address<br />
password=myopendnspassword<br />
myhostname<br />
<br />
You may sometimes even set up your router to use OpenDNS, therefore allowing protection spanning on all devices connected to that router.<br />
<br />
== Editing /etc/hosts ==<br />
You may configure your [[wikipedia:Hosts (file)|/etc/hosts]] file to block access to certain domains. A more draconian approach is to only allow domains explicitly stated in {{ic|/etc/hosts}}, as described [https://help.ubuntu.com/community/ParentalControls#Do_It_Yourself_Whitelisting here]. If you do this, please remember that this will affect your whole system, so for example pacman may be unable to connect to the update server unless you make a proper binding in your {{ic|/etc/hosts}}.<br />
<br />
== Browser add-ons ==<br />
Several add-ons exist for web browsers to filter web content. Some of them can even block out pages examining on their body, not only on their URL. Be warned, however, that this is not a very secure way. Starting Firefox in safe mode, messing with the Firefox profile directory or Firefox profile manager are obvious ways to attempt to shut down Firefox-based add-ons. If all else fails, the kid may simply use a different browser.</div>Jose1711https://wiki.archlinux.org/index.php?title=User_talk:Lahwaacz&diff=651851User talk:Lahwaacz2021-02-10T20:34:47Z<p>Jose1711: Re: /* Re: Undo of Automatic configuration using udev */</p>
<hr />
<div>== bot checking links after move ==<br />
<br />
Hi, re [[Talk:Touchpad Synaptics#adding libinput alternative]]. [[Touchpad Synaptics]] has 100+ backlinks and the more important ones - a bit tedious task. I was just glancing over your clever github bot scripts. It would be handy to have a script after such moves: walk over the backlinks of [[Touchpad Synaptics]] and just replace "[[Touchpad Synaptics" with "[[Synaptics" from the links. That would leave all links to subsections intact. Leaving out the translations to handle manually, there would not be much to go wrong, or? --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 07:36, 26 September 2015 (UTC)<br />
<br />
:Hi, thanks for the suggestion. It would be indeed handy in this case, but most likely not generally. Imagine that there was a [[UUID]] page, which was later generalized and renamed to [[Persistent block device naming]] and content about UUID is now only a section on the page. In this case using the naive replacement would likely change the meaning of many sentences, and using shorter redirects for convenience is actually encouraged. There would have to be a list of whitelisted "harmless" replacements, which could even help to replace <nowiki>[[pacman|Install]]</nowiki> with <nowiki>[[Install]]</nowiki> etc. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:01, 26 September 2015 (UTC)<br />
<br />
::Yes, good examples, but you are thinking universal already :) I did not mean it could be that. For example, if you take the time when the bulk of the title case moves were done. With such a script one could avoid a lot of internal redirects as well. E.g. [https://wiki.archlinux.org/index.php/Special:WhatLinksHere/Beginners'_Guide]. But it's ok, just an idea. Please close this, if you think it's too singular cases with a simple enough replacement where it could be applied. --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 10:02, 26 September 2015 (UTC)<br />
<br />
== mkosi ==<br />
<br />
Hi, about your [https://wiki.archlinux.org/index.php?title=Systemd-nspawn&diff=0&oldid=491975 revert]: You can use mkosi also to create a container/directory tree (-t directory). So it can do the same and more. -- [[User:Nudin|Nudin]] ([[User talk:Nudin|talk]]) 11:33, 1 October 2017 (UTC)<br />
<br />
:Alright, how is the "more" relevant to systemd-nspawn though? -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 17:30, 3 October 2017 (UTC)<br />
<br />
::Hi, mkosi let's you create images (or directory trees) of various different distributions and allows you to do things like setting the root-password or installing additional packages. systemd-nspawn alows you to boot such images/directory trees. So I thought mentioning mkosi as alternative to manually creating a container with pacstrap or debootstrap would be worth it. -- [[User:Nudin|Nudin]] ([[User talk:Nudin|talk]]) 22:23, 5 October 2017 (UTC)<br />
<br />
== Waking from suspend with USB device ==<br />
<br />
Hi Lahwaacz, thanks for your input on this topic.<br />
Can you help me a bit further, I know the USB host controller and the USB device are different things but I thought that enabling the host controller was not necessary anymore, see [https://www.spinics.net/lists/linux-usb/msg53661.html].<br />
In my case all the {{ic|driver/*/power/wakeup}} are all enabled by default and the {{ic|/proc/acpi/wakeup}} as well.<br />
Anyway I have added a step in my explanations to identify the path awaiting for more clarity.<br />
<br />
[[User:Kewl|Kewl]] ([[User talk:Kewl|talk]]) 21:57, 16 January 2018 (UTC)<br />
<br />
:Hi, thanks for the link, it's entirely possible that something changed since the section was written. However, in my case only the keyboard device has wakeup enabled by default: {{bc|<nowiki><br />
$ for f in /sys/bus/usb/drivers/usb/*/power/wakeup; do echo "$f: $(cat $f)"; done<br />
/sys/bus/usb/drivers/usb/1-1/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/2-1/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/3-11/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/3-12/power/wakeup: enabled<br />
/sys/bus/usb/drivers/usb/3-13/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/4-3/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/4-4/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/usb1/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/usb2/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/usb3/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/usb4/power/wakeup: disabled<br />
</nowiki>}}<br />
:But in practice it seems to wake up the system even without the host controllers enabled for wakeup... It might also depend on some BIOS/firmware settings but if it works by default on most systems then I think the host controller settings could be removed again.<br />
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:14, 19 January 2018 (UTC)<br />
<br />
== Are supported local/remote destinations important for choosing a backup program? ==<br />
<br />
You [[Special:Diff/525550|reverted]] my edit adding supported backup destinations to [[Synchronization_and_backup_programs]]. This is puzzling to me. Here are some thoughts:<br />
* if choosing any backup program, the ability to send the backup off-site vs only on a local disk is a key feature consideration. Perhaps *the* key feature: one helps me recover in case my house gets burglarized or burns down, and the other does not. This is a much more important feature consideration than, say, whether the program is written in Go or Mono (something that has a full column). I think it's hard to disagree on that.<br />
* Given this, I am very puzzled you would use the term "useless" in the revert message.<br />
* I assume you didn't like that the table got even bigger (it didn't fit into the layout even before). I don't like it either, but perhaps the revert should have said "can you put this somewhere else, not in this already-too-big table?"<br />
* On a personal note, when I provide feedback or give opinion on somebody else's work, I'd like to be constructive and kind, instead of aggressive and putting people down. Just a thought. Thanks for listening.<br />
<br />
[[User:Jernst|Jernst]] ([[User talk:Jernst|talk]]) 17:38, 11 June 2018 (UTC)<br />
<br />
:No because you can use any remote back-end with any backup application by just running one command / writing the backups to a [[FUSE]] (if available).--[[User:Larivact|Larivact]] ([[User talk:Larivact|talk]]) 04:39, 12 June 2018 (UTC)<br />
<br />
::Hmm, by that reasoning we don't need the Arch package repository, as long as we have source code and makepkg. Or Perl, if we have bash and awk. But even then, and if all the fuse backends existed (I doubt they do), and if it were easy to set all of them up (another thing I doubt), do you indeed believe that running something written to read/write local files will be just as efficient backing up gigabytes of data to a remote repository as something that is specifically optimized for that use case? Note that backing up, say, daily, a typical hard drive via tpyical consumer broadband is still quite a bandwidth challenge in many places today. What about we add this info, and remove (or merge) some other columns to make the table smaller? {{Unsigned|18:08, 12 June 2018|Jernst}}<br />
<br />
:::Your comparisons don't make sense. Mind the slash in my response, you do not need a FUSE implementation, a simple CLI suffices. You do not need to "set all of them up", you only need one. --[[User:Larivact|Larivact]] ([[User talk:Larivact|talk]]) 18:47, 12 June 2018 (UTC)<br />
<br />
::::If you ever attempt to help a normal user set up a reliably-working off-site backup strategy, think of this discussion. In the meantime, this is all the time I'm going to spend on a discussion that has such repeated gems in it as "makes no sense" without explaining why you think so. Have a nice day. [[User:Jernst|Jernst]] ([[User talk:Jernst|talk]]) 18:54, 12 June 2018 (UTC)<br />
<br />
== The pip section in [[Python package guidelines]] ==<br />
<br />
Hi, you wanted the warning about using pip or wheels restored but accidentally(?) reverted my whole set of changes. I redid them, leaving the warning in place. – [[User:Flying sheep|flying sheep]] 08:17, 8 March 2019 (UTC)<br />
<br />
:Full revert was intentional, because the "wheel" section is not a full replacement for "pip" because there are packages which don't provide wheel files. As I said in the edit summary, there is no reason to recommend one or the other due to the warning. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:21, 8 March 2019 (UTC)<br />
::That still doesn’t explain why you reverted the first part, that had nothing to do with the pip/wheel section and simple improves the files.pythonhosted.org URLs. I restored that one while we’re discussing the pip/wheel section. And about that: There’s no reason to use pip for anything else, and pip is only used because some people (me included) didn’t understand that you can install most wheels by just extracting them to the correct location. So what do you think is missing from my wheels section that the former pip section had? – [[User:Flying_sheep|flying sheep]] 11:41, 11 March 2019 (UTC)<br />
<br />
:::If you didn't notice, the page includes "guidelines" in the title. So the page should contain only common and recommended ways to do things, not everything that is possible to do. If you think that your way to install "wheels" should be followed by everybody, feel free to discuss it on the talk page. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:26, 11 March 2019 (UTC)<br />
::::Well, extracting static archives sounds much more recommended than running pip with like 7 options to make it behave. I added a talk item: [[Talk:Python package guidelines#Remove_pip_section_in_favor_of_wheels_section?]] – [[User:Flying_sheep|flying sheep]]<br />
<br />
== wpa_supplicant ==<br />
<br />
Regarding https://wiki.archlinux.org/index.php?title=WPA_supplicant&diff=577215&oldid=577167, one person ran into this problem in March of this year and spent too much time diagnosing it:<br />
<br />
https://bbs.archlinux.org/viewtopic.php?id=244950<br />
<br />
It took me a few days to find the problem. I want to make sure the next time someone encounters it, they easily find relevant information about what the cause is. Since you've reverted my edits to both netctl and wpa_supplicant, what do you suggest?<br />
<br />
--<br />
<br />
[[User:Pooryorick|Pooryorick]] ([[User talk:Pooryorick|talk]]) 08:24, 18 July 2019 (UTC)<br />
<br />
== F2FS and GRUB ==<br />
<br />
Hello. :) I'm here to address a recent disagreement. I noticed a reversion of my edit regarding the F2FS filesystem, in particular regarding the configuration file to edit (with you representing /boot/grub/grub.cfg and me representing /etc/default/grub). I run F2FS on my daily driver with an encrypted root filesystem and encrypted boot on a separate partition, and have never had to touch grub.cfg. I only automatically generate it. It's possible to use either, but /etc/default/grub would make more sense as a recommendation in my mind because grub.cfg has the potential to be overwritten during updates, whereas /etc/default/grub doesn't. <br />
<br />
If there's a compelling reason to use grub.cfg over /etc/default/grub, please let me know. ^^ I'm always eager to learn more about Arch. I don't want to get in a reversion war so I've left your change untouched for the time being.<br />
<br />
[[User:Eurydice|Eurydice]] ([[User talk:Eurydice|talk]]) 00:17, 8 September 2019 (UTC)<br />
<br />
:The reason is explained in the section: "If GRUB is used with an unsupported filesystem it is not able to extract the UUID of your drive so it uses classic non-persistent /dev/sdXx names instead." If it does not apply to F2FS, it should be made clear. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 06:29, 8 September 2019 (UTC)<br />
<br />
::You can specify UUID's in GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, so my proposed solution would work for F2FS and other unsupported filesystems, without the burden of manually editing grub.cfg. If there's anything I need to clarify or something else I'm missing, just let me know. :) [[User:Eurydice|Eurydice]] ([[User talk:Eurydice|talk]]) 19:37, 8 September 2019 (UTC)<br />
<br />
:::The {{ic|1=root=}} parameter is not supposed to be in GRUB_CMDLINE_LINUX_DEFAULT, regardless if UUID is used or not. ''grub-mkconfig'' automatically detects the root filesystem and adds the appropriate {{ic|1=root=}} parameter based on GRUB_DISABLE_LINUX_UUID. In any case, your change to the paragraph does not make sense. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:02, 8 September 2019 (UTC)<br />
<br />
::::It could simply be because I use full disk encryption, and adding a kernel parameter for the encrypted disk's UUID is correct in that situation. You're more experienced with contributing to the wiki, so I guess I'll defer to your judgment. It felt like a reasonable edit and solution to me and I don't see the downside to including it in GRUB_CMDLINE_LINUX_DEFAULT. [[User:Eurydice|Eurydice]] ([[User talk:Eurydice|talk]]) 05:38, 9 September 2019 (UTC)<br />
<br />
== dracut executable link ==<br />
<br />
Hello, your last edit on the dracut page (https://wiki.archlinux.org/index.php?title=Dracut&oldid=596388) that undid my 'Link to direct "make executable" section for executable link' commit states: "the redirect executable points exactly to that section", but it doesn't. Following the [[executable]] link just points to the top of the Help:Reading page.<br />
<br />
{{unsigned|17:06, 28 January 2020|Krathalan}}<br />
<br />
:In that case your browser probably does not work correctly, because the redirect [https://wiki.archlinux.org/index.php?title=Executable&redirect=no really points to the section]. Or MediaWiki, there was a bug several years ago... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:41, 28 January 2020 (UTC)<br />
<br />
:: How strange... thanks for pointing that out. It does indeed appear to be some issue with my Firefox configuration. [[User:Krathalan|Krathalan]] ([[User talk:Krathalan|talk]]) 19:51, 28 January 2020 (UTC)<br />
<br />
== Getting install.php work in DokuWiki ==<br />
<br />
Hi, than you for having undone my contribution and pointed to the right solution on [[Dokuwiki#Configuration]]. Indeed I had read this solution before, but I was misled by the condition "if you are using lighttpd or nginx and your PHP version is lower than 7": as I use Apache with php v. 7.4.3 I didn't take it into account. Do you know what a correct rephrasing could be? Maybe it should be deleted?<br />
<br />
Also, I think that, at the end of this same section, one should add something like "verify that {{Pkg|php-gd}} is installed and restart {{ic|php-fpm.service}}".<br />
<br />
Naturally I can do it myself, but I prefer to ask before.<br />
[[User:BDumont|BDumont]] ([[User talk:BDumont|talk]]) 17:31, 19 February 2020 (UTC)<br />
<br />
:Hi, apparently it depends on whether you had {{ic|open_basedir}} set previously or not. I've changed the page, feel free to update the gd extension. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 21:16, 19 February 2020 (UTC)<br />
<br />
::Thank you! However, while, I didn't have {{ic|open_basedir}} set previously, I couldn't access ''install.php''. I suspect there is another thing to do, since the configuration editor in DokuWiki complains that it cannot modify the configuration files although ownership and permissions are correctly set for the relevant symlinks, directories and files, and so is {{ic|open_basedir}}. However I can edit my pages. Maybe a return from a new user with a fresh installation would be more useful, though. [[User:BDumont|BDumont]] ([[User talk:BDumont|talk]]) 08:20, 20 February 2020 (UTC)<br />
<br />
== Dead link in Simple stateful firewall#See Also ==<br />
<br />
Hi, Jakub. I am about [https://wiki.archlinux.org/index.php?title=Simple_stateful_firewall&diff=599725&oldid=599717 this] edit. I tried to follow that link one more time and it is not require entering captcha. I am not see any content limitations and my colleague (he uses Tor) does not see them too. I am not sure how it works, so I leave it on your descision. -- [[User:Duodai|Duodai]] ([[User talk:Duodai|talk]]) 14:29, 1 March 2020 (UTC)<br />
<br />
:Well, maybe it depends on the location from which the request comes. But I don't know how it works either... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:33, 1 March 2020 (UTC)<br />
<br />
::my guess is it returns captcha for crawlers only -- [[User:Ubone|Ubone]] ([[User talk:Ubone|talk]]) 01:59, 2 March 2020 (UTC)<br />
<br />
:::I'm getting it in my browser... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:14, 2 March 2020 (UTC)<br />
<br />
== SystemD user units depending on graphical session ==<br />
Hi,<br />
regarding reverting my addition to [[Systemd/User]], could you please explain why? I referenced [[https://www.freedesktop.org/software/systemd/man/systemd.special.html]] which directly contradicts what you said in your summary.<br />
<br />
{{unsigned|19:53, 5 May 2020|Fuero}}<br />
<br />
:The note in [[Systemd/User#How it works]] still applies - systemd services are never per-session, but per-user. The service does not magically get the correct DISPLAY or WAYLAND_DISPLAY variable, it does not work if you have multiple sessions per user, etc. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 12:45, 6 May 2020 (UTC)<br />
<br />
== Plymouth ==<br />
<br />
Actually with just Plymouth it does not work properly. Even 0dd17y had the same issue in https://bbs.archlinux.org/viewtopic.php?id=220900.<br />
<br />
The reason I did not file a bug report is that it is anyway fixed in the git version and the latest release (0.9.4) is around 2 years behind master<br />
<br />
{{unsigned|09:50, 6 May 2020|M.Srikanth}}<br />
<br />
:So if you don't have to file a bug report, add a full troubleshooting entry or at least properly reference your inline note instead of resorting to plain "if that does not work, try this instead". -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 12:15, 6 May 2020 (UTC)<br />
<br />
== [Bitcoin core] build the code and run the test suites ==<br />
<br />
Hello,<br />
<br />
This week, I managed to build the Bitcoin code and run all the test suites with the help of this page: https://jonatack.github.io/articles/how-to-compile-bitcoin-core-and-run-the-tests<br />
<br />
Archlinux has two particularities:<br />
* being in rolling release, it takes to manually use the library {{ic|Berkeley DB (BDB) v4.8}}<br />
* the {{ic|/tmp}} directory is by default limited to half the size of the Ram<br />
<br />
For these reason, maybe it could be interesting to have a page in the wiki to explain how to build the Bitcoin core?<br />
<br />
Cheers,<br />
<br />
Thomas<br />
<br />
[[User:Thomasb|Thomasb]] ([[User talk:Thomasb|talk]]) 20:29, 9 May 2020 (UTC)<br />
<br />
:I don't think that this is useful. There is the {{AUR|bitcoin-core-git}} package and nothing more should be needed. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 16:53, 26 May 2020 (UTC)<br />
<br />
== Double linefeed results in extra line ==<br />
<br />
If you look at templates that end with double linefeed before noinclude this would result in extra line in resulting page.<br />
<br />
It may be a minor point but since you are perfectionist about wikitext I should mention this is a tradeoff and it results in slightly worse result.<br />
<br />
Removing just one linefeed removes the problem while still allowing it to not jumble all the tags into same line.<br />
<br />
-- [[User:Svito|Svito]] ([[User talk:Svito|talk]]) 16:30, 11 May 2020 (UTC)<br />
<br />
:If this is about [https://wiki.archlinux.org/index.php?title=Template:Cat_main&diff=next&oldid=612179], the spaces I added back are not included when the template is used elsewhere, because the spaces are inside the noinclude tags. The extra space is only on the template page itself, but it does not result from template inclusion. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:41, 11 May 2020 (UTC)<br />
<br />
::OFC, I mean the template page render has extra line. -- [[User:Svito|Svito]] ([[User talk:Svito|talk]]) 21:21, 11 May 2020 (UTC)<br />
<br />
:::I agree with [[User:Svito|Svito]], isn't it good to delete the extra blank lines? -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 05:39, 12 May 2020 (UTC)<br />
<br />
::::OK, let's do it. [https://wiki.archlinux.org/index.php?title=Template:Cat_main&diff=616382&oldid=612181] -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 16:47, 26 May 2020 (UTC)<br />
<br />
== Re: lighttpd: remove python2 version ==<br />
<br />
Instead of removing the example we could as well add an example using a Python3 library like https://pypi.org/project/flup6/.<br />
<br />
{{unsigned|15:23, 18 May 2020|Gruentee}}<br />
<br />
:Feel free to add it if you find it useful. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:56, 18 May 2020 (UTC)<br />
<br />
== Xbindkeys removal ==<br />
<br />
Hi, just wondering why you [https://wiki.archlinux.org/index.php?title=Xbindkeys&diff=617675&oldid=617670 removed my edit] from [[Xbindkeys]]? The xbindkeys page has a number of quick tips but no mention of how to bind anything to the Print Screen key so I thought it would be useful to add. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 02:27, 3 June 2020 (UTC)<br />
<br />
:Giving examples for all keys on the keyboard is useless, there is [[Xbindkeys#Identifying keycodes]] which teaches how to find the keycodes and keysyms of any key. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 06:37, 3 June 2020 (UTC)<br />
<br />
:: So how come you left the examples for the volume up/down and brightness? What is different between those examples and a screenshot example? Aren't more examples better to save people from hunting all over the place trying to piece things together themselves? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 14:03, 4 June 2020 (UTC)<br />
<br />
:::The difference is that when it comes to volume control, there are 1 or 2 options for the 99% most common cases, but for screenshot taking there are dozens of different options. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 15:15, 12 August 2020 (UTC)<br />
<br />
== Re: Revert for edit to XDG Base Directory page regarding python_history ==<br />
<br />
I understand the justification for reverting the change I made, however I would like to point out that similar entries on the page (such as Maven) also have instructions for what contents to put in files (even though there is native documentation for those settings). Additionally, it took me a bit of re-reading on the linked Python documentation to reason out how the documentation's example needed to be modified, since it's not clear from the Python documentation whether placing such code in the PYTHONSTARTUP file will actually ''override'' the default behavior. [[User:Varriount|Varriount]] ([[User talk:Varriount|talk]]) 20:44, 20 June 2020 (UTC)<br />
<br />
:Even maven's note can be [https://wiki.archlinux.org/index.php?title=XDG_Base_Directory&diff=631704&oldid=631630 shortened]. The notes in the table must be as short as possible, there is no place for extended explanations or long code snippets like in the upstream documentation. If the Python's documentation is not clear enough, I don't think any note in a massive convoluted table will ever be better. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:47, 12 August 2020 (UTC)<br />
<br />
== Re: Revert for Backlight page ==<br />
<br />
Hi, you reverted my change to [[Backlight]] page that mentioned WIP patches for controlling OLED panel brightness. I don't really understand justification for reverting it since currently the page says that OLED brightness can be controlled only by changing gamma ramp. That is wrong - since it's not the only way - these panels can control brightness with a PWM. Moreover controlling brightness with gamma ramp is not optimal - it essentially reduces dynamic range, i.e. at 50% you have 7 bits per pixel, at 25% - 6 bit per pixel, etc. That results in banding artifacts at lower brightness level.<br />
<br />
As far waiting for the patches to be merged before mentioning it there - it'll take ~3-6 months (yes, that's the process) and I haven't found *any* reference to these changes on the internet - everyone recommends using gamma ramp instead of fixing it properly. I'm absolutely sure that having information about these patches would not hurt [[User:Anarsoul|Anarsoul]] ([[User talk:Anarsoul|talk]]) 15:56, 30 June 2020 (UTC)<br />
<br />
:Linking to a repo which which has 2 custom commits on top of some arbitrary development version of the Linux kernel tree is not helpful for users. Nobody will compile directly from this repo which is already significantly outdated compared to recent kernel versions and there is no indication if the patches actually work with newer (or older) kernels. We can mention the PWM control as a general concept though. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:32, 12 August 2020 (UTC)<br />
<br />
== Automatic template correction ==<br />
<br />
Per [[Help:Template#Style]], templates should be used with the capitalization shown in the examples in their pages, so {{ic|&#123;{AUR&#124;...}} is correct, while {{ic|&#123;{aur&#124;...}} is not.<br />
<br />
However, there are pages that don't respect that rule (e.g. [[Android_Debug_Bridge]] until recently).<br />
<br />
I beleive this correction should be easy to implement using a bot. What do you think?<br />
<br />
{{unsigned|07:24, 25 August 2020|Relrel}}<br />
<br />
:Yes, this should be easy, but the bot should not make a huge amount of simple style-only changes - they should be combined with corrections for more complex rules. Anyway, there is an idea to create a [https://github.com/lahwaacz/wiki-scripts/issues/22 style linter] for the ArchWiki rules. Would you like to help? ;-) – [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 09:21, 25 August 2020 (UTC)<br />
<br />
== Failed to create tun device ==<br />
<br />
I don't understand your reason for [[https://wiki.archlinux.org/index.php?title=NetworkManager&diff=0&oldid=634880 removing my section in NetworkManager]]. Could you elaborate?--[[User:Egils|Egils]] ([[User talk:Egils|talk]]) 07:40, 11 September 2020 (UTC)<br />
<br />
:You can't use [[systemd-networkd]] and [[NetworkManager]] at the same time. Even if you don't have any ''.network'' file for systemd-networkd, you can't solve NetworkManager's problems with systemd-networkd. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:43, 11 September 2020 (UTC)<br />
<br />
::Ok, thanks, in this case it solved the error I got. Now the VPN works. Do you have an idea about how to solve it without systemd-networkd?--[[User:Egils|Egils]] ([[User talk:Egils|talk]]) 22:27, 11 September 2020 (UTC)<br />
<br />
:::You should really fix the permission problem for {{Pkg|networkmanager-openvpn}}. The tun interface should be managed by OpenVPN which needs rights to create it. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 06:37, 12 September 2020 (UTC)<br />
<br />
::I don't think this statement is entirely correct. [[systemd-networkd]] and [[NetworkManager]] can happily co-exist together if they are managing different interfaces. I unfortunately don't have a reference to point to this, but I came across this being mentioned a couple of times on forums. I personally use [[NetworkManager]] on my laptop to handle wifi, while [[systemd-networkd]] is in control of virtual ethernet and bridges for all my [[systemd-nspawn]] instances. [[User:Romstor|Romstor]] ([[User talk:Romstor|talk]]) 03:24, 12 September 2020 (UTC)<br />
<br />
== [https://wiki.archlinux.org/index.php?title=XDG_Base_Directory&oldid=636526/ XDG Base Directory]: Undo revision 636525 ==<br />
<br />
Dear Lahwaacz,<br />
<br />
maybe my changes were to rushed and from my point of view only. But I have two points to consider:<br />
<br />
# If I put the quotes around my vimrc and source it from my .bash_profile, I get the vim-error E471 (Argument required). Without quotes, this doesn't happen. So this change based on experience.<br />
# The rtp should includes directories, which are needed at runtime. (in plain vim e.g. ~/.vim). This is not a typical configuration directory. My mistake was, that I supposed that everyone put their vim plug-ins in $XDG_DATA_HOME and not in $XDG_CONFIG_HOME, because from my point of view a plug-in doesn't belong to the configuration. Maybe it is a good idea to add a remark, which explains the addition of $XDG_CONFIG_HOME to the rtp.<br />
<br />
[[User:Grrr|Grrr]] ([[User talk:Grrr|talk]]) 13:53, 26 September 2020 (UTC)<br />
<br />
# Quotes are there because $XDG_CONFIG_HOME may contain spaces.<br />
# It's not only about quotes - the runtimepath has subdirectories for color schemes, keymaps, autoload scripts etc.<br />
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:22, 26 September 2020 (UTC)<br />
<br />
== Readability in Wiki ==<br />
<br />
I noticed that you and the other admins and moderators often want sentences to continue endlessly, without line breaks.<br />
For example in the introduction of [[Wayland]].<br />
<br />
I think it would be better to have more seperated sentences, so it is easier to read and "important" information is easier visible for people.<br />
I don't know who is responsible, but maybe some options in MediaWiki (or whatever this wiki software is) could be changed as well, to make make line breaks etc. easier and reduce the height-space (if you know what I mean) between sentences, so it looks better, even though line breaks are used.<br />
<br />
[[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 14:38, 15 October 2020 (UTC) G3ro<br />
<br />
:I don't know exactly what you mean. Is it about the readability of the rendered HTML or the "source code" of the page? -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:15, 15 October 2020 (UTC)<br />
<br />
:: Well I guess it can be about both. But mainly it is about what people see on the page.<br />
:: There are three seperate topics I mentioned:<br />
<br />
:: 1. Use line breaks: I would like to use more line breaks, because if you have long sentences that are written after each other without line breaks, it gets "harder" to recognize when the next sentence starts.<br />
:: While I agree to what you said somewhere, that sentences that belong directly together, should be written in one "paragraph", it would be useful for sentences that cover (slightly) different "topics" to be visibly parted.<br />
<br />
:: 2. Adjust margin options: I notice that when line breaks are used, there is a vertical space added between two sentences. Just like in this post. If you would use line breaks more often, this is a little too much spacing in my oppinion.<br />
<br />
:: 3. Potential options to make line breaks easier: It would be very convenient if a line break in the source code would lead to a line break in displayed text as well, instead of needing to add an empty line.<br />
<br />
:: [[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 20:33, 15 October 2020 (UTC) G3ro<br />
<br />
:::OK, now I understand. I agree that splitting different topics usually improves legibility, but they should be split into separate paragraphs and not just by line breaks (e.g. using the &lt;br> tags). Paragraphs are semantic units whereas line breaks inside a paragraph are usually typographic errors.<br />
:::Also note that such splitting alone may not be enough to improve the text flow. For example, if we consider the intro for [[Wayland]], the second sentence about XWayland would not constitute a good paragraph - it is just a plain statement and the new topic is not nicely introduced. Ideally, you'd split the topic and make some wording changes for the second paragraph.<br />
:::As for the margin options, that is the difference between paragraph splitting and non-semantic line breaks. In my opinion, the styling is correct in this respect, as paragraphs should be discernible. You mentioned that you like line breaks to easily recognize where a sentence ends - but reading should be based on whole paragraphs, not sentences. There should be no reason to skip anything in the middle of a paragraph, otherwise it should be probably split into multiple paragraphs or otherwise rephrased.<br />
:::If you find it hard to follow a long sentence horizontally on a wide screen, we might consider enforcing some maximum width for the whole content. I think the readability would be better, since there would be more top-to-bottom eye movement at the cost of left-to-right-and-back.<br />
:::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:59, 15 October 2020 (UTC)<br />
<br />
== Xorg parentheses ==<br />
<br />
I actually think that X(org) is very useful to imply that it is one and the same thing.<br />
<br />
It might even be more confusing now, as we use both Xorg and X, because the wiki title and the package titles are Xorg.<br />
<br />
[[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 13:30, 17 October 2020 (UTC) G3ro<br />
<br />
:Well the conventions should be established on the [[Xorg]] page, not anywhere else... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:36, 17 October 2020 (UTC)<br />
<br />
:: Imo the conventions are established by upstream and they use a wide variety of X, X.org, X(org), Xorg etc.<br />
:: As I said I always prefer X(org) because then it is clear, that both are same thing.<br />
:: But ultimately it's your decision. <br />
:: [[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 13:43, 17 October 2020 (UTC) G3ro<br />
<br />
:::When upstream is not capable of making a unambiguous decision, it makes sense that other projects pick some option and stick with it wherever they can to keep at least some consistency. So for this wiki, pages should use the same style as the [[Xorg]] page. But feel free to start a discussion about this in [[Talk:Xorg]]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:56, 17 October 2020 (UTC)<br />
<br />
== SSHFS - systemd edit ==<br />
<br />
The edit was removed because "there is no advantage over using fstab entries".<br />
<br />
Is not only about the dis/advantages of the systemd option, is about that it is another possibility to achieve the task, that is why it was created in another level and the fstab section was left alone.<br />
<br />
Reconsider the edit as it presents another option which people can use.<br />
<br />
[[User:Garnica|Garnica]] ([[User talk:Garnica|talk]]) 16:22, 22 October 2020 (UTC)<br />
<br />
:There is no need to use anything else, fstab just works well enough. Configuring mounts with systemd services is not a good idea - it is much more bloated than fstab and not the right tool for it. If anything, a different type of systemd units should be used: {{man|5|systemd.mount}}. But creating the mount units manually is still pretty useless since everything can be configured in fstab and systemd will generate the unit for you. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:22, 22 October 2020 (UTC)<br />
<br />
:: It is about the ability to use the user's .config file and all the proper options that are saved there. Also systemd gives the possibility to use different targets, so the user could mount it when an specific user logs in or when a graphical session starts. I could argue that bad a modification of fstab could lead to a system that doesnt boot, but such poorly configured systemd unit file just fails and the system is fine. Just give the user the information and let it decide what they can use depending on their use case. [[User:Garnica|Garnica]] ([[User talk:Garnica|talk]]) 08:08, 24 October 2020 (UTC)<br />
<br />
:::You can configure systemd targets in fstab using the {{ic|x-systemd.wanted-by}} and {{ic|x-systemd.required-by}} options, there are also {{ic|nofail}} and {{ic|noauto}} options. Please read the {{man|5|systemd.mount}} manual.<br />
:::Using hosts from the user's {{ic|.ssh/config}} is the only thing which is not possible with fstab, but this does not warrant using the wrong tool for the task. Simple copy the full {{ic|user@hostname}} into fstab and you're done.<br />
:::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:47, 24 October 2020 (UTC)<br />
<br />
== [[Self-encrypting drives]] ==<br />
<br />
Hi, I'd like to respectfully disagree with the rollback. It's specific to sedutil that with most commands you need to input /dev/nvme0 (when encrypting the device) but for the sleep commands it requires /dev/nvme0n1 or it fails with a very unspecific error (Error saving the password to the kernel errno = 25), as found out in the discussion https://github.com/Drive-Trust-Alliance/sedutil/issues/90<br />
<br />
All in all I believe that it is important to keep this piece of information which was found out in a long discussion between the reporter and the developers. I ran into it and I believe many people may run into it, considering most of the new SSD will be NVMe. Best, [[User:Przemub|Przemub]] ([[User talk:Przemub|talk]]) 13:34, 28 October 2020 (UTC)<br />
<br />
:OK, then it makes sense. But it should be probably explained before, not in the section about the sleep command. Also please add the link to the note as a reference. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:27, 28 October 2020 (UTC)<br />
<br />
== Nvidia Installation ==<br />
<br />
The whole guide is unnecessary long and overcomplicated formulated.<br />
Shorter is better, most people will know their graphic card for example, so the determination etc. is only optional.<br />
<br />
[[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 20:21, 10 November 2020 (UTC) G3ro<br />
<br />
:Moving some info to some other page and leaving a tip behind does not make it shorter, but harder to follow. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:36, 10 November 2020 (UTC)<br />
<br />
== Btrfs layout ==<br />
<br />
Hi, Lahwaacz<br />
<br />
Thanks for maintaining [[Snapper]]! However I think the layout is not openSUSE specific and beneficial to all btrfs users. Can you elaborate your reason of undoing the edits? IMO the previous 'simple layout' complicates the rollback procedure.<br />
<br />
Cheers,<br />
[[User:I2Oc9|I2Oc9]] ([[User talk:I2Oc9|talk]]) 07:26, 3 December 2020 (UTC)<br />
<br />
:It is not overcomplicated, it is just doing things right. You can read about that in the forum thread, see the first note in [[Snapper#Suggested filesystem layout]]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:24, 3 December 2020 (UTC)<br />
<br />
::Anyway I've moved the guides to my user page. It's not that I haven't read the 5-year-old forum post, it's that before the current layout I followed that post and resulted in a not fully rolled-back system. That post also sourced (then current) information from openSUSE. openSUSE has since massively overhauled the layout, as I pointed out in an edit you undid earlier.[[User:I2Oc9|I2Oc9]] ([[User talk:I2Oc9|talk]]) 09:02, 3 December 2020 (UTC)<br />
<br />
::Since last message I've extensively documented the new layout at [[User:I2Oc9/Btrfs_subvolumes]] and [[User:I2Oc9/Root_on_Btrfs_with_LUKS_full_disk_encryption]]. Have a look for yourself. Nothing new really, but IMO [[User:I2Oc9/Root_on_Btrfs_with_LUKS_full_disk_encryption#Rollback_/_&_system_recovery|my take]] is much more simpler and complete than the supposedly [[Snapper#Restoring_/_to_a_previous_snapshot_of_@|simpler one]]. That one does not leverage native {{ic|snapper rollback}} or {{Pkg|grub-btrfs}}, among other things. I strongly suggest you try if you have time. [[User:I2Oc9|I2Oc9]] ([[User talk:I2Oc9|talk]]) 11:55, 3 December 2020 (UTC)<br />
<br />
::Actually if you look closely, none of [[User:I2Oc9/Root_on_Btrfs_with_LUKS_full_disk_encryption#Rollback_/_&_system_recovery|my recovery methods]] is specific to [[User:I2Oc9/Btrfs_subvolumes#A_new_kind_of_layout|the new 'complex' layout]], it will work totally fine with the old one. I just don't think moving @ around in live environment is appropriate.<br />
<br />
::On the other hand, the layout recommendation has been updated by openSUSE [https://en.opensuse.org/SDB:BTRFS], why stick with the old one? [[User:I2Oc9|I2Oc9]] ([[User talk:I2Oc9|talk]]) 12:37, 3 December 2020 (UTC)<br />
<br />
:::The main reasons why I reverted your edits on the [[Snapper]] page are: 1) it was a huge change which was not discussed previously as required by [[ArchWiki:Contributing#The 3 fundamental rules]], and 2) it has some elements which do not apply to Arch (see below). If you wish to propose a better layout of the subvolumes, it should be discussed in [[Talk:Snapper]] first. Your user pages would serve as great drafts.<br />
:::Note that the current suggested layout is not ''flat'' in the sense of [[User:I2Oc9/Btrfs subvolumes#Snapper on flatly-installed system subvolume|your section]] - it has a separate subvolume for {{ic|.snapshots}} so it does not lead to the recursive mess. So your proposed layout seemed very similar to the current suggested layout. The real difference is which subvolume gets mounted at {{ic|/}}, but I did not find it explained anywhere on the Snapper page before I reverted the changes (I get it now from your user page). I also did not find a proper documentation of the openSUSE's layout - it seems to be just the product of their installer and the documentation only deals with the result, saying at most that [https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha-snapper.html#sec-snapper-snapshot-boot the subvolume configuration must not be changed] for rollbacks to work.<br />
:::Now the openSUSE-specific elements: some Arch packages actually install software into {{ic|/opt}}, so the recommended layout should not suggest a separate subvolume for this path. Even more importantly, the pacman database is located at {{ic|/var/lib/pacman/local/}} and it must be rolled back along with the system, so there should be no separate subvolume for {{ic|/var}}. Instead, users should be encouraged to create (even nested) subvolumes for specific data directories under {{ic|/var}}, such as {{ic|/var/log}}, {{ic|/var/tmp}}, {{ic|/var/cache/pacman}}, {{ic|/var/lib/machines}}, etc.<br />
:::Finally, the suggested layout should not be GRUB-specific, there should be no recommendations regarding a boot loader. Sure it is useful to include non-trivial tips, but people may actually use a different boot loader.<br />
:::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 09:31, 4 December 2020 (UTC)<br />
<br />
::::Thanks for your detailed reply. I admit that I'm not knowledgeable on the intricate differences between distributions and shouldn't have made the changes without properly discussing them first.<br />
::::Yes, I get that the current layout is not [[User:I2Oc9/Btrfs subvolumes#Snapper on flatly-installed system subvolume|the one described in this section]] and indeed properly separates {{ic|/.snapshot}} and {{ic|/}}. The layout I proposed attempts to add some "niceties" such as supporting multi-distribution installations (complex and unnecessary, I agree) and bring the openSUSE layout here, which is a mistake, as you've pointed out.<br />
::::As for GRUB, since I use LUKS all the time and it's the only bootloader supporting encrypted {{ic|/boot}} on Btrfs on LUKS1, I really didn't think of any other possibilities.<br />
::::I will incorporate your recommendations to my user page and add a new section in [[Talk:Snapper]] pointing to those pages.<br />
::::Cheers -- [[User:S0x9v|S0x9v]] ([[User talk:S0x9v|talk]]) 10:09, 4 December 2020 (UTC)<br />
<br />
:::::I've adopted [[Install_Arch_Linux_on_ZFS#System_datasets|Archlinux Root on ZFS layout]] to [[User:I2Oc9/Root_on_Btrfs_with_LUKS_full_disk_encryption#Create_subvolumes|my proposal]]. [[User:S0x9v|S0x9v]] ([[User talk:S0x9v|talk]]) 10:56, 4 December 2020 (UTC)<br />
<br />
== Reflector Revert ==<br />
<br />
Hi Lahwaacz, about your [https://wiki.archlinux.org/index.php?title=Reflector&oldid=643749 revert], it seems like there's precedence for including AUR packages that replicate the code on the wiki. For example, in [[dash#Relinking /bin/sh]].<br />
<br />
In addition, I believe that there's value for linking the AUR package because it allows a simpler user experience where the AUR package is maintained for them. That way, if it is ever updated, they can easily fetch the update instead of religiously checking the wiki page (which most users probably don't do).<br />
<br />
Thanks!<br />
<br />
[[User:Denton-l|Denton-l]] ([[User talk:Denton-l|talk]]) 01:52, 7 December 2020 (UTC)<br />
<br />
== firefox zoom ==<br />
<br />
"no reason to zoom manually, see HiDPI)" - fractional scaling doesn't work [[User:Ubone|Ubone]] ([[User talk:Ubone|talk]]) 02:38, 26 December 2020 (UTC)<br />
<br />
:That should be explained in [[HiDPI#Firefox]] anyway. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:48, 26 December 2020 (UTC)<br />
<br />
::it's good to have this mentioned somewhere clearly so people know about it before they say "fonts on linux suck" [[User:Ubone|Ubone]] ([[User talk:Ubone|talk]]) 15:51, 29 December 2020 (UTC)<br />
<br />
== Intel GVT-g edits ==<br />
<br />
Hello Lahwaacz,<br />
<br />
I have noticed that you reverted one of the edits I have performed on [[Intel_GVT-g]].<br />
<br />
About this revert: [https://wiki.archlinux.org/index.php?title=Intel_GVT-g&oldid=648062 Windows problems are out of scope]<br />
<br />
While I understand that the ArchWiki is about ArchLinux, this article in particular mentions Windows in the introduction, and already includes another troubleshooting point about Windows. The issue I have encountered with the black bars is somewhat common, as I have found other people discussing it online, and I really fail to see why not including this piece of information in this article would be better than including it.<br />
<br />
Please, let me know your thoughts. If you think that the point can be improved, I will be happy to do that.<br />
<br />
Ciao,<br />
<br />
[[User:Wilcomir|Wilcomir]] ([[User talk:Wilcomir|talk]]) 09:14, 3 January 2021 (UTC)<br />
<br />
:Well, the existing section about a Windows problem is actually solved by configuring the Linux host. I think anything involving configuration or installation of programs in Windows is not appropriate for long troubleshooting sections. At most, they could be mentioned in a short reference to other sites which describe the problem in detail. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:34, 3 January 2021 (UTC)<br />
<br />
== XDG configuration for Vim ==<br />
<br />
Hi Lahwaacz,<br />
<br />
You have reverted the updated Notes for Vim on [[XDG Base Directory]], because "copy-pasted from a blog post".<br />
<br />
The problem is, not only is the configuration presented currently also copied from a blog post too, but is already 10 years old.<br />
<br />
Would it be OK, if we bring back the more up to date version? Or at least remove the obsolete one and leave link to newer?<br><br />
(Although I think a copy on wiki would be beneficial in case my blog ceases to exist)<br />
<br />
[[User:Jorengarenar|Jorengarenar]] ([[User talk:Jorengarenar|talk]]) 02:05, 12 January 2021 (UTC)<br />
<br />
== <s>Categorization of Wayland Compositors related to Comparison of Tiling Window Managers edit</s> ==<br />
<br />
Hi, last Sunday, you edited the [https://wiki.archlinux.org/index.php?title=Comparison_of_tiling_window_managers&diff=next&oldid=649129 Comparison of tiling window mangers page]<br />
removing all Wayland compositors from the list. I understand that<br />
Wayland compositors are not window managers. However, for instance the<br />
Sway wiki page is listed under the category of "tiling WMs" and Velox<br />
under the category "Dynamic WMs".<br />
<br />
Would you support adding a new category:tiling Wayland compositors<br />
(which, admittedly, would be a very small category) or should we only<br />
be categorized as a graphical user interface and listed in<br />
[[Wayland#Tiling]]. Alternatively, Sway<br />
and Cagebreak could be left in the category "tiling WMs" since it is the<br />
closest categorization the wiki offers. In any case, I feel it would be<br />
useful to have a table or list giving an overview of the features of the<br />
different compositors/WMs. The benefit of having a single table for both<br />
compositors and WMs would be that more comparisons could be made and<br />
that the benefits/drawbacks of switching from Xorg to Wayland could be<br />
better assessed. Nevertheless, as you correctly pointed out, this would<br />
require a renaming/broadening of the category. What do you think? Do you<br />
propose a different course of action? Should I raise a discussion on the<br />
talk page of the article?<br />
<br />
[[User:Project-repo|Project-repo]] ([[User talk:Project-repo|talk]]) 11:34, 19 January 2021 (UTC)<br />
<br />
:I think whatever new comparison should first appear on the [[Wayland]] page, so that people can see how it looks and discuss it on the talk page. When there is a comprehensive comparison of wayland compositors, it can be moved elsewhere (e.g. to a new page) if needed.<br />
:As for window managers vs Wayland compositors, I think they are two incomparable categories. Usually people choose either X or Wayland and then look for a suitable window manager or compositor. It makes sense to mention counterparts from the other category (like i3 and Sway), but Wayland compositors can't compete with window managers in any comparison and vice versa.<br />
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 18:46, 19 January 2021 (UTC)<br />
<br />
::Thank you, I will think about useful comparisons of wayland compositors and discuss any such plans on the [[Wayland]] talk page. It is difficult for me to simply create an entire comparison because I don't have much experience with most of the wayland compositors.<br />
<br />
::Do you have any opinions regarding the wiki category for articles about wayland compositors like cagebreak or sway? They are currently categorized as tiling and dynamic WMs, which, as you pointed out, does not quite fit the WM part of the category. I tried to trace the tree of categories upwards and the first non-x-related category is "graphical user interfaces" which seems unreasonably broad. Alternatively, one might add new categories like wayland and wayland compositor.<br />
::[[User:Project-repo|Project-repo]] ([[User talk:Project-repo|talk]]) 19:54, 19 January 2021 (UTC)<br />
<br />
:::You can use [[Template:Expansion]] to indicate that some section or table is incomplete. As for the categories, I'd either move the pages to [[:Category:Graphical user interfaces]] or create a new category for [[:Category:Wayland compositors|Wayland compositors]]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:15, 19 January 2021 (UTC)<br />
<br />
::::Seems done, so closing. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:27, 6 February 2021 (UTC)<br />
<br />
== Root on ZFS draft ==<br />
<br />
Hi, I submitted [https://github.com/openzfs/openzfs-docs/pull/104 a Root on ZFS draft] to official doc repo.<br />
<br />
In the draft, the following directories are separated from root filesystem:<br />
home,root,srv,usr/local,var/log,var/spool,var/tmp<br />
<br />
Is this appropriate for Arch Linux? Or do you have any suggestion on the draft?<br />
Any comment is appreciated.<br />
[[User:M0p|M0p]] ([[User talk:M0p|talk]]) 01:28, 23 January 2021 (UTC)<br />
<br />
== Re: undo GRUB - Common installation errors ==<br />
<br />
Concerning your undo of [https://wiki.archlinux.org/index.php?title=GRUB&diff=next&oldid=649799 Add the error message `Could not prepare Boot variable: No space left on device`)]<br />
Is there a better place to for this Information? One can find the solution in various forums, but I thought it could be helpful to have it in this wiki somewhere. [[User:ModProg|ModProg]] ([[User talk:ModProg|talk]]) 12:51, 25 January 2021 (UTC)<br />
<br />
:The error message is not specific to the {{ic|/sys/fs/pstore/}} filesystem (which does not even seem to be used by default on Arch...) Where did you find that? -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:16, 25 January 2021 (UTC)<br />
<br />
::I did not find anything Arch specific, but this post about Debian helped: [https://donjajo.com/fix-grub-efibootmgr-not-set-variable-no-space-left-device/ Post]. I also found something about [https://askubuntu.com/questions/1072618/could-not-prepare-boot-variable-no-space-left-on-device-grub-install-error-ef /sys/fs/efi/efivars/dump-*] The problem is that the actual efi-partition does not seam to be the problem, there is more than 70% space left. If there is better information to guide the user in the right direction that wuld be more helpful. This is what I found worked, but I admit that I don't know much about how grub operates. [[User:ModProg|ModProg]] ([[User talk:ModProg|talk]]) 16:20, 25 January 2021 (UTC)<br />
<br />
:::This wiki ''is'' Arch specific so old posts about Debian or Ubuntu do not apply. Even if they did, this is hardly a ''common'' installation problem. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:29, 26 January 2021 (UTC)<br />
<br />
::::I know that, and would not have put it there if it didn't occur on my Arch Linux installation. If this is something that should not be documented in this wiki, I understand that. Is there any other place you would recommend? An issue for grub-install maybe? [[User:ModProg|ModProg]] ([[User talk:ModProg|talk]]) 22:24, 26 January 2021 (UTC)<br />
<br />
== <s>References</s> ==<br />
<br />
Hi - on [[Systemd-networkd#Speeding up TCP slow-start]] you asked for some references, but it appears the Cite extension is not available on this wiki so when I use <nowiki><cite/></nowiki> tags they don't summarise the way references do on other wikis. Can you advise what you meant by references in this case, if this wiki does not support the usual MediaWiki-style references? I've had a look around at some other random pages but none of them seem to have any inline references like this. Thanks! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 08:21, 29 January 2021 (UTC)<br />
<br />
:Use just plain links... [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:39, 29 January 2021 (UTC)<br />
<br />
:: Done. Not sure I like the look of it but feel free to adjust it if you meant something different. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:03, 29 January 2021 (UTC)<br />
<br />
:::Thanks, it's good enough for me. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:00, 7 February 2021 (UTC)<br />
<br />
== <s>Re: Undo of Automatic configuration using udev</s> ==<br />
<br />
Regarding [https://wiki.archlinux.org/index.php?title=Wacom_tablet&oldid=632194]. You remove almost two thousand lines without ever contacting the editor (me) and asking for a fix (or at least giving a heads-up). Do you really think this is how the "communication" within community should work? I must say this is very "encouraging" too and would certainly motivate my edits in this wiki. [[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 11:33, 4 February 2021 (UTC)<br />
<br />
:If you want notifications, add the page to your watchlist, go to [[Special:Preferences#mw-prefsection-personal]] and check "Email me when a page or a file on my watchlist is changed". If you want to discuss disputed additions for a specific page, please use its talk page (e.g. [[Talk:Wacom tablet]]). -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 15:45, 6 February 2021 (UTC)<br />
<br />
::Thank you, I appreciate your cleanups of my (think it was) 3rd attempt. I was probably not born for wiki edits but trying to improve. [[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 20:34, 10 February 2021 (UTC)<br />
<br />
== Kernel Compilation time ==<br />
<br />
Reference: [https://wiki.archlinux.org/index.php?title=Kernel&diff=next&oldid=650896 link]<br />
<br />
I don't think we should judge information by what is obvious to experts.<br />
People might have experience with compilation of other programs, which mostly is fast, and then there is the kernel which takes forever to compile.<br />
I think it does not hurt anyone to make people aware of it.<br />
<br />
[[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 14:03, 6 February 2021 (UTC)<br />
<br />
:It is an unnecessary information without a definite answer which can even be [https://html.duckduckgo.com/html?q=how%20long%20does%20it%20take%20to%20compile%20Linux%20kernel searched elsewhere]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:23, 6 February 2021 (UTC)<br />
<br />
:: I disagree, with that argument nearly any tip and note is unnecessary. These things are intended to inform users about things that should be taken into consideration and that are different from the norm.<br />
:: Also do you search for the compilation time for every program you intend to compile? I don't.<br />
:: Furthermore this info is included, why not tell it to people directly on the start, so they don't read over it? <br />
:: [[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 14:36, 6 February 2021 (UTC)<br />
<br />
:::If someone wants to compile the Linux kernel, they should obviously expect that it will take ''some time''. Stating that it "can take up to several hours" does not make sense without referring to a specific hardware. Obviously, it will take much longer on a poor laptop than on a powerful workstation with a many-core processor, but people can assume that themselves. Without a reference to a specific hardware, the note is unnecessarily discouraging because the compilation can be as fast as some tens of minutes - it is by far not the most expensive package to compile...<br />
:::As you said, people can find better notes later along with advices to enable parallel build etc. which is all that's needed IMO.<br />
:::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 15:03, 6 February 2021 (UTC)<br />
<br />
== Wayland style ==<br />
<br />
Reference: [https://wiki.archlinux.org/index.php?title=Wayland&diff=prev&oldid=650979 link]<br />
<br />
I think in the old version it was much easier to read the "source code", so I don't see why there can't be spaces between it.<br />
Things shouldn't be complicated more than necessary.<br />
<br />
[[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 14:11, 6 February 2021 (UTC)<br />
<br />
:Most templates on the wiki are written without spaces around the |. When we [https://github.com/archlinux/archwiki/pull/32 switch the editor], there will even be syntax highlighting. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:25, 6 February 2021 (UTC)</div>Jose1711https://wiki.archlinux.org/index.php?title=Graphics_tablet&diff=651086Graphics tablet2021-02-06T19:23:55Z<p>Jose1711: Add new section: automatic button remapping after plugging in (reworked, changed style, added wiki links)</p>
<hr />
<div>[[Category:Input devices]]<br />
[[ja:Wacom タブレット]]<br />
[[zh-hans:Wacom tablet]] <br />
{{Move|Graphics tablets|Most content is not specific to Wacom.|section=Graphics tablet more generally}}<br />
<br />
[[Wikipedia:Wacom (company)|Wacom]] does not officially support Linux. Linux support is provided by the [https://linuxwacom.github.io/ Linux Wacom Project]. Supported devices are listed on the [https://github.com/linuxwacom/input-wacom/wiki/Device-IDs Device IDs] page with a version number in the ''input-wacom'' column.<br />
<br />
== Installation ==<br />
<br />
The Arch Linux [[kernels]] include the [https://github.com/linuxwacom/input-wacom input-wacom] driver.<br />
<br />
Ensure your kernel recognizes your tablet. Connect your tablet via USB or [[Bluetooth]]. It should show up in {{ic|dmesg {{!}} grep -i wacom}} and be listed in {{ic|/proc/bus/input/devices}} (and if you use USB in the {{ic|lsusb}} output). If it does not, your only chance is that your tablet is supported by a more recent driver than the one in your kernel. In that case [[install]] the {{AUR|input-wacom-dkms}} package.<br />
<br />
[[Install]] the [[X]] driver, {{Pkg|xf86-input-wacom}}, and restart X so the new [[udev]] rules take effect.<br />
<br />
The command {{ic|xsetwacom list devices}} should now list some devices. If it does not, see [[#Manual setup]].<br />
<br />
The {{Pkg|kcm-wacomtablet}} package provides a [[KDE]] graphical user interface for tablet configuration and supports tablet-specific profiles and hotplugging.<br />
<br />
Support for the following Wacom tablets is provided via {{AUR|tuhi-git}}:<br />
* Bamboo Spark<br />
* Bamboo Slate<br />
* Intuos Pro Paper<br />
<br />
Consult README for the details of initial configuration. For setups with more than one monitor you'll probably want to fix aspect ratio using {{ic|Coordinate Transformation Matrix}} as described at [https://github.com/linuxwacom/xf86-input-wacom/wiki/Dual-and-Multi-Monitor-Set-Up dual and multimonitor set up].<br />
<br />
=== Non-Wacom tablets ===<br />
The Arch-Linux [[kernels]] also include the [https://digimend.github.io/ Digimend driver], used for most non-Wacom tablets. If your tablet is recent, and few features are missing, you can test {{AUR|digimend-kernel-drivers-dkms-git}} that could complete this features. If this features are not supported, you can [https://digimend.github.io/support/howto/trbl/diagnostics/ report a tablet test to Digimend drivers authors], to include it's functionalities to the driver. The Digimend diagnostic tools are available on AUR {{AUR|uclogic-tools}}, {{ic|lsusb}} and {{ic|usbhid-dump}} are available in {{Pkg|usbutils}}.<br />
<br />
These tablets are also auto-detected, but it could be interesting to map it as a Wacom tablet, because few rare system tools, like GNOME tablet settings, only recognise Wacom tablet. To have your non-wacom tablet recognized as Wacom tablet, simply add in <code>/etc/X11/xorg.conf.d/50-tablet.conf</code> (create it, if it doesn't exists) the following Section, where <code>VID:PID</code> is your USB ID as seen by {{ic|lsusb}}:<br />
<pre><br />
Section "InputClass"<br />
Identifier "Tablet"<br />
Driver "wacom"<br />
MatchDevicePath "/dev/input/event*"<br />
MatchUSBID "VID:PID"<br />
EndSection<br />
</pre><br />
<br />
== Configuration ==<br />
<br />
The Xorg driver can be temporarily configured with {{ic|xsetwacom}}, see {{man|1|xsetwacom}}. Changes are lost after X server restarts or replugging your tablet.<br />
<br />
List the available devices:<br />
<br />
{{hc|$ xsetwacom list devices|<br />
Wacom Bamboo 16FG 4x5 Finger touch id: 12 type: TOUCH<br />
Wacom Bamboo 16FG 4x5 Finger pad id: 13 type: PAD <br />
Wacom Bamboo 16FG 4x5 Pen stylus id: 17 type: STYLUS <br />
Wacom Bamboo 16FG 4x5 Pen eraser id: 18 type: ERASER<br />
}}<br />
<br />
For the {{ic|get}} and {{ic|set}} commands, devices can be specified by name or id. Scripts should use names because ids can change after X server restarts or replugging.<br />
<br />
=== Permanent configuration ===<br />
<br />
{{Note|Because ''xorg.conf'' lacks options ''xsetwacom'' has and only lets you map buttons to mouse buttons, you may want to [[autostart]] a script with ''xsetwacom'' commands instead of using ''xorg.conf''.}}<br />
<br />
Configuration can be made persistent in [[xorg.conf]] and {{man|5|xorg.conf}}.<br />
<br />
You firstly need to find out your product names in the [[Xorg#General|Xorg log file]]:<br />
<br />
{{hc|$ grep "Using input driver 'wacom'" ~/.local/share/xorg/Xorg.0.log|<br />
[ 25059.351] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen'<br />
[ 25059.409] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pad'<br />
[ 25059.428] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen eraser'<br />
[ 25059.429] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen cursor'<br />
}}<br />
<br />
For these product names the sections would be:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/72-wacom-options.conf|<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS pen"<br />
MatchDriver "wacom"<br />
MatchProduct "Pen"<br />
NoMatchProduct "eraser"<br />
NoMatchProduct "cursor"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS pad"<br />
MatchDriver "wacom"<br />
MatchProduct "Pad"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS eraser"<br />
MatchDriver "wacom"<br />
MatchProduct "eraser"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS cursor"<br />
MatchDriver "wacom"<br />
MatchProduct "cursor"<br />
EndSection<br />
}}<br />
<br />
* The options described in {{man|4|wacom}} can be added to sections.<br />
* The product name needs to contain the {{ic|MatchProduct}} value in order for a section to match. Matching of parent devices requires negative matching.<br />
* The {{ic|Identifier}} can be arbitrary and is printed into the Xorg log when the section matches. Giving your identifiers a common prefix lets you easily [[grep]] for what sections were matched: {{bc|grep "WACOM OPT" /var/log/Xorg.0.log}}<br />
* Configuration changes require a X server restart to take effect.<br />
<br />
{{Note|''xorg.conf'' options can differ from ''xsetwacom'' options.}}<br />
<br />
''xsetwacom'' can try to print all current settings of a device in ''xorg.conf'' format with:<br />
<br />
$ xsetwacom get ''device'' all<br />
<br />
=== Remapping buttons ===<br />
<br />
The X driver lets you remap the buttons on tablets and pens. Buttons are identified by numbers. Tablet buttons start at 1, pen buttons start at 2 (1 is the tip contact event). By default the X driver maps button ''M'' to mouse button ''M''. Because X uses buttons 4-7 as the four scrolling directions, physical buttons 4 and higher are mapped to mouse buttons 8 and higher by default. While ''xorg.conf'' uses the actual button numbers and only lets you map to mouse buttons, ''xsetwacom'' uses the translated mouse button numbers and allows mapping to multiple keycodes (but not keysyms).<br />
<br />
If you have not yet remapped your buttons you can easily identify their ids with {{Pkg|xorg-xev}}, by running the following command, placing the mouse cursor on the created window and pressing a button:<br />
<br />
{{hc|$ xev -event button|<br />
Outer window is 0x1a00001, inner window is 0x1a00002<br />
<br />
ButtonPress event, serial 25, synthetic NO, window 0x1a00001,<br />
root 0x2a0, subw 0x0, time 3390669, (404,422), root:(1047,444),<br />
state 0x0, button 8, same_screen YES<br />
}}<br />
<br />
In this case the button number for ''xsetwacom'' is 8 and the actual button number for ''xorg.conf'' is 4.<br />
<br />
Alternatively, if you want an overview of your tablet's button layout you can look at your tablet's layout SVG. Firstly, find out the filename with a recursive [[grep]] search for the tablet name reported by {{ic|xsetwacom list devices}}:<br />
<br />
{{hc|$ grep -rl 'Wacom Bamboo 16FG 4x5' /usr/share/libwacom/*.tablet|2=<br />
/usr/share/libwacom/bamboo-16fg-s-t.tablet<br />
}}<br />
<br />
In this case the respective layout SVG is {{ic|/usr/share/libwacom/layouts/bamboo-16fg-s-t.svg}}. The letters in the SVG correspond to the button numbers: A=1, B=2, C=3, ...<br />
<br />
==== Mapping pad buttons to function keys ====<br />
<br />
If you want to bind your tablet buttons to different shortcuts in different applications, you may want to map your tablet buttons to function keys because applications generally do not let you bind keyboard shortcuts to mouse buttons.<br />
<br />
Firstly, map the pad buttons to mouse buttons 11 and higher so that you can distinguish them from regular mouse buttons. For example:<br />
<br />
xsetwacom set ''pad'' Button 1 11<br />
xsetwacom set ''pad'' Button 2 12<br />
...<br />
<br />
Then map the mouse buttons to the function keys. This can be done with [[xbindkeys]] and [[xdotool]] by adding an entry like the following for every pad to your {{ic|~/.xbindkeysrc}}:<br />
<br />
"xdotool key F21"<br />
b:11<br />
<br />
"xdotool key F22"<br />
b:12<br />
...<br />
<br />
==== The syntax ====<br />
<br />
The syntax of {{ic|xsetwacom}} is flexible but not very well documented. The general mapping syntax (extracted from the source code) for xsetwacom 0.17.0 is the following.<br />
<br />
KEYWORD [ARGS...] [KEYWORD [ARGS...] ...]<br />
<br />
KEYWORD + ARGS:<br />
key [+,-]KEY [[+,-]KEY ...] where +:key down, -:key up, no prefix:down and up<br />
button BUTTON [BUTTON ...] (1=left,2=middle,3=right mouse button, 4/5 scroll mouse wheel)<br />
modetoggle toggle absolute/relative tablet mode <br />
displaytoggle toggle cursor movement among all displays which include individual screens<br />
plus the whole desktop for the selected tool if it is not a pad.<br />
When the tool is a pad, the function applies to all tools that are asssociated<br />
with the tablet<br />
<br />
BUTTON: button ID as integer number<br />
<br />
KEY: MODIFIER, SPECIALKEY or ASCIIKEY<br />
MODIFIER: (each can be prefix with an '''l''' or an '''r''' for the left/right modifier (no prefix = left)<br />
ctrl=ctl=control, meta, alt, shift, super, hyper<br />
SPECIALKEY: f1-f35, esc=Esc, up,down,left,right, backspace=Backspace, tab, PgUp,PgDn<br />
ASCIIKEY: (usual characters the key produces, e.g. a,b,c,1,2,3 etc.)<br />
<br />
==== Some examples ====<br />
<br />
$ xsetwacom set ''pad'' Button 1 3 # right mouse button<br />
$ xsetwacom set ''pad'' Button 1 "key +ctrl z -ctrl"<br />
$ xsetwacom get ''pad'' Button 1<br />
key +Control_L +z -z -Control_L<br />
$ xsetwacom set ''pad'' Button 1 "key +shift button 1 key -shift"<br />
<br />
Even little macros are possible:<br />
<br />
$ xsetwacom set ''pad'' Button 1 "key +shift h -shift e l l o"<br />
<br />
{{Note|If you try to run a script with {{ic|xsetwacom}} commands from a udev rule, you might find that it will not work, as the Wacom input devices will not be ready at the time. A workaround is to add {{ic|sleep 1}} at the beginning of your script. If it's still not working, check [https://unix.stackexchange.com/questions/65788/why-doesnt-xsetwacom-work-from-udev] for possible solutions.}}<br />
<br />
{{Note|The button ID's might change each time a tablet is plugged in, which can prevent a script with {{ic|xsetwacom}} commands that runs from a udev rule from working consistently. A workaround is to parse the output from {{ic|xsetwacom list devices}} to get the correct ID, as shown here [https://unix.stackexchange.com/questions/627536/udev-rule-for-wacom-tablet-that-has-changing-ids/627537#627537]}}<br />
<br />
==== Automatic button remapping after plugging in ====<br />
<br />
In order to configure buttons but also tune other parameters such as ratio via {{ic|xsetwacom}} combining [[udev]] with custom [[systemd]] unit file is probably the best approach. First step is plugging in the tablet and learning vendor ID ({{ic|056a}} in example below).<br />
<br />
<br />
$ lsusb | grep Wacom<br />
Bus 003 Device 007: ID 056a:0374 Wacom Co., Ltd CTL-4100 [Intuos (S)]<br />
<br />
Create a following udev rule (replace vendor ID accordingly):<br />
<br />
/etc/udev/rules.d/99-wacom.rules<br />
<br />
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="056a", TAG+="systemd", ENV{SYSTEMD_USER_WANTS}+="wacom.service"<br />
<br />
<br />
Prepare systemd unit file:<br />
<br />
~/.config/systemd/user/wacom.service<br />
<br />
[Unit]<br />
After=graphical.target<br />
<br />
[Service]<br />
Type=forking<br />
Restart=no<br />
ExecStart=/path/to/wacom_set.sh<br />
TimeoutSec=infinity<br />
<br />
[Install]<br />
WantedBy=default.target<br />
<br />
Script setting up tablet, optionally starting the application is called {{ic|wacom_set.sh}}:<br />
<br />
#!/bin/bash<br />
for i in $(seq 30)<br />
do<br />
systemctl --user is-active graphical-session.target | grep -q ^active && break<br />
sleep 1<br />
done<br />
<br />
export DISPLAY=:$(ls -1 /tmp/.X11-unix | tr -d 'X' | sort -nrk 1 | head -1)<br />
<br />
for i in $(seq 10)<br />
do<br />
xsetwacom list devices | grep -q Wacom && break<br />
sleep 1<br />
done<br />
<br />
list=$(xsetwacom list devices)<br />
pad=$(echo "${list}" | awk '/pad/{print $7}')<br />
stylus=$(echo "${list}" | xsetwacom list devices | awk '/stylus/{print $7}')<br />
<br />
if [ -z "${pad}" ]; then exit 0; fi<br />
<br />
# disable buttons on stylus<br />
xsetwacom set "${stylus}" Button 2 11<br />
xsetwacom set "${stylus}" Button 3 11<br />
<br />
# set buttons on stylus, button 2 is +, button 3 is -<br />
xsetwacom set ${stylus} "Button" 2 "key plus"<br />
xsetwacom set ${stylus} "Button" 3 "key minus"<br />
<br />
notify-send "Tablet found and configured"<br />
# optionally start Krita, Gimp or some other editor<br />
<br />
Finally enable the systemd/user service {{ic|wacom.service}}.<br />
<br />
systemctl --user enable wacom<br />
<br />
==== Execute custom commands ====<br />
<br />
{{Style|Duplicates [[Xbindkeys]]. There are alternatives to xbindkeys.}}<br />
<br />
Mapping custom commands to the buttons is a little bit tricky but actually very simple. First, install [[xbindkeys]].<br />
<br />
To get well defined button codes add the following to your permanent configuration file, e.g. {{ic|/etc/X11/xorg.conf.d/52-wacom-options.conf}} in the InputClass section of your '''pad''' device. Map the tablet's buttons to some unused button ids.<br />
<br />
# Setting up buttons (preferably choose the correct button order, so the topmost key is mapped to 10 and so on)<br />
Option "Button1" "10"<br />
Option "Button2" "11"<br />
Option "Button3" "12"<br />
Option "Button4" "13"<br />
<br />
{{Note|In some cases (e.g. for the "Wacom Co., Ltd CTH-490 [Intuos Art/Photo/Comic (S)]" tablet) it is necessary to add {{ic|MatchDevicePath "/dev/input/event*"}} to the {{ic|InputClass}} section in order to make it work.}}<br />
<br />
Then restart your ''Xorg'' server and verify the buttons using {{ic|xev}} or {{ic|xbindkeys -mk}}.<br />
<br />
Now set up your xbindkeys configuration, if you do not already have one you might want to create a default configuration<br />
<br />
$ xbindkeys --defaults > ~/.xbindkeysrc<br />
<br />
Then add your custom key mapping to {{ic|~/.xbindkeysrc}}, for example<br />
<br />
"firefox"<br />
m:0x10 + b:10 (mouse)<br />
"xterm"<br />
m:0x10 + b:11 (mouse)<br />
"xdotool key ctrl-z"<br />
m:0x10 + b:12 (mouse)<br />
"send-notify Test "No need for escaping the quotes""<br />
m:0x10 + b:13 (mouse)<br />
<br />
=== Adjusting aspect ratios ===<br />
<br />
Drawing areas of tablets are generally more square than the usual widescreen display with a 16:9 aspect ratio, leading to a slight vertical compression of your input. To resolve such an aspect ratio mismatch you need to compromise by either reducing the drawing area height (called ''Force Proportions'' on Windows) or reducing the screen area width. The former wastes drawing area and the latter prevents you from reaching the right edge of your screen with your Stylus. It is probably still a compromise worth to be made because it prevents your strokes from being skewed.<br />
<br />
Find out your tablet's resolution by running:<br />
<br />
$ xsetwacom get ''stylus'' Area<br />
<br />
==== Reducing the drawing area height ====<br />
<br />
Run:<br />
<br />
$ xsetwacom set ''stylus'' Area 0 0 ''tablet_width'' ''height''<br />
<br />
where ''height'' is ''tablet_width * screen_height / screen_width''.<br />
<br />
The tablet resolution can be reset back to the default using:<br />
<br />
$ xsetwacom set ''stylus'' ResetArea<br />
<br />
==== Reducing the screen area width ====<br />
<br />
Run:<br />
<br />
$ xsetwacom set ''stylus'' MapToOutput ''WIDTH''x''SCREEN_HEIGHT''+0+0<br />
<br />
where ''WIDTH'' is ''screen_height * tablet_width / tablet_height''.<br />
<br />
=== LEDs ===<br />
<br />
See the [https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-driver-wacom sysfs-driver-wacom] documentation. To make changes without requiring root permissions you will likely want to create a [[udev]] rule like so:<br />
<br />
{{hc|/etc/udev/rules.d/99-wacom.rules|<nowiki><br />
# Give the users group permissions to set Wacom device LEDs.<br />
ACTION=="add", SUBSYSTEM=="hid", DRIVERS=="wacom", RUN+="/usr/bin/sh -c 'chown :users /sys/%p/wacom_led/*'"<br />
</nowiki>}}<br />
<br />
Setting the Intuos OLEDs can be done using {{AUR|i4oled}} from the AUR.<br />
<br />
=== Multiscreen setup ===<br />
==== TwinView setup ====<br />
<br />
If you are going to use two monitors the aspect ratio while using the tablet might feel unnatural. In order to fix this you need to add:<br />
<br />
Option "TwinView" "horizontal"<br />
<br />
to all of your Wacom-InputDevice entries in the ''xorg.conf'' file. You may read more about that [http://ubuntuforums.org/showthread.php?t=640898 here].{{Dead link|2018|09|05}}<br />
<br />
===== Temporary TwinView setup =====<br />
<br />
For temporary mapping of a Wacom device to a single display ''while preserving the aspect ratio'', [https://gist.github.com/Quackmatic/6c19fe907945d735c045 this script]{{Dead link|2020|04|03|status=404}} may be used. This will letter-box the surface area of the device as required to ensure the input is not stretched on the display. This script may be executed in your {{ic|.xinitrc}} file for it to automatically run.<br />
<br />
==== xrandr setup ====<br />
<br />
{{Style|Wording can be improved, personal writing style.}}<br />
<br />
[[xrandr]] sets two monitors as one big screen, mapping the tablet to the whole virtual screen and deforming aspect ratio. For a solution see this thread: [https://bbs.archlinux.org/viewtopic.php?pid=797617 Arch Linux forum]. Note there are GUI to interact with this, like DE independent {{AUR|ptxconf-git}}, or specific panel in [[GNOME]] desktop settings.<br />
<br />
If you just want to map the tablet to one of your screens, first find out what the screens are called:<br />
<br />
$ xrandr<br />
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384<br />
HDMI-0 disconnected (normal left inverted right x axis y axis)<br />
DVI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
VGA-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
<br />
Then you need to know what is the ID of your tablet.<br />
<br />
$ xsetwacom list devices<br />
WALTOP International Corp. Slim Tablet stylus id: 12 type: STYLUS<br />
<br />
In my case I want to map the tablet (ID: 12) to the screen on the right, which is ''VGA-0''. I can do that with this command<br />
<br />
$ xsetwacom set 12 MapToOutput VGA-0<br />
<br />
This should work immediately, no root necessary.<br />
<br />
This method has the flaw that rebooting or disconnecting your tablet might change the tablet ID, luckily you can set it by referencing the tablet name directly, get the stylus name by launching {{ic|xsetwacom}} for example you will get:<br />
<br />
Wacom Intuos S Pen stylus id: 16 type: STYLUS <br />
... <br />
<br />
Then to set the output to monitor 0:<br />
<br />
$ xsetwacom set Wacom Intuos S Pen stylus MapToOutput VGA-0<br />
<br />
If this doesn't work with the Nvidia binary drivers, try using ''HEAD-0'', ''HEAD-1'', ... according to the monitor number.<br />
<br />
If xsetwacom replies with "Unable to find an output ..." an X11 geometry string of the form {{ic|WIDTHxHEIGHT+X+Y}} can be specified instead of the screen identifier. In this example<br />
<br />
$ xsetwacom set 12 MapToOutput 1920x1080+1920+0<br />
<br />
should also map the tablet to the screen on the right.<br />
<br />
Alternatively, you can use [https://github.com/denilsonsa/small_scripts/blob/master/xsetwacom_my_preferences.sh this bash script] to quickly map the tablet to one of your screens (or the entire desktop) and fix the aspect ratio.<br />
<br />
In case ''xsetwacom'' does not work, you can try ''xinput''.<br />
<br />
First, you need to find your tablet's ID.<br />
<br />
$ xinput list<br />
<br />
In my case, the output is:<br />
<br />
⎡ Virtual core pointer id=2 [master pointer (3)]<br />
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Finger id=11 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Pad id=12 [slave pointer (2)]<br />
⎜ ↳ USB Keyboard id=14 [slave pointer (2)]<br />
⎜ ↳ SynPS/2 Synaptics TouchPad id=16 [slave pointer (2)]<br />
⎜ ↳ TPPS/2 IBM TrackPoint id=17 [slave pointer (2)]<br />
⎜ ↳ SteelSeries Kinzu V2 Gaming Mouse id=9 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Pen Pen (0x6281780c) id=20 [slave pointer (2)]<br />
⎣ Virtual core keyboard id=3 [master keyboard (2)]<br />
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]<br />
↳ Power Button id=6 [slave keyboard (3)]<br />
↳ Video Bus id=7 [slave keyboard (3)]<br />
↳ Sleep Button id=8 [slave keyboard (3)]<br />
↳ Wacom Intuos PT S 2 Pen id=10 [slave keyboard (3)]<br />
↳ USB Keyboard id=13 [slave keyboard (3)]<br />
↳ AT Translated Set 2 keyboard id=15 [slave keyboard (3)]<br />
↳ ThinkPad Extra Buttons id=18 [slave keyboard (3)]<br />
↳ USB Keyboard id=19 [slave keyboard (3)]<br />
<br />
This mean, my tablet's ID is ''20''. Now we map it with ''VGA-0'' screen:<br />
<br />
$ xinput map-to-output 20 VGA-0<br />
<br />
===== Ptxconf=====<br />
<br />
{{AUR|ptxconf-git}} is a GUI to configure your tablet for multiscreen. When launched, it is added to the desktop environment systray. It automatically detects connected displays, their respective positions on the screen, and buttons allow to link an input device with an output display. It works with [[KDE Plasma]], [[LXQt]] and [[Xfce]], and it manages any type of graphics tablets, not only Wacom, as Gnome Wacom Tablet configurator (See [[#Non-Wacom tablets]] for a workaround). On some tablets, the stylus needs to be first moved near the screen to let [[libinput]] detect it before Ptxconf can show it.<br />
<br />
Use the command {{ic|ptxconf}} to start the program. Configure [[Autostarting]] to let it start automatically.<br />
<br />
=== Pressure curve ===<br />
<br />
Use the [https://linuxwacom.github.io/bezier.html Wacom Pressure Curve and Threshold Graph] to find P1=red (eg. 50,0) and P2=purple (eg. 100,80) of your desired curve. The x-axis is the input pressure you apply to the pen; the y-axis is the output pressure the application is given.<br />
<br />
You can change the pressure curve with:<br />
<br />
$ xsetwacom set ''stylus'' PressureCurve ''x1 y1 x2 y2''<br />
<br />
=== Letting libinput take control of the touchpad ===<br />
<br />
As the wacom touchpad normally does not support inverted scrolling it can be desirable to use libinput to take control of the touchpad.<br />
<br />
To do this create `/etc/X11/xorg.conf.d/90-libinput-wacom.conf` with the following contents:<br />
<br />
Section "InputClass"<br />
Identifier "libinput Wacom touchpad override class"<br />
MatchUSBID "056a:*"<br />
MatchDevicePath "/dev/input/event*"<br />
MatchIsTouchpad "true"<br />
Driver "libinput"<br />
EndSection<br />
<br />
Reboot afterwards.<br />
<br />
See [https://github.com/linuxwacom/xf86-input-wacom/issues/28#issuecomment-420737038 here] for a more detailed explanation.<br />
<br />
== Application-specific configuration ==<br />
<br />
=== Alchemy ===<br />
<br />
{{AUR|Alchemy}} (and {{AUR|Alchemy-git}}) needs the JPen library to manage stylus pressure. See [https://digimend.github.io/support/howto/apps/alchemy/ Digimend documentation about Alchemy].<br />
<br />
=== Blender ===<br />
<br />
To enable pad buttons and extra pen buttons in [[Blender]], you can create a xsetwacom wrapper to temporarily remap buttons for your blender session.<br />
<br />
Provided example (for Bamboo fun) adapted to ''Sculpt'' mode: [http://pastebin.archlinux.fr/1887946 blender_sculpt.sh]{{Dead link|2020|04|03|status=404}}<br />
<br />
It remaps:<br />
* Left tablet buttons to {{ic|Shift}} and {{ic|Ctrl}} ''(pan/tilt/zoom/smooth/invert)''<br />
* Right tablet buttons to {{ic|F}} ''(brush size/strenght)'' and {{ic|Ctrl-z}} ''(undo)''<br />
* Top pen button ton {{ic|m}} ''(mask control)''<br />
<br />
=== DrawPile ===<br />
<br />
{{AUR|drawpile}} is a drawing whiteboard (network collaborative drawing tool). It manages pressure level on its drawing tools. In the "Freehand" box, a brush icon at the right of each parameter needs to be activated to have pressure management on this parameter. There is only a general curve on the bottom right of the window ("Input" box), that can be applied to stylus, distance and velocity.<br />
<br />
=== GIMP ===<br />
<br />
To enable proper usage and pressure sensitive painting in [[GIMP]], just go to ''Edit > Input Devices''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.<br />
<br />
* Please take note that if present, the ''pad'' ''device'' should be kept disabled as I do not think GIMP supports such things. Alternatively, to use such features of your tablet you should map them to keyboard commands with a program such as [http://hem.bredband.net/devel/wacom/ Wacom ExpressKeys]{{Dead link|2020|04|03|status=404}}.<br />
* You should also take note that the tool selected for the ''stylus'' is independent to that of the ''eraser''. This can actually be quite handy, as you can have the ''eraser'' set to be used as any tool you like.<br />
<br />
For more information checkout the ''Setting up GIMP'' section of [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]{{Dead link|2020|04|03|status=domain name not resolved}}.<br />
<br />
If the above was not enough, you may want to try setting up the tablet's stylus (and eraser) as a second mouse pointer (separating it from your mouse) by using the {{ic|xinput create-master}} and {{ic|xinput reattach}} commands. It can help when GIMP does not start painting even if the stylus touches the tablet.<br />
<br />
=== Inkscape ===<br />
<br />
Pressure sensitivity in [[Inkscape]] is enabled the same way as in GIMP. Go to ''Edit > Input Devices...''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.<br />
<br />
=== MyPaint ===<br />
<br />
{{pkg|mypaint}} (extra {{pkg|mypaint-brushes}}, {{pkg|mypaint-brushes1}}, ''note that these brushes are also used on other applications using libmypaint'') is a general bitmap drawing application. Its advanced brush settings have been adopted by [[#GIMP|GIMP]], [[#Krita|Krita]], [[#OpenToonz|OpenToonz]], and few others and is in integration process in [[#Pencil2D|Pencil2D]]. It is a very light tool that can be used in low-end computers.<br />
<br />
In MyPaint, there are general settings about tablets and per brush specific parameters (you can set your own brushes).<br />
<br />
General settings are in menu ''Edit > Edit Preferences''.<br />
<br />
* The "Pressure" tab is for global pressure mapping.<br />
* The "Devices" tab displays the list of detected input devices with little general information. Each one can be assigned to specific tasks by clicking on their parameter in the "Use for..." (Any Task, Ignore, Non-painting tasks, Navigation only) and "Scroll..." (zoom, pan) columns.<br />
* The "Buttons" tab allows to assign buttons to specific functions.<br />
<br />
Brush settings can be accessed by the brush context menu (right click on a tool). You can duplicate an existing tool before making modification, and so, keep the tool with its default preset ("clone" in the context menu).<br />
<br />
* To edit brush settings, simply use the ''Edit Brush'' settings from the context menu on brush. There are several settings, see the [https://github.com/mypaint/mypaint/wiki/Documentation MyPaint documentation] for a full description or play with them to discover what they do.<br />
<br />
=== OpenToonz ===<br />
<br />
{{pkg|opentoonz}} is a professional 2D animation tool, first developed by Studio Ghibli, and used by Ghibli and Folimage among others.<br />
<br />
Stylus pressure is managed by default on default tools. There is a checkbox ''Pressure'' at the second line, at top right, that can be unchecked to disable pressure management. Several presets can be selected by the menu button at right of ''Preset'', and added or deleted with the +/- buttons.<br />
<br />
{{pkg|libmypaint}} brushes can be chosen in the ''Basics'' mode (upper right tabs), and then in the column between the drawing area and the exposure sheet: at the "[LEVEL]: Palette" button, click on "Raster" tab to view the brushes. The brushes can be edited with MyPaint and used in OpenToonz.<br />
<br />
=== Pencil2D ===<br />
<br />
{{pkg|pencil2d}} is a light 2D animation tool. Each tool that can use the pressure parameter (Pencil, Eraser, Pen and Brush) has a checkbox called "Pressure" that is checked by default to use stylus pressure parameter.<br />
<br />
There is also a git version, {{AUR|pencil2d-mypaint-git}} (already a very stable branch), that contains the libMyPaint engine and Deevad set of MyPaint Brushes. A subset of the brush settings with pressure management can be set by clicking on the brush and choosing edit.<br />
<br />
=== Krita ===<br />
<br />
If your tablet does not draw in Krita (clicks/pressure are not registered) but works in the brush selection dialog which has a small test area, try putting Krita in full-screen or canvas-only mode.<br />
<br />
Krita only requires that Qt is able to use your tablet to function properly. If your tablet is not working in Krita, then make sure to check it is working in Qt first. The effect of tablet pressure can then be tweaked in the painttop configuration, for example by selecting opacity, then selecting pressure from the drop down and adjusting the curve to your preference.<br />
<br />
October 2020 '''[https://bugs.archlinux.org/task/68099 There is currently a known bug related to Qt 5.15.1 and Krita]''' with all the tablets, to access to the "Pop-up Pallet" in Krita with stylus button. You can use right mouse button on canvas or temporary use Krita appimage from the [https://krita.org/en/download/krita-desktop/ official Krita website] until the updated version of Qt.<br />
<br />
=== VirtualBox ===<br />
<br />
First, make sure that your tablet works well under Arch. Then, download and install the last driver from [https://www.wacom.com/en-cl/support/bamboo-support Wacom website] on the guest OS. Shutdown the virtual machine, go to ''Settings > USB''. Select ''Add Filter From Device'' and select your tablet (e.g. WACOM CTE-440-U V4.0-3 [0403]). Select ''Edit Filter'', and change the last item ''Remote'' to ''Any''.<br />
<br />
== Troubleshooting ==<br />
<br />
Newer tablets' drivers might not be in the kernel yet, and additional manipulations might be needed. A notable example is the newer Intuos line of tablets (Draw/Comic/Photo).<br />
<br />
=== Unknown device_type ===<br />
<br />
If your tablet does not get recognized by {{ic|xsetwacom}} and {{ic|dmesg}} complains about an unknown device_type, then you need to install a patched version of input-wacom.<br />
<br />
Download and install the for-4.4 branch from [https://sourceforge.net/p/linuxwacom/input-wacom/ci/jiri/for-4.4/~/tarball SourceForge].<br />
Your device should be recognized after you run<br />
<br />
# rmmod wacom<br />
# insmod /lib/modules/YOUR_KERNEL/kernel/drivers/hid/wacom.ko.gz<br />
<br />
=== Tablet recognized but xsetwacom and similar tools do not display it ===<br />
<br />
Your logs indicate that the correct driver is selected, and the tablet works. However, when running {{ic|xsetwacom list devices}} or use similar tools that depend on the correct driver, you get an empty list.<br />
<br />
A reason might be the execution order of your xorg configuration. {{ic|/usr/share/X11/xorg.conf.d}} gets executed first, then {{ic|/etc/X11/xorg.conf.d}}. The package {{pkg|xf86-input-wacom}} contains the file {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}}. If there is a catchall for tablets, executed after this file, the previously selected {{ic|wacom}} driver will be overwritten with a generic one that does not work with xsetwacom et. al.<br />
<br />
To make sure, check the rules contained in the files executed after {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}} for anything that looks like graphics tablets.<br />
<br />
=== Manual setup ===<br />
<br />
A manual configuration is done in {{ic|/etc/X11/xorg.conf}} or in a separate file in the {{ic|/etc/X11/xorg.conf.d/}} directory. The Wacom tablet device is accessed using a input event interface in {{ic|/dev/input/}} which is provided by the kernel driver. The interface number {{ic|event??}} is likely to change when unplugging and replugging into the same or especially a different ''USB'' port. Therefore it is wise to not refer to the device using its concrete {{ic|event??}} interface ('''static''' configuration) but by letting ''udev'' dynamically create a symbolic link to the correct {{ic|event}} file ('''dynamic''' configuration).<br />
===== USB-devices =====<br />
<br />
After (re-)plugging in your ''USB''-tablet (or at least after rebooting) some symbolic links should appear in {{ic|/dev/input}} referring to your tablet device.<br />
<br />
$ ls /dev/input/wacom* <br />
/dev/input/wacom /dev/input/wacom-stylus /dev/input/wacom-touch<br />
<br />
If not, your device is likely to be not yet included in the ''udev'' configuration from ''wacom-udev'' which resides in {{ic|/usr/lib/udev/rules.d/wacom.rules}}. Copy the file to {{ic|/etc/udev/rules.d/wacom.rules}} and modify it there.<br />
<br />
Add your device to the file by duplicating some line of another device and adapting ''idVendor'',''idProduct'' and the symlink name to your device.<br />
The two id's can be determined using<br />
<br />
$ lsusb | grep -i wacom<br />
Bus 002 Device 007: ID 056a:0062 Wacom Co., Ltd<br />
<br />
In this example idVendor is 056a and idProduct 0062. In case you have device with touch (e.g. Bamboo Pen&Touch) you might need to add a second line for the touch input interface. For details check the linuxwacom wiki [https://github.com/linuxwacom/input-wacom/wiki/Fixed-device-files-with-udev Fixed device files with udev].<br />
<br />
Save the file and reload udev's configuration profile using the command ''udevadm control --reload-rules'' Check again the content of ''/dev/input'' to make sure that the ''wacom'' symlinks appeared. Note that you may need to plug-in the tablet again for the device to appear.<br />
<br />
The files of further interest for the ''Xorg'' configuration are {{ic|/dev/input/wacom}} and for a touch-device also {{ic|/dev/input/wacom_touch}}.<br />
<br />
==== Static setup ====<br />
<br />
Usually it is recommended to rely on [[Xorg]]'s auto-detection or to use a '''dynamic''' setup. However for an ''internal'' tablet device one might consider a '''static''' Xorg setup in case autodetection does not work. A static [[Xorg]] setup is usually not able to recognize your Wacom tablet when it is connected to a different ''USB'' port or even after unplugging and replugging it into the same port, and as such it should be considered as deprecated.<br />
<br />
If you insist in using a static setup just refer to your tablet in the ''Xorg'' configuration in the next section using the correct {{ic|/dev/input/event??}} files as one can find out by looking into {{ic|/proc/bus/input/devices}}.<br />
<br />
==== Xorg configuration ====<br />
<br />
In either case, dynamic or static setup you got now one or two files in {{ic|/dev/input/}} which refer to the correct input event devices of your tablet. All that is left to do is add the relevant information to {{ic|/etc/X11/xorg.conf}}, or a dedicated file under {{ic|/etc/X11/xorg.conf.d/}}. The exact configuration depends on your tablet's features of course. {{ic|xsetwacom list devices}} might give helpful information on what ''InputDevice'' sections are needed for your tablet.<br />
<br />
An example configuration for a ''Volito2'' might look like this<br />
<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "stylus"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "stylus"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "eraser"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "eraser"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "cursor"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "cursor"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
EndSection<br />
<br />
Make sure that you also change the path ({{Ic|"Device"}}) to your mouse, as it will be {{Ic|/dev/input/mouse_udev}} now.<br />
<br />
Section "InputDevice"<br />
Identifier "Mouse1"<br />
Driver "mouse"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mouse_udev"<br />
Option "SendCoreEvents" "true"<br />
Option "Protocol" "IMPS/2"<br />
Option "ZAxisMapping" "4 5"<br />
Option "Buttons" "5"<br />
EndSection<br />
<br />
Add this to the ''ServerLayout'' section<br />
<br />
InputDevice "cursor" "SendCoreEvents" <br />
InputDevice "stylus" "SendCoreEvents"<br />
InputDevice "eraser" "SendCoreEvents"<br />
<br />
And finally make sure to update the identifier of your mouse in the ''ServerLayout'' section &ndash; as mine went from<br />
<br />
InputDevice "Mouse0" "CorePointer"<br />
<br />
to<br />
<br />
InputDevice "Mouse1" "CorePointer"<br />
<br />
=== Mouse Moving Erratically due to Proximity Sensor ===<br />
<br />
You can disable the mouse jumping due to a proximity sensor detecting a non-existing stylus. You can find your device with xinput --list, and after seeing the Stylus, disable it with: xinput disable "Your Device Name". This only works if you are not currently using a stylus.<br />
<br />
== See also ==<br />
<br />
* [[List of applications/Documents#Stylus note-taking]]<br />
* [https://github.com/linuxwacom/input-wacom/wiki input-wacom Wiki]<br />
* [https://github.com/linuxwacom/xf86-input-wacom/wiki xf86-input-wacom Wiki] (out of date)<br />
* [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]{{Dead link|2020|04|03|status=domain name not resolved}}<br />
* [https://help.ubuntu.com/community/Wacom Ubuntu Help: Wacom]<br />
* [http://ubuntuforums.org/showthread.php?t=1038949 Ubuntu Forums - Install a LinuxWacom Kernel Driver for Tablet PC's]<br />
* [https://github.com/tb2097/wacom-gui Wacom-GUI]</div>Jose1711https://wiki.archlinux.org/index.php?title=Graphics_tablet&diff=650934Graphics tablet2021-02-05T21:04:06Z<p>Jose1711: Readd udev autoconfiguration script, this time with as little hardcoded stuff as possible (also it's tested on current Arch and works reliably)</p>
<hr />
<div>[[Category:Input devices]]<br />
[[ja:Wacom タブレット]]<br />
[[zh-hans:Wacom tablet]] <br />
{{Move|Graphics tablets|Most content is not specific to Wacom.|section=Graphics tablet more generally}}<br />
<br />
[[Wikipedia:Wacom (company)|Wacom]] does not officially support Linux. Linux support is provided by the [https://linuxwacom.github.io/ Linux Wacom Project]. Supported devices are listed on the [https://github.com/linuxwacom/input-wacom/wiki/Device-IDs Device IDs] page with a version number in the ''input-wacom'' column.<br />
<br />
== Installation ==<br />
<br />
The Arch Linux [[kernels]] include the [https://github.com/linuxwacom/input-wacom input-wacom] driver.<br />
<br />
Ensure your kernel recognizes your tablet. Connect your tablet via USB or [[Bluetooth]]. It should show up in {{ic|dmesg {{!}} grep -i wacom}} and be listed in {{ic|/proc/bus/input/devices}} (and if you use USB in the {{ic|lsusb}} output). If it does not, your only chance is that your tablet is supported by a more recent driver than the one in your kernel. In that case [[install]] the {{AUR|input-wacom-dkms}} package.<br />
<br />
[[Install]] the [[X]] driver, {{Pkg|xf86-input-wacom}}, and restart X so the new [[udev]] rules take effect.<br />
<br />
The command {{ic|xsetwacom list devices}} should now list some devices. If it does not, see [[#Manual setup]].<br />
<br />
The {{Pkg|kcm-wacomtablet}} package provides a [[KDE]] graphical user interface for tablet configuration and supports tablet-specific profiles and hotplugging.<br />
<br />
Support for the following Wacom tablets is provided via {{AUR|tuhi-git}}:<br />
* Bamboo Spark<br />
* Bamboo Slate<br />
* Intuos Pro Paper<br />
<br />
Consult README for the details of initial configuration. For setups with more than one monitor you'll probably want to fix aspect ratio using {{ic|Coordinate Transformation Matrix}} as described at [https://github.com/linuxwacom/xf86-input-wacom/wiki/Dual-and-Multi-Monitor-Set-Up dual and multimonitor set up].<br />
<br />
=== Non-Wacom tablets ===<br />
The Arch-Linux [[kernels]] also include the [https://digimend.github.io/ Digimend driver], used for most non-Wacom tablets. If your tablet is recent, and few features are missing, you can test {{AUR|digimend-kernel-drivers-dkms-git}} that could complete this features. If this features are not supported, you can [https://digimend.github.io/support/howto/trbl/diagnostics/ report a tablet test to Digimend drivers authors], to include it's functionalities to the driver. The Digimend diagnostic tools are available on AUR {{AUR|uclogic-tools}}, {{ic|lsusb}} and {{ic|usbhid-dump}} are available in {{Pkg|usbutils}}.<br />
<br />
These tablets are also auto-detected, but it could be interesting to map it as a Wacom tablet, because few rare system tools, like GNOME tablet settings, only recognise Wacom tablet. To have your non-wacom tablet recognized as Wacom tablet, simply add in <code>/etc/X11/xorg.conf.d/50-tablet.conf</code> (create it, if it doesn't exists) the following Section, where <code>VID:PID</code> is your USB ID as seen by {{ic|lsusb}}:<br />
<pre><br />
Section "InputClass"<br />
Identifier "Tablet"<br />
Driver "wacom"<br />
MatchDevicePath "/dev/input/event*"<br />
MatchUSBID "VID:PID"<br />
EndSection<br />
</pre><br />
<br />
== Configuration ==<br />
<br />
The Xorg driver can be temporarily configured with {{ic|xsetwacom}}, see {{man|1|xsetwacom}}. Changes are lost after X server restarts or replugging your tablet.<br />
<br />
List the available devices:<br />
<br />
{{hc|$ xsetwacom list devices|<br />
Wacom Bamboo 16FG 4x5 Finger touch id: 12 type: TOUCH<br />
Wacom Bamboo 16FG 4x5 Finger pad id: 13 type: PAD <br />
Wacom Bamboo 16FG 4x5 Pen stylus id: 17 type: STYLUS <br />
Wacom Bamboo 16FG 4x5 Pen eraser id: 18 type: ERASER<br />
}}<br />
<br />
For the {{ic|get}} and {{ic|set}} commands, devices can be specified by name or id. Scripts should use names because ids can change after X server restarts or replugging.<br />
<br />
=== Permanent configuration ===<br />
<br />
{{Note|Because ''xorg.conf'' lacks options ''xsetwacom'' has and only lets you map buttons to mouse buttons, you may want to [[autostart]] a script with ''xsetwacom'' commands instead of using ''xorg.conf''.}}<br />
<br />
Configuration can be made persistent in [[xorg.conf]] and {{man|5|xorg.conf}}.<br />
<br />
You firstly need to find out your product names in the [[Xorg#General|Xorg log file]]:<br />
<br />
{{hc|$ grep "Using input driver 'wacom'" ~/.local/share/xorg/Xorg.0.log|<br />
[ 25059.351] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen'<br />
[ 25059.409] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pad'<br />
[ 25059.428] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen eraser'<br />
[ 25059.429] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen cursor'<br />
}}<br />
<br />
For these product names the sections would be:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/72-wacom-options.conf|<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS pen"<br />
MatchDriver "wacom"<br />
MatchProduct "Pen"<br />
NoMatchProduct "eraser"<br />
NoMatchProduct "cursor"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS pad"<br />
MatchDriver "wacom"<br />
MatchProduct "Pad"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS eraser"<br />
MatchDriver "wacom"<br />
MatchProduct "eraser"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS cursor"<br />
MatchDriver "wacom"<br />
MatchProduct "cursor"<br />
EndSection<br />
}}<br />
<br />
* The options described in {{man|4|wacom}} can be added to sections.<br />
* The product name needs to contain the {{ic|MatchProduct}} value in order for a section to match. Matching of parent devices requires negative matching.<br />
* The {{ic|Identifier}} can be arbitrary and is printed into the Xorg log when the section matches. Giving your identifiers a common prefix lets you easily [[grep]] for what sections were matched: {{bc|grep "WACOM OPT" /var/log/Xorg.0.log}}<br />
* Configuration changes require a X server restart to take effect.<br />
<br />
{{Note|''xorg.conf'' options can differ from ''xsetwacom'' options.}}<br />
<br />
''xsetwacom'' can try to print all current settings of a device in ''xorg.conf'' format with:<br />
<br />
$ xsetwacom get ''device'' all<br />
<br />
=== Remapping buttons ===<br />
<br />
The X driver lets you remap the buttons on tablets and pens. Buttons are identified by numbers. Tablet buttons start at 1, pen buttons start at 2 (1 is the tip contact event). By default the X driver maps button ''M'' to mouse button ''M''. Because X uses buttons 4-7 as the four scrolling directions, physical buttons 4 and higher are mapped to mouse buttons 8 and higher by default. While ''xorg.conf'' uses the actual button numbers and only lets you map to mouse buttons, ''xsetwacom'' uses the translated mouse button numbers and allows mapping to multiple keycodes (but not keysyms).<br />
<br />
If you have not yet remapped your buttons you can easily identify their ids with {{Pkg|xorg-xev}}, by running the following command, placing the mouse cursor on the created window and pressing a button:<br />
<br />
{{hc|$ xev -event button|<br />
Outer window is 0x1a00001, inner window is 0x1a00002<br />
<br />
ButtonPress event, serial 25, synthetic NO, window 0x1a00001,<br />
root 0x2a0, subw 0x0, time 3390669, (404,422), root:(1047,444),<br />
state 0x0, button 8, same_screen YES<br />
}}<br />
<br />
In this case the button number for ''xsetwacom'' is 8 and the actual button number for ''xorg.conf'' is 4.<br />
<br />
Alternatively, if you want an overview of your tablet's button layout you can look at your tablet's layout SVG. Firstly, find out the filename with a recursive [[grep]] search for the tablet name reported by {{ic|xsetwacom list devices}}:<br />
<br />
{{hc|$ grep -rl 'Wacom Bamboo 16FG 4x5' /usr/share/libwacom/*.tablet|2=<br />
/usr/share/libwacom/bamboo-16fg-s-t.tablet<br />
}}<br />
<br />
In this case the respective layout SVG is {{ic|/usr/share/libwacom/layouts/bamboo-16fg-s-t.svg}}. The letters in the SVG correspond to the button numbers: A=1, B=2, C=3, ...<br />
<br />
==== Mapping pad buttons to function keys ====<br />
<br />
If you want to bind your tablet buttons to different shortcuts in different applications, you may want to map your tablet buttons to function keys because applications generally do not let you bind keyboard shortcuts to mouse buttons.<br />
<br />
Firstly, map the pad buttons to mouse buttons 11 and higher so that you can distinguish them from regular mouse buttons. For example:<br />
<br />
xsetwacom set ''pad'' Button 1 11<br />
xsetwacom set ''pad'' Button 2 12<br />
...<br />
<br />
Then map the mouse buttons to the function keys. This can be done with [[xbindkeys]] and [[xdotool]] by adding an entry like the following for every pad to your {{ic|~/.xbindkeysrc}}:<br />
<br />
"xdotool key F21"<br />
b:11<br />
<br />
"xdotool key F22"<br />
b:12<br />
...<br />
<br />
==== The syntax ====<br />
<br />
The syntax of {{ic|xsetwacom}} is flexible but not very well documented. The general mapping syntax (extracted from the source code) for xsetwacom 0.17.0 is the following.<br />
<br />
KEYWORD [ARGS...] [KEYWORD [ARGS...] ...]<br />
<br />
KEYWORD + ARGS:<br />
key [+,-]KEY [[+,-]KEY ...] where +:key down, -:key up, no prefix:down and up<br />
button BUTTON [BUTTON ...] (1=left,2=middle,3=right mouse button, 4/5 scroll mouse wheel)<br />
modetoggle toggle absolute/relative tablet mode <br />
displaytoggle toggle cursor movement among all displays which include individual screens<br />
plus the whole desktop for the selected tool if it is not a pad.<br />
When the tool is a pad, the function applies to all tools that are asssociated<br />
with the tablet<br />
<br />
BUTTON: button ID as integer number<br />
<br />
KEY: MODIFIER, SPECIALKEY or ASCIIKEY<br />
MODIFIER: (each can be prefix with an '''l''' or an '''r''' for the left/right modifier (no prefix = left)<br />
ctrl=ctl=control, meta, alt, shift, super, hyper<br />
SPECIALKEY: f1-f35, esc=Esc, up,down,left,right, backspace=Backspace, tab, PgUp,PgDn<br />
ASCIIKEY: (usual characters the key produces, e.g. a,b,c,1,2,3 etc.)<br />
<br />
==== Automatic configuration using udev ====<br />
<br />
In order to configure buttons and/or adjust aspect ratio and other parameters via {{ic|xsetwacom}} combining udev with custom systemd unit file is probably the best approach. First step is plugging in the tablet and finding out the vendor ID ({{ic|056a}} in example below).<br />
<br />
<br />
$ lsusb | grep Wacom<br />
Bus 003 Device 007: ID 056a:0374 Wacom Co., Ltd CTL-4100 [Intuos (S)]<br />
<br />
Create a following udev rule (replace vendor ID accordingly):<br />
<br />
/etc/udev/rules.d/99-wacom.rules<br />
<br />
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="056a", TAG+="systemd", ENV{SYSTEMD_USER_WANTS}+="wacom.service"<br />
<br />
<br />
Prepare systemd unit file:<br />
<br />
~/.config/systemd/user/wacom.service<br />
<br />
[Unit]<br />
After=graphical.target<br />
<br />
[Service]<br />
Type=forking<br />
Restart=no<br />
ExecStart=/path/to/wacom_set.sh<br />
TimeoutSec=infinity<br />
<br />
[Install]<br />
WantedBy=default.target<br />
<br />
Script setting up tablet, optionally starting the application is called {{ic|wacom_set.sh}}:<br />
<br />
#!/bin/bash<br />
for i in $(seq 30)<br />
do<br />
systemctl --user is-active graphical-session.target | grep -q ^active && break<br />
sleep 1<br />
done<br />
<br />
export DISPLAY=:$(ls -1 /tmp/.X11-unix | tr -d 'X' | sort -nrk 1 | head -1)<br />
<br />
for i in $(seq 10)<br />
do<br />
xsetwacom list devices | grep -q Wacom && break<br />
sleep 1<br />
done<br />
<br />
list=$(xsetwacom list devices)<br />
pad=$(echo "${list}" | awk '/pad/{print $7}')<br />
stylus=$(echo "${list}" | xsetwacom list devices | awk '/stylus/{print $7}')<br />
<br />
if [ -z "${pad}" ]; then exit 0; fi<br />
<br />
# disable buttons on stylus<br />
xsetwacom set "${stylus}" Button 2 11<br />
xsetwacom set "${stylus}" Button 3 11<br />
<br />
# set buttons on stylus, button 2 is +, button 3 is -<br />
xsetwacom set ${stylus} "Button" 2 "key plus"<br />
xsetwacom set ${stylus} "Button" 3 "key minus"<br />
<br />
notify-send "Tablet found and configured"<br />
# optionally start Krita, Gimp or some other editor<br />
<br />
Finally enable the systemd/User unit {{ic|wacom.service}}.<br />
<br />
systemctl --user enable wacom<br />
<br />
<br />
==== Some examples ====<br />
<br />
$ xsetwacom set ''pad'' Button 1 3 # right mouse button<br />
$ xsetwacom set ''pad'' Button 1 "key +ctrl z -ctrl"<br />
$ xsetwacom get ''pad'' Button 1<br />
key +Control_L +z -z -Control_L<br />
$ xsetwacom set ''pad'' Button 1 "key +shift button 1 key -shift"<br />
<br />
Even little macros are possible:<br />
<br />
$ xsetwacom set ''pad'' Button 1 "key +shift h -shift e l l o"<br />
<br />
{{Note|If you try to run a script with {{ic|xsetwacom}} commands from a udev rule, you might find that it will not work, as the Wacom input devices will not be ready at the time. A workaround is to add {{ic|sleep 1}} at the beginning of your script. If it's still not working, check [https://unix.stackexchange.com/questions/65788/why-doesnt-xsetwacom-work-from-udev] for possible solutions.}}<br />
<br />
{{Note|The button ID's might change each time a tablet is plugged in, which can prevent a script with {{ic|xsetwacom}} commands that runs from a udev rule from working consistently. A workaround is to parse the output from {{ic|xsetwacom list devices}} to get the correct ID, as shown here [https://unix.stackexchange.com/questions/627536/udev-rule-for-wacom-tablet-that-has-changing-ids/627537#627537]}}<br />
<br />
==== Execute custom commands ====<br />
<br />
{{Style|Duplicates [[Xbindkeys]]. There are alternatives to xbindkeys.}}<br />
<br />
Mapping custom commands to the buttons is a little bit tricky but actually very simple. First, install [[xbindkeys]].<br />
<br />
To get well defined button codes add the following to your permanent configuration file, e.g. {{ic|/etc/X11/xorg.conf.d/52-wacom-options.conf}} in the InputClass section of your '''pad''' device. Map the tablet's buttons to some unused button ids.<br />
<br />
# Setting up buttons (preferably choose the correct button order, so the topmost key is mapped to 10 and so on)<br />
Option "Button1" "10"<br />
Option "Button2" "11"<br />
Option "Button3" "12"<br />
Option "Button4" "13"<br />
<br />
{{Note|In some cases (e.g. for the "Wacom Co., Ltd CTH-490 [Intuos Art/Photo/Comic (S)]" tablet) it is necessary to add {{ic|MatchDevicePath "/dev/input/event*"}} to the {{ic|InputClass}} section in order to make it work.}}<br />
<br />
Then restart your ''Xorg'' server and verify the buttons using {{ic|xev}} or {{ic|xbindkeys -mk}}.<br />
<br />
Now set up your xbindkeys configuration, if you do not already have one you might want to create a default configuration<br />
<br />
$ xbindkeys --defaults > ~/.xbindkeysrc<br />
<br />
Then add your custom key mapping to {{ic|~/.xbindkeysrc}}, for example<br />
<br />
"firefox"<br />
m:0x10 + b:10 (mouse)<br />
"xterm"<br />
m:0x10 + b:11 (mouse)<br />
"xdotool key ctrl-z"<br />
m:0x10 + b:12 (mouse)<br />
"send-notify Test "No need for escaping the quotes""<br />
m:0x10 + b:13 (mouse)<br />
<br />
=== Adjusting aspect ratios ===<br />
<br />
Drawing areas of tablets are generally more square than the usual widescreen display with a 16:9 aspect ratio, leading to a slight vertical compression of your input. To resolve such an aspect ratio mismatch you need to compromise by either reducing the drawing area height (called ''Force Proportions'' on Windows) or reducing the screen area width. The former wastes drawing area and the latter prevents you from reaching the right edge of your screen with your Stylus. It is probably still a compromise worth to be made because it prevents your strokes from being skewed.<br />
<br />
Find out your tablet's resolution by running:<br />
<br />
$ xsetwacom get ''stylus'' Area<br />
<br />
==== Reducing the drawing area height ====<br />
<br />
Run:<br />
<br />
$ xsetwacom set ''stylus'' Area 0 0 ''tablet_width'' ''height''<br />
<br />
where ''height'' is ''tablet_width * screen_height / screen_width''.<br />
<br />
The tablet resolution can be reset back to the default using:<br />
<br />
$ xsetwacom set ''stylus'' ResetArea<br />
<br />
==== Reducing the screen area width ====<br />
<br />
Run:<br />
<br />
$ xsetwacom set ''stylus'' MapToOutput ''WIDTH''x''SCREEN_HEIGHT''+0+0<br />
<br />
where ''WIDTH'' is ''screen_height * tablet_width / tablet_height''.<br />
<br />
=== LEDs ===<br />
<br />
See the [https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-driver-wacom sysfs-driver-wacom] documentation. To make changes without requiring root permissions you will likely want to create a [[udev]] rule like so:<br />
<br />
{{hc|/etc/udev/rules.d/99-wacom.rules|<nowiki><br />
# Give the users group permissions to set Wacom device LEDs.<br />
ACTION=="add", SUBSYSTEM=="hid", DRIVERS=="wacom", RUN+="/usr/bin/sh -c 'chown :users /sys/%p/wacom_led/*'"<br />
</nowiki>}}<br />
<br />
Setting the Intuos OLEDs can be done using {{AUR|i4oled}} from the AUR.<br />
<br />
=== Multiscreen setup ===<br />
==== TwinView setup ====<br />
<br />
If you are going to use two monitors the aspect ratio while using the tablet might feel unnatural. In order to fix this you need to add:<br />
<br />
Option "TwinView" "horizontal"<br />
<br />
to all of your Wacom-InputDevice entries in the ''xorg.conf'' file. You may read more about that [http://ubuntuforums.org/showthread.php?t=640898 here].{{Dead link|2018|09|05}}<br />
<br />
===== Temporary TwinView setup =====<br />
<br />
For temporary mapping of a Wacom device to a single display ''while preserving the aspect ratio'', [https://gist.github.com/Quackmatic/6c19fe907945d735c045 this script]{{Dead link|2020|04|03|status=404}} may be used. This will letter-box the surface area of the device as required to ensure the input is not stretched on the display. This script may be executed in your {{ic|.xinitrc}} file for it to automatically run.<br />
<br />
==== xrandr setup ====<br />
<br />
{{Style|Wording can be improved, personal writing style.}}<br />
<br />
[[xrandr]] sets two monitors as one big screen, mapping the tablet to the whole virtual screen and deforming aspect ratio. For a solution see this thread: [https://bbs.archlinux.org/viewtopic.php?pid=797617 Arch Linux forum]. Note there are GUI to interact with this, like DE independent {{AUR|ptxconf-git}}, or specific panel in [[GNOME]] desktop settings.<br />
<br />
If you just want to map the tablet to one of your screens, first find out what the screens are called:<br />
<br />
$ xrandr<br />
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384<br />
HDMI-0 disconnected (normal left inverted right x axis y axis)<br />
DVI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
VGA-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
<br />
Then you need to know what is the ID of your tablet.<br />
<br />
$ xsetwacom list devices<br />
WALTOP International Corp. Slim Tablet stylus id: 12 type: STYLUS<br />
<br />
In my case I want to map the tablet (ID: 12) to the screen on the right, which is ''VGA-0''. I can do that with this command<br />
<br />
$ xsetwacom set 12 MapToOutput VGA-0<br />
<br />
This should work immediately, no root necessary.<br />
<br />
This method has the flaw that rebooting or disconnecting your tablet might change the tablet ID, luckily you can set it by referencing the tablet name directly, get the stylus name by launching {{ic|xsetwacom}} for example you will get:<br />
<br />
Wacom Intuos S Pen stylus id: 16 type: STYLUS <br />
... <br />
<br />
Then to set the output to monitor 0:<br />
<br />
$ xsetwacom set Wacom Intuos S Pen stylus MapToOutput VGA-0<br />
<br />
If this doesn't work with the Nvidia binary drivers, try using ''HEAD-0'', ''HEAD-1'', ... according to the monitor number.<br />
<br />
If xsetwacom replies with "Unable to find an output ..." an X11 geometry string of the form {{ic|WIDTHxHEIGHT+X+Y}} can be specified instead of the screen identifier. In this example<br />
<br />
$ xsetwacom set 12 MapToOutput 1920x1080+1920+0<br />
<br />
should also map the tablet to the screen on the right.<br />
<br />
Alternatively, you can use [https://github.com/denilsonsa/small_scripts/blob/master/xsetwacom_my_preferences.sh this bash script] to quickly map the tablet to one of your screens (or the entire desktop) and fix the aspect ratio.<br />
<br />
In case ''xsetwacom'' does not work, you can try ''xinput''.<br />
<br />
First, you need to find your tablet's ID.<br />
<br />
$ xinput list<br />
<br />
In my case, the output is:<br />
<br />
⎡ Virtual core pointer id=2 [master pointer (3)]<br />
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Finger id=11 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Pad id=12 [slave pointer (2)]<br />
⎜ ↳ USB Keyboard id=14 [slave pointer (2)]<br />
⎜ ↳ SynPS/2 Synaptics TouchPad id=16 [slave pointer (2)]<br />
⎜ ↳ TPPS/2 IBM TrackPoint id=17 [slave pointer (2)]<br />
⎜ ↳ SteelSeries Kinzu V2 Gaming Mouse id=9 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Pen Pen (0x6281780c) id=20 [slave pointer (2)]<br />
⎣ Virtual core keyboard id=3 [master keyboard (2)]<br />
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]<br />
↳ Power Button id=6 [slave keyboard (3)]<br />
↳ Video Bus id=7 [slave keyboard (3)]<br />
↳ Sleep Button id=8 [slave keyboard (3)]<br />
↳ Wacom Intuos PT S 2 Pen id=10 [slave keyboard (3)]<br />
↳ USB Keyboard id=13 [slave keyboard (3)]<br />
↳ AT Translated Set 2 keyboard id=15 [slave keyboard (3)]<br />
↳ ThinkPad Extra Buttons id=18 [slave keyboard (3)]<br />
↳ USB Keyboard id=19 [slave keyboard (3)]<br />
<br />
This mean, my tablet's ID is ''20''. Now we map it with ''VGA-0'' screen:<br />
<br />
$ xinput map-to-output 20 VGA-0<br />
<br />
===== Ptxconf=====<br />
<br />
{{AUR|ptxconf-git}} is a GUI to configure your tablet for multiscreen. When launched, it is added to the desktop environment systray. It automatically detects connected displays, their respective positions on the screen, and buttons allow to link an input device with an output display. It works with [[KDE Plasma]], [[LXQt]] and [[Xfce]], and it manages any type of graphics tablets, not only Wacom, as Gnome Wacom Tablet configurator (See [[#Non-Wacom tablets]] for a workaround). On some tablets, the stylus needs to be first moved near the screen to let [[libinput]] detect it before Ptxconf can show it.<br />
<br />
Use the command {{ic|ptxconf}} to start the program. Configure [[Autostarting]] to let it start automatically.<br />
<br />
=== Pressure curve ===<br />
<br />
Use the [https://linuxwacom.github.io/bezier.html Wacom Pressure Curve and Threshold Graph] to find P1=red (eg. 50,0) and P2=purple (eg. 100,80) of your desired curve. The x-axis is the input pressure you apply to the pen; the y-axis is the output pressure the application is given.<br />
<br />
You can change the pressure curve with:<br />
<br />
$ xsetwacom set ''stylus'' PressureCurve ''x1 y1 x2 y2''<br />
<br />
=== Letting libinput take control of the touchpad ===<br />
<br />
As the wacom touchpad normally does not support inverted scrolling it can be desirable to use libinput to take control of the touchpad.<br />
<br />
To do this create `/etc/X11/xorg.conf.d/90-libinput-wacom.conf` with the following contents:<br />
<br />
Section "InputClass"<br />
Identifier "libinput Wacom touchpad override class"<br />
MatchUSBID "056a:*"<br />
MatchDevicePath "/dev/input/event*"<br />
MatchIsTouchpad "true"<br />
Driver "libinput"<br />
EndSection<br />
<br />
Reboot afterwards.<br />
<br />
See [https://github.com/linuxwacom/xf86-input-wacom/issues/28#issuecomment-420737038 here] for a more detailed explanation.<br />
<br />
== Application-specific configuration ==<br />
<br />
=== Alchemy ===<br />
<br />
{{AUR|Alchemy}} (and {{AUR|Alchemy-git}}) needs the JPen library to manage stylus pressure. See [https://digimend.github.io/support/howto/apps/alchemy/ Digimend documentation about Alchemy].<br />
<br />
=== Blender ===<br />
<br />
To enable pad buttons and extra pen buttons in [[Blender]], you can create a xsetwacom wrapper to temporarily remap buttons for your blender session.<br />
<br />
Provided example (for Bamboo fun) adapted to ''Sculpt'' mode: [http://pastebin.archlinux.fr/1887946 blender_sculpt.sh]{{Dead link|2020|04|03|status=404}}<br />
<br />
It remaps:<br />
* Left tablet buttons to {{ic|Shift}} and {{ic|Ctrl}} ''(pan/tilt/zoom/smooth/invert)''<br />
* Right tablet buttons to {{ic|F}} ''(brush size/strenght)'' and {{ic|Ctrl-z}} ''(undo)''<br />
* Top pen button ton {{ic|m}} ''(mask control)''<br />
<br />
=== DrawPile ===<br />
<br />
{{AUR|drawpile}} is a drawing whiteboard (network collaborative drawing tool). It manages pressure level on its drawing tools. In the "Freehand" box, a brush icon at the right of each parameter needs to be activated to have pressure management on this parameter. There is only a general curve on the bottom right of the window ("Input" box), that can be applied to stylus, distance and velocity.<br />
<br />
=== GIMP ===<br />
<br />
To enable proper usage and pressure sensitive painting in [[GIMP]], just go to ''Edit > Input Devices''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.<br />
<br />
* Please take note that if present, the ''pad'' ''device'' should be kept disabled as I do not think GIMP supports such things. Alternatively, to use such features of your tablet you should map them to keyboard commands with a program such as [http://hem.bredband.net/devel/wacom/ Wacom ExpressKeys]{{Dead link|2020|04|03|status=404}}.<br />
* You should also take note that the tool selected for the ''stylus'' is independent to that of the ''eraser''. This can actually be quite handy, as you can have the ''eraser'' set to be used as any tool you like.<br />
<br />
For more information checkout the ''Setting up GIMP'' section of [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]{{Dead link|2020|04|03|status=domain name not resolved}}.<br />
<br />
If the above was not enough, you may want to try setting up the tablet's stylus (and eraser) as a second mouse pointer (separating it from your mouse) by using the {{ic|xinput create-master}} and {{ic|xinput reattach}} commands. It can help when GIMP does not start painting even if the stylus touches the tablet.<br />
<br />
=== Inkscape ===<br />
<br />
Pressure sensitivity in [[Inkscape]] is enabled the same way as in GIMP. Go to ''Edit > Input Devices...''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.<br />
<br />
=== MyPaint ===<br />
<br />
{{pkg|mypaint}} (extra {{pkg|mypaint-brushes}}, {{pkg|mypaint-brushes1}}, ''note that these brushes are also used on other applications using libmypaint'') is a general bitmap drawing application. Its advanced brush settings have been adopted by [[#GIMP|GIMP]], [[#Krita|Krita]], [[#OpenToonz|OpenToonz]], and few others and is in integration process in [[#Pencil2D|Pencil2D]]. It is a very light tool that can be used in low-end computers.<br />
<br />
In MyPaint, there are general settings about tablets and per brush specific parameters (you can set your own brushes).<br />
<br />
General settings are in menu ''Edit > Edit Preferences''.<br />
<br />
* The "Pressure" tab is for global pressure mapping.<br />
* The "Devices" tab displays the list of detected input devices with little general information. Each one can be assigned to specific tasks by clicking on their parameter in the "Use for..." (Any Task, Ignore, Non-painting tasks, Navigation only) and "Scroll..." (zoom, pan) columns.<br />
* The "Buttons" tab allows to assign buttons to specific functions.<br />
<br />
Brush settings can be accessed by the brush context menu (right click on a tool). You can duplicate an existing tool before making modification, and so, keep the tool with its default preset ("clone" in the context menu).<br />
<br />
* To edit brush settings, simply use the ''Edit Brush'' settings from the context menu on brush. There are several settings, see the [https://github.com/mypaint/mypaint/wiki/Documentation MyPaint documentation] for a full description or play with them to discover what they do.<br />
<br />
=== OpenToonz ===<br />
<br />
{{pkg|opentoonz}} is a professional 2D animation tool, first developed by Studio Ghibli, and used by Ghibli and Folimage among others.<br />
<br />
Stylus pressure is managed by default on default tools. There is a checkbox ''Pressure'' at the second line, at top right, that can be unchecked to disable pressure management. Several presets can be selected by the menu button at right of ''Preset'', and added or deleted with the +/- buttons.<br />
<br />
{{pkg|libmypaint}} brushes can be chosen in the ''Basics'' mode (upper right tabs), and then in the column between the drawing area and the exposure sheet: at the "[LEVEL]: Palette" button, click on "Raster" tab to view the brushes. The brushes can be edited with MyPaint and used in OpenToonz.<br />
<br />
=== Pencil2D ===<br />
<br />
{{pkg|pencil2d}} is a light 2D animation tool. Each tool that can use the pressure parameter (Pencil, Eraser, Pen and Brush) has a checkbox called "Pressure" that is checked by default to use stylus pressure parameter.<br />
<br />
There is also a git version, {{AUR|pencil2d-mypaint-git}} (already a very stable branch), that contains the libMyPaint engine and Deevad set of MyPaint Brushes. A subset of the brush settings with pressure management can be set by clicking on the brush and choosing edit.<br />
<br />
=== Krita ===<br />
<br />
If your tablet does not draw in Krita (clicks/pressure are not registered) but works in the brush selection dialog which has a small test area, try putting Krita in full-screen or canvas-only mode.<br />
<br />
Krita only requires that Qt is able to use your tablet to function properly. If your tablet is not working in Krita, then make sure to check it is working in Qt first. The effect of tablet pressure can then be tweaked in the painttop configuration, for example by selecting opacity, then selecting pressure from the drop down and adjusting the curve to your preference.<br />
<br />
October 2020 '''[https://bugs.archlinux.org/task/68099 There is currently a known bug related to Qt 5.15.1 and Krita]''' with all the tablets, to access to the "Pop-up Pallet" in Krita with stylus button. You can use right mouse button on canvas or temporary use Krita appimage from the [https://krita.org/en/download/krita-desktop/ official Krita website] until the updated version of Qt.<br />
<br />
=== VirtualBox ===<br />
<br />
First, make sure that your tablet works well under Arch. Then, download and install the last driver from [https://www.wacom.com/en-cl/support/bamboo-support Wacom website] on the guest OS. Shutdown the virtual machine, go to ''Settings > USB''. Select ''Add Filter From Device'' and select your tablet (e.g. WACOM CTE-440-U V4.0-3 [0403]). Select ''Edit Filter'', and change the last item ''Remote'' to ''Any''.<br />
<br />
== Troubleshooting ==<br />
<br />
Newer tablets' drivers might not be in the kernel yet, and additional manipulations might be needed. A notable example is the newer Intuos line of tablets (Draw/Comic/Photo).<br />
<br />
=== Unknown device_type ===<br />
<br />
If your tablet does not get recognized by {{ic|xsetwacom}} and {{ic|dmesg}} complains about an unknown device_type, then you need to install a patched version of input-wacom.<br />
<br />
Download and install the for-4.4 branch from [https://sourceforge.net/p/linuxwacom/input-wacom/ci/jiri/for-4.4/~/tarball SourceForge].<br />
Your device should be recognized after you run<br />
<br />
# rmmod wacom<br />
# insmod /lib/modules/YOUR_KERNEL/kernel/drivers/hid/wacom.ko.gz<br />
<br />
=== Tablet recognized but xsetwacom and similar tools do not display it ===<br />
<br />
Your logs indicate that the correct driver is selected, and the tablet works. However, when running {{ic|xsetwacom list devices}} or use similar tools that depend on the correct driver, you get an empty list.<br />
<br />
A reason might be the execution order of your xorg configuration. {{ic|/usr/share/X11/xorg.conf.d}} gets executed first, then {{ic|/etc/X11/xorg.conf.d}}. The package {{pkg|xf86-input-wacom}} contains the file {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}}. If there is a catchall for tablets, executed after this file, the previously selected {{ic|wacom}} driver will be overwritten with a generic one that does not work with xsetwacom et. al.<br />
<br />
To make sure, check the rules contained in the files executed after {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}} for anything that looks like graphics tablets.<br />
<br />
=== Manual setup ===<br />
<br />
A manual configuration is done in {{ic|/etc/X11/xorg.conf}} or in a separate file in the {{ic|/etc/X11/xorg.conf.d/}} directory. The Wacom tablet device is accessed using a input event interface in {{ic|/dev/input/}} which is provided by the kernel driver. The interface number {{ic|event??}} is likely to change when unplugging and replugging into the same or especially a different ''USB'' port. Therefore it is wise to not refer to the device using its concrete {{ic|event??}} interface ('''static''' configuration) but by letting ''udev'' dynamically create a symbolic link to the correct {{ic|event}} file ('''dynamic''' configuration).<br />
===== USB-devices =====<br />
<br />
After (re-)plugging in your ''USB''-tablet (or at least after rebooting) some symbolic links should appear in {{ic|/dev/input}} referring to your tablet device.<br />
<br />
$ ls /dev/input/wacom* <br />
/dev/input/wacom /dev/input/wacom-stylus /dev/input/wacom-touch<br />
<br />
If not, your device is likely to be not yet included in the ''udev'' configuration from ''wacom-udev'' which resides in {{ic|/usr/lib/udev/rules.d/wacom.rules}}. Copy the file to {{ic|/etc/udev/rules.d/wacom.rules}} and modify it there.<br />
<br />
Add your device to the file by duplicating some line of another device and adapting ''idVendor'',''idProduct'' and the symlink name to your device.<br />
The two id's can be determined using<br />
<br />
$ lsusb | grep -i wacom<br />
Bus 002 Device 007: ID 056a:0062 Wacom Co., Ltd<br />
<br />
In this example idVendor is 056a and idProduct 0062. In case you have device with touch (e.g. Bamboo Pen&Touch) you might need to add a second line for the touch input interface. For details check the linuxwacom wiki [https://github.com/linuxwacom/input-wacom/wiki/Fixed-device-files-with-udev Fixed device files with udev].<br />
<br />
Save the file and reload udev's configuration profile using the command ''udevadm control --reload-rules'' Check again the content of ''/dev/input'' to make sure that the ''wacom'' symlinks appeared. Note that you may need to plug-in the tablet again for the device to appear.<br />
<br />
The files of further interest for the ''Xorg'' configuration are {{ic|/dev/input/wacom}} and for a touch-device also {{ic|/dev/input/wacom_touch}}.<br />
<br />
==== Static setup ====<br />
<br />
Usually it is recommended to rely on [[Xorg]]'s auto-detection or to use a '''dynamic''' setup. However for an ''internal'' tablet device one might consider a '''static''' Xorg setup in case autodetection does not work. A static [[Xorg]] setup is usually not able to recognize your Wacom tablet when it is connected to a different ''USB'' port or even after unplugging and replugging it into the same port, and as such it should be considered as deprecated.<br />
<br />
If you insist in using a static setup just refer to your tablet in the ''Xorg'' configuration in the next section using the correct {{ic|/dev/input/event??}} files as one can find out by looking into {{ic|/proc/bus/input/devices}}.<br />
<br />
==== Xorg configuration ====<br />
<br />
In either case, dynamic or static setup you got now one or two files in {{ic|/dev/input/}} which refer to the correct input event devices of your tablet. All that is left to do is add the relevant information to {{ic|/etc/X11/xorg.conf}}, or a dedicated file under {{ic|/etc/X11/xorg.conf.d/}}. The exact configuration depends on your tablet's features of course. {{ic|xsetwacom list devices}} might give helpful information on what ''InputDevice'' sections are needed for your tablet.<br />
<br />
An example configuration for a ''Volito2'' might look like this<br />
<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "stylus"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "stylus"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "eraser"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "eraser"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "cursor"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "cursor"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
EndSection<br />
<br />
Make sure that you also change the path ({{Ic|"Device"}}) to your mouse, as it will be {{Ic|/dev/input/mouse_udev}} now.<br />
<br />
Section "InputDevice"<br />
Identifier "Mouse1"<br />
Driver "mouse"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mouse_udev"<br />
Option "SendCoreEvents" "true"<br />
Option "Protocol" "IMPS/2"<br />
Option "ZAxisMapping" "4 5"<br />
Option "Buttons" "5"<br />
EndSection<br />
<br />
Add this to the ''ServerLayout'' section<br />
<br />
InputDevice "cursor" "SendCoreEvents" <br />
InputDevice "stylus" "SendCoreEvents"<br />
InputDevice "eraser" "SendCoreEvents"<br />
<br />
And finally make sure to update the identifier of your mouse in the ''ServerLayout'' section &ndash; as mine went from<br />
<br />
InputDevice "Mouse0" "CorePointer"<br />
<br />
to<br />
<br />
InputDevice "Mouse1" "CorePointer"<br />
<br />
=== Mouse Moving Erratically due to Proximity Sensor ===<br />
<br />
You can disable the mouse jumping due to a proximity sensor detecting a non-existing stylus. You can find your device with xinput --list, and after seeing the Stylus, disable it with: xinput disable "Your Device Name". This only works if you are not currently using a stylus.<br />
<br />
== See also ==<br />
<br />
* [[List of applications/Documents#Stylus note-taking]]<br />
* [https://github.com/linuxwacom/input-wacom/wiki input-wacom Wiki]<br />
* [https://github.com/linuxwacom/xf86-input-wacom/wiki xf86-input-wacom Wiki] (out of date)<br />
* [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]{{Dead link|2020|04|03|status=domain name not resolved}}<br />
* [https://help.ubuntu.com/community/Wacom Ubuntu Help: Wacom]<br />
* [http://ubuntuforums.org/showthread.php?t=1038949 Ubuntu Forums - Install a LinuxWacom Kernel Driver for Tablet PC's]<br />
* [https://github.com/tb2097/wacom-gui Wacom-GUI]</div>Jose1711https://wiki.archlinux.org/index.php?title=User_talk:Lahwaacz&diff=650778User talk:Lahwaacz2021-02-04T11:34:01Z<p>Jose1711: add Re: Undo of Automatic configuration using udev</p>
<hr />
<div>== bot checking links after move ==<br />
<br />
Hi, re [[Talk:Touchpad Synaptics#adding libinput alternative]]. [[Touchpad Synaptics]] has 100+ backlinks and the more important ones - a bit tedious task. I was just glancing over your clever github bot scripts. It would be handy to have a script after such moves: walk over the backlinks of [[Touchpad Synaptics]] and just replace "[[Touchpad Synaptics" with "[[Synaptics" from the links. That would leave all links to subsections intact. Leaving out the translations to handle manually, there would not be much to go wrong, or? --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 07:36, 26 September 2015 (UTC)<br />
<br />
:Hi, thanks for the suggestion. It would be indeed handy in this case, but most likely not generally. Imagine that there was a [[UUID]] page, which was later generalized and renamed to [[Persistent block device naming]] and content about UUID is now only a section on the page. In this case using the naive replacement would likely change the meaning of many sentences, and using shorter redirects for convenience is actually encouraged. There would have to be a list of whitelisted "harmless" replacements, which could even help to replace <nowiki>[[pacman|Install]]</nowiki> with <nowiki>[[Install]]</nowiki> etc. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:01, 26 September 2015 (UTC)<br />
<br />
::Yes, good examples, but you are thinking universal already :) I did not mean it could be that. For example, if you take the time when the bulk of the title case moves were done. With such a script one could avoid a lot of internal redirects as well. E.g. [https://wiki.archlinux.org/index.php/Special:WhatLinksHere/Beginners'_Guide]. But it's ok, just an idea. Please close this, if you think it's too singular cases with a simple enough replacement where it could be applied. --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 10:02, 26 September 2015 (UTC)<br />
<br />
== mkosi ==<br />
<br />
Hi, about your [https://wiki.archlinux.org/index.php?title=Systemd-nspawn&diff=0&oldid=491975 revert]: You can use mkosi also to create a container/directory tree (-t directory). So it can do the same and more. -- [[User:Nudin|Nudin]] ([[User talk:Nudin|talk]]) 11:33, 1 October 2017 (UTC)<br />
<br />
:Alright, how is the "more" relevant to systemd-nspawn though? -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 17:30, 3 October 2017 (UTC)<br />
<br />
::Hi, mkosi let's you create images (or directory trees) of various different distributions and allows you to do things like setting the root-password or installing additional packages. systemd-nspawn alows you to boot such images/directory trees. So I thought mentioning mkosi as alternative to manually creating a container with pacstrap or debootstrap would be worth it. -- [[User:Nudin|Nudin]] ([[User talk:Nudin|talk]]) 22:23, 5 October 2017 (UTC)<br />
<br />
== Waking from suspend with USB device ==<br />
<br />
Hi Lahwaacz, thanks for your input on this topic.<br />
Can you help me a bit further, I know the USB host controller and the USB device are different things but I thought that enabling the host controller was not necessary anymore, see [https://www.spinics.net/lists/linux-usb/msg53661.html].<br />
In my case all the {{ic|driver/*/power/wakeup}} are all enabled by default and the {{ic|/proc/acpi/wakeup}} as well.<br />
Anyway I have added a step in my explanations to identify the path awaiting for more clarity.<br />
<br />
[[User:Kewl|Kewl]] ([[User talk:Kewl|talk]]) 21:57, 16 January 2018 (UTC)<br />
<br />
:Hi, thanks for the link, it's entirely possible that something changed since the section was written. However, in my case only the keyboard device has wakeup enabled by default: {{bc|<nowiki><br />
$ for f in /sys/bus/usb/drivers/usb/*/power/wakeup; do echo "$f: $(cat $f)"; done<br />
/sys/bus/usb/drivers/usb/1-1/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/2-1/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/3-11/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/3-12/power/wakeup: enabled<br />
/sys/bus/usb/drivers/usb/3-13/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/4-3/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/4-4/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/usb1/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/usb2/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/usb3/power/wakeup: disabled<br />
/sys/bus/usb/drivers/usb/usb4/power/wakeup: disabled<br />
</nowiki>}}<br />
:But in practice it seems to wake up the system even without the host controllers enabled for wakeup... It might also depend on some BIOS/firmware settings but if it works by default on most systems then I think the host controller settings could be removed again.<br />
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:14, 19 January 2018 (UTC)<br />
<br />
== Are supported local/remote destinations important for choosing a backup program? ==<br />
<br />
You [[Special:Diff/525550|reverted]] my edit adding supported backup destinations to [[Synchronization_and_backup_programs]]. This is puzzling to me. Here are some thoughts:<br />
* if choosing any backup program, the ability to send the backup off-site vs only on a local disk is a key feature consideration. Perhaps *the* key feature: one helps me recover in case my house gets burglarized or burns down, and the other does not. This is a much more important feature consideration than, say, whether the program is written in Go or Mono (something that has a full column). I think it's hard to disagree on that.<br />
* Given this, I am very puzzled you would use the term "useless" in the revert message.<br />
* I assume you didn't like that the table got even bigger (it didn't fit into the layout even before). I don't like it either, but perhaps the revert should have said "can you put this somewhere else, not in this already-too-big table?"<br />
* On a personal note, when I provide feedback or give opinion on somebody else's work, I'd like to be constructive and kind, instead of aggressive and putting people down. Just a thought. Thanks for listening.<br />
<br />
[[User:Jernst|Jernst]] ([[User talk:Jernst|talk]]) 17:38, 11 June 2018 (UTC)<br />
<br />
:No because you can use any remote back-end with any backup application by just running one command / writing the backups to a [[FUSE]] (if available).--[[User:Larivact|Larivact]] ([[User talk:Larivact|talk]]) 04:39, 12 June 2018 (UTC)<br />
<br />
::Hmm, by that reasoning we don't need the Arch package repository, as long as we have source code and makepkg. Or Perl, if we have bash and awk. But even then, and if all the fuse backends existed (I doubt they do), and if it were easy to set all of them up (another thing I doubt), do you indeed believe that running something written to read/write local files will be just as efficient backing up gigabytes of data to a remote repository as something that is specifically optimized for that use case? Note that backing up, say, daily, a typical hard drive via tpyical consumer broadband is still quite a bandwidth challenge in many places today. What about we add this info, and remove (or merge) some other columns to make the table smaller? {{Unsigned|18:08, 12 June 2018|Jernst}}<br />
<br />
:::Your comparisons don't make sense. Mind the slash in my response, you do not need a FUSE implementation, a simple CLI suffices. You do not need to "set all of them up", you only need one. --[[User:Larivact|Larivact]] ([[User talk:Larivact|talk]]) 18:47, 12 June 2018 (UTC)<br />
<br />
::::If you ever attempt to help a normal user set up a reliably-working off-site backup strategy, think of this discussion. In the meantime, this is all the time I'm going to spend on a discussion that has such repeated gems in it as "makes no sense" without explaining why you think so. Have a nice day. [[User:Jernst|Jernst]] ([[User talk:Jernst|talk]]) 18:54, 12 June 2018 (UTC)<br />
<br />
== The pip section in [[Python package guidelines]] ==<br />
<br />
Hi, you wanted the warning about using pip or wheels restored but accidentally(?) reverted my whole set of changes. I redid them, leaving the warning in place. – [[User:Flying sheep|flying sheep]] 08:17, 8 March 2019 (UTC)<br />
<br />
:Full revert was intentional, because the "wheel" section is not a full replacement for "pip" because there are packages which don't provide wheel files. As I said in the edit summary, there is no reason to recommend one or the other due to the warning. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:21, 8 March 2019 (UTC)<br />
::That still doesn’t explain why you reverted the first part, that had nothing to do with the pip/wheel section and simple improves the files.pythonhosted.org URLs. I restored that one while we’re discussing the pip/wheel section. And about that: There’s no reason to use pip for anything else, and pip is only used because some people (me included) didn’t understand that you can install most wheels by just extracting them to the correct location. So what do you think is missing from my wheels section that the former pip section had? – [[User:Flying_sheep|flying sheep]] 11:41, 11 March 2019 (UTC)<br />
<br />
:::If you didn't notice, the page includes "guidelines" in the title. So the page should contain only common and recommended ways to do things, not everything that is possible to do. If you think that your way to install "wheels" should be followed by everybody, feel free to discuss it on the talk page. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:26, 11 March 2019 (UTC)<br />
::::Well, extracting static archives sounds much more recommended than running pip with like 7 options to make it behave. I added a talk item: [[Talk:Python package guidelines#Remove_pip_section_in_favor_of_wheels_section?]] – [[User:Flying_sheep|flying sheep]]<br />
<br />
== wpa_supplicant ==<br />
<br />
Regarding https://wiki.archlinux.org/index.php?title=WPA_supplicant&diff=577215&oldid=577167, one person ran into this problem in March of this year and spent too much time diagnosing it:<br />
<br />
https://bbs.archlinux.org/viewtopic.php?id=244950<br />
<br />
It took me a few days to find the problem. I want to make sure the next time someone encounters it, they easily find relevant information about what the cause is. Since you've reverted my edits to both netctl and wpa_supplicant, what do you suggest?<br />
<br />
--<br />
<br />
[[User:Pooryorick|Pooryorick]] ([[User talk:Pooryorick|talk]]) 08:24, 18 July 2019 (UTC)<br />
<br />
== F2FS and GRUB ==<br />
<br />
Hello. :) I'm here to address a recent disagreement. I noticed a reversion of my edit regarding the F2FS filesystem, in particular regarding the configuration file to edit (with you representing /boot/grub/grub.cfg and me representing /etc/default/grub). I run F2FS on my daily driver with an encrypted root filesystem and encrypted boot on a separate partition, and have never had to touch grub.cfg. I only automatically generate it. It's possible to use either, but /etc/default/grub would make more sense as a recommendation in my mind because grub.cfg has the potential to be overwritten during updates, whereas /etc/default/grub doesn't. <br />
<br />
If there's a compelling reason to use grub.cfg over /etc/default/grub, please let me know. ^^ I'm always eager to learn more about Arch. I don't want to get in a reversion war so I've left your change untouched for the time being.<br />
<br />
[[User:Eurydice|Eurydice]] ([[User talk:Eurydice|talk]]) 00:17, 8 September 2019 (UTC)<br />
<br />
:The reason is explained in the section: "If GRUB is used with an unsupported filesystem it is not able to extract the UUID of your drive so it uses classic non-persistent /dev/sdXx names instead." If it does not apply to F2FS, it should be made clear. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 06:29, 8 September 2019 (UTC)<br />
<br />
::You can specify UUID's in GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, so my proposed solution would work for F2FS and other unsupported filesystems, without the burden of manually editing grub.cfg. If there's anything I need to clarify or something else I'm missing, just let me know. :) [[User:Eurydice|Eurydice]] ([[User talk:Eurydice|talk]]) 19:37, 8 September 2019 (UTC)<br />
<br />
:::The {{ic|1=root=}} parameter is not supposed to be in GRUB_CMDLINE_LINUX_DEFAULT, regardless if UUID is used or not. ''grub-mkconfig'' automatically detects the root filesystem and adds the appropriate {{ic|1=root=}} parameter based on GRUB_DISABLE_LINUX_UUID. In any case, your change to the paragraph does not make sense. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:02, 8 September 2019 (UTC)<br />
<br />
::::It could simply be because I use full disk encryption, and adding a kernel parameter for the encrypted disk's UUID is correct in that situation. You're more experienced with contributing to the wiki, so I guess I'll defer to your judgment. It felt like a reasonable edit and solution to me and I don't see the downside to including it in GRUB_CMDLINE_LINUX_DEFAULT. [[User:Eurydice|Eurydice]] ([[User talk:Eurydice|talk]]) 05:38, 9 September 2019 (UTC)<br />
<br />
== dracut executable link ==<br />
<br />
Hello, your last edit on the dracut page (https://wiki.archlinux.org/index.php?title=Dracut&oldid=596388) that undid my 'Link to direct "make executable" section for executable link' commit states: "the redirect executable points exactly to that section", but it doesn't. Following the [[executable]] link just points to the top of the Help:Reading page.<br />
<br />
{{unsigned|17:06, 28 January 2020|Krathalan}}<br />
<br />
:In that case your browser probably does not work correctly, because the redirect [https://wiki.archlinux.org/index.php?title=Executable&redirect=no really points to the section]. Or MediaWiki, there was a bug several years ago... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:41, 28 January 2020 (UTC)<br />
<br />
:: How strange... thanks for pointing that out. It does indeed appear to be some issue with my Firefox configuration. [[User:Krathalan|Krathalan]] ([[User talk:Krathalan|talk]]) 19:51, 28 January 2020 (UTC)<br />
<br />
== Getting install.php work in DokuWiki ==<br />
<br />
Hi, than you for having undone my contribution and pointed to the right solution on [[Dokuwiki#Configuration]]. Indeed I had read this solution before, but I was misled by the condition "if you are using lighttpd or nginx and your PHP version is lower than 7": as I use Apache with php v. 7.4.3 I didn't take it into account. Do you know what a correct rephrasing could be? Maybe it should be deleted?<br />
<br />
Also, I think that, at the end of this same section, one should add something like "verify that {{Pkg|php-gd}} is installed and restart {{ic|php-fpm.service}}".<br />
<br />
Naturally I can do it myself, but I prefer to ask before.<br />
[[User:BDumont|BDumont]] ([[User talk:BDumont|talk]]) 17:31, 19 February 2020 (UTC)<br />
<br />
:Hi, apparently it depends on whether you had {{ic|open_basedir}} set previously or not. I've changed the page, feel free to update the gd extension. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 21:16, 19 February 2020 (UTC)<br />
<br />
::Thank you! However, while, I didn't have {{ic|open_basedir}} set previously, I couldn't access ''install.php''. I suspect there is another thing to do, since the configuration editor in DokuWiki complains that it cannot modify the configuration files although ownership and permissions are correctly set for the relevant symlinks, directories and files, and so is {{ic|open_basedir}}. However I can edit my pages. Maybe a return from a new user with a fresh installation would be more useful, though. [[User:BDumont|BDumont]] ([[User talk:BDumont|talk]]) 08:20, 20 February 2020 (UTC)<br />
<br />
== Dead link in Simple stateful firewall#See Also ==<br />
<br />
Hi, Jakub. I am about [https://wiki.archlinux.org/index.php?title=Simple_stateful_firewall&diff=599725&oldid=599717 this] edit. I tried to follow that link one more time and it is not require entering captcha. I am not see any content limitations and my colleague (he uses Tor) does not see them too. I am not sure how it works, so I leave it on your descision. -- [[User:Duodai|Duodai]] ([[User talk:Duodai|talk]]) 14:29, 1 March 2020 (UTC)<br />
<br />
:Well, maybe it depends on the location from which the request comes. But I don't know how it works either... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:33, 1 March 2020 (UTC)<br />
<br />
::my guess is it returns captcha for crawlers only -- [[User:Ubone|Ubone]] ([[User talk:Ubone|talk]]) 01:59, 2 March 2020 (UTC)<br />
<br />
:::I'm getting it in my browser... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:14, 2 March 2020 (UTC)<br />
<br />
== SystemD user units depending on graphical session ==<br />
Hi,<br />
regarding reverting my addition to [[Systemd/User]], could you please explain why? I referenced [[https://www.freedesktop.org/software/systemd/man/systemd.special.html]] which directly contradicts what you said in your summary.<br />
<br />
{{unsigned|19:53, 5 May 2020|Fuero}}<br />
<br />
:The note in [[Systemd/User#How it works]] still applies - systemd services are never per-session, but per-user. The service does not magically get the correct DISPLAY or WAYLAND_DISPLAY variable, it does not work if you have multiple sessions per user, etc. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 12:45, 6 May 2020 (UTC)<br />
<br />
== Plymouth ==<br />
<br />
Actually with just Plymouth it does not work properly. Even 0dd17y had the same issue in https://bbs.archlinux.org/viewtopic.php?id=220900.<br />
<br />
The reason I did not file a bug report is that it is anyway fixed in the git version and the latest release (0.9.4) is around 2 years behind master<br />
<br />
{{unsigned|09:50, 6 May 2020|M.Srikanth}}<br />
<br />
:So if you don't have to file a bug report, add a full troubleshooting entry or at least properly reference your inline note instead of resorting to plain "if that does not work, try this instead". -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 12:15, 6 May 2020 (UTC)<br />
<br />
== [Bitcoin core] build the code and run the test suites ==<br />
<br />
Hello,<br />
<br />
This week, I managed to build the Bitcoin code and run all the test suites with the help of this page: https://jonatack.github.io/articles/how-to-compile-bitcoin-core-and-run-the-tests<br />
<br />
Archlinux has two particularities:<br />
* being in rolling release, it takes to manually use the library {{ic|Berkeley DB (BDB) v4.8}}<br />
* the {{ic|/tmp}} directory is by default limited to half the size of the Ram<br />
<br />
For these reason, maybe it could be interesting to have a page in the wiki to explain how to build the Bitcoin core?<br />
<br />
Cheers,<br />
<br />
Thomas<br />
<br />
[[User:Thomasb|Thomasb]] ([[User talk:Thomasb|talk]]) 20:29, 9 May 2020 (UTC)<br />
<br />
:I don't think that this is useful. There is the {{AUR|bitcoin-core-git}} package and nothing more should be needed. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 16:53, 26 May 2020 (UTC)<br />
<br />
== Double linefeed results in extra line ==<br />
<br />
If you look at templates that end with double linefeed before noinclude this would result in extra line in resulting page.<br />
<br />
It may be a minor point but since you are perfectionist about wikitext I should mention this is a tradeoff and it results in slightly worse result.<br />
<br />
Removing just one linefeed removes the problem while still allowing it to not jumble all the tags into same line.<br />
<br />
-- [[User:Svito|Svito]] ([[User talk:Svito|talk]]) 16:30, 11 May 2020 (UTC)<br />
<br />
:If this is about [https://wiki.archlinux.org/index.php?title=Template:Cat_main&diff=next&oldid=612179], the spaces I added back are not included when the template is used elsewhere, because the spaces are inside the noinclude tags. The extra space is only on the template page itself, but it does not result from template inclusion. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:41, 11 May 2020 (UTC)<br />
<br />
::OFC, I mean the template page render has extra line. -- [[User:Svito|Svito]] ([[User talk:Svito|talk]]) 21:21, 11 May 2020 (UTC)<br />
<br />
:::I agree with [[User:Svito|Svito]], isn't it good to delete the extra blank lines? -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 05:39, 12 May 2020 (UTC)<br />
<br />
::::OK, let's do it. [https://wiki.archlinux.org/index.php?title=Template:Cat_main&diff=616382&oldid=612181] -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 16:47, 26 May 2020 (UTC)<br />
<br />
== Re: lighttpd: remove python2 version ==<br />
<br />
Instead of removing the example we could as well add an example using a Python3 library like https://pypi.org/project/flup6/.<br />
<br />
{{unsigned|15:23, 18 May 2020|Gruentee}}<br />
<br />
:Feel free to add it if you find it useful. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:56, 18 May 2020 (UTC)<br />
<br />
== Xbindkeys removal ==<br />
<br />
Hi, just wondering why you [https://wiki.archlinux.org/index.php?title=Xbindkeys&diff=617675&oldid=617670 removed my edit] from [[Xbindkeys]]? The xbindkeys page has a number of quick tips but no mention of how to bind anything to the Print Screen key so I thought it would be useful to add. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 02:27, 3 June 2020 (UTC)<br />
<br />
:Giving examples for all keys on the keyboard is useless, there is [[Xbindkeys#Identifying keycodes]] which teaches how to find the keycodes and keysyms of any key. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 06:37, 3 June 2020 (UTC)<br />
<br />
:: So how come you left the examples for the volume up/down and brightness? What is different between those examples and a screenshot example? Aren't more examples better to save people from hunting all over the place trying to piece things together themselves? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 14:03, 4 June 2020 (UTC)<br />
<br />
:::The difference is that when it comes to volume control, there are 1 or 2 options for the 99% most common cases, but for screenshot taking there are dozens of different options. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 15:15, 12 August 2020 (UTC)<br />
<br />
== Re: Revert for edit to XDG Base Directory page regarding python_history ==<br />
<br />
I understand the justification for reverting the change I made, however I would like to point out that similar entries on the page (such as Maven) also have instructions for what contents to put in files (even though there is native documentation for those settings). Additionally, it took me a bit of re-reading on the linked Python documentation to reason out how the documentation's example needed to be modified, since it's not clear from the Python documentation whether placing such code in the PYTHONSTARTUP file will actually ''override'' the default behavior. [[User:Varriount|Varriount]] ([[User talk:Varriount|talk]]) 20:44, 20 June 2020 (UTC)<br />
<br />
:Even maven's note can be [https://wiki.archlinux.org/index.php?title=XDG_Base_Directory&diff=631704&oldid=631630 shortened]. The notes in the table must be as short as possible, there is no place for extended explanations or long code snippets like in the upstream documentation. If the Python's documentation is not clear enough, I don't think any note in a massive convoluted table will ever be better. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:47, 12 August 2020 (UTC)<br />
<br />
== Re: Revert for Backlight page ==<br />
<br />
Hi, you reverted my change to [[Backlight]] page that mentioned WIP patches for controlling OLED panel brightness. I don't really understand justification for reverting it since currently the page says that OLED brightness can be controlled only by changing gamma ramp. That is wrong - since it's not the only way - these panels can control brightness with a PWM. Moreover controlling brightness with gamma ramp is not optimal - it essentially reduces dynamic range, i.e. at 50% you have 7 bits per pixel, at 25% - 6 bit per pixel, etc. That results in banding artifacts at lower brightness level.<br />
<br />
As far waiting for the patches to be merged before mentioning it there - it'll take ~3-6 months (yes, that's the process) and I haven't found *any* reference to these changes on the internet - everyone recommends using gamma ramp instead of fixing it properly. I'm absolutely sure that having information about these patches would not hurt [[User:Anarsoul|Anarsoul]] ([[User talk:Anarsoul|talk]]) 15:56, 30 June 2020 (UTC)<br />
<br />
:Linking to a repo which which has 2 custom commits on top of some arbitrary development version of the Linux kernel tree is not helpful for users. Nobody will compile directly from this repo which is already significantly outdated compared to recent kernel versions and there is no indication if the patches actually work with newer (or older) kernels. We can mention the PWM control as a general concept though. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:32, 12 August 2020 (UTC)<br />
<br />
== Automatic template correction ==<br />
<br />
Per [[Help:Template#Style]], templates should be used with the capitalization shown in the examples in their pages, so {{ic|&#123;{AUR&#124;...}} is correct, while {{ic|&#123;{aur&#124;...}} is not.<br />
<br />
However, there are pages that don't respect that rule (e.g. [[Android_Debug_Bridge]] until recently).<br />
<br />
I beleive this correction should be easy to implement using a bot. What do you think?<br />
<br />
{{unsigned|07:24, 25 August 2020|Relrel}}<br />
<br />
:Yes, this should be easy, but the bot should not make a huge amount of simple style-only changes - they should be combined with corrections for more complex rules. Anyway, there is an idea to create a [https://github.com/lahwaacz/wiki-scripts/issues/22 style linter] for the ArchWiki rules. Would you like to help? ;-) – [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 09:21, 25 August 2020 (UTC)<br />
<br />
== Failed to create tun device ==<br />
<br />
I don't understand your reason for [[https://wiki.archlinux.org/index.php?title=NetworkManager&diff=0&oldid=634880 removing my section in NetworkManager]]. Could you elaborate?--[[User:Egils|Egils]] ([[User talk:Egils|talk]]) 07:40, 11 September 2020 (UTC)<br />
<br />
:You can't use [[systemd-networkd]] and [[NetworkManager]] at the same time. Even if you don't have any ''.network'' file for systemd-networkd, you can't solve NetworkManager's problems with systemd-networkd. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:43, 11 September 2020 (UTC)<br />
<br />
::Ok, thanks, in this case it solved the error I got. Now the VPN works. Do you have an idea about how to solve it without systemd-networkd?--[[User:Egils|Egils]] ([[User talk:Egils|talk]]) 22:27, 11 September 2020 (UTC)<br />
<br />
:::You should really fix the permission problem for {{Pkg|networkmanager-openvpn}}. The tun interface should be managed by OpenVPN which needs rights to create it. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 06:37, 12 September 2020 (UTC)<br />
<br />
::I don't think this statement is entirely correct. [[systemd-networkd]] and [[NetworkManager]] can happily co-exist together if they are managing different interfaces. I unfortunately don't have a reference to point to this, but I came across this being mentioned a couple of times on forums. I personally use [[NetworkManager]] on my laptop to handle wifi, while [[systemd-networkd]] is in control of virtual ethernet and bridges for all my [[systemd-nspawn]] instances. [[User:Romstor|Romstor]] ([[User talk:Romstor|talk]]) 03:24, 12 September 2020 (UTC)<br />
<br />
== [https://wiki.archlinux.org/index.php?title=XDG_Base_Directory&oldid=636526/ XDG Base Directory]: Undo revision 636525 ==<br />
<br />
Dear Lahwaacz,<br />
<br />
maybe my changes were to rushed and from my point of view only. But I have two points to consider:<br />
<br />
# If I put the quotes around my vimrc and source it from my .bash_profile, I get the vim-error E471 (Argument required). Without quotes, this doesn't happen. So this change based on experience.<br />
# The rtp should includes directories, which are needed at runtime. (in plain vim e.g. ~/.vim). This is not a typical configuration directory. My mistake was, that I supposed that everyone put their vim plug-ins in $XDG_DATA_HOME and not in $XDG_CONFIG_HOME, because from my point of view a plug-in doesn't belong to the configuration. Maybe it is a good idea to add a remark, which explains the addition of $XDG_CONFIG_HOME to the rtp.<br />
<br />
[[User:Grrr|Grrr]] ([[User talk:Grrr|talk]]) 13:53, 26 September 2020 (UTC)<br />
<br />
# Quotes are there because $XDG_CONFIG_HOME may contain spaces.<br />
# It's not only about quotes - the runtimepath has subdirectories for color schemes, keymaps, autoload scripts etc.<br />
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:22, 26 September 2020 (UTC)<br />
<br />
== Readability in Wiki ==<br />
<br />
I noticed that you and the other admins and moderators often want sentences to continue endlessly, without line breaks.<br />
For example in the introduction of [[Wayland]].<br />
<br />
I think it would be better to have more seperated sentences, so it is easier to read and "important" information is easier visible for people.<br />
I don't know who is responsible, but maybe some options in MediaWiki (or whatever this wiki software is) could be changed as well, to make make line breaks etc. easier and reduce the height-space (if you know what I mean) between sentences, so it looks better, even though line breaks are used.<br />
<br />
[[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 14:38, 15 October 2020 (UTC) G3ro<br />
<br />
:I don't know exactly what you mean. Is it about the readability of the rendered HTML or the "source code" of the page? -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:15, 15 October 2020 (UTC)<br />
<br />
:: Well I guess it can be about both. But mainly it is about what people see on the page.<br />
:: There are three seperate topics I mentioned:<br />
<br />
:: 1. Use line breaks: I would like to use more line breaks, because if you have long sentences that are written after each other without line breaks, it gets "harder" to recognize when the next sentence starts.<br />
:: While I agree to what you said somewhere, that sentences that belong directly together, should be written in one "paragraph", it would be useful for sentences that cover (slightly) different "topics" to be visibly parted.<br />
<br />
:: 2. Adjust margin options: I notice that when line breaks are used, there is a vertical space added between two sentences. Just like in this post. If you would use line breaks more often, this is a little too much spacing in my oppinion.<br />
<br />
:: 3. Potential options to make line breaks easier: It would be very convenient if a line break in the source code would lead to a line break in displayed text as well, instead of needing to add an empty line.<br />
<br />
:: [[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 20:33, 15 October 2020 (UTC) G3ro<br />
<br />
:::OK, now I understand. I agree that splitting different topics usually improves legibility, but they should be split into separate paragraphs and not just by line breaks (e.g. using the &lt;br> tags). Paragraphs are semantic units whereas line breaks inside a paragraph are usually typographic errors.<br />
:::Also note that such splitting alone may not be enough to improve the text flow. For example, if we consider the intro for [[Wayland]], the second sentence about XWayland would not constitute a good paragraph - it is just a plain statement and the new topic is not nicely introduced. Ideally, you'd split the topic and make some wording changes for the second paragraph.<br />
:::As for the margin options, that is the difference between paragraph splitting and non-semantic line breaks. In my opinion, the styling is correct in this respect, as paragraphs should be discernible. You mentioned that you like line breaks to easily recognize where a sentence ends - but reading should be based on whole paragraphs, not sentences. There should be no reason to skip anything in the middle of a paragraph, otherwise it should be probably split into multiple paragraphs or otherwise rephrased.<br />
:::If you find it hard to follow a long sentence horizontally on a wide screen, we might consider enforcing some maximum width for the whole content. I think the readability would be better, since there would be more top-to-bottom eye movement at the cost of left-to-right-and-back.<br />
:::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:59, 15 October 2020 (UTC)<br />
<br />
== Xorg parentheses ==<br />
<br />
I actually think that X(org) is very useful to imply that it is one and the same thing.<br />
<br />
It might even be more confusing now, as we use both Xorg and X, because the wiki title and the package titles are Xorg.<br />
<br />
[[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 13:30, 17 October 2020 (UTC) G3ro<br />
<br />
:Well the conventions should be established on the [[Xorg]] page, not anywhere else... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:36, 17 October 2020 (UTC)<br />
<br />
:: Imo the conventions are established by upstream and they use a wide variety of X, X.org, X(org), Xorg etc.<br />
:: As I said I always prefer X(org) because then it is clear, that both are same thing.<br />
:: But ultimately it's your decision. <br />
:: [[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 13:43, 17 October 2020 (UTC) G3ro<br />
<br />
:::When upstream is not capable of making a unambiguous decision, it makes sense that other projects pick some option and stick with it wherever they can to keep at least some consistency. So for this wiki, pages should use the same style as the [[Xorg]] page. But feel free to start a discussion about this in [[Talk:Xorg]]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:56, 17 October 2020 (UTC)<br />
<br />
== SSHFS - systemd edit ==<br />
<br />
The edit was removed because "there is no advantage over using fstab entries".<br />
<br />
Is not only about the dis/advantages of the systemd option, is about that it is another possibility to achieve the task, that is why it was created in another level and the fstab section was left alone.<br />
<br />
Reconsider the edit as it presents another option which people can use.<br />
<br />
[[User:Garnica|Garnica]] ([[User talk:Garnica|talk]]) 16:22, 22 October 2020 (UTC)<br />
<br />
:There is no need to use anything else, fstab just works well enough. Configuring mounts with systemd services is not a good idea - it is much more bloated than fstab and not the right tool for it. If anything, a different type of systemd units should be used: {{man|5|systemd.mount}}. But creating the mount units manually is still pretty useless since everything can be configured in fstab and systemd will generate the unit for you. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:22, 22 October 2020 (UTC)<br />
<br />
:: It is about the ability to use the user's .config file and all the proper options that are saved there. Also systemd gives the possibility to use different targets, so the user could mount it when an specific user logs in or when a graphical session starts. I could argue that bad a modification of fstab could lead to a system that doesnt boot, but such poorly configured systemd unit file just fails and the system is fine. Just give the user the information and let it decide what they can use depending on their use case. [[User:Garnica|Garnica]] ([[User talk:Garnica|talk]]) 08:08, 24 October 2020 (UTC)<br />
<br />
:::You can configure systemd targets in fstab using the {{ic|x-systemd.wanted-by}} and {{ic|x-systemd.required-by}} options, there are also {{ic|nofail}} and {{ic|noauto}} options. Please read the {{man|5|systemd.mount}} manual.<br />
:::Using hosts from the user's {{ic|.ssh/config}} is the only thing which is not possible with fstab, but this does not warrant using the wrong tool for the task. Simple copy the full {{ic|user@hostname}} into fstab and you're done.<br />
:::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:47, 24 October 2020 (UTC)<br />
<br />
== [[Self-encrypting drives]] ==<br />
<br />
Hi, I'd like to respectfully disagree with the rollback. It's specific to sedutil that with most commands you need to input /dev/nvme0 (when encrypting the device) but for the sleep commands it requires /dev/nvme0n1 or it fails with a very unspecific error (Error saving the password to the kernel errno = 25), as found out in the discussion https://github.com/Drive-Trust-Alliance/sedutil/issues/90<br />
<br />
All in all I believe that it is important to keep this piece of information which was found out in a long discussion between the reporter and the developers. I ran into it and I believe many people may run into it, considering most of the new SSD will be NVMe. Best, [[User:Przemub|Przemub]] ([[User talk:Przemub|talk]]) 13:34, 28 October 2020 (UTC)<br />
<br />
:OK, then it makes sense. But it should be probably explained before, not in the section about the sleep command. Also please add the link to the note as a reference. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:27, 28 October 2020 (UTC)<br />
<br />
== <s>[[Docker#Installation]], reverted edit</s> ==<br />
<br />
Hi,<br />
<br />
About your reverted edit on the docker page, the first line of the installation section asks the user to verify operation :<br />
: Next [[start]] and enable {{ic|docker.service}} and verify operation:<br />
<br />
: {{bc|# docker info}}<br />
<br />
Except that doing so results in the following :<br />
<br />
{{hc|# docker info|Client:<br />
Debug Mode: false<br />
<br />
Server:<br />
ERROR: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.40/info": dial unix /var/run/docker.sock: connect: permission denied<br />
errors pretty printing info<br />
}}<br />
<br />
the reason for which is only given at the end of the section, after talking about breakage from a simultaneous VPN connection... I know because it happened to me yesterday, and I had to go looking for what went wrong, except that everything was fine, which the output doesn't suggest. Which is why I suggest that the note at the end be brought up a couple of lines. Another option is to change "run docker info" to "run (as root) docker info" <br />
<br />
[[User:Cvlc|Cvlc]] ([[User talk:Cvlc|talk]]) 22:33, 6 November 2020 (UTC)<br />
<br />
:The commands in the [[Docker#Installation]] section are supposed to be run as root, see [[Help:Reading#Regular user or root]]. Did you try to run them as an unprivileged user? -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 23:38, 6 November 2020 (UTC)<br />
:: Yup. I'd never noticed the #/$ difference, thanks for pointing that out ! -- [[User:Cvlc|Cvlc]] ([[User talk:Cvlc|talk]]) 01:36, 7 November 2020 (UTC)<br />
<br />
== Nvidia Installation ==<br />
<br />
The whole guide is unnecessary long and overcomplicated formulated.<br />
Shorter is better, most people will know their graphic card for example, so the determination etc. is only optional.<br />
<br />
[[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 20:21, 10 November 2020 (UTC) G3ro<br />
<br />
:Moving some info to some other page and leaving a tip behind does not make it shorter, but harder to follow. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:36, 10 November 2020 (UTC)<br />
<br />
== Btrfs layout ==<br />
<br />
Hi, Lahwaacz<br />
<br />
Thanks for maintaining [[Snapper]]! However I think the layout is not openSUSE specific and beneficial to all btrfs users. Can you elaborate your reason of undoing the edits? IMO the previous 'simple layout' complicates the rollback procedure.<br />
<br />
Cheers,<br />
[[User:I2Oc9|I2Oc9]] ([[User talk:I2Oc9|talk]]) 07:26, 3 December 2020 (UTC)<br />
<br />
:It is not overcomplicated, it is just doing things right. You can read about that in the forum thread, see the first note in [[Snapper#Suggested filesystem layout]]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:24, 3 December 2020 (UTC)<br />
<br />
::Anyway I've moved the guides to my user page. It's not that I haven't read the 5-year-old forum post, it's that before the current layout I followed that post and resulted in a not fully rolled-back system. That post also sourced (then current) information from openSUSE. openSUSE has since massively overhauled the layout, as I pointed out in an edit you undid earlier.[[User:I2Oc9|I2Oc9]] ([[User talk:I2Oc9|talk]]) 09:02, 3 December 2020 (UTC)<br />
<br />
::Since last message I've extensively documented the new layout at [[User:I2Oc9/Btrfs_subvolumes]] and [[User:I2Oc9/Root_on_Btrfs_with_LUKS_full_disk_encryption]]. Have a look for yourself. Nothing new really, but IMO [[User:I2Oc9/Root_on_Btrfs_with_LUKS_full_disk_encryption#Rollback_/_&_system_recovery|my take]] is much more simpler and complete than the supposedly [[Snapper#Restoring_/_to_a_previous_snapshot_of_@|simpler one]]. That one does not leverage native {{ic|snapper rollback}} or {{Pkg|grub-btrfs}}, among other things. I strongly suggest you try if you have time. [[User:I2Oc9|I2Oc9]] ([[User talk:I2Oc9|talk]]) 11:55, 3 December 2020 (UTC)<br />
<br />
::Actually if you look closely, none of [[User:I2Oc9/Root_on_Btrfs_with_LUKS_full_disk_encryption#Rollback_/_&_system_recovery|my recovery methods]] is specific to [[User:I2Oc9/Btrfs_subvolumes#A_new_kind_of_layout|the new 'complex' layout]], it will work totally fine with the old one. I just don't think moving @ around in live environment is appropriate.<br />
<br />
::On the other hand, the layout recommendation has been updated by openSUSE [https://en.opensuse.org/SDB:BTRFS], why stick with the old one? [[User:I2Oc9|I2Oc9]] ([[User talk:I2Oc9|talk]]) 12:37, 3 December 2020 (UTC)<br />
<br />
:::The main reasons why I reverted your edits on the [[Snapper]] page are: 1) it was a huge change which was not discussed previously as required by [[ArchWiki:Contributing#The 3 fundamental rules]], and 2) it has some elements which do not apply to Arch (see below). If you wish to propose a better layout of the subvolumes, it should be discussed in [[Talk:Snapper]] first. Your user pages would serve as great drafts.<br />
:::Note that the current suggested layout is not ''flat'' in the sense of [[User:I2Oc9/Btrfs subvolumes#Snapper on flatly-installed system subvolume|your section]] - it has a separate subvolume for {{ic|.snapshots}} so it does not lead to the recursive mess. So your proposed layout seemed very similar to the current suggested layout. The real difference is which subvolume gets mounted at {{ic|/}}, but I did not find it explained anywhere on the Snapper page before I reverted the changes (I get it now from your user page). I also did not find a proper documentation of the openSUSE's layout - it seems to be just the product of their installer and the documentation only deals with the result, saying at most that [https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha-snapper.html#sec-snapper-snapshot-boot the subvolume configuration must not be changed] for rollbacks to work.<br />
:::Now the openSUSE-specific elements: some Arch packages actually install software into {{ic|/opt}}, so the recommended layout should not suggest a separate subvolume for this path. Even more importantly, the pacman database is located at {{ic|/var/lib/pacman/local/}} and it must be rolled back along with the system, so there should be no separate subvolume for {{ic|/var}}. Instead, users should be encouraged to create (even nested) subvolumes for specific data directories under {{ic|/var}}, such as {{ic|/var/log}}, {{ic|/var/tmp}}, {{ic|/var/cache/pacman}}, {{ic|/var/lib/machines}}, etc.<br />
:::Finally, the suggested layout should not be GRUB-specific, there should be no recommendations regarding a boot loader. Sure it is useful to include non-trivial tips, but people may actually use a different boot loader.<br />
:::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 09:31, 4 December 2020 (UTC)<br />
<br />
::::Thanks for your detailed reply. I admit that I'm not knowledgeable on the intricate differences between distributions and shouldn't have made the changes without properly discussing them first.<br />
::::Yes, I get that the current layout is not [[User:I2Oc9/Btrfs subvolumes#Snapper on flatly-installed system subvolume|the one described in this section]] and indeed properly separates {{ic|/.snapshot}} and {{ic|/}}. The layout I proposed attempts to add some "niceties" such as supporting multi-distribution installations (complex and unnecessary, I agree) and bring the openSUSE layout here, which is a mistake, as you've pointed out.<br />
::::As for GRUB, since I use LUKS all the time and it's the only bootloader supporting encrypted {{ic|/boot}} on Btrfs on LUKS1, I really didn't think of any other possibilities.<br />
::::I will incorporate your recommendations to my user page and add a new section in [[Talk:Snapper]] pointing to those pages.<br />
::::Cheers -- [[User:S0x9v|S0x9v]] ([[User talk:S0x9v|talk]]) 10:09, 4 December 2020 (UTC)<br />
<br />
:::::I've adopted [[Install_Arch_Linux_on_ZFS#System_datasets|Archlinux Root on ZFS layout]] to [[User:I2Oc9/Root_on_Btrfs_with_LUKS_full_disk_encryption#Create_subvolumes|my proposal]]. [[User:S0x9v|S0x9v]] ([[User talk:S0x9v|talk]]) 10:56, 4 December 2020 (UTC)<br />
<br />
== Reflector Revert ==<br />
<br />
Hi Lahwaacz, about your [https://wiki.archlinux.org/index.php?title=Reflector&oldid=643749 revert], it seems like there's precedence for including AUR packages that replicate the code on the wiki. For example, in [[dash#Relinking /bin/sh]].<br />
<br />
In addition, I believe that there's value for linking the AUR package because it allows a simpler user experience where the AUR package is maintained for them. That way, if it is ever updated, they can easily fetch the update instead of religiously checking the wiki page (which most users probably don't do).<br />
<br />
Thanks!<br />
<br />
[[User:Denton-l|Denton-l]] ([[User talk:Denton-l|talk]]) 01:52, 7 December 2020 (UTC)<br />
<br />
== firefox zoom ==<br />
<br />
"no reason to zoom manually, see HiDPI)" - fractional scaling doesn't work [[User:Ubone|Ubone]] ([[User talk:Ubone|talk]]) 02:38, 26 December 2020 (UTC)<br />
<br />
:That should be explained in [[HiDPI#Firefox]] anyway. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:48, 26 December 2020 (UTC)<br />
<br />
::it's good to have this mentioned somewhere clearly so people know about it before they say "fonts on linux suck" [[User:Ubone|Ubone]] ([[User talk:Ubone|talk]]) 15:51, 29 December 2020 (UTC)<br />
<br />
== <s>Gitlab edits</s> ==<br />
<br />
I've made gitlab working it took me 2 days due to fact that gitlab article is outdated and misguided.<br />
1. There is permission problem which been resolved in manner described, some how other options did not work.<br />
2. I've put information about redis because it does not follow arch practise /run/<appname> and gitlab debugging is hard and time wasting.<br />
<br />
https://wiki.archlinux.org/index.php?title=GitLab&oldid=647716<br />
<br />
https://wiki.archlinux.org/index.php?title=GitLab&oldid=647715<br />
<br />
Please revert changes because it makes article useless for newcomers.<br />
<br />
{{unsigned|09:30, 31 December 2020|Lukaszdh}}<br />
<br />
:As I said in the edit summaries: the directories in {{ic|/etc}} are already owned by {{ic|gitlab}} bacause of how the packages are built - see the links to the PKGBUILDs. As for changing the ownership of files in {{ic|/usr/share}} - that is simply nonsense, everything that gitlab needs to write should go to {{ic|/var/lib/gitlab}} (and it is configured so by default).<br />
:[[GitLab#Redis]] links to [[Redis#Configuration]] which contains everything that is needed. The troubleshooting section is not a shortcut for missed configuration steps.<br />
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 09:39, 31 December 2020 (UTC)<br />
<br />
::The setup gitlab by Your self and check if article is uptodate. I've set it up with 13.6.3-2 (current).<br />
::[[User:Lukaszdh|Lukaszdh]] ([[User talk:Lukaszdh|talk]]) 09:46, 31 December 2020 (UTC)<br />
<br />
:::I see you're not interested in providing useful feedback, so this discussion won't get anywhere. Closing. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 09:56, 31 December 2020 (UTC)<br />
<br />
== <s>Screen Capture formatting</s> ==<br />
<br />
First of all, sorry for the bad edit on this page, I'll try to better respect the conventions in the future<br />
<br />
However I still think that the fact that some methods under [[Screen capture#Wayland#Screensharing]] works only on wlroots based compositor should be mentionned. I could try to refactor the entire section to something like<br />
<br />
3 Wayland<br />
<br />
:3.1 Screensharing<br />
<br />
::3.1.1 Gnome<br />
<br />
:::3.1.1.1 Gnome screencast<br />
<br />
::3.1.2 Wlroot-based compositor<br />
<br />
:::3.1.2.1 Virtual webcam<br />
<br />
:::3.1.2.2 WebRTC<br />
<br />
What do you think of it ?<br />
<br />
Totally unrelated but how am I supposed to format such trees ? Using code blocks or as I did ?<br />
<br />
Thanks for the time you are spending on this<br />
<br />
[[User:Ocisra|Ocisra]] ([[User talk:Ocisra|talk]]) 09:06, 3 January 2021 (UTC)<br />
<br />
:Yes, I think indicating this in the section titles would be better. But 4 levels are probably too deep, it might be better to split the Wayland section into two top-level sections, e.g. "Screenshotting in Wayland" and "Screensharing in Wayland" or something like that. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:20, 3 January 2021 (UTC)<br />
<br />
::OK, I'm proposing something in [[Talk:Screen capture|the talk page]] for anyone to comment or suggest modifications on it and I'll refactor the Wayland part later this week -- [[User:Ocisra|Ocisra]] ([[User talk:Ocisra|talk]]) 10:44, 3 January 2021 (UTC)<br />
<br />
:::Nice, thanks. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 12:37, 3 January 2021 (UTC)<br />
<br />
== Intel GVT-g edits ==<br />
<br />
Hello Lahwaacz,<br />
<br />
I have noticed that you reverted one of the edits I have performed on [[Intel_GVT-g]].<br />
<br />
About this revert: [https://wiki.archlinux.org/index.php?title=Intel_GVT-g&oldid=648062 Windows problems are out of scope]<br />
<br />
While I understand that the ArchWiki is about ArchLinux, this article in particular mentions Windows in the introduction, and already includes another troubleshooting point about Windows. The issue I have encountered with the black bars is somewhat common, as I have found other people discussing it online, and I really fail to see why not including this piece of information in this article would be better than including it.<br />
<br />
Please, let me know your thoughts. If you think that the point can be improved, I will be happy to do that.<br />
<br />
Ciao,<br />
<br />
[[User:Wilcomir|Wilcomir]] ([[User talk:Wilcomir|talk]]) 09:14, 3 January 2021 (UTC)<br />
<br />
:Well, the existing section about a Windows problem is actually solved by configuring the Linux host. I think anything involving configuration or installation of programs in Windows is not appropriate for long troubleshooting sections. At most, they could be mentioned in a short reference to other sites which describe the problem in detail. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:34, 3 January 2021 (UTC)<br />
<br />
== <s>XBOOTLDR</s> ==<br />
<br />
Hello Lahwaacz, you have reverted my edit in the XBOOTLDR section on [[Systemd-boot]].<br />
<br />
It is true that XBOOTLDR is not part of the UEFI specification but systemd-boot relies on the UEFI implementation of the device to read the ESP and additional XBOOTLDR partitions. The UEFI provides the filesystem driver (typically VFAT) and loads/mounts partitions on boot. Some UEFI implementations do not load all VFAT partitions on a storage device during fastboot. systemd-boot then cannot find additional boot entries specified by with XBOOTLDR. For example my device (Lenovo T14 Gen 1) does this. I've seen other users with similiar issues: [https://wiki.archlinux.org/index.php/Talk:Lenovo_IdeaPad_5_15are05].<br />
<br />
I think this is useful information, can we undo the revert? Thanks!<br />
<br />
[[User:0xFelix|0xFelix]] ([[User talk:0xFelix|talk]]) 19:26, 7 January 2021 (UTC)<br />
<br />
:OK, I've added it back with a different/more general wording. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:02, 9 January 2021 (UTC)<br />
<br />
== XDG configuration for Vim ==<br />
<br />
Hi Lahwaacz,<br />
<br />
You have reverted the updated Notes for Vim on [[XDG Base Directory]], because "copy-pasted from a blog post".<br />
<br />
The problem is, not only is the configuration presented currently also copied from a blog post too, but is already 10 years old.<br />
<br />
Would it be OK, if we bring back the more up to date version? Or at least remove the obsolete one and leave link to newer?<br><br />
(Although I think a copy on wiki would be beneficial in case my blog ceases to exist)<br />
<br />
[[User:Jorengarenar|Jorengarenar]] ([[User talk:Jorengarenar|talk]]) 02:05, 12 January 2021 (UTC)<br />
<br />
== Categorization of Wayland Compositors related to Comparison of Tiling Window Managers edit ==<br />
<br />
Hi, last Sunday, you edited the [https://wiki.archlinux.org/index.php?title=Comparison_of_tiling_window_managers&diff=next&oldid=649129 Comparison of tiling window mangers page]<br />
removing all Wayland compositors from the list. I understand that<br />
Wayland compositors are not window managers. However, for instance the<br />
Sway wiki page is listed under the category of "tiling WMs" and Velox<br />
under the category "Dynamic WMs".<br />
<br />
Would you support adding a new category:tiling Wayland compositors<br />
(which, admittedly, would be a very small category) or should we only<br />
be categorized as a graphical user interface and listed in<br />
[[Wayland#Tiling]]. Alternatively, Sway<br />
and Cagebreak could be left in the category "tiling WMs" since it is the<br />
closest categorization the wiki offers. In any case, I feel it would be<br />
useful to have a table or list giving an overview of the features of the<br />
different compositors/WMs. The benefit of having a single table for both<br />
compositors and WMs would be that more comparisons could be made and<br />
that the benefits/drawbacks of switching from Xorg to Wayland could be<br />
better assessed. Nevertheless, as you correctly pointed out, this would<br />
require a renaming/broadening of the category. What do you think? Do you<br />
propose a different course of action? Should I raise a discussion on the<br />
talk page of the article?<br />
<br />
[[User:Project-repo|Project-repo]] ([[User talk:Project-repo|talk]]) 11:34, 19 January 2021 (UTC)<br />
<br />
:I think whatever new comparison should first appear on the [[Wayland]] page, so that people can see how it looks and discuss it on the talk page. When there is a comprehensive comparison of wayland compositors, it can be moved elsewhere (e.g. to a new page) if needed.<br />
:As for window managers vs Wayland compositors, I think they are two incomparable categories. Usually people choose either X or Wayland and then look for a suitable window manager or compositor. It makes sense to mention counterparts from the other category (like i3 and Sway), but Wayland compositors can't compete with window managers in any comparison and vice versa.<br />
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 18:46, 19 January 2021 (UTC)<br />
<br />
::Thank you, I will think about useful comparisons of wayland compositors and discuss any such plans on the [[Wayland]] talk page. It is difficult for me to simply create an entire comparison because I don't have much experience with most of the wayland compositors.<br />
<br />
::Do you have any opinions regarding the wiki category for articles about wayland compositors like cagebreak or sway? They are currently categorized as tiling and dynamic WMs, which, as you pointed out, does not quite fit the WM part of the category. I tried to trace the tree of categories upwards and the first non-x-related category is "graphical user interfaces" which seems unreasonably broad. Alternatively, one might add new categories like wayland and wayland compositor.<br />
::[[User:Project-repo|Project-repo]] ([[User talk:Project-repo|talk]]) 19:54, 19 January 2021 (UTC)<br />
<br />
:::You can use [[Template:Expansion]] to indicate that some section or table is incomplete. As for the categories, I'd either move the pages to [[:Category:Graphical user interfaces]] or create a new category for [[:Category:Wayland compositors|Wayland compositors]]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:15, 19 January 2021 (UTC)<br />
<br />
== Root on ZFS draft ==<br />
<br />
Hi, I submitted [https://github.com/openzfs/openzfs-docs/pull/104 a Root on ZFS draft] to official doc repo.<br />
<br />
In the draft, the following directories are separated from root filesystem:<br />
home,root,srv,usr/local,var/log,var/spool,var/tmp<br />
<br />
Is this appropriate for Arch Linux? Or do you have any suggestion on the draft?<br />
Any comment is appreciated.<br />
[[User:M0p|M0p]] ([[User talk:M0p|talk]]) 01:28, 23 January 2021 (UTC)<br />
<br />
== Re: undo GRUB - Common installation errors ==<br />
<br />
Concerning your undo of [https://wiki.archlinux.org/index.php?title=GRUB&diff=next&oldid=649799 Add the error message `Could not prepare Boot variable: No space left on device`)]<br />
Is there a better place to for this Information? One can find the solution in various forums, but I thought it could be helpful to have it in this wiki somewhere. [[User:ModProg|ModProg]] ([[User talk:ModProg|talk]]) 12:51, 25 January 2021 (UTC)<br />
<br />
:The error message is not specific to the {{ic|/sys/fs/pstore/}} filesystem (which does not even seem to be used by default on Arch...) Where did you find that? -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:16, 25 January 2021 (UTC)<br />
<br />
::I did not find anything Arch specific, but this post about Debian helped: [https://donjajo.com/fix-grub-efibootmgr-not-set-variable-no-space-left-device/ Post]. I also found something about [https://askubuntu.com/questions/1072618/could-not-prepare-boot-variable-no-space-left-on-device-grub-install-error-ef /sys/fs/efi/efivars/dump-*] The problem is that the actual efi-partition does not seam to be the problem, there is more than 70% space left. If there is better information to guide the user in the right direction that wuld be more helpful. This is what I found worked, but I admit that I don't know much about how grub operates. [[User:ModProg|ModProg]] ([[User talk:ModProg|talk]]) 16:20, 25 January 2021 (UTC)<br />
<br />
:::This wiki ''is'' Arch specific so old posts about Debian or Ubuntu do not apply. Even if they did, this is hardly a ''common'' installation problem. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:29, 26 January 2021 (UTC)<br />
<br />
::::I know that, and would not have put it there if it didn't occur on my Arch Linux installation. If this is something that should not be documented in this wiki, I understand that. Is there any other place you would recommend? An issue for grub-install maybe? [[User:ModProg|ModProg]] ([[User talk:ModProg|talk]]) 22:24, 26 January 2021 (UTC)<br />
<br />
== References ==<br />
<br />
Hi - on [[Systemd-networkd#Speeding up TCP slow-start]] you asked for some references, but it appears the Cite extension is not available on this wiki so when I use <nowiki><cite/></nowiki> tags they don't summarise the way references do on other wikis. Can you advise what you meant by references in this case, if this wiki does not support the usual MediaWiki-style references? I've had a look around at some other random pages but none of them seem to have any inline references like this. Thanks! -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 08:21, 29 January 2021 (UTC)<br />
<br />
:Use just plain links... [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:39, 29 January 2021 (UTC)<br />
<br />
:: Done. Not sure I like the look of it but feel free to adjust it if you meant something different. -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 11:03, 29 January 2021 (UTC)<br />
<br />
== Re: Undo of Automatic configuration using udev ==<br />
<br />
Regarding [https://wiki.archlinux.org/index.php?title=Wacom_tablet&oldid=632194]. You remove almost two thousand lines without ever contacting the editor (me) and asking for a fix (or at least giving a heads-up). Do you really think this is how the "communication" within community should work? I must say this is very "encouraging" too and would certainly motivate my edits in this wiki. [[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 11:33, 4 February 2021 (UTC)</div>Jose1711https://wiki.archlinux.org/index.php?title=PipeWire&diff=634597PipeWire2020-09-07T15:05:35Z<p>Jose1711: add link to pipewire status (as of september 2020)</p>
<hr />
<div>[[Category:Multimedia]]<br />
[[ja:PipeWire]]<br />
[http://pipewire.org PipeWire] is a rather new multimedia framework by GNOME. The main developer is Wim Taymans.<br />
<br />
PipeWire supports containers like [[Flatpak]] and does not rely on [[user group]]s ''audio'' and ''video'', but rather uses a PolKit-like security model asking Flatpak or Wayland for permission to record screen or audio.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{pkg|pipewire}}, {{pkg|pipewire-pulse}} (and optionally {{pkg|pipewire-jack}} and {{pkg|pipewire-docs}}) packages from the official repositories or the {{aur|pipewire-git}} package from the [[AUR]].<br />
<br />
The package installs systemd unit files for the service itself and automatic socket activation (which means it will autostart).<br />
<br />
systemctl --user status pipewire.socket<br />
systemctl --user status pipewire.service<br />
<br />
== Usage ==<br />
<br />
=== WebRTC screen sharing ===<br />
<br />
Most browsers used to rely on X11 for capturing the desktop (or apps) when using WebRTC (e.g. on google Hangouts); because Gnome shell uses Wayland by default on Arch when started by GDM, desktop sharing is basically broken, but pipewire is going to provide support for this usecase under Wayland.<br />
<br />
This requires [http://jgrulich.cz/2018/07/04/how-to-enable-and-use-screen-sharing-on-wayland Pipewire and xdg-desktop-portal to be installed]; Firefox 68 [https://bugzilla.mozilla.org/show_bug.cgi?id=1496359 will support PipeWire with a custom patch from fedora], and on Chromium (73+) you need to enable [https://bugs.chromium.org/p/chromium/issues/detail?id=682122 WebRTC PipeWire support] the following url in a chromium tab:<br />
chrome://flags/#enable-webrtc-pipewire-capturer<br />
<br />
Note that since Chrome(ium) is currently using pipewire 0.2 whereas Arch ships pipewire 0.3, you also need to install {{Pkg|libpipewire02}} for screen sharing to work.<br />
<br />
{{Warning|Since [https://github.com/flatpak/xdg-desktop-portal-gtk/pull/225 this pull request] was merged following note about specific app/window sharing may be not correct anymore}}<br />
<br />
Note that the only supported feature is sharing the entire desktop and not a specific app/window due to [https://github.com/flatpak/xdg-desktop-portal-gtk/issues/204 missing implementation in xdg-desktop-portal].<br />
<br />
=== Video ===<br />
<br />
Although the software is not yet production ready, it is safe to play around with. Most application that rely on [[GStreamer]] to handle e.g. video streams should work out-of-the-box due to the PipeWire GStreamer plugin. Applications like e.g. {{pkg|cheese}} are therefore already able to share video input using it.<br />
<br />
=== Audio (JACK) ===<br />
<br />
Support for the JACK API on top of PipeWire is implemented and first applications relying on said interface are working in a test environment. Through that work one is able to achieve the low latency needed for pro-audio with PipeWire.<br />
<br />
A detailed description of how to enable and use it can be found [https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/JACK here].<br />
<br />
=== ALSA/Legacy applications ===<br />
<br />
Work on ALSA emulation is ongoing but first working code exists.<br />
<br />
=== Bluetooth ===<br />
<br />
PipeWire provides a bluetooth module that integrates directly into the Bluez Bluetooth framework. Pairing and management hence works the same since it is handled by higher level interfaces.<br />
<br />
=== Drop-in replacement for PulseAudio/Jack (Experimental) ===<br />
<br />
PipeWire provides ABI-compatible library for PulseAudio and JACK clients.<br />
<br />
To use PipeWire as a drop-in replacement, install {{aur|pipewire-pulse-dropin}} for PulseAudio and {{aur|pipewire-jack-dropin}} for JACK. It is recommended to reboot after installing to make sure applications use the PipeWire libraries, not PulseAudio/JACK ones.<br />
<br />
To check if the replacement is working, run the following command and see the output:<br />
<br />
{{hc|1=$ pactl info|2=<br />
Server String: pipewire-0<br />
...<br />
}}<br />
<br />
See [https://blogs.gnome.org/uraeus/2020/09/04/pipewire-late-summer-update-2020/ this blog entry] for more information on testing PipeWire.<br />
<br />
== See also ==<br />
<br />
* [https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/home Wiki] — PipeWire Wiki on Freedesktop GitLab<br />
* [https://blogs.gnome.org/uraeus/2018/01/26/an-update-on-pipewire-the-multimedia-revolution-an-update/ Pipewire Update Blog Post] — Blog post from January 2018 outlining the state of PipeWire at the time<br />
* [https://blogs.gnome.org/uraeus/2020/09/04/pipewire-late-summer-update-2020/ PipeWire Late Summer Update 2020] — Blog post from September 2020</div>Jose1711https://wiki.archlinux.org/index.php?title=Graphics_tablet&diff=617649Graphics tablet2020-06-01T22:23:02Z<p>Jose1711: add instructions how to configure tablet automatically by using udev + systemd</p>
<hr />
<div>[[Category:Input devices]]<br />
[[ja:Wacom タブレット]]<br />
[[zh-hans:Wacom tablet]]<br />
[[Wikipedia:Wacom (company)|Wacom]] does not officially support Linux. Linux support is provided by the [https://linuxwacom.github.io/ Linux Wacom Project]. Supported devices are listed on the [https://github.com/linuxwacom/input-wacom/wiki/Device-IDs Device IDs] page with a version number in the ''input-wacom'' column.<br />
<br />
== Installation ==<br />
<br />
The Arch Linux [[kernels]] include the [https://github.com/linuxwacom/input-wacom input-wacom] driver.<br />
<br />
Ensure your kernel recognizes your tablet. Connect your tablet via USB or [[Bluetooth]]. It should show up in {{ic|dmesg {{!}} grep -i wacom}} and be listed in {{ic|/proc/bus/input/devices}} (and if you use USB in the {{ic|lsusb}} output). If it does not, your only chance is that your tablet is supported by a more recent driver than the one in your kernel. In that case [[install]] the {{AUR|input-wacom-dkms}} package.<br />
<br />
[[Install]] the [[X]] driver, {{Pkg|xf86-input-wacom}}, and restart X so the new [[udev]] rules take effect.<br />
<br />
The command {{ic|xsetwacom list devices}} should now list some devices. If it does not, see [[#Manual setup]].<br />
<br />
The {{Pkg|kcm-wacomtablet}} package provides a [[KDE]] graphical user interface for tablet configuration and supports tablet-specific profiles and hotplugging.<br />
<br />
Support for the following Wacom tablets is provided via {{AUR|tuhi-git}}:<br />
* Bamboo Spark<br />
* Bamboo Slate<br />
* Intuos Pro Paper<br />
<br />
Consult README for the details of initial configuration. For setups with more than one monitor you'll probably want to fix aspect ratio using {{ic|Coordinate Transformation Matrix}} as described at [https://github.com/linuxwacom/xf86-input-wacom/wiki/Dual-and-Multi-Monitor-Set-Up dual and multimonitor set up].<br />
<br />
== Configuration ==<br />
<br />
The Xorg driver can be temporarily configured with {{ic|xsetwacom}}, see {{man|1|xsetwacom}}. Changes are lost after X server restarts or replugging your tablet.<br />
<br />
List the available devices:<br />
<br />
{{hc|$ xsetwacom list devices|<br />
Wacom Bamboo 16FG 4x5 Finger touch id: 12 type: TOUCH<br />
Wacom Bamboo 16FG 4x5 Finger pad id: 13 type: PAD <br />
Wacom Bamboo 16FG 4x5 Pen stylus id: 17 type: STYLUS <br />
Wacom Bamboo 16FG 4x5 Pen eraser id: 18 type: ERASER<br />
}}<br />
<br />
For the {{ic|get}} and {{ic|set}} commands, devices can be specified by name or id. Scripts should use names because ids can change after X server restarts or replugging.<br />
<br />
=== Permanent configuration ===<br />
<br />
{{Note|Because ''xorg.conf'' lacks options ''xsetwacom'' has and only lets you map buttons to mouse buttons, you may want to [[autostart]] a script with ''xsetwacom'' commands instead of using ''xorg.conf''.}}<br />
<br />
Configuration can be made persistent in [[xorg.conf]] and {{man|5|xorg.conf}}.<br />
<br />
You firstly need to find out your product names:<br />
<br />
{{hc|$ grep "Using input driver 'wacom'" /var/log/Xorg.0.log|<br />
[ 25059.351] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen'<br />
[ 25059.409] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pad'<br />
[ 25059.428] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen eraser'<br />
[ 25059.429] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen cursor'<br />
}}<br />
<br />
For these product names the sections would be:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/72-wacom-options.conf|<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS pen"<br />
MatchDriver "wacom"<br />
MatchProduct "Pen"<br />
NoMatchProduct "eraser"<br />
NoMatchProduct "cursor"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS pad"<br />
MatchDriver "wacom"<br />
MatchProduct "Pad"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS eraser"<br />
MatchDriver "wacom"<br />
MatchProduct "eraser"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS cursor"<br />
MatchDriver "wacom"<br />
MatchProduct "cursor"<br />
EndSection<br />
}}<br />
<br />
* The options described in {{man|4|wacom}} can be added to sections.<br />
* The product name needs to contain the {{ic|MatchProduct}} value in order for a section to match. Matching of parent devices requires negative matching.<br />
* The {{ic|Identifier}} can be arbitrary and is printed into the Xorg log when the section matches. Giving your identifiers a common prefix lets you easily [[grep]] for what sections were matched: {{bc|grep "WACOM OPT" /var/log/Xorg.0.log}}<br />
* Configuration changes require a X server restart to take effect.<br />
<br />
{{Note|''xorg.conf'' options can differ from ''xsetwacom'' options.}}<br />
<br />
''xsetwacom'' can try to print all current settings of a device in ''xorg.conf'' format with:<br />
<br />
$ xsetwacom get ''device'' all<br />
<br />
=== Remapping buttons ===<br />
<br />
The X driver lets you remap the buttons on tablets and pens. Buttons are identified by numbers. Tablet buttons start at 1, pen buttons start at 2 (1 is the tip contact event). By default the X driver maps button ''M'' to mouse button ''M''. Because X uses buttons 4-7 as the four scrolling directions, physical buttons 4 and higher are mapped to mouse buttons 8 and higher by default. While ''xorg.conf'' uses the actual button numbers and only lets you map to mouse buttons, ''xsetwacom'' uses the translated mouse button numbers and allows mapping to multiple keycodes (but not keysyms).<br />
<br />
If you have not yet remapped your buttons you can easily identify their ids with {{Pkg|xorg-xev}}, by running the following command, placing the mouse cursor on the created window and pressing a button:<br />
<br />
{{hc|$ xev -event button|<br />
Outer window is 0x1a00001, inner window is 0x1a00002<br />
<br />
ButtonPress event, serial 25, synthetic NO, window 0x1a00001,<br />
root 0x2a0, subw 0x0, time 3390669, (404,422), root:(1047,444),<br />
state 0x0, button 8, same_screen YES<br />
}}<br />
<br />
In this case the button number for ''xsetwacom'' is 8 and the actual button number for ''xorg.conf'' is 4.<br />
<br />
Alternatively, if you want an overview of your tablet's button layout you can look at your tablet's layout SVG. Firstly, find out the filename with a recursive [[grep]] search for the tablet name reported by {{ic|xsetwacom list devices}}:<br />
<br />
{{hc|$ grep -rl 'Wacom Bamboo 16FG 4x5' /usr/share/libwacom/*.tablet|2=<br />
/usr/share/libwacom/bamboo-16fg-s-t.tablet<br />
}}<br />
<br />
In this case the respective layout SVG is {{ic|/usr/share/libwacom/layouts/bamboo-16fg-s-t.svg}}. The letters in the SVG correspond to the button numbers: A=1, B=2, C=3, ...<br />
<br />
==== Mapping pad buttons to function keys ====<br />
<br />
If you want to bind your tablet buttons to different shortcuts in different applications, you may want to map your tablet buttons to function keys because applications generally do not let you bind keyboard shortcuts to mouse buttons.<br />
<br />
Firstly, map the pad buttons to mouse buttons 11 and higher so that you can distinguish them from regular mouse buttons. For example:<br />
<br />
xsetwacom set ''pad'' Button 1 11<br />
xsetwacom set ''pad'' Button 2 12<br />
...<br />
<br />
Then map the mouse buttons to the function keys. This can be done with [[xbindkeys]] and [[xdotool]] by adding an entry like the following for every pad to your {{ic|~/.xbindkeysrc}}:<br />
<br />
"xdotool key F21"<br />
b:11<br />
<br />
"xdotool key F22"<br />
b:12<br />
...<br />
<br />
==== The syntax ====<br />
<br />
The syntax of {{ic|xsetwacom}} is flexible but not very well documented. The general mapping syntax (extracted from the source code) for xsetwacom 0.17.0 is the following.<br />
<br />
KEYWORD [ARGS...] [KEYWORD [ARGS...] ...]<br />
<br />
KEYWORD + ARGS:<br />
key [+,-]KEY [[+,-]KEY ...] where +:key down, -:key up, no prefix:down and up<br />
button BUTTON [BUTTON ...] (1=left,2=middle,3=right mouse button, 4/5 scroll mouse wheel)<br />
modetoggle toggle absolute/relative tablet mode <br />
displaytoggle toggle cursor movement among all displays which include individual screens<br />
plus the whole desktop for the selected tool if it is not a pad.<br />
When the tool is a pad, the function applies to all tools that are asssociated<br />
with the tablet<br />
<br />
BUTTON: button ID as integer number<br />
<br />
KEY: MODIFIER, SPECIALKEY or ASCIIKEY<br />
MODIFIER: (each can be prefix with an '''l''' or an '''r''' for the left/right modifier (no prefix = left)<br />
ctrl=ctl=control, meta, alt, shift, super, hyper<br />
SPECIALKEY: f1-f35, esc=Esc, up,down,left,right, backspace=Backspace, tab, PgUp,PgDn<br />
ASCIIKEY: (usual characters the key produces, e.g. a,b,c,1,2,3 etc.)<br />
<br />
==== Some examples ====<br />
<br />
$ xsetwacom set ''pad'' Button 1 3 # right mouse button<br />
$ xsetwacom set ''pad'' Button 1 "key +ctrl z -ctrl"<br />
$ xsetwacom get ''pad'' Button 1<br />
key +Control_L +z -z -Control_L<br />
$ xsetwacom set ''pad'' Button 1 "key +shift button 1 key -shift"<br />
<br />
Even little macros are possible:<br />
<br />
$ xsetwacom set ''pad'' Button 1 "key +shift h -shift e l l o"<br />
<br />
==== Automatic configuration using udev ====<br />
<br />
The original hint/workaround to configure buttons, adjust aspect ratio or tune other parameters after plugging in was to add {{ic|sleep 1}} at the beginning of the script. This never worked for me so here's a little more elaborate solution based on this [https://unix.stackexchange.com/questions/65788/why-doesnt-xsetwacom-work-from-udev link]. This example has been successfully tested on Gnome but may work in other desktop environments without modifications.<br />
<br />
{{hc|$ lsusb {{!}} grep Wacom|<br />
Bus 003 Device 007: ID 056a:0374 Wacom Co., Ltd CTL-4100 [Intuos (S)]<br />
}}<br />
<br />
{{hc|$ id -u|<br />
1000<br />
}}<br />
<br />
{{hc|head=/etc/udev/rules.d/99-wacom.rules|output=# modify uid (1000) and vendor/product id accordingly<br />
ACTION=="add",SUBSYSTEM=="usb", ATTRS{idVendor}=="056a", ENV{XAUTHORITY}="/run/user/1000/gdm/Xauthority", TAG+="systemd"<br />
ACTION=="remove",SUBSYSTEM=="usb", ENV{PRODUCT}=="56a/374/*", ENV{XAUTHORITY}="/run/user/1000/gdm/Xauthority", TAG+="systemd"<br />
}}<br />
<br />
{{hc|head=~/.config/systemd/user/wacom.service|output=[Unit]<br />
After=graphical.target<br />
<br />
[Service]<br />
Type=forking<br />
Restart=no<br />
ExecStart=/path/to/wacom_set.sh<br />
<br />
[Install]<br />
WantedBy=default.target<br />
# use udevadm monitor and replug the device to set this parameter correctly<br />
WantedBy=sys-devices-pci0000\:00-0000\:00\:1e.0-0000\:05\:01.2-usb3-3\\x2d2-3\\x2d2.2-3\\x2d2.2.2.device<br />
}}<br />
<br />
{{hc|head=wacom_set.sh|output=#!/bin/bash<br />
for i in $(seq 30)<br />
do<br />
systemctl --user is-active graphical-session.target {{!}} grep -q ^active<br />
if [ $? -eq 0 ]<br />
then<br />
break<br />
fi<br />
sleep 1<br />
done<br />
<br />
systemctl --user is-active graphical-session.target {{!}} grep -q ^active<br />
if [ $? -ne 0 ]<br />
then<br />
echo "Timeout - graphical session not active, trying to ignore this fact"<br />
fi<br />
<br />
export DISPLAY=:$(ls -1 /tmp/.X11-unix {{!}} tr -d 'X' {{!}} sort -nrk 1 {{!}} head -1)<br />
<br />
for i in $(seq 10)<br />
do<br />
xsetwacom list devices {{!}} grep -q Wacom<br />
if [ $? -eq 0 ]<br />
then<br />
break<br />
fi<br />
sleep 1<br />
done<br />
<br />
list=$(xsetwacom list devices)<br />
pad=$(echo "${list}" {{!}} awk '/pad/{print $7}')<br />
stylus=$(echo "${list}" {{!}} xsetwacom list devices {{!}} awk '/stylus/{print $7}')<br />
<br />
if [ -z "${pad}" ]<br />
then<br />
notify-send "Timeout - tablet not found"<br />
exit 0<br />
fi<br />
<br />
# disable buttons on stylus<br />
xsetwacom set "${stylus}" Button 2 11<br />
xsetwacom set "${stylus}" Button 3 11<br />
<br />
# set buttons on stylus<br />
xsetwacom set ${stylus} "Button" 2 "key plus"<br />
xsetwacom set ${stylus} "Button" 3 "key minus"<br />
..<br />
notify-send "Tablet found and configured"<br />
}}<br />
<br />
{{ic|$ systemctl --user enable wacom<br />
}}<br />
<br />
<br />
==== Execute custom commands ====<br />
<br />
{{Style|Duplicates [[Xbindkeys]]. There are alternatives to xbindkeys.}}<br />
<br />
Mapping custom commands to the buttons is a little bit tricky but actually very simple. First, install [[xbindkeys]].<br />
<br />
To get well defined button codes add the following to your permanent configuration file, e.g. {{ic|/etc/X11/xorg.conf.d/52-wacom-options.conf}} in the InputClass section of your '''pad''' device. Map the tablet's buttons to some unused button ids.<br />
<br />
# Setting up buttons (preferably choose the correct button order, so the topmost key is mapped to 10 and so on)<br />
Option "Button1" "10"<br />
Option "Button2" "11"<br />
Option "Button3" "12"<br />
Option "Button4" "13"<br />
<br />
Then restart your ''Xorg'' server and verify the buttons using {{ic|xev}} or {{ic|xbindkeys -mk}}.<br />
<br />
Now set up your xbindkeys configuration, if you do not already have one you might want to create a default configuration<br />
<br />
$ xbindkeys --defaults > ~/.xbindkeysrc<br />
<br />
Then add your custom key mapping to {{ic|~/.xbindkeysrc}}, for example<br />
<br />
"firefox"<br />
m:0x10 + b:10 (mouse)<br />
"xterm"<br />
m:0x10 + b:11 (mouse)<br />
"xdotool key ctrl-z"<br />
m:0x10 + b:12 (mouse)<br />
"send-notify Test "No need for escaping the quotes""<br />
m:0x10 + b:13 (mouse)<br />
<br />
=== Adjusting aspect ratios ===<br />
<br />
Drawing areas of tablets are generally more square than the usual widescreen display with a 16:9 aspect ratio, leading to a slight vertical compression of your input. To resolve such an aspect ratio mismatch you need to compromise by either reducing the drawing area height (called ''Force Proportions'' on Windows) or reducing the screen area width. The former wastes drawing area and the latter prevents you from reaching the right edge of your screen with your Stylus. It is probably still a compromise worth to be made because it prevents your strokes from being skewed.<br />
<br />
Find out your tablet's resolution by running:<br />
<br />
$ xsetwacom get ''stylus'' Area<br />
<br />
==== Reducing the drawing area height ====<br />
<br />
Run:<br />
<br />
$ xsetwacom set ''stylus'' Area 0 0 ''tablet_width'' ''height''<br />
<br />
where ''height'' is ''tablet_width * screen_height / screen_width''.<br />
<br />
The tablet resolution can be reset back to the default using:<br />
<br />
$ xsetwacom set ''stylus'' ResetArea<br />
<br />
==== Reducing the screen area width ====<br />
<br />
Run:<br />
<br />
$ xsetwacom set ''stylus'' MapToOutput ''WIDTH''x''SCREEN_HEIGHT''+0+0<br />
<br />
where ''WIDTH'' is ''screen_height * tablet_width / tablet_height''.<br />
<br />
=== LEDs ===<br />
<br />
See the [https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-driver-wacom sysfs-driver-wacom] documentation. To make changes without requiring root permissions you will likely want to create a [[udev]] rule like so:<br />
<br />
{{hc|/etc/udev/rules.d/99-wacom.rules|<nowiki><br />
# Give the users group permissions to set Wacom device LEDs.<br />
ACTION=="add", SUBSYSTEM=="hid", DRIVERS=="wacom", RUN+="/usr/bin/sh -c 'chown :users /sys/%p/wacom_led/*'"<br />
</nowiki>}}<br />
<br />
Setting the Intuos OLEDs can be done using {{AUR|i4oled}} from the AUR.<br />
<br />
=== TwinView setup ===<br />
<br />
If you are going to use two monitors the aspect ratio while using the tablet might feel unnatural. In order to fix this you need to add:<br />
<br />
Option "TwinView" "horizontal"<br />
<br />
to all of your Wacom-InputDevice entries in the ''xorg.conf'' file. You may read more about that [http://ubuntuforums.org/showthread.php?t=640898 here].{{Dead link|2018|09|05}}<br />
<br />
==== Temporary TwinView setup ====<br />
<br />
For temporary mapping of a Wacom device to a single display ''while preserving the aspect ratio'', [https://gist.github.com/Quackmatic/6c19fe907945d735c045 this script]{{Dead link|2020|04|03|status=404}} may be used. This will letter-box the surface area of the device as required to ensure the input is not stretched on the display. This script may be executed in your {{ic|.xinitrc}} file for it to automatically run.<br />
<br />
=== xrandr setup ===<br />
<br />
{{Style|Wording can be improved, personal writing style.}}<br />
<br />
[[xrandr]] sets two monitors as one big screen, mapping the tablet to the whole virtual screen and deforming aspect ratio. For a solution see this thread: [https://bbs.archlinux.org/viewtopic.php?pid=797617 Arch Linux forum].<br />
<br />
If you just want to map the tablet to one of your screens, first find out what the screens are called:<br />
<br />
$ xrandr<br />
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384<br />
HDMI-0 disconnected (normal left inverted right x axis y axis)<br />
DVI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
VGA-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
<br />
Then you need to know what is the ID of your tablet.<br />
<br />
$ xsetwacom list devices<br />
WALTOP International Corp. Slim Tablet stylus id: 12 type: STYLUS<br />
<br />
In my case I want to map the tablet (ID: 12) to the screen on the right, which is ''VGA-0''. I can do that with this command<br />
<br />
$ xsetwacom set 12 MapToOutput VGA-0<br />
<br />
This should work immediately, no root necessary.<br />
<br />
Should this fail when using the NVIDIA binary driver, using ''HEAD-0'', ''HEAD-1'' and so on to refer to the monitors may work.<br />
<br />
If xsetwacom replies with "Unable to find an output ..." an X11 geometry string of the form {{ic|WIDTHxHEIGHT+X+Y}} can be specified instead of the screen identifier. In this example<br />
<br />
$ xsetwacom set 12 MapToOutput 1920x1080+1920+0<br />
<br />
should also map the tablet to the screen on the right.<br />
<br />
Alternatively, you can use [https://bitbucket.org/denilsonsa/small_scripts/src/3380435f92646190f860b87f566a39d0e215034c/xsetwacom_my_preferences.sh?at=default this bash script] to quickly map the tablet to one of your screens (or the entire desktop) and fix the aspect ratio.<br />
<br />
In case ''xsetwacom'' does not work, you can try ''xinput''.<br />
<br />
First, you need to find your tablet's ID.<br />
<br />
$ xinput list<br />
<br />
In my case, the output is:<br />
<br />
⎡ Virtual core pointer id=2 [master pointer (3)]<br />
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Finger id=11 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Pad id=12 [slave pointer (2)]<br />
⎜ ↳ USB Keyboard id=14 [slave pointer (2)]<br />
⎜ ↳ SynPS/2 Synaptics TouchPad id=16 [slave pointer (2)]<br />
⎜ ↳ TPPS/2 IBM TrackPoint id=17 [slave pointer (2)]<br />
⎜ ↳ SteelSeries Kinzu V2 Gaming Mouse id=9 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Pen Pen (0x6281780c) id=20 [slave pointer (2)]<br />
⎣ Virtual core keyboard id=3 [master keyboard (2)]<br />
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]<br />
↳ Power Button id=6 [slave keyboard (3)]<br />
↳ Video Bus id=7 [slave keyboard (3)]<br />
↳ Sleep Button id=8 [slave keyboard (3)]<br />
↳ Wacom Intuos PT S 2 Pen id=10 [slave keyboard (3)]<br />
↳ USB Keyboard id=13 [slave keyboard (3)]<br />
↳ AT Translated Set 2 keyboard id=15 [slave keyboard (3)]<br />
↳ ThinkPad Extra Buttons id=18 [slave keyboard (3)]<br />
↳ USB Keyboard id=19 [slave keyboard (3)]<br />
<br />
This mean, my tablet's ID is ''20''. Now we map it with ''VGA-0'' screen:<br />
<br />
$ xinput map-to-output 20 VGA-0<br />
<br />
=== Pressure curve ===<br />
<br />
Use the [https://linuxwacom.github.io/bezier.html Wacom Pressure Curve and Threshold Graph] to find P1=red (eg. 50,0) and P2=purple (eg. 100,80) of your desired curve. The x-axis is the input pressure you apply to the pen; the y-axis is the output pressure the application is given.<br />
<br />
You can change the pressure curve with:<br />
<br />
$ xsetwacom set ''stylus'' PressureCurve ''x1 y1 x2 y2''<br />
<br />
== Application-specific configuration ==<br />
<br />
=== Blender ===<br />
<br />
To enable pad buttons and extra pen buttons in [[Blender]], you can create a xsetwacom wrapper to temporarily remap buttons for your blender session.<br />
<br />
Provided example (for Bamboo fun) adapted to ''Sculpt'' mode: [http://pastebin.archlinux.fr/1887946 blender_sculpt.sh]{{Dead link|2020|04|03|status=404}}<br />
<br />
It remaps:<br />
* Left tablet buttons to {{ic|Shift}} and {{ic|Ctrl}} ''(pan/tilt/zoom/smooth/invert)''<br />
* Right tablet buttons to {{ic|F}} ''(brush size/strenght)'' and {{ic|Ctrl-z}} ''(undo)''<br />
* Top pen button ton {{ic|m}} ''(mask control)''<br />
<br />
=== GIMP ===<br />
<br />
To enable proper usage, and pressure sensitive painting in [[GIMP]], just go to ''Edit > Input Devices''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.<br />
<br />
* Please take note that if present, the ''pad'' ''device'' should be kept disabled as I do not think GIMP supports such things. Alternatively, to use such features of your tablet you should map them to keyboard commands with a program such as [http://hem.bredband.net/devel/wacom/ Wacom ExpressKeys]{{Dead link|2020|04|03|status=404}}.<br />
<br />
* You should also take note that the tool selected for the ''stylus'' is independent to that of the ''eraser''. This can actually be quite handy, as you can have the ''eraser'' set to be used as any tool you like.<br />
<br />
For more information checkout the ''Setting up GIMP'' section of [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]{{Dead link|2020|04|03|status=domain name not resolved}}.<br />
<br />
If the above was not enough, you may want to try setting up the tablet's stylus (and eraser) as a second mouse pointer (separating it from your mouse) by using the {{ic|xinput create-master}} and {{ic|xinput reattach}} commands. It can help when GIMP does not start painting even if the stylus touches the tablet.<br />
<br />
=== Inkscape ===<br />
<br />
Pressure sensitivity in [[Inkscape]] is enabled the same way as in GIMP. Go to ''Edit > Input Devices...''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.<br />
<br />
=== Krita ===<br />
<br />
If your tablet does not draw in Krita (clicks/pressure are not registered) but works in the brush selection dialog which has a small test area, try putting Krita in full-screen or canvas-only mode.<br />
<br />
Krita only requires that Qt is able to use your tablet to function properly. If your tablet is not working in Krita, then make sure to check it is working in Qt first. The effect of tablet pressure can then be tweaked in the painttop configuration, for example by selecting opacity, then selecting pressure from the drop down and adjusting the curve to your preference.<br />
<br />
=== VirtualBox ===<br />
<br />
First, make sure that your tablet works well under Arch. Then, download and install the last driver from [https://www.wacom.com/en-cl/support/bamboo-support Wacom website] on the guest OS. Shutdown the virtual machine, go to ''Settings > USB''. Select ''Add Filter From Device'' and select your tablet (e.g. WACOM CTE-440-U V4.0-3 [0403]). Select ''Edit Filter'', and change the last item ''Remote'' to ''Any''.<br />
<br />
== Troubleshooting ==<br />
<br />
Newer tablets' drivers might not be in the kernel yet, and additional manipulations might be needed. A notable example is the newer Intuos line of tablets (Draw/Comic/Photo).<br />
<br />
=== Unknown device_type ===<br />
<br />
If your tablet does not get recognized by {{ic|xsetwacom}} and {{ic|dmesg}} complains about an unknown device_type, then you need to install a patched version of input-wacom.<br />
<br />
Download and install the for-4.4 branch from [http://sourceforge.net/p/linuxwacom/input-wacom/ci/jiri/for-4.4/~/tarball SourceForge].<br />
Your device should be recognized after you run<br />
<br />
# rmmod wacom<br />
# insmod /lib/modules/YOUR_KERNEL/kernel/drivers/hid/wacom.ko.gz<br />
<br />
=== Tablet recognized but xsetwacom and similar tools do not display it ===<br />
<br />
Your logs indicate that the correct driver is selected, and the tablet works. However, when running {{ic|xsetwacom list devices}} or use similar tools that depend on the correct driver, you get an empty list.<br />
<br />
A reason might be the execution order of your xorg configuration. {{ic|/usr/share/X11/xorg.conf.d}} gets executed first, then {{ic|/etc/X11/xorg.conf.d}}. The package {{pkg|xf86-input-wacom}} contains the file {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}}. If there is a catchall for tablets, executed after this file, the previously selected {{ic|wacom}} driver will be overwritten with a generic one that does not work with xsetwacom et. al.<br />
<br />
To make sure, check the rules contained in the files executed after {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}} for anything that looks like graphics tablets.<br />
<br />
=== Manual setup ===<br />
<br />
A manual configuration is done in {{ic|/etc/X11/xorg.conf}} or in a separate file in the {{ic|/etc/X11/xorg.conf.d/}} directory. The Wacom tablet device is accessed using a input event interface in {{ic|/dev/input/}} which is provided by the kernel driver. The interface number {{ic|event??}} is likely to change when unplugging and replugging into the same or especially a different ''USB'' port. Therefore it is wise to not refer to the device using its concrete {{ic|event??}} interface ('''static''' configuration) but by letting ''udev'' dynamically create a symbolic link to the correct {{ic|event}} file ('''dynamic''' configuration).<br />
===== USB-devices =====<br />
<br />
After (re-)plugging in your ''USB''-tablet (or at least after rebooting) some symbolic links should appear in {{ic|/dev/input}} referring to your tablet device.<br />
<br />
$ ls /dev/input/wacom* <br />
/dev/input/wacom /dev/input/wacom-stylus /dev/input/wacom-touch<br />
<br />
If not, your device is likely to be not yet included in the ''udev'' configuration from ''wacom-udev'' which resides in {{ic|/usr/lib/udev/rules.d/wacom.rules}}. Copy the file to {{ic|/etc/udev/rules.d/wacom.rules}} and modify it there.<br />
<br />
Add your device to the file by duplicating some line of another device and adapting ''idVendor'',''idProduct'' and the symlink name to your device.<br />
The two id's can be determined using<br />
<br />
$ lsusb | grep -i wacom<br />
Bus 002 Device 007: ID 056a:0062 Wacom Co., Ltd<br />
<br />
In this example idVendor is 056a and idProduct 0062. In case you have device with touch (e.g. Bamboo Pen&Touch) you might need to add a second line for the touch input interface. For details check the linuxwacom wiki [http://linuxwacom.sourceforge.net/wiki/index.php/Fixed_device_files_with_udev Fixed device files with udev]{{Dead link|2020|04|03|status=404}}.<br />
<br />
Save the file and reload udev's configuration profile using the command ''udevadm control --reload-rules'' Check again the content of ''/dev/input'' to make sure that the ''wacom'' symlinks appeared. Note that you may need to plug-in the tablet again for the device to appear.<br />
<br />
The files of further interest for the ''Xorg'' configuration are {{ic|/dev/input/wacom}} and for a touch-device also {{ic|/dev/input/wacom_touch}}.<br />
<br />
==== Static setup ====<br />
<br />
Usually it is recommended to rely on [[Xorg]]'s auto-detection or to use a '''dynamic''' setup. However for an ''internal'' tablet device one might consider a '''static''' Xorg setup in case autodetection does not work. A static [[Xorg]] setup is usually not able to recognize your Wacom tablet when it is connected to a different ''USB'' port or even after unplugging and replugging it into the same port, and as such it should be considered as deprecated.<br />
<br />
If you insist in using a static setup just refer to your tablet in the ''Xorg'' configuration in the next section using the correct {{ic|/dev/input/event??}} files as one can find out by looking into {{ic|/proc/bus/input/devices}}.<br />
<br />
==== Xorg configuration ====<br />
<br />
In either case, dynamic or static setup you got now one or two files in {{ic|/dev/input/}} which refer to the correct input event devices of your tablet. All that is left to do is add the relevant information to {{ic|/etc/X11/xorg.conf}}, or a dedicated file under {{ic|/etc/X11/xorg.conf.d/}}. The exact configuration depends on your tablet's features of course. {{ic|xsetwacom list devices}} might give helpful information on what ''InputDevice'' sections are needed for your tablet.<br />
<br />
An example configuration for a ''Volito2'' might look like this<br />
<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "stylus"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "stylus"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "eraser"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "eraser"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "cursor"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "cursor"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
EndSection<br />
<br />
Make sure that you also change the path ({{Ic|"Device"}}) to your mouse, as it will be {{Ic|/dev/input/mouse_udev}} now.<br />
<br />
Section "InputDevice"<br />
Identifier "Mouse1"<br />
Driver "mouse"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mouse_udev"<br />
Option "SendCoreEvents" "true"<br />
Option "Protocol" "IMPS/2"<br />
Option "ZAxisMapping" "4 5"<br />
Option "Buttons" "5"<br />
EndSection<br />
<br />
Add this to the ''ServerLayout'' section<br />
<br />
InputDevice "cursor" "SendCoreEvents" <br />
InputDevice "stylus" "SendCoreEvents"<br />
InputDevice "eraser" "SendCoreEvents"<br />
<br />
And finally make sure to update the identifier of your mouse in the ''ServerLayout'' section &ndash; as mine went from<br />
<br />
InputDevice "Mouse0" "CorePointer"<br />
<br />
to<br />
<br />
InputDevice "Mouse1" "CorePointer"<br />
<br />
=== Mouse Moving Erratically due to Proximity Sensor ===<br />
<br />
You can disable the mouse jumping due to a proximity sensor detecting a non-existing stylus. You can find your device with xinput --list, and after seeing the Stylus, disable it with: xinput disable "Your Device Name". This only works if you are not currently using a stylus.<br />
<br />
== See also ==<br />
<br />
* [[List of applications/Documents#Stylus note-taking]]<br />
* [https://github.com/linuxwacom/input-wacom/wiki input-wacom Wiki]<br />
* [https://github.com/linuxwacom/xf86-input-wacom/wiki xf86-input-wacom Wiki] (out of date)<br />
* [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]{{Dead link|2020|04|03|status=domain name not resolved}}<br />
* [https://help.ubuntu.com/community/Wacom Ubuntu Help: Wacom]<br />
* [http://ubuntuforums.org/showthread.php?t=1038949 Ubuntu Forums - Install a LinuxWacom Kernel Driver for Tablet PC's]</div>Jose1711https://wiki.archlinux.org/index.php?title=Graphics_tablet&diff=604231Graphics tablet2020-04-05T22:39:14Z<p>Jose1711: add another solutions to "setxwacom not working with udev"</p>
<hr />
<div>[[Category:Input devices]]<br />
[[ja:Wacom タブレット]]<br />
[[zh-hans:Wacom tablet]]<br />
[[Wikipedia:Wacom (company)|Wacom]] does not officially support Linux. Linux support is provided by the [https://linuxwacom.github.io/ Linux Wacom Project]. Supported devices are listed on the [https://github.com/linuxwacom/input-wacom/wiki/Device-IDs Device IDs] page with a version number in the ''input-wacom'' column.<br />
<br />
== Installation ==<br />
<br />
The Arch Linux [[kernels]] include the [https://github.com/linuxwacom/input-wacom input-wacom] driver.<br />
<br />
Ensure your kernel recognizes your tablet. Connect your tablet via USB or [[Bluetooth]]. It should show up in {{ic|dmesg {{!}} grep -i wacom}} and be listed in {{ic|/proc/bus/input/devices}} (and if you use USB in the {{ic|lsusb}} output). If it does not, your only chance is that your tablet is supported by a more recent driver than the one in your kernel. In that case [[install]] the {{AUR|input-wacom-dkms}} package.<br />
<br />
[[Install]] the [[X]] driver, {{Pkg|xf86-input-wacom}}, and restart X so the new [[udev]] rules take effect.<br />
<br />
The command {{ic|xsetwacom list devices}} should now list some devices. If it does not, see [[#Manual setup]].<br />
<br />
The {{Pkg|kcm-wacomtablet}} package provides a [[KDE]] graphical user interface for tablet configuration and supports tablet-specific profiles and hotplugging.<br />
<br />
Support for the following Wacom tablets is provided via {{AUR|tuhi-git}}:<br />
* Bamboo Spark<br />
* Bamboo Slate<br />
* Intuos Pro Paper<br />
<br />
Consult README for the details of initial configuration. For setups with more than one monitor you'll probably want to fix aspect ratio using {{ic|Coordinate Transformation Matrix}} as described at [https://github.com/linuxwacom/xf86-input-wacom/wiki/Dual-and-Multi-Monitor-Set-Up dual and multimonitor set up].<br />
<br />
== Configuration ==<br />
<br />
The Xorg driver can be temporarily configured with {{ic|xsetwacom}}, see {{man|1|xsetwacom}}. Changes are lost after X server restarts or replugging your tablet.<br />
<br />
List the available devices:<br />
<br />
{{hc|$ xsetwacom list devices|<br />
Wacom Bamboo 16FG 4x5 Finger touch id: 12 type: TOUCH<br />
Wacom Bamboo 16FG 4x5 Finger pad id: 13 type: PAD <br />
Wacom Bamboo 16FG 4x5 Pen stylus id: 17 type: STYLUS <br />
Wacom Bamboo 16FG 4x5 Pen eraser id: 18 type: ERASER<br />
}}<br />
<br />
For the {{ic|get}} and {{ic|set}} commands, devices can be specified by name or id. Scripts should use names because ids can change after X server restarts or replugging.<br />
<br />
=== Permanent configuration ===<br />
<br />
{{Note|Because ''xorg.conf'' lacks options ''xsetwacom'' has and only lets you map buttons to mouse buttons, you may want to [[autostart]] a script with ''xsetwacom'' commands instead of using ''xorg.conf''.}}<br />
<br />
Configuration can be made persistent in [[xorg.conf]] and {{man|5|xorg.conf}}.<br />
<br />
You firstly need to find out your product names:<br />
<br />
{{hc|$ grep "Using input driver 'wacom'" /var/log/Xorg.0.log|<br />
[ 25059.351] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen'<br />
[ 25059.409] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pad'<br />
[ 25059.428] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen eraser'<br />
[ 25059.429] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen cursor'<br />
}}<br />
<br />
For these product names the sections would be:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/72-wacom-options.conf|<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS pen"<br />
MatchDriver "wacom"<br />
MatchProduct "Pen"<br />
NoMatchProduct "eraser"<br />
NoMatchProduct "cursor"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS pad"<br />
MatchDriver "wacom"<br />
MatchProduct "Pad"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS eraser"<br />
MatchDriver "wacom"<br />
MatchProduct "eraser"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS cursor"<br />
MatchDriver "wacom"<br />
MatchProduct "cursor"<br />
EndSection<br />
}}<br />
<br />
* The options described in {{man|4|wacom}} can be added to sections.<br />
* The product name needs to contain the {{ic|MatchProduct}} value in order for a section to match. Matching of parent devices requires negative matching.<br />
* The {{ic|Identifier}} can be arbitrary and is printed into the Xorg log when the section matches. Giving your identifiers a common prefix lets you easily [[grep]] for what sections were matched: {{bc|grep "WACOM OPT" /var/log/Xorg.0.log}}<br />
* Configuration changes require a X server restart to take effect.<br />
<br />
{{Note|''xorg.conf'' options can differ from ''xsetwacom'' options.}}<br />
<br />
''xsetwacom'' can try to print all current settings of a device in ''xorg.conf'' format with:<br />
<br />
$ xsetwacom get ''device'' all<br />
<br />
=== Remapping buttons ===<br />
<br />
The X driver lets you remap the buttons on tablets and pens. Buttons are identified by numbers. Tablet buttons start at 1, pen buttons start at 2 (1 is the tip contact event). By default the X driver maps button ''M'' to mouse button ''M''. Because X uses buttons 4-7 as the four scrolling directions, physical buttons 4 and higher are mapped to mouse buttons 8 and higher by default. While ''xorg.conf'' uses the actual button numbers and only lets you map to mouse buttons, ''xsetwacom'' uses the translated mouse button numbers and allows mapping to multiple keycodes (but not keysyms).<br />
<br />
If you have not yet remapped your buttons you can easily identify their ids with {{Pkg|xorg-xev}}, by running the following command, placing the mouse cursor on the created window and pressing a button:<br />
<br />
{{hc|$ xev -event button|<br />
Outer window is 0x1a00001, inner window is 0x1a00002<br />
<br />
ButtonPress event, serial 25, synthetic NO, window 0x1a00001,<br />
root 0x2a0, subw 0x0, time 3390669, (404,422), root:(1047,444),<br />
state 0x0, button 8, same_screen YES<br />
}}<br />
<br />
In this case the button number for ''xsetwacom'' is 8 and the actual button number for ''xorg.conf'' is 4.<br />
<br />
Alternatively, if you want an overview of your tablet's button layout you can look at your tablet's layout SVG. Firstly, find out the filename with a recursive [[grep]] search for the tablet name reported by {{ic|xsetwacom list devices}}:<br />
<br />
{{hc|$ grep -rl 'Wacom Bamboo 16FG 4x5' /usr/share/libwacom/*.tablet|2=<br />
/usr/share/libwacom/bamboo-16fg-s-t.tablet<br />
}}<br />
<br />
In this case the respective layout SVG is {{ic|/usr/share/libwacom/layouts/bamboo-16fg-s-t.svg}}. The letters in the SVG correspond to the button numbers: A=1, B=2, C=3, ...<br />
<br />
==== Mapping pad buttons to function keys ====<br />
<br />
If you want to bind your tablet buttons to different shortcuts in different applications, you may want to map your tablet buttons to function keys because applications generally do not let you bind keyboard shortcuts to mouse buttons.<br />
<br />
Firstly, map the pad buttons to mouse buttons 11 and higher so that you can distinguish them from regular mouse buttons. For example:<br />
<br />
xsetwacom set ''pad'' Button 1 11<br />
xsetwacom set ''pad'' Button 2 12<br />
...<br />
<br />
Then map the mouse buttons to the function keys. This can be done with [[xbindkeys]] and [[xdotool]] by adding an entry like the following for every pad to your {{ic|~/.xbindkeysrc}}:<br />
<br />
"xdotool key F21"<br />
b:11<br />
<br />
"xdotool key F22"<br />
b:12<br />
...<br />
<br />
==== The syntax ====<br />
<br />
The syntax of {{ic|xsetwacom}} is flexible but not very well documented. The general mapping syntax (extracted from the source code) for xsetwacom 0.17.0 is the following.<br />
<br />
KEYWORD [ARGS...] [KEYWORD [ARGS...] ...]<br />
<br />
KEYWORD + ARGS:<br />
key [+,-]KEY [[+,-]KEY ...] where +:key down, -:key up, no prefix:down and up<br />
button BUTTON [BUTTON ...] (1=left,2=middle,3=right mouse button, 4/5 scroll mouse wheel)<br />
modetoggle toggle absolute/relative tablet mode <br />
displaytoggle toggle cursor movement among all displays which include individual screens<br />
plus the whole desktop for the selected tool if it is not a pad.<br />
When the tool is a pad, the function applies to all tools that are asssociated<br />
with the tablet<br />
<br />
BUTTON: button ID as integer number<br />
<br />
KEY: MODIFIER, SPECIALKEY or ASCIIKEY<br />
MODIFIER: (each can be prefix with an '''l''' or an '''r''' for the left/right modifier (no prefix = left)<br />
ctrl=ctl=control, meta, alt, shift, super, hyper<br />
SPECIALKEY: f1-f35, esc=Esc, up,down,left,right, backspace=Backspace, tab, PgUp,PgDn<br />
ASCIIKEY: (usual characters the key produces, e.g. a,b,c,1,2,3 etc.)<br />
<br />
==== Some examples ====<br />
<br />
$ xsetwacom set ''pad'' Button 1 3 # right mouse button<br />
$ xsetwacom set ''pad'' Button 1 "key +ctrl z -ctrl"<br />
$ xsetwacom get ''pad'' Button 1<br />
key +Control_L +z -z -Control_L<br />
$ xsetwacom set ''pad'' Button 1 "key +shift button 1 key -shift"<br />
<br />
Even little macros are possible:<br />
<br />
$ xsetwacom set ''pad'' Button 1 "key +shift h -shift e l l o"<br />
<br />
{{Note|If you try to run a script with {{ic|xsetwacom}} commands from a udev rule, you might find that it will not work, as the Wacom input devices will not be ready at the time. A workaround is to add {{ic|sleep 1}} at the beginning of your script. If it's still not working, check [https://unix.stackexchange.com/questions/65788/why-doesnt-xsetwacom-work-from-udev] for possible solutions.}}<br />
<br />
==== Execute custom commands ====<br />
<br />
{{Style|Duplicates [[Xbindkeys]]. There are alternatives to xbindkeys.}}<br />
<br />
Mapping custom commands to the buttons is a little bit tricky but actually very simple. First, install [[xbindkeys]].<br />
<br />
To get well defined button codes add the following to your permanent configuration file, e.g. {{ic|/etc/X11/xorg.conf.d/52-wacom-options.conf}} in the InputClass section of your '''pad''' device. Map the tablet's buttons to some unused button ids.<br />
<br />
# Setting up buttons (preferably choose the correct button order, so the topmost key is mapped to 10 and so on)<br />
Option "Button1" "10"<br />
Option "Button2" "11"<br />
Option "Button3" "12"<br />
Option "Button4" "13"<br />
<br />
Then restart your ''Xorg'' server and verify the buttons using {{ic|xev}} or {{ic|xbindkeys -mk}}.<br />
<br />
Now set up your xbindkeys configuration, if you do not already have one you might want to create a default configuration<br />
<br />
$ xbindkeys --defaults > ~/.xbindkeysrc<br />
<br />
Then add your custom key mapping to {{ic|~/.xbindkeysrc}}, for example<br />
<br />
"firefox"<br />
m:0x10 + b:10 (mouse)<br />
"xterm"<br />
m:0x10 + b:11 (mouse)<br />
"xdotool key ctrl-z"<br />
m:0x10 + b:12 (mouse)<br />
"send-notify Test "No need for escaping the quotes""<br />
m:0x10 + b:13 (mouse)<br />
<br />
=== Adjusting aspect ratios ===<br />
<br />
Drawing areas of tablets are generally more square than the usual widescreen display with a 16:9 aspect ratio, leading to a slight vertical compression of your input. To resolve such an aspect ratio mismatch you need to compromise by either reducing the drawing area height (called ''Force Proportions'' on Windows) or reducing the screen area width. The former wastes drawing area and the latter prevents you from reaching the right edge of your screen with your Stylus. It is probably still a compromise worth to be made because it prevents your strokes from being skewed.<br />
<br />
Find out your tablet's resolution by running:<br />
<br />
$ xsetwacom get ''stylus'' Area<br />
<br />
==== Reducing the drawing area height ====<br />
<br />
Run:<br />
<br />
$ xsetwacom set ''stylus'' Area 0 0 ''tablet_width'' ''height''<br />
<br />
where ''height'' is ''tablet_width * screen_height / screen_width''.<br />
<br />
The tablet resolution can be reset back to the default using:<br />
<br />
$ xsetwacom set ''stylus'' ResetArea<br />
<br />
==== Reducing the screen area width ====<br />
<br />
Run:<br />
<br />
$ xsetwacom set ''stylus'' MapToOutput ''WIDTH''x''SCREEN_HEIGHT''+0+0<br />
<br />
where ''WIDTH'' is ''screen_height * tablet_width / tablet_height''.<br />
<br />
=== LEDs ===<br />
<br />
See the [https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-driver-wacom sysfs-driver-wacom] documentation. To make changes without requiring root permissions you will likely want to create a [[udev]] rule like so:<br />
<br />
{{hc|/etc/udev/rules.d/99-wacom.rules|<nowiki><br />
# Give the users group permissions to set Wacom device LEDs.<br />
ACTION=="add", SUBSYSTEM=="hid", DRIVERS=="wacom", RUN+="/usr/bin/sh -c 'chown :users /sys/%p/wacom_led/*'"<br />
</nowiki>}}<br />
<br />
Setting the Intuos OLEDs can be done using {{AUR|i4oled}} from the AUR.<br />
<br />
=== TwinView setup ===<br />
<br />
If you are going to use two monitors the aspect ratio while using the tablet might feel unnatural. In order to fix this you need to add:<br />
<br />
Option "TwinView" "horizontal"<br />
<br />
to all of your Wacom-InputDevice entries in the ''xorg.conf'' file. You may read more about that [http://ubuntuforums.org/showthread.php?t=640898 here].{{Dead link|2018|09|05}}<br />
<br />
==== Temporary TwinView setup ====<br />
<br />
For temporary mapping of a Wacom device to a single display ''while preserving the aspect ratio'', [https://gist.github.com/Quackmatic/6c19fe907945d735c045 this script]{{Dead link|2020|04|03|status=404}} may be used. This will letter-box the surface area of the device as required to ensure the input is not stretched on the display. This script may be executed in your {{ic|.xinitrc}} file for it to automatically run.<br />
<br />
=== xrandr setup ===<br />
<br />
{{Style|Wording can be improved, personal writing style.}}<br />
<br />
[[xrandr]] sets two monitors as one big screen, mapping the tablet to the whole virtual screen and deforming aspect ratio. For a solution see this thread: [https://bbs.archlinux.org/viewtopic.php?pid=797617 Arch Linux forum].<br />
<br />
If you just want to map the tablet to one of your screens, first find out what the screens are called:<br />
<br />
$ xrandr<br />
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384<br />
HDMI-0 disconnected (normal left inverted right x axis y axis)<br />
DVI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
VGA-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
<br />
Then you need to know what is the ID of your tablet.<br />
<br />
$ xsetwacom list devices<br />
WALTOP International Corp. Slim Tablet stylus id: 12 type: STYLUS<br />
<br />
In my case I want to map the tablet (ID: 12) to the screen on the right, which is ''VGA-0''. I can do that with this command<br />
<br />
$ xsetwacom set 12 MapToOutput VGA-0<br />
<br />
This should work immediately, no root necessary.<br />
<br />
Should this fail when using the NVIDIA binary driver, using ''HEAD-0'', ''HEAD-1'' and so on to refer to the monitors may work.<br />
<br />
If xsetwacom replies with "Unable to find an output ..." an X11 geometry string of the form {{ic|WIDTHxHEIGHT+X+Y}} can be specified instead of the screen identifier. In this example<br />
<br />
$ xsetwacom set 12 MapToOutput 1920x1080+1920+0<br />
<br />
should also map the tablet to the screen on the right.<br />
<br />
Alternatively, you can use [https://bitbucket.org/denilsonsa/small_scripts/src/3380435f92646190f860b87f566a39d0e215034c/xsetwacom_my_preferences.sh?at=default this bash script] to quickly map the tablet to one of your screens (or the entire desktop) and fix the aspect ratio.<br />
<br />
In case ''xsetwacom'' does not work, you can try ''xinput''.<br />
<br />
First, you need to find your tablet's ID.<br />
<br />
$ xinput list<br />
<br />
In my case, the output is:<br />
<br />
⎡ Virtual core pointer id=2 [master pointer (3)]<br />
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Finger id=11 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Pad id=12 [slave pointer (2)]<br />
⎜ ↳ USB Keyboard id=14 [slave pointer (2)]<br />
⎜ ↳ SynPS/2 Synaptics TouchPad id=16 [slave pointer (2)]<br />
⎜ ↳ TPPS/2 IBM TrackPoint id=17 [slave pointer (2)]<br />
⎜ ↳ SteelSeries Kinzu V2 Gaming Mouse id=9 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Pen Pen (0x6281780c) id=20 [slave pointer (2)]<br />
⎣ Virtual core keyboard id=3 [master keyboard (2)]<br />
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]<br />
↳ Power Button id=6 [slave keyboard (3)]<br />
↳ Video Bus id=7 [slave keyboard (3)]<br />
↳ Sleep Button id=8 [slave keyboard (3)]<br />
↳ Wacom Intuos PT S 2 Pen id=10 [slave keyboard (3)]<br />
↳ USB Keyboard id=13 [slave keyboard (3)]<br />
↳ AT Translated Set 2 keyboard id=15 [slave keyboard (3)]<br />
↳ ThinkPad Extra Buttons id=18 [slave keyboard (3)]<br />
↳ USB Keyboard id=19 [slave keyboard (3)]<br />
<br />
This mean, my tablet's ID is ''20''. Now we map it with ''VGA-0'' screen:<br />
<br />
$ xinput map-to-output 20 VGA-0<br />
<br />
=== Pressure curve ===<br />
<br />
Use the [https://linuxwacom.github.io/bezier.html Wacom Pressure Curve and Threshold Graph] to find P1=red (eg. 50,0) and P2=purple (eg. 100,80) of your desired curve. The x-axis is the input pressure you apply to the pen; the y-axis is the output pressure the application is given.<br />
<br />
You can change the pressure curve with:<br />
<br />
$ xsetwacom set ''stylus'' PressureCurve ''x1 y1 x2 y2''<br />
<br />
== Application-specific configuration ==<br />
<br />
=== Blender ===<br />
<br />
To enable pad buttons and extra pen buttons in [[Blender]], you can create a xsetwacom wrapper to temporarily remap buttons for your blender session.<br />
<br />
Provided example (for Bamboo fun) adapted to ''Sculpt'' mode: [http://pastebin.archlinux.fr/1887946 blender_sculpt.sh]{{Dead link|2020|04|03|status=404}}<br />
<br />
It remaps:<br />
* Left tablet buttons to {{ic|Shift}} and {{ic|Ctrl}} ''(pan/tilt/zoom/smooth/invert)''<br />
* Right tablet buttons to {{ic|F}} ''(brush size/strenght)'' and {{ic|Ctrl-z}} ''(undo)''<br />
* Top pen button ton {{ic|m}} ''(mask control)''<br />
<br />
=== GIMP ===<br />
<br />
To enable proper usage, and pressure sensitive painting in [[GIMP]], just go to ''Edit > Input Devices''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.<br />
<br />
* Please take note that if present, the ''pad'' ''device'' should be kept disabled as I do not think GIMP supports such things. Alternatively, to use such features of your tablet you should map them to keyboard commands with a program such as [http://hem.bredband.net/devel/wacom/ Wacom ExpressKeys]{{Dead link|2020|04|03|status=404}}.<br />
<br />
* You should also take note that the tool selected for the ''stylus'' is independent to that of the ''eraser''. This can actually be quite handy, as you can have the ''eraser'' set to be used as any tool you like.<br />
<br />
For more information checkout the ''Setting up GIMP'' section of [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]{{Dead link|2020|04|03|status=domain name not resolved}}.<br />
<br />
If the above was not enough, you may want to try setting up the tablet's stylus (and eraser) as a second mouse pointer (separating it from your mouse) by using the {{ic|xinput create-master}} and {{ic|xinput reattach}} commands. It can help when GIMP does not start painting even if the stylus touches the tablet.<br />
<br />
=== Inkscape ===<br />
<br />
Pressure sensitivity in [[Inkscape]] is enabled the same way as in GIMP. Go to ''Edit > Input Devices...''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.<br />
<br />
=== Krita ===<br />
<br />
If your tablet does not draw in Krita (clicks/pressure are not registered) but works in the brush selection dialog which has a small test area, try putting Krita in full-screen or canvas-only mode.<br />
<br />
Krita only requires that Qt is able to use your tablet to function properly. If your tablet is not working in Krita, then make sure to check it is working in Qt first. The effect of tablet pressure can then be tweaked in the painttop configuration, for example by selecting opacity, then selecting pressure from the drop down and adjusting the curve to your preference.<br />
<br />
=== VirtualBox ===<br />
<br />
First, make sure that your tablet works well under Arch. Then, download and install the last driver from [https://www.wacom.com/en-cl/support/bamboo-support Wacom website] on the guest OS. Shutdown the virtual machine, go to ''Settings > USB''. Select ''Add Filter From Device'' and select your tablet (e.g. WACOM CTE-440-U V4.0-3 [0403]). Select ''Edit Filter'', and change the last item ''Remote'' to ''Any''.<br />
<br />
== Troubleshooting ==<br />
<br />
Newer tablets' drivers might not be in the kernel yet, and additional manipulations might be needed. A notable example is the newer Intuos line of tablets (Draw/Comic/Photo).<br />
<br />
=== Unknown device_type ===<br />
<br />
If your tablet does not get recognized by {{ic|xsetwacom}} and {{ic|dmesg}} complains about an unknown device_type, then you need to install a patched version of input-wacom.<br />
<br />
Download and install the for-4.4 branch from [http://sourceforge.net/p/linuxwacom/input-wacom/ci/jiri/for-4.4/~/tarball SourceForge].<br />
Your device should be recognized after you run<br />
<br />
# rmmod wacom<br />
# insmod /lib/modules/YOUR_KERNEL/kernel/drivers/hid/wacom.ko.gz<br />
<br />
=== Tablet recognized but xsetwacom and similar tools do not display it ===<br />
<br />
Your logs indicate that the correct driver is selected, and the tablet works. However, when running {{ic|xsetwacom list devices}} or use similar tools that depend on the correct driver, you get an empty list.<br />
<br />
A reason might be the execution order of your xorg configuration. {{ic|/usr/share/X11/xorg.conf.d}} gets executed first, then {{ic|/etc/X11/xorg.conf.d}}. The package {{pkg|xf86-input-wacom}} contains the file {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}}. If there is a catchall for tablets, executed after this file, the previously selected {{ic|wacom}} driver will be overwritten with a generic one that does not work with xsetwacom et. al.<br />
<br />
To make sure, check the rules contained in the files executed after {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}} for anything that looks like graphics tablets.<br />
<br />
=== Manual setup ===<br />
<br />
A manual configuration is done in {{ic|/etc/X11/xorg.conf}} or in a separate file in the {{ic|/etc/X11/xorg.conf.d/}} directory. The Wacom tablet device is accessed using a input event interface in {{ic|/dev/input/}} which is provided by the kernel driver. The interface number {{ic|event??}} is likely to change when unplugging and replugging into the same or especially a different ''USB'' port. Therefore it is wise to not refer to the device using its concrete {{ic|event??}} interface ('''static''' configuration) but by letting ''udev'' dynamically create a symbolic link to the correct {{ic|event}} file ('''dynamic''' configuration).<br />
<br />
==== Dynamic with udev ====<br />
<br />
{{Note|In AUR there is wacom-udev package, which includes udev-rules-file. You might skip this part and move on to the {{ic|xorg.conf}} configuration if you are using the wacom-udev package from AUR.}}<br />
<br />
Assuming ''udev'' is already installed you simply need to install {{AUR|wacom-udev}}{{Broken package link|{{aur-mirror|wacom-udev}}}} from the [[AUR]].<br />
<br />
===== USB-devices =====<br />
<br />
After (re-)plugging in your ''USB''-tablet (or at least after rebooting) some symbolic links should appear in {{ic|/dev/input}} referring to your tablet device.<br />
<br />
$ ls /dev/input/wacom* <br />
/dev/input/wacom /dev/input/wacom-stylus /dev/input/wacom-touch<br />
<br />
If not, your device is likely to be not yet included in the ''udev'' configuration from ''wacom-udev'' which resides in {{ic|/usr/lib/udev/rules.d/wacom.rules}}. Copy the file to {{ic|/etc/udev/rules.d/wacom.rules}} and modify it there.<br />
<br />
Add your device to the file by duplicating some line of another device and adapting ''idVendor'',''idProduct'' and the symlink name to your device.<br />
The two id's can be determined using<br />
<br />
$ lsusb | grep -i wacom<br />
Bus 002 Device 007: ID 056a:0062 Wacom Co., Ltd<br />
<br />
In this example idVendor is 056a and idProduct 0062. In case you have device with touch (e.g. Bamboo Pen&Touch) you might need to add a second line for the touch input interface. For details check the linuxwacom wiki [http://linuxwacom.sourceforge.net/wiki/index.php/Fixed_device_files_with_udev Fixed device files with udev]{{Dead link|2020|04|03|status=404}}.<br />
<br />
Save the file and reload udev's configuration profile using the command ''udevadm control --reload-rules'' Check again the content of ''/dev/input'' to make sure that the ''wacom'' symlinks appeared. Note that you may need to plug-in the tablet again for the device to appear.<br />
<br />
The files of further interest for the ''Xorg'' configuration are {{ic|/dev/input/wacom}} and for a touch-device also {{ic|/dev/input/wacom_touch}}.<br />
<br />
===== Serial devices =====<br />
<br />
The {{AUR|wacom-udev}}{{Broken package link|{{aur-mirror|wacom-udev}}}} should also include support for serial devices. Users of serial tablets might be also interested in the inputattach tool from {{Pkg|linuxconsole}} package. The inputattach command allows to bind serial device into /dev/input tree, for example with:<br />
<br />
# inputattach --w8001 /dev/ttyS0<br />
<br />
See ''man inputattach'' for help about available options. As for USB devices one should end up with a file {{ic|/dev/input/wacom}} and proceed with the ''Xorg'' configuration.<br />
<br />
==== Static setup ====<br />
<br />
Usually it is recommended to rely on [[Xorg]]'s auto-detection or to use a '''dynamic''' setup. However for an ''internal'' tablet device one might consider a '''static''' Xorg setup in case autodetection does not work. A static [[Xorg]] setup is usually not able to recognize your Wacom tablet when it is connected to a different ''USB'' port or even after unplugging and replugging it into the same port, and as such it should be considered as deprecated.<br />
<br />
If you insist in using a static setup just refer to your tablet in the ''Xorg'' configuration in the next section using the correct {{ic|/dev/input/event??}} files as one can find out by looking into {{ic|/proc/bus/input/devices}}.<br />
<br />
==== Xorg configuration ====<br />
<br />
In either case, dynamic or static setup you got now one or two files in {{ic|/dev/input/}} which refer to the correct input event devices of your tablet. All that is left to do is add the relevant information to {{ic|/etc/X11/xorg.conf}}, or a dedicated file under {{ic|/etc/X11/xorg.conf.d/}}. The exact configuration depends on your tablet's features of course. {{ic|xsetwacom list devices}} might give helpful information on what ''InputDevice'' sections are needed for your tablet.<br />
<br />
An example configuration for a ''Volito2'' might look like this<br />
<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "stylus"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "stylus"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "eraser"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "eraser"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "cursor"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "cursor"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
EndSection<br />
<br />
Make sure that you also change the path ({{Ic|"Device"}}) to your mouse, as it will be {{Ic|/dev/input/mouse_udev}} now.<br />
<br />
Section "InputDevice"<br />
Identifier "Mouse1"<br />
Driver "mouse"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mouse_udev"<br />
Option "SendCoreEvents" "true"<br />
Option "Protocol" "IMPS/2"<br />
Option "ZAxisMapping" "4 5"<br />
Option "Buttons" "5"<br />
EndSection<br />
<br />
Add this to the ''ServerLayout'' section<br />
<br />
InputDevice "cursor" "SendCoreEvents" <br />
InputDevice "stylus" "SendCoreEvents"<br />
InputDevice "eraser" "SendCoreEvents"<br />
<br />
And finally make sure to update the identifier of your mouse in the ''ServerLayout'' section &ndash; as mine went from<br />
<br />
InputDevice "Mouse0" "CorePointer"<br />
<br />
to<br />
<br />
InputDevice "Mouse1" "CorePointer"<br />
<br />
=== Mouse Moving Erratically due to Proximity Sensor ===<br />
<br />
You can disable the mouse jumping due to a proximity sensor detecting a non-existing stylus. You can find your device with xinput --list, and after seeing the Stylus, disable it with: xinput disable "Your Device Name". This only works if you are not currently using a stylus.<br />
<br />
== See also ==<br />
<br />
* [[List of applications/Documents#Stylus note-taking]]<br />
* [https://github.com/linuxwacom/input-wacom/wiki input-wacom Wiki]<br />
* [https://github.com/linuxwacom/xf86-input-wacom/wiki xf86-input-wacom Wiki] (out of date)<br />
* [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]{{Dead link|2020|04|03|status=domain name not resolved}}<br />
* [https://help.ubuntu.com/community/Wacom Ubuntu Help: Wacom]<br />
* [http://ubuntuforums.org/showthread.php?t=1038949 Ubuntu Forums - Install a LinuxWacom Kernel Driver for Tablet PC's]</div>Jose1711https://wiki.archlinux.org/index.php?title=Pam_oath&diff=595966Pam oath2020-01-23T21:53:01Z<p>Jose1711: qrencode may be used without an intermediate image</p>
<hr />
<div>{{DISPLAYTITLE:pam_oath}}<br />
[[Category:Secure Shell]]<br />
[[Category:Authentication]]<br />
[[ja:Pam oath]]<br />
The [http://www.nongnu.org/oath-toolkit/index.html OATH Toolkit] provides a two-step authentication procedure using one-time passcodes (OTP). It complies to two OTP method RFC standards ([[w:HMAC-based_One-time_Password_Algorithm|HOTP]], [[w:Time-based_One-time_Password_Algorithm|TOTP]]). The OTP generator applications are available for iOS, Android, Blackberry and other devices. Similar to [[Google Authenticator]] the authentication mechanism integrates into the Linux [[PAM]] system. This guide shows the installation and configuration of this mechanism.<br />
<br />
== Installation ==<br />
<br />
Install the {{Pkg|oath-toolkit}} package.<br />
<br />
== Setting up the oath ==<br />
<br />
The oath seed is an hexadecimal number that should be unique per user. To generate a new seed for a user, you could use the following command line:<br />
<br />
$ head -10 /dev/urandom | sha512sum | cut -b 1-30<br />
1ab4321412aebcw<br />
<br />
Note the above output seed is used as example seed in this article and '''must not''' be used. There needs to be one oath per user and link to it in a configuration file {{ic|/etc/users.oath}}. While being root create the file and insert the user seed:<br />
<br />
{{hc|/etc/users.oath|# Option User Prefix Seed<br />
HOTP/T30/6 ''user'' - ''1ab4321412aebcw''}}<br />
<br />
Make sure that the file can only be accessed by root:<br />
<br />
# chmod 600 /etc/users.oath<br />
# chown root /etc/users.oath<br />
<br />
== Setting up the PAM ==<br />
<br />
To enable oath for a specific service only, like ssh, you can edit the file {{ic|/etc/pam.d/sshd}} and add at the beginning of the file the following line:<br />
<br />
auth sufficient pam_oath.so usersfile=/etc/users.oath window=30 digits=6<br />
<br />
This will allow authentication if you just enter the right oath code. You can make it a requirement and let the rest of the pam stack be processed if you use the following line instead:<br />
<br />
auth required pam_oath.so usersfile=/etc/users.oath window=30 digits=6<br />
<br />
For ssh login to work make sure that both {{ic|ChallengeResponseAuthentication}} and {{ic|UsePAM}} options are enabled:<br />
<br />
ChallengeResponseAuthentication yes<br />
UsePAM yes<br />
<br />
If you want to force OATH request-response even if there is a working public/private key authentication also add the following:<br />
<br />
AuthenticationMethods publickey,keyboard-interactive<br />
PasswordAuthentication yes<br />
<br />
== Logging with an oath pass ==<br />
<br />
Run the following command if you are logging in and need the current oath pass :<br />
<br />
oathtool -v -d6 ''1ab4321412aebcw''<br />
<br />
Of course replace ''1ab4321412aebcw'' by the seed corresponding to your user. It will display something like that :<br />
<br />
Hex secret: 1ab4321412aebc<br />
Base32 secret: DK2DEFASV26A====<br />
Digits: 6<br />
Window size: 0<br />
Start counter: 0x0 (0)<br />
<br />
820170<br />
<br />
The last number is actually the code you can use to log in right now, but more interestingly the Base32 secret, is actually what we need to generate a qr code for this user. To do so install the package {{Pkg|qrencode}} to run the following command :<br />
<br />
qrencode -o ''user''.png 'otpauth://totp/''user''@''machine''?secret=''DK2DEFASV26A===='''<br />
<br />
Of course change ''user'', ''machine'' and ''DK2DEFASV26A===='' accordingly. Once done, you can visualize your qrcode with your preferred image visualizer application and use that to configure your phone. Alternatively you may generate the QR code directly onto terminal with:<br />
<br />
qrencode -t UTF8 'otpauth://totp/''user''@''machine''?secret=''DK2DEFASV26A===='''<br />
<br />
It is pretty straight forward to use FreeOTP to then take a screenshot of that ''.png'' (or ASCII-art like image) and get it to display OTP pass when needed.<br />
<br />
{{Note|The secret key of your users is the most important information in this system. Once you setup a phone to provide OTP, it does have that key. The qr code in that ''.png'' file does have that key. You need to take extra care of this file. They should only be stored on encrypted medium (Your phone need to be using encryption for any sane level of security). If not even confined in a sandbox like Samsung Knox to prevent third party application to potentially access them.}}<br />
<br />
== See also ==<br />
<br />
* [http://spod.cx/blog/two-factor-ssh-auth-with-pam_oath-google-authenticator.shtml Two-factor time based (TOTP) SSH authentication with pam_oath and Google Authenticator]<br />
* [http://www.nongnu.org/oath-toolkit/pam_oath.html pam_oath man page]</div>Jose1711https://wiki.archlinux.org/index.php?title=Mobile_broadband_modem&diff=595248Mobile broadband modem2020-01-16T08:17:46Z<p>Jose1711: add mmcli script for reading text messages and make a separate section for sending messages</p>
<hr />
<div>[[Category:Modems]]<br />
[[ja:USB 3G モデム]]<br />
[[ru:USB 3G Modem]]<br />
{{Style|does not conform to [[Help:Style]]}}<br />
{{Related articles start}}<br />
{{Related|wvdial}}<br />
{{Related|Direct Modem Connection}}<br />
{{Related|3G and GPRS modems with pppd}}<br />
{{Related|:Category:Modems}}<br />
{{Related articles end}}<br />
A number of mobile telephone networks around the world offer mobile internet connections over UMTS (or EDGE or GSM) using a portable USB modem device.<br />
<br />
== Remove the PIN ==<br />
<br />
First of all use your SIM card in a normal phone and disable the PIN request if present. If the SIM card asks the PIN wvdial will not work.<br />
<br />
Failing that, you can also use ''mmcli'', which is provided by {{Pkg|modemmanager}}, to unlock the SIM card:<br />
<br />
# mmcli --sim=''SIMNUMBER'' --pin=''PIN''<br />
<br />
where ''SIMNUMBER'' can be found using {{ic|mmcli --list-modems}} and {{ic|1= mmcli --modem=[PATH{{!}}INDEX]}}.<br />
<br />
== Device identification ==<br />
<br />
Examine the output of<br />
<br />
$ lsusb<br />
<br />
which will show the vendor and product IDs of the device. Note that some devices will show ''two'' different product IDs at different times as explained below.<br />
<br />
== Mode switching ==<br />
<br />
Often these devices will have two modes (1) USB flash memory storage (2) USB Modem. The first mode, sometimes known as ZeroCD, is often used to deliver an internet communications program for another operating system and is generally of no interest to Linux users. Additionally some have a slot into which the user can insert an additional flash memory card.<br />
<br />
A useful utility for switching these devices into modem mode is {{Pkg|usb_modeswitch}}, available in the [[official repositories]]. Udev rules are supplied with {{Pkg|usb_modeswitch}} in {{ic|/lib/udev/rules.d/40-usb_modeswitch.rules}}. It contains entries for many devices, which it will switch to modem mode upon insertion.<br />
<br />
When a device is switched, its product ID may change to a different value. The vendor ID will remain unchanged. This can be seen in the output of {{ic|lsusb}}.<br />
<br />
Some devices are supported in the USB serial kernel module called "option" (after the Option devices, but not limited to just those) and may be used without usb_modeswitch.<br />
<br />
Udev itself included a utility called {{ic|/lib/udev/modem-modeswitch}}. In udev 157 this was renamed to {{ic|/lib/udev/mobile-action-modeswitch}} and morphed into a tool that only switches Mobile Action cables. For other devices use {{ic|usb_modeswitch}}.<br />
<br />
{{Note|You can find an alternative way to do this base on eject command [[ZTE_MF110/MF190#Switch_from_CD_mode_to_modem_mode_on_the_device|here]].}}<br />
<br />
== Connection ==<br />
<br />
In general, at this point you should note if [[#Mode switching]]ing left you with additional /dev/ttyUSB* serial like device, or an Ethernet like device, such as en* interface. You can do that by shell commands such as <br />
<br />
$ ls /dev/ttyUSB*<br />
$ ip link<br />
<br />
, or with [[journalctl]]. And follow [[Network configuration]] accordingly. Some further notes are:<br />
<br />
=== Serial like interface ===<br />
<br />
==== NetworkManager ====<br />
<br />
After installing {{Pkg|usbutils}} and {{Pkg|usb_modeswitch}}, you just need to install {{Pkg|modemmanager}} to make the modem work with [[NetworkManager]].<br />
<br />
Make sure both NetworkManager and ModemManager services are running, see [[systemd#Using units]] for details.<br />
<br />
Make sure {{Pkg|mobile-broadband-provider-info}} and {{Pkg|nm-connection-editor}} are installed.<br />
<br />
A system restart might be necessary for ModemManager to detect the USB modem. After you restart the NetworkManager-applet and plug the modem in again NetworkManager should recognize the modem in the menu without further configuration. Setting up the modem in NetworkManager is self-explanatory, you should only need the login-information provided by your network provider.<br />
<br />
In case NetworkManager does not recognize the modem, check the output of ModemManager.service:<br />
<br />
# systemctl status ModemManager<br />
<br />
If you get error messages such as "Couldn't check support for device" and "not supported by any plugin", you may have to whitelist your device using the ModemManager filter rules https://www.freedesktop.org/software/ModemManager/api/1.8.0/ref-overview-modem-filter.html<br />
<br />
Whilst running ModemManager gammu will not work. SMS and Ussd codes can be still used with {{Pkg|modem-manager-gui}}.<br />
<br />
==== pppd ====<br />
<br />
[[pppd]] can be used to configure 3g connections. Step by step instruction is available on [[3G and GPRS modems with pppd]]. Optionally, {{Aur|pppconfig}} can be used to simplify the pppd configuration using dialog interface.<br />
<br />
==== wvdial ====<br />
<br />
See main article: [[wvdial]]<br />
<br />
==== netctl ====<br />
<br />
Netctl can be used to establish a connection using a USB modem. An example configuration file provided by {{Pkg|netctl}} is located at {{ic|/etc/netctl/examples/mobile_ppp}}. Minimally you will probably have to specify<br />
{{hc|/etc/netctl/mobile_ppp|<br />
<nowiki>Interface=cdc-wdmX<br />
Connection=mobile_ppp<br />
PhoneNumber=XxxxXXXX<br />
AccessPointName=Broadband</nowiki><br />
}}<br />
<br />
See the [[netctl]] article and [https://github.com/joukewitteveen/netctl/blob/master/docs/netctl.profile.5.txt netctl.profile] for more information.<br />
<br />
==== libmbim ====<br />
<br />
Install {{pkg|libmbim}} from the official repositories. To bring up the modem you can use {{ic|mbim-network}} which is a wrapper for {{ic|mmcli}} calls. First create a profile for mbim-network.<br />
{{hc|/etc/mbim-network.conf|<br />
<nowiki>APN=Broadband</nowiki>}}<br />
Now connect to the network with {{bc|# mbim-network /dev/cdc-wdmX start}}. Then bring up the interface and get an ip address:<br />
{{bc|<br />
# ip link set wwanY up<br />
# dhcpcd wwanY<br />
}}<br />
<br />
==== sakis3g ====<br />
<br />
There may be the chance that the modem stick is supported by [http://www.sakis3g.com/ sakis3g] which is an all in one command line script and automates all the steps above. Install {{AUR|sakis3g}} from the [[AUR]].<br />
<br />
=== Ethernet like interface ===<br />
<br />
In that case you will need to have the [[Network_configuration#Enabling_and_disabling_network_interfaces|interface up]]. If the device has a [[DHCP]] server, you can use a DHCP client to match it. Otherwise, you will have to have some knowledge about the network the device expects. Such information might be obtained from its behavior in another OS. Or by searching the web. Or from the drivers, and other information, stored in the initial USB flash memory storage (ZeroCD). Some Huawei HiLink devices, for example, sometime operate at 192.168.8.0/24, with a gateway at 192.168.8.1. They also might have a web interface at 192.168.8.1.<br />
<br />
=== Connection halts after few minutes running ===<br />
<br />
This problem commonly occurs on some modems which locked by a mobile operator. You can successfully connect to the internet but after few minutes connection halts and your modem reboots. That happens because an operator built a some checks into modem firmware so a modem checks if a branded software is running on your pc, but usually that software is Windows-only, and obviously you don't use it. Fix (it works on ZTE-mf190 at least) is simple - send this command through serial port (use minicom or similar soft):<br />
<br />
AT+ZCDRUN=E\r\n<br />
<br />
This command will delete a NODOWNLOAD.FLG file in the modem's filesystem - it will disable such checks.<br />
<br />
Another possibility for such disconnections is to help the customer save bandwidth, which might be expensive. With Huawei HiLink devices with a web interface, there might be an option there to set a longer period of inactivity before the connection hangs up.<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Disable mode switching === <br />
Some ways to disable {{pkg|usb_modeswitch}} from operating on a device before the device was inserted, for example to be able to read the initial flash memory (ZeroCD), are:<br />
<br />
==== By the configuration file ====<br />
{{hc|/etc/usb_modeswitch.conf|2=<br />
DisableSwitching=1}}<br />
<br />
==== With a udev rule ====<br />
Masking the udev rule the package is using can be achieved with <br />
# ln -s /dev/null /etc/udev/rules.d/40-usb_modeswitch.rules<br />
<br />
=== AT commands ===<br />
<br />
There are some useful commands:<br />
<br />
* AT^U2DIAG=0 - the device is only Modem<br />
* AT^U2DIAG=1 - device is in modem mode + CD ROM<br />
* AT^U2DIAG=255 - the device in modem mode + CD ROM + Card Reader<br />
* AT^U2DIAG=256 - the device in modem mode + Card Reader<br />
* AT+CPIN=<PIN-CODE> - enter PIN-code<br />
* AT+CUSD=1,<PDU-encoded-USSD-code>,15 - USSD request, result can be found (probably) in /dev/ttyUSB2.<br />
<br />
Encode "*100#" to PDU format:<br />
<br />
perl -e '@a=split(//,unpack("b*","*100#")); for ($i=7; $i < $#a; $i+=8) { $a[$i]="" } print uc(unpack("H*", pack("b*", join("", @a))))."\n"'<br />
<br />
Decode "AA180C3602" from PDU format:<br />
<br />
perl -e '@a=split(//,unpack("b*", pack("H*","AA180C3602"))); for ($i=6; $i < $#a; $i+=7) {$a[$i].="0" } print pack("b*", join("", @a)).""'<br />
<br />
Answer decoding (this example is balance response: 151.25):<br />
<br />
perl -e 'print pack("H*", "003100350031002C003200350020044004430431002E0020");'<br />
<br />
Some operators return USSD result in PDU encoding, so you should check proper decoding method.<br />
<br />
* AT+CSQ - get signal quality (AT+CSQ=?)<br />
* AT+GMI - get manufacturer<br />
* AT+GMM - get model<br />
* AT+GMR - get revision<br />
* AT+GMN - get IMEI<br />
* AT+COPS? - get operator info<br />
* AT^CARDLOCK="NCK-code" - unlock modem. NCK-code should be calculated by IMEI. After that modem can work with any GSM-provider.<br />
* AT^SYSCFG=mode, order, band, roaming, domain - System Config<br />
<br />
Mode:<br />
<br />
* 2 Automatic search<br />
* 13 2G ONLY<br />
* 14 3G ONLY<br />
* 16 No change<br />
<br />
Order:<br />
<br />
* 0 Automatic search<br />
* 1 2G first, then 3G<br />
* 2 3G first, then 2G<br />
* 3 No change<br />
<br />
Band:<br />
<br />
* 80 GSM DCS systems<br />
* 100 Extended GSM 900<br />
* 200 Primary GSM 900<br />
* 200000 GSM PCS<br />
* 400000 WCDMA IMT 2000<br />
* 3FFFFFFF Any band<br />
* 40000000 No change of band<br />
<br />
Roaming:<br />
<br />
* 0 Not supported<br />
* 1 Roaming is supported<br />
* 2 No change<br />
<br />
Domain:<br />
<br />
* 0 CS_ONLY<br />
* 1 PS_ONLY<br />
* 2 CS_PS<br />
* 3 ANY<br />
* 4 No change<br />
<br />
=== Low connection speed ===<br />
<br />
Someone claims that the connection speed under linux is lower than Windows [https://bbs.archlinux.org/viewtopic.php?id=111513]. This is a short summary for possible solutions which are not fully verified.<br />
<br />
In most of conditions, the low speed is caused by bad receiver signals and too many people in cell. But you still could use the following method to try to improve the connection speed:<br />
<br />
* QoS parameter can be set with the {{ic|AT+CGEQMIN}} and {{ic|AT+CGEQREQ}} commands. It should also be possible to decrease and limit the connection speed. Add the following {{ic|Init}} command in {{ic|/etc/wvdial.conf}}:<br />
<br />
Init6 = AT+CGEQMIN=1,4,64,640,64,640<br />
Init7 = AT+CGEQREQ=1,4,64,640,64,640<br />
<br />
* Baud parameter in {{ic|/etc/wvdial.conf}} could be used to increase the connection speed:<br />
<br />
Baud = 460800<br />
<br />
It is advisable to see the baud rate set by the official modem application for Windows (possibly {{ic|9600}} on Vista).<br />
<br />
=== Monitor used bandwidth ===<br />
<br />
Frequently a 3G connection obtained via a mobile phone operator comes with restricted bandwidth, so that you are only allowed to use a certain bandwidth per time (e.g. 1GB per month). While it is quite straight-forward to know which type of network applications are pretty bandwidth extensive (e.g. video streaming, gaming, torrent, etc.), it may be difficult to keep an overview about overall consumed bandwidth. <br />
<br />
A number of tools are available to help with that. Two console tools are {{pkg|vnstat}}, which allows to keep track of bandwith over time, and {{pkg|iftop}} to monitor bandwidth of individual sessions. If you are a [[KDE]] user, {{Pkg|knemo}} might help. All are available in the [[official repositories]].<br />
<br />
The internal web server found in some devices, such as some Huawei HiLink, might also show information about bandwidth usage.<br />
<br />
=== Reading SMS ===<br />
<br />
==== With dedicated software ====<br />
<br />
This was tested on a Huawei EM770W (GTM382E) 3g card integrated into an Acer Aspire AS3810TG laptop.<br />
<br />
{{bc|<br />
$ pacman -S gnokii<br />
$ mkdir -p $XDG_CONFIG_HOME/gnokii<br />
}}<br />
<br />
Usually the configuration directory is {{ic|~/.config/gnokii}}. <br />
<br />
{{bc|<br />
$ cp /etc/gnokiirc ~/.config/gnokii/config<br />
}}<br />
<br />
Edit {{ic|~/.config/gnokii/config}} as follows:<br />
<br />
{{bc|1=<br />
port = /dev/ttyUSB0<br />
}}<br />
<br />
You may have to use a different port depending on your configuration, for example {{ic|/dev/ttyUSB1}} or something else:<br />
<br />
{{bc|1=<br />
model = AT<br />
connection = serial<br />
}}<br />
<br />
You need to be part of the {{ic|uucp}} [[user group|group]] to use {{ic|/dev/ttyUSB0}}, for example if your user is called "x":<br />
<br />
{{bc|<br />
# gpasswd -a x uucp<br />
$ newgrp uucp<br />
}}<br />
<br />
The ''newgrp'' command allows you to take advantage of the new group assignment immediately without having to logout/login.<br />
<br />
Then launch gnokii:<br />
<br />
{{bc|<br />
$ xgnokii<br />
}}<br />
<br />
Click on the "SMS" icon button, a window opens up. Then click: "messages->activate sms reading". Your messages will show up in the window.<br />
<br />
'''Command line script''':<br />
<br />
A small command line script using gnokii to read SMS on your SIM card (not phone memory) without having to start a GUI:<br />
<br />
$ gnokii --getsms SM 0 end 2>&1|grep Text -A1 -B3|grep -v Text<br />
<br />
What it does:<br />
<br />
{{bc|<nowiki><br />
gnokii # invoke gnokii<br />
--getsms SM 0 end # read SMS from SM-memory location (=SIM card) starting at 0 and reading all occupied memory locations ("end")<br />
2>&1 # connect STDERR to STDOUT to make sure the output from the --getsms command can be piped to grep<br />
|grep Text # pipe output from gnokii to grep, anchoring at output containing "Text"<br />
-A1 -B3 # print one line after the matched pattern and three lines before the matched pattern<br />
|grep -v Text # grep result to another grep to exclude the "Text" line (-v for inverting the pattern)<br />
</nowiki>}}<br />
<br />
Granted this does not work very well if your SMS contains the word "Text", but you may adapt the script to your liking.<br />
<br />
Another option is to use {{ic|mmcli}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
#get modem number<br />
MODEMNO=$(mmcli -L | grep -o "Modem/[0-9]" | grep -o [0-9]$)<br />
#list newest SMS<br />
SMSNO=$(mmcli -m ${MODEMNO} --messaging-list-sms | awk '/received/{split($1, ar, /\//); print ar[6]; exit}')<br />
#read message<br />
mmcli -m ${MODEMNO} -s /org/freedesktop/ModemManager1/SMS/${SMSNO}<br />
</nowiki>}}<br />
<br />
==== With email like web interface ====<br />
<br />
Some Devices, such as some Huawei HiLink, include an email like web interface for SMS. It is included in the device internal web server, which is used for other purposes too.<br />
<br />
=== Writing SMS ===<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
#get modem number<br />
MODEMNO=$(mmcli -L | grep -o "Modem/[0-9]" | grep -o [0-9]$)<br />
#create sms in modem and get number<br />
SMSNO=$(mmcli -m ${MODEMNO} --messaging-create-sms="text='$1',number=+$2" | grep -o [0-9]*$)<br />
#send message<br />
mmcli -s ${SMSNO} --send<br />
# delete all sent messages<br />
for i in $(mmcli -m ${MODEMNO} --messaging-list-sms | grep " (sent)" | cut -f5 -d' ') ; do<br />
mmcli -m ${MODEMNO} --messaging-delete-sms=$i<br />
done<br />
</nowiki>}}<br />
<br />
You may need give permission by creating file with content like<br />
<br />
{{hc|/etc/polkit-1/rules.d/49-nopasswd_mmcli.rules|<nowiki><br />
polkit.addRule(function(action, subject) {<br />
if (action.id == "org.freedesktop.ModemManager1.Messaging" &&<br />
subject.isInGroup("uucp"))<br />
{<br />
return polkit.Result.YES;<br />
}<br />
});<br />
</nowiki>}}<br />
<br />
=== Fix image quality ===<br />
<br />
If you are getting low quality images while browsing the web over a mobile broadband connection with the hints "shift+r improves the quality of this image" and "shift+a improves the quality of all images on this page", follow these instructions:<br />
<br />
[[Install]] {{Pkg|tinyproxy}}, available in the [[official repositories]].<br />
<br />
Edit /etc/tinyproxy/tinyproxy.conf and insert the following two lines:<br />
<br />
AddHeader "Pragma" "No-Cache"<br />
AddHeader "Cache-Control" "No-Cache"<br />
<br />
Start tinyproxy:<br />
<br />
systemctl start tinyproxy<br />
<br />
Configure your browser to use localhost:8888 as a [[proxy server]] and you are all done. This is especially useful if you are using, for example, Google [[Chrome]] which, unlike Firefox, does not allow you to modify the Pragma and Cache-Control headers.</div>Jose1711https://wiki.archlinux.org/index.php?title=Logitech_Unifying_Receiver&diff=594586Logitech Unifying Receiver2020-01-11T12:27:46Z<p>Jose1711: Fix formatting (this is not markdown)</p>
<hr />
<div>[[Category:Input devices]]<br />
[[ja:Logitech Unifying Receiver]]<br />
[[zh-hant:Logitech Unifying Receiver]]<br />
The [http://www.logitech.com/349/6072 Logitech Unifying Receiver] is a wireless receiver using 2.4 GHz band radio communication that can connect up to six compatible wireless mice and keyboards to your computer.<br />
The input device that comes with the receiver is already paired with it and should work out of the box through plug and play.<br />
Logitech officially supports pairing of additional devices just through their Windows and macOS software.<br />
<br />
Pairing and unpairing on Linux is supported by a number of tools, listed thereafter:<br />
<br />
[https://lekensteyn.nl/logitech-unifying.html ltunify] is a command-line C program that can perform pairing, unpairing and listing of devices. [http://pwr.github.io/Solaar/ Solaar] is a graphical Python program that integrates in your system tray and allows you to configure additional features of your input device such as swapping the functionality of Fn keys. [https://github.com/libratbag/libratbag libratbag] is a configurable mice daemon that allows you to configure your devices, it has a GTK based graphical frontend app, [https://github.com/libratbag/piper piper].<br />
<br />
== Installation ==<br />
Several solutions are available:<br />
*{{Pkg|libratbag}}/{{Pkg|piper}}<br />
*{{AUR|pairing_tool}}<br />
<br />
The following packages use the {{ic|plugdev}} [[user group]], create it if it does not exist, and add users to this group to avoid the need of running these as root:<br />
*{{Pkg|solaar}} or {{AUR|solaar-git}}<br />
*{{AUR|ltunify-git}}<br />
Do not forget to relogin to apply user's group membership. After installation, run<br />
# udevadm control --reload-rules<br />
and then replug reciever. After that you will not need root permissions.<br />
<br />
== Usage ==<br />
<br />
pairingtool can only be used for pairing and does not provide feedback, it also needs to know the device name for pairing. ltunify, Solaar and libratbag can detect the receiver automatically.<br />
<br />
=== ltunify ===<br />
<br />
Examples on unpairing a device, pairing a new device and showing a list of all devices:<br />
<br />
$ ltunify unpair mouse<br />
Device 0x01 Mouse successfully unpaired<br />
$ ltunify pair<br />
Please turn your wireless device off and on to start pairing.<br />
Found new device, id=0x01 Mouse<br />
$ ltunify list<br />
Devices count: 1<br />
Connected devices:<br />
idx=1 Mouse M525<br />
<br />
=== Solaar ===<br />
<br />
Solaar has a GUI and CLI. Example CLI pairing session:<br />
<br />
$ solaar unpair mouse<br />
Unpaired 1: Wireless Mouse M525 [M525:DAFA335E]<br />
$ solaar pair<br />
Pairing: turn your new device on (timing out in 20 seconds).<br />
Paired device 1: Wireless Mouse M525 [M525:DAFA335E]<br />
$ solaar show<br />
-: Unifying Receiver [/dev/hidraw0:08D89AA6] with 1 devices<br />
1: Wireless Mouse M525 [M525:DAFA335E]<br />
<br />
To disable autostart of Solaar, remove {{ic|/etc/xdg/autostart/solaar.desktop}}.<br />
<br />
=== libratbag ===<br />
<br />
Currently, piper isn't able to pair/manage devices for unifying receivers but libratbag does include a {{ic|lur-command}} command line tool that is able to do this.<br />
<br />
=== pairingtool ===<br />
<br />
To find the device that the receiver has, therefore take a look at the outputs of <br />
$ ls -l /sys/class/hidraw/hidraw*/device/driver | awk -F/ '/receiver/{print $5}'<br />
This will show the names of your receiver, for example {{ic|hidraw0}}.<br />
<br />
Now switch off the device that you want to pair (if it was on) and execute your compiled program with the appropriate device as argument:<br />
# pairing_tool /dev/hidraw0<br />
The receiver is ready to pair a new device.<br />
Switch your device on to pair it (you have thirty seconds to do so).<br />
Now switch on the device you want to pair. After a few seconds your new device should work properly.<br />
<br />
== Known Problems ==<br />
<br />
=== Wrong device (pairing tool only) ===<br />
<br />
On some systems there is more than one device that has the same name. In that case you will receive the following error message when the wrong device is choosen:<br />
# pairing_tool /dev/hidraw1<br />
Error: 32<br />
write: Broken pipe<br />
<br />
=== Keyboard layout via xorg.conf ===<br />
<br />
With kernel 3.2 the Unifying Receiver got its own kernel module ''hid_logitech_dj'' which does not work flawlessly together with keyboard layout setting set via [[Xorg#Keyboard settings|xorg.conf]].<br />
A temporary workaround is to use {{Pkg|xorg-setxkbmap}} and set the layout manually. For example for a German layout with no deadkeys one has to execute:<br />
$ setxkbmap -layout de -variant nodeadkeys<br />
To automate this process one could add this line to [[xinitrc]] or the according [[autostart]] file of your windows manager respectively desktop environment.<br />
<br />
=== Logitech touchpad keyboard K400r with unifying receiver M325 ===<br />
The Logitech keyboard K400r with integrated touchpad comes with Logitech unifying receiver M325 so the above mentioned about the keyboard layout will apply here too.<br />
<br />
Also the integrated touchpad is recognized as 'pointer' instead of 'touchpad' so you cannot use the [[Touchpad Synaptics]] drivers.<br />
Two finger horizontal scrolling and tapclick will work but in order to have a middle mouse button emulated you will have to add<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-evdev.conf|<nowiki><br />
Section "InputClass"<br />
Identifier "evdev pointer catchall"<br />
MatchIsPointer "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Driver "evdev"<br />
Option "Emulate3Buttons" "true"<br />
EndSection<br />
</nowiki>}}<br />
<br />
to your evdev.conf. <br />
Now third button is emulated by pressing both buttons simultaneously.<br />
<br />
=== Solaar 'Permission denied' ===<br />
<br />
Is it possible to have the error:<br />
$ solaar show<br />
solaar: error: [Errno 13] Permission denied: '/dev/hidraw2'<br />
In this case, you can physically remove the Unifying Receiver and re-insert it, and re-run the command (as described in the second point of installation part on the official site [https://github.com/3v1n0/Solaar/blob/master/docs/installation.md]).<br />
<br />
=== Wireless Keyboard doesn't work while booting (can't enter luks passphrase) ===<br />
<br />
While booting it's impossible to input anything with a Logitech wireless Keyboard (e. g. Logitech MK700).<br />
The cause of the problem is the own hid module for Logitech devices since Kernel 3.2.<br />
<br />
A workaround is adding ''hid-logitech-hidpp'' to MODULES in {{ic|/etc/mkinitcpio.conf}}:<br />
MODULES="hid-logitech-hidpp"<br />
and recreate the initrd for the kernel:<br />
# mkinitcpio -p linux<br />
<br />
=== MouseJack Vulnerability ===<br />
<br />
Several security vulnerabilities of the system have been reported and you may be in particular affected by the [https://www.bastille.net/research/vulnerabilities/mousejack/affected-devices MouseJack Vulnerability] if your firmware has not been updated recently.<br />
<br />
It is possible to display the current firmware's version by running:<br />
ltunify receiver-info<br />
<br />
RQR12 firmware with version earlier than {{ic|012.008.00030}} and RQR24 firmware versions earlier than {{ic|024.006.00030}} are affected by this vulnerability and should be updated.<br />
<br />
The firmware can be updated using [[fwupd]] like so:<br />
<br />
fwupdmgr refresh && fwupdmgr get-updates<br />
<br />
If everything looks good, apply the update:<br />
<br />
fwupdmgr update<br />
<br />
=== Keyboard or mouse does not wake pc from sleep ===<br />
<br />
Follow the [https://github.com/3v1n0/Solaar/blob/master/docs/installation.md Solaar USB installation] instructions.<br />
<br />
=== Lag of the wireless device during heavy Wi-Fi load ===<br />
<br />
Because the receiver uses the 2.4 GHz frequency band also used by Bluetooth and Wi-Fi 802.11, it is possible in some circumstances of heavy Wi-Fi usage close to the receiver to experience lag or disturbances in communication with the devices. This is unlikely because the receiver confines its communication to channels unused by the majority of 802.11 solutions and it is able to quickly change channel within the band if it detects any interference from another device. However, some users have experienced interferences.<br />
<br />
Switching on/off the device will force the search for a "quiet" channel and may solve the issue.</div>Jose1711https://wiki.archlinux.org/index.php?title=Duply&diff=593923Duply2020-01-04T10:47:34Z<p>Jose1711: Fix typo</p>
<hr />
<div>[[Category:Backup]]<br />
[[ja:Duply]]<br />
From [http://www.duply.net/ duply.net]:<br />
<br />
:Duply is a frontend for the mighty duplicity magic. [[Duplicity]] is a python based shell application that makes encrypted incremental backups to remote storages.<br />
<br />
== Installation ==<br />
<br />
Duply is available in the {{AUR|duply}} package.<br />
<br />
== Usage ==<br />
<br />
For an overview on how to use Duply run {{ic|duply usage}}.<br />
<br />
The first thing to do is create a profile. Run {{ic|duply my_profile create}} to create a profile named ''my_profile''. Then configure the profile using the file ''~/.duply/my_profile/conf''.<br />
<br />
Use {{ic|duply my_profile backup}} to make backups and {{ic|duply my_profile restore restore_directory}} to restore after configuration is complete.<br />
<br />
== Configuration ==<br />
<br />
Set ''GPG_KEY'' to encrypt and sign the backup with a GPG key. Set the ''GPG_PW'' with the GPG passphrase. See [[#No GPG Passphrase]] for details on Duply prompting for the GPG passphrase. Set ''TARGET'' for the destination of the backup. Set ''SOURCE'' for the base location to backup. See the ''conf'' file for information on other Duply backup settings.<br />
<br />
Example:<br />
<br />
{{hc|~/.duply/my_profile/conf|<br />
output=GPG_KEY='72AD0468'<br />
GPG_PW='password'<br />
TARGET='file://my_profile_backup'<br />
SOURCE='/tmp/important_files'<br />
}}<br />
<br />
Now run {{ic|duply my_profile backup}} to backup everything in ''/tmp/important_files''. The first time {{ic|duply my_profile backup}} the user will be prompted for the GPG passphrase so that the key can be exported for safe keeping. Afterwords, Duply should run without prompting for a passphrase.<br />
<br />
To exclude files backed up, see the ''~/.duply/my_profile/exclude'' file.<br />
<br />
{{hc|~/.duply/my_profile/exclude|<br />
# Backup everything except this directory<br />
- **/less_important_files<br />
}}<br />
<br />
OR<br />
<br />
{{hc|~/.duply/my_profile/exclude|<br />
# Individual files<br />
+ /tmp/important_files/file1<br />
+ /tmp/important_files/file2<br />
<br />
# Exclude cache inside directory<br />
- /tmp/important_files/directory/cache<br />
+ /tmp/important_files/directory<br />
<br />
# Exclude everything else<br />
- **<br />
}}<br />
<br />
Dupicity exclude requires {{ic|**}} as to match the base directory.<br />
<br />
=== No GPG Passphrase ===<br />
<br />
Because of [https://sourceforge.net/p/ftplicity/bugs/83/ a bug] in the Duply, duplicity will prompt for a GPG passphrase even though it is available from the gpg-agent. Simply pressing return during the prompt will work as the passphrase is not needed to use the key (if the key is cached), or the {{ic|1=DUPL_PARAMS="$DUPL_PARAMS --use-agent"}} line can be added to the ''conf''.<br />
<br />
{{hc|1=~/.duply/my_profile/conf|<br />
2=# Turn on --use-agent option no matter what<br />
DUPL_PARAMS="$DUPL_PARAMS --use-agent"<br />
}}<br />
<br />
=== Signing fails using GPG version 2.1.0 or later ===<br />
<br />
Due to changes in recent versions of GPG, this message may occur during backup process:<br />
<br />
duply gpg: signing failed: Inappropriate ioctl for device<br />
<br />
This can be fixed by uncommenting ''GPG_OPTS'' section of Duply's ''conf'' file and adding ''--pinentry-mode loopback'' argument into it:<br />
<br />
{{hc|head=~/.duply/my_profile/conf OR /etc/duply/my_profile/conf (if running as root)|<br />
output=GPG_OPTS='--pinentry-mode loopback'<br />
}}<br />
<br />
== Backup configuration ==<br />
<br />
It is important to backup the configuration for your profile so that the backup can be recovered. One way to do this automatically is to add a ''post'' script which tars the profile after a ''backup''. For example:<br />
<br />
{{hc|1=~/.duply/my_profile/post|<br />
2=#!/bin/bash<br />
<br />
profile_name=$(basename $CONFDIR)<br />
<br />
time=$(date +%s)<br />
backup_file="$HOME/.duply/duply-$profile_name-"$time".tar.gz"<br />
<br />
# Archive the profile in the ~/.duply directory.<br />
tar -zcvf $backup_file -C $HOME/.duply $profile_name<br />
chmod 600 $backup_file<br />
}}<br />
<br />
Copy the ''*.tar.gz'' file to a secure storage location such as LastPass, KeePass, Peerio or an offline USB harddrive. Another option is to archive the profile on a piece of paper as QR code ({{AUR|duply_qr-git}}). The configuration file should accessible even if access is lost to the computer being backed up because the whole point of the backup is that it can be recovered even if the computer is lost or destroyed.</div>Jose1711https://wiki.archlinux.org/index.php?title=Duply&diff=593922Duply2020-01-04T10:46:49Z<p>Jose1711: Add duply_qr script as another alternative for duply profile backup</p>
<hr />
<div>[[Category:Backup]]<br />
[[ja:Duply]]<br />
From [http://www.duply.net/ duply.net]:<br />
<br />
:Duply is a frontend for the mighty duplicity magic. [[Duplicity]] is a python based shell application that makes encrypted incremental backups to remote storages.<br />
<br />
== Installation ==<br />
<br />
Duply is available in the {{AUR|duply}} package.<br />
<br />
== Usage ==<br />
<br />
For an overview on how to use Duply run {{ic|duply usage}}.<br />
<br />
The first thing to do is create a profile. Run {{ic|duply my_profile create}} to create a profile named ''my_profile''. Then configure the profile using the file ''~/.duply/my_profile/conf''.<br />
<br />
Use {{ic|duply my_profile backup}} to make backups and {{ic|duply my_profile restore restore_directory}} to restore after configuration is complete.<br />
<br />
== Configuration ==<br />
<br />
Set ''GPG_KEY'' to encrypt and sign the backup with a GPG key. Set the ''GPG_PW'' with the GPG passphrase. See [[#No GPG Passphrase]] for details on Duply prompting for the GPG passphrase. Set ''TARGET'' for the destination of the backup. Set ''SOURCE'' for the base location to backup. See the ''conf'' file for information on other Duply backup settings.<br />
<br />
Example:<br />
<br />
{{hc|~/.duply/my_profile/conf|<br />
output=GPG_KEY='72AD0468'<br />
GPG_PW='password'<br />
TARGET='file://my_profile_backup'<br />
SOURCE='/tmp/important_files'<br />
}}<br />
<br />
Now run {{ic|duply my_profile backup}} to backup everything in ''/tmp/important_files''. The first time {{ic|duply my_profile backup}} the user will be prompted for the GPG passphrase so that the key can be exported for safe keeping. Afterwords, Duply should run without prompting for a passphrase.<br />
<br />
To exclude files backed up, see the ''~/.duply/my_profile/exclude'' file.<br />
<br />
{{hc|~/.duply/my_profile/exclude|<br />
# Backup everything except this directory<br />
- **/less_important_files<br />
}}<br />
<br />
OR<br />
<br />
{{hc|~/.duply/my_profile/exclude|<br />
# Individual files<br />
+ /tmp/important_files/file1<br />
+ /tmp/important_files/file2<br />
<br />
# Exclude cache inside directory<br />
- /tmp/important_files/directory/cache<br />
+ /tmp/important_files/directory<br />
<br />
# Exclude everything else<br />
- **<br />
}}<br />
<br />
Dupicity exclude requires {{ic|**}} as to match the base directory.<br />
<br />
=== No GPG Passphrase ===<br />
<br />
Because of [https://sourceforge.net/p/ftplicity/bugs/83/ a bug] in the Duply, duplicity will prompt for a GPG passphrase even though it is available from the gpg-agent. Simply pressing return during the prompt will work as the passphrase is not needed to use the key (if the key is cached), or the {{ic|1=DUPL_PARAMS="$DUPL_PARAMS --use-agent"}} line can be added to the ''conf''.<br />
<br />
{{hc|1=~/.duply/my_profile/conf|<br />
2=# Turn on --use-agent option no matter what<br />
DUPL_PARAMS="$DUPL_PARAMS --use-agent"<br />
}}<br />
<br />
=== Signing fails using GPG version 2.1.0 or later ===<br />
<br />
Due to changes in recent versions of GPG, this message may occur during backup process:<br />
<br />
duply gpg: signing failed: Inappropriate ioctl for device<br />
<br />
This can be fixed by uncommenting ''GPG_OPTS'' section of Duply's ''conf'' file and adding ''--pinentry-mode loopback'' argument into it:<br />
<br />
{{hc|head=~/.duply/my_profile/conf OR /etc/duply/my_profile/conf (if running as root)|<br />
output=GPG_OPTS='--pinentry-mode loopback'<br />
}}<br />
<br />
== Backup configuration ==<br />
<br />
It is important to backup the configuration for your profile so that the backup can be recovered. One way to do this automatically is to add a ''post'' script which tars the profile after a ''backup''. For example:<br />
<br />
{{hc|1=~/.duply/my_profile/post|<br />
2=#!/bin/bash<br />
<br />
profile_name=$(basename $CONFDIR)<br />
<br />
time=$(date +%s)<br />
backup_file="$HOME/.duply/duply-$profile_name-"$time".tar.gz"<br />
<br />
# Archive the profile in the ~/.duply directory.<br />
tar -zcvf $backup_file -C $HOME/.duply $profile_name<br />
chmod 600 $backup_file<br />
}}<br />
<br />
Copy the ''*.tar.gz'' file to a secure storage location such as LastPass, KeePass, Peerio or an offline USB harddrive. Another option is to archive the profile on a piece of paper as QR code ({{AUR|duply_qr-git}}). The configuration file should accessable even if access is lost to the computer being backed up because the whole point of the backup is that it can be recovered even if the computer is lost or destroyed.</div>Jose1711https://wiki.archlinux.org/index.php?title=Asterisk&diff=592616Asterisk2019-12-25T23:43:46Z<p>Jose1711: add blink as recommended sip client, fix linphone aur link</p>
<hr />
<div>[[Category:Telephony]]<br />
[[Category:Voice over IP]]<br />
[[ja:Asterisk]]<br />
[http://www.asterisk.org Asterisk] is a complete PBX (private branch exchange) in software. It runs on Linux, BSD, Windows and macOS and provides all of the features you would expect from a PBX and more. Asterisk does voice over IP in four protocols, and can interoperate with almost all standards-based telephony equipment using relatively inexpensive hardware.<br />
<br />
Asterisk provides voice-mail services with directory, call conferencing, interactive voice response and call queuing. It has support for three-way calling, caller ID services, ADSI, IAX, SIP, H.323 (as both client and gateway), MGCP (call manager only) and SCCP/Skinny. <br />
<br />
This article will show you how to configure a simple in house network enabling us to use a SIP [[softphone]] to talk to another SIP softphone on your LAN.<br />
<br />
==Installation==<br />
<br />
Install the {{AUR|asterisk}} package. If you are using Cisco-based phones it is recommended to use the {{AUR|asterisk-cisco}} package instead as this is prepatched with the presence patch. (See [https://issues.asterisk.org/jira/browse/ASTERISK-13145 https://issues.asterisk.org/jira/browse/ASTERISK-13145])<br />
<br />
[[Start]] the server with {{ic|asterisk.service}}.<br />
<br />
You will also need a SIP [[softphone]] and at least two machines. Recommendations for SIP phones are [http://icanblink.com/ Blink] ({{AUR|blink}}), [http://www.linphone.org/ Linphone] ({{AUR|linphone-git}}) or [http://www.counterpath.com/x-lite/ X-Lite] ({{AUR|xlite_bin}} package).<br />
<br />
To enable ilbc codec support add the following to the very beginning of the {{ic|build}} section of the PKGBUILD:<br />
{{bc|<nowiki><br />
cd ${srcdir}/${pkgname}-${pkgver}/contrib/scripts<br />
echo | ./get_ilbc_source.sh<br />
</nowiki>}}<br />
<br />
==Configuration==<br />
<br />
Note that the following instructions assume that you want to use already obsoleted {{ic|sip}} module. In order to do so you must allow it and at the same time assure that newer {{ic|pjsip}} module is unloaded. In {{ic|/etc/asterisk/modules.conf}} adjust the following:<br />
{{bc|<nowiki><br />
noload => chan_pjsip.so<br />
noload => res_pjsip.so<br />
# remove noload => chan_sip<br />
</nowiki>}}<br />
<br />
===SIP===<br />
Assuming your asterisk server is up and running, we will only need to edit two files: {{ic|sip.conf}} and {{ic|extensions.conf}}. Change to your asterisk configuration directory (should be {{ic|/etc/asterisk}}). Edit sip.conf and place the following:<br />
{{bc|1=<br />
[me1]<br />
type=friend<br />
username=me1<br />
secret=PASSWORD<br />
host=dynamic<br />
context=house<br />
<br />
[me2]<br />
type=friend<br />
username=me2<br />
secret=PASSWORD<br />
host=dynamic<br />
context=house<br />
}}<br />
<br />
This creates our two SIP users {{Ic|me1}} and {{Ic|me2}} with a password of {{Ic|PASSWORD}} in the {{Ic|house}} context.<br />
<br />
We will be defining the context next -- edit extensions.conf with the following:<br />
{{bc|1=<br />
[house]<br />
exten => 100,1,Dial(SIP/me1)<br />
<br />
exten => 101,1,Dial(SIP/me2)<br />
}}<br />
<br />
This creates the context {{Ic|house}} and assigns extension 100 to the SIP user {{Ic|me1}}, and extension 101 to the SIP user {{Ic|me2}}. Now all thats left is to see if it works.<br />
===Music on hold===<br />
Music on hold is a really sweet feature. And once again easy to install and configure.<br />
Edit {{ic|/etc/asterisk/musiconhold.conf}} and add, or make sure it is uncommented:<br />
{{bc|1=<br />
[default]<br />
mode=files<br />
directory=mohmp3<br />
}}<br />
<br />
And that is all there is to it. Just copy your favorite legally obtained MP3 to {{ic|/var/lib/asterisk/mohmp3}}.<br />
<br />
===Voicemail===<br />
Voicemail is another feature of asterisk. There are many ways to configure it, however this article only covers a simple approach.<br />
<br />
Create/edit your {{ic|voicemail.conf}}:<br />
{{bc|<nowiki><br />
[general]<br />
format=gsm|wav49|wav<br />
serveremail=asterisk<br />
attach=no<br />
mailcmd=/usr/sbin/sendmail -t<br />
maxmessage=180<br />
maxgreet=60<br />
<br />
[default]<br />
100 => 1234,Me,me@mydomain.com<br />
</nowiki>}}<br />
<br />
What does this mean? Most of the {{Ic|[general]}} is pretty self-explanatory. However, do note that if you have postfix set up right the PBX will send an email notifying the user of a new voice-mail and if {{Ic|1=attach=yes}} is defined it will attach the file.<br />
<br />
Now for the actual mailbox. The format is:<br />
mailbox => password,user,email<br />
In this case, we gave 'Me' (email me@mydomain.com) mailbox 100, with a password of 1234.<br />
<br />
Now we have to have a way to leave messages to this voice-mail, and a way to access it. <br />
For this, we go back to the {{ic|extensions.conf}} and modify your existing entry as follows:<br />
exten => 100,1,Dial(SIP/me1,20)<br />
exten => 100,n,Voicemail(u100@default)<br />
The 20 on the end of the first 'exten' tells 'Dial()' to call for 20 seconds. If no one answers it heads to voice-mail box 100 in the default context.<br />
<br />
Next is actually accessing your voicemail. For this we add:<br />
exten => 600,1,VoiceMailMain,s100@default<br />
So when we call 600, the application 'VoiceMailMain' goes to 100 in the default context. The {{Ic|s}} allows for automatic login. <br />
<br />
{{Note|The 'VoiceMail' applications have a significant amount of options, so it is suggested reading over some additional documentation. This is just for a basic, home use setup. Also note that it is generally a good idea to use extensions higher then your users extensions for accessing 'VoiceMail'. This way someone dialing 208 does not hit someone's voice-mail at 205.}}<br />
<br />
===Connecting to the PSTN===<br />
Now that you have the previous setup, it is time to actually connect to the outside world. To do this, you will need a provider such as [https://www.onsip.com/ OnSIP]. Your provider should have instructions on connecting to asterisk, so this section is very general.<br />
<br />
====General set-up====<br />
=====sip.conf=====<br />
{{bc|1=<br />
[general]<br />
register => username:password@sip.specific.com<br />
<br />
[whatever] <br />
fromdomain=specific.com <br />
host=sip.specific.com<br />
insecure=very ; check with provider<br />
username=usernameduh<br />
secret=passwordduh<br />
type=peer<br />
}}<br />
<br />
=====extensions.conf=====<br />
{{bc|1=<br />
[outboundwithCID] ; this can be whatever<br />
exten => _1NXXNXXXXXX,1,SetCIDNum(15555551234)<br />
exten => _1NXXNXXXXXX,2,Dial(SIP/${EXTEN}@whatever)<br />
exten => _1NXXNXXXXXX,3,Congestion()<br />
exten => _1NXXNXXXXXX,103,Busy()<br />
<br />
[default] ; This should be set in your sip.conf for incoming calls<br />
<br />
;These should to be changed to your actual number<br />
; ie 15555555555<br />
exten => 1NXXNXXXXXX,1,Answer()<br />
exten => 1NXXNXXXXXX,2,Playback(ttt-weasels)<br />
exten => 1NXXNXXXXXX,3,HangUp()<br />
}}<br />
<br />
*In the outbound context, any number dialed will be sent out to your service provider. The 'whatever' in the 2 priority should match what you have in your sip.conf.<br />
*Of course, the inbound dial-plan can be modified to do what you want. For instance, you can have {{Ic|Dial(SIP/me1)}} so when someone calls your number they are routed to your SIP phone on your computer. Then add in voice-mail and so on.<br />
<br />
=====iax.conf=====<br />
The first step is to log into FWD and enable their side of IAX. It is under extra features, and keep in mind that the authors claim it takes a little while to activate. <br />
<br />
Now edit your iax.conf with the following in the 'general' section:<br />
{{bc|1=<br />
register => FWDNUMBER:PASSWORD@iax2.fwdnet.net <br />
disallow = all<br />
allow = ulaw<br />
}}<br />
<br />
And at the bottom add:<br />
{{bc|1=<br />
[iaxfwd]<br />
type=user<br />
context=fromiaxfwd<br />
auth=rsa<br />
inkeys=freeworlddialup<br />
}}<br />
<br />
This allows calls from FWD.<br />
<br />
=====extensions.conf=====<br />
Place this at the top under '[globals]':<br />
{{bc|1=<br />
FWDNUMBER=MYFWDNUMBER ; your calling number<br />
FWDCIDNAME="MyName"; your caller id<br />
FWDPASSWORD=MYFWDPASSWORD ; your password<br />
FWDRINGS=sip/office ; the phone to ring<br />
FWDVMBOX=1000 ; the VM box for this user<br />
}}<br />
<br />
Next, add this to a context for outgoing:<br />
{{bc|1=<br />
exten => _393.,1,SetCallerId,${FWDCIDNAME}<br />
exten => _393.,2,Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:3},60,r)<br />
exten => _393.,3,Congestion<br />
}}<br />
<br />
You can change the '393' to whatever you want. This is what you will dial before dialing a 'fwd' number. For instance, to dial '744561' you would dial '393744561'.<br />
<br />
And lastly, the incoming calls:<br />
{{bc|1=<br />
[fromiaxfwd]<br />
exten => ${FWDNUMBER},1,Dial(${FWDRINGS},20,r)<br />
exten => ${FWDNUMBER},2,Voicemail,u${FWDVMBOX}<br />
exten => ${FWDNUMBER},102,Voicemail,b${FWDVMBOX}<br />
}}<br />
<br />
{{Note|If you have problems try removing the variables from {{ic|extensions.conf}}. These instructions are from FWD's site and I have not been tested by this article's author.}}<br />
<br />
Extensions to try calling are 55555 (a volunteer maned test line) and 514 (conference).<br />
<br />
===Sounds===<br />
Sounds are stored in the folder {{ic|/var/lib/asterisk/xx}}, {{ic|xx}} stands for the code of the language for example "en" for English. To add new sounds copy them to the folder. Preserve the following folder structure:<br />
{{bc|<br />
/var/lib/asterisk/sounds/xx<br />
/var/lib/asterisk/sounds/xx/digits<br />
/var/lib/asterisk/sounds/xx/letters<br />
/var/lib/asterisk/sounds/xx/phonetic<br />
}}<br />
<br />
Edit the language parameter in the {{ic|sip.conf}}<br />
{{bc|1=<br />
[general]<br />
...<br />
language=en<br />
...<br />
}}<br />
Possible sources for sounds are:<br />
* http://downloads.asterisk.org/pub/telephony/sounds/ <br />
* https://packages.debian.org/wheezy/all/asterisk-prompt-xx<br />
** [https://packages.debian.org/wheezy/all/asterisk-prompt-fr fr]<br />
** [https://packages.debian.org/wheezy/all/asterisk-prompt-de de]<br />
** ...<br />
* [http://www.voip-info.org/wiki/view/Asterisk+sound+files+international voip-info.org]<br />
===MeetMe===<br />
MeetMe is the application that allows you to do conference calling. Same as everything, basic setup is easy.<br />
<br />
Edit {{ic|meetme.conf}}:<br />
conf => 1000<br />
Next is extensions.conf<br />
exten => 999,1,MeetMe(1000|M)<br />
Now dial 999 to get into conference 1000. The {{Ic||M}} enables music on hold if no one is in there. It will automatically go away when someone joins the conference.<br />
<br />
{{Note|You ''must'' have the zaptel package in order for MeetMe to work. Install it and run {{Ic|modprobe ztdummy}} before running asterisk. This provides digium timing for us without cards so we can utilize TDM.}}<br />
<br />
==Asterisk console and softphones==<br />
Now lets get Asterisk going: <br />
# asterisk -vvvvvvc<br />
This will give us the Asterisk CLI with verbose output. If Asterisk is already running you will need to use:<br />
# asterisk -r<br />
Now fire up your SIP clients and set them up with the information in the sip.conf. Switch back to your Asterisk CLI and you should see: <br />
Registered SIP 'me1' at 192.168.0.142 port 5061 expires 60<br />
<br />
Now you should be able to dial {{Ic|101}} from {{Ic|me1}} and talk to {{Ic|me2}}.<br />
<br />
==Troubleshooting==<br />
If you receive a 404 Not Found error check your {{ic|extensions.conf}} and the number you dialed.</div>Jose1711https://wiki.archlinux.org/index.php?title=Asterisk&diff=592604Asterisk2019-12-25T19:59:30Z<p>Jose1711: add note about unloading pjsip for instructions to work</p>
<hr />
<div>[[Category:Telephony]]<br />
[[Category:Voice over IP]]<br />
[[ja:Asterisk]]<br />
[http://www.asterisk.org Asterisk] is a complete PBX (private branch exchange) in software. It runs on Linux, BSD, Windows and macOS and provides all of the features you would expect from a PBX and more. Asterisk does voice over IP in four protocols, and can interoperate with almost all standards-based telephony equipment using relatively inexpensive hardware.<br />
<br />
Asterisk provides voice-mail services with directory, call conferencing, interactive voice response and call queuing. It has support for three-way calling, caller ID services, ADSI, IAX, SIP, H.323 (as both client and gateway), MGCP (call manager only) and SCCP/Skinny. <br />
<br />
This article will show you how to configure a simple in house network enabling us to use a SIP [[softphone]] to talk to another SIP softphone on your LAN.<br />
<br />
==Installation==<br />
<br />
Install the {{AUR|asterisk}} package. If you are using Cisco-based phones it is recommended to use the {{AUR|asterisk-cisco}} package instead as this is prepatched with the presence patch. (See [https://issues.asterisk.org/jira/browse/ASTERISK-13145 https://issues.asterisk.org/jira/browse/ASTERISK-13145])<br />
<br />
[[Start]] the server with {{ic|asterisk.service}}.<br />
<br />
You will also need a SIP [[softphone]] and at least two machines. Recommendations for SIP phones are [http://www.linphone.org/ Linphone] ({{AUR|linphone}}{{Broken package link|package not found}} package) or [http://www.counterpath.com/x-lite/ X-Lite] ({{AUR|xlite_bin}} package).<br />
<br />
To enable ilbc codec support add the following to the very beginning of the {{ic|build}} section of the PKGBUILD:<br />
{{bc|<nowiki><br />
cd ${srcdir}/${pkgname}-${pkgver}/contrib/scripts<br />
echo | ./get_ilbc_source.sh<br />
</nowiki>}}<br />
<br />
==Configuration==<br />
<br />
Note that the following instructions assume that you want to use already obsoleted {{ic|sip}} module. In order to do so you must allow it and at the same time assure that newer {{ic|pjsip}} module is unloaded. In {{ic|/etc/asterisk/modules.conf}} adjust the following:<br />
{{bc|<nowiki><br />
noload => chan_pjsip.so<br />
noload => res_pjsip.so<br />
# remove noload => chan_sip<br />
</nowiki>}}<br />
<br />
===SIP===<br />
Assuming your asterisk server is up and running, we will only need to edit two files: {{ic|sip.conf}} and {{ic|extensions.conf}}. Change to your asterisk configuration directory (should be {{ic|/etc/asterisk}}). Edit sip.conf and place the following:<br />
{{bc|1=<br />
[me1]<br />
type=friend<br />
username=me1<br />
secret=PASSWORD<br />
host=dynamic<br />
context=house<br />
<br />
[me2]<br />
type=friend<br />
username=me2<br />
secret=PASSWORD<br />
host=dynamic<br />
context=house<br />
}}<br />
<br />
This creates our two SIP users {{Ic|me1}} and {{Ic|me2}} with a password of {{Ic|PASSWORD}} in the {{Ic|house}} context.<br />
<br />
We will be defining the context next -- edit extensions.conf with the following:<br />
{{bc|1=<br />
[house]<br />
exten => 100,1,Dial(SIP/me1)<br />
<br />
exten => 101,1,Dial(SIP/me2)<br />
}}<br />
<br />
This creates the context {{Ic|house}} and assigns extension 100 to the SIP user {{Ic|me1}}, and extension 101 to the SIP user {{Ic|me2}}. Now all thats left is to see if it works.<br />
===Music on hold===<br />
Music on hold is a really sweet feature. And once again easy to install and configure.<br />
Edit {{ic|/etc/asterisk/musiconhold.conf}} and add, or make sure it is uncommented:<br />
{{bc|1=<br />
[default]<br />
mode=files<br />
directory=mohmp3<br />
}}<br />
<br />
And that is all there is to it. Just copy your favorite legally obtained MP3 to {{ic|/var/lib/asterisk/mohmp3}}.<br />
<br />
===Voicemail===<br />
Voicemail is another feature of asterisk. There are many ways to configure it, however this article only covers a simple approach.<br />
<br />
Create/edit your {{ic|voicemail.conf}}:<br />
{{bc|<nowiki><br />
[general]<br />
format=gsm|wav49|wav<br />
serveremail=asterisk<br />
attach=no<br />
mailcmd=/usr/sbin/sendmail -t<br />
maxmessage=180<br />
maxgreet=60<br />
<br />
[default]<br />
100 => 1234,Me,me@mydomain.com<br />
</nowiki>}}<br />
<br />
What does this mean? Most of the {{Ic|[general]}} is pretty self-explanatory. However, do note that if you have postfix set up right the PBX will send an email notifying the user of a new voice-mail and if {{Ic|1=attach=yes}} is defined it will attach the file.<br />
<br />
Now for the actual mailbox. The format is:<br />
mailbox => password,user,email<br />
In this case, we gave 'Me' (email me@mydomain.com) mailbox 100, with a password of 1234.<br />
<br />
Now we have to have a way to leave messages to this voice-mail, and a way to access it. <br />
For this, we go back to the {{ic|extensions.conf}} and modify your existing entry as follows:<br />
exten => 100,1,Dial(SIP/me1,20)<br />
exten => 100,n,Voicemail(u100@default)<br />
The 20 on the end of the first 'exten' tells 'Dial()' to call for 20 seconds. If no one answers it heads to voice-mail box 100 in the default context.<br />
<br />
Next is actually accessing your voicemail. For this we add:<br />
exten => 600,1,VoiceMailMain,s100@default<br />
So when we call 600, the application 'VoiceMailMain' goes to 100 in the default context. The {{Ic|s}} allows for automatic login. <br />
<br />
{{Note|The 'VoiceMail' applications have a significant amount of options, so it is suggested reading over some additional documentation. This is just for a basic, home use setup. Also note that it is generally a good idea to use extensions higher then your users extensions for accessing 'VoiceMail'. This way someone dialing 208 does not hit someone's voice-mail at 205.}}<br />
<br />
===Connecting to the PSTN===<br />
Now that you have the previous setup, it is time to actually connect to the outside world. To do this, you will need a provider such as [https://www.onsip.com/ OnSIP]. Your provider should have instructions on connecting to asterisk, so this section is very general.<br />
<br />
====General set-up====<br />
=====sip.conf=====<br />
{{bc|1=<br />
[general]<br />
register => username:password@sip.specific.com<br />
<br />
[whatever] <br />
fromdomain=specific.com <br />
host=sip.specific.com<br />
insecure=very ; check with provider<br />
username=usernameduh<br />
secret=passwordduh<br />
type=peer<br />
}}<br />
<br />
=====extensions.conf=====<br />
{{bc|1=<br />
[outboundwithCID] ; this can be whatever<br />
exten => _1NXXNXXXXXX,1,SetCIDNum(15555551234)<br />
exten => _1NXXNXXXXXX,2,Dial(SIP/${EXTEN}@whatever)<br />
exten => _1NXXNXXXXXX,3,Congestion()<br />
exten => _1NXXNXXXXXX,103,Busy()<br />
<br />
[default] ; This should be set in your sip.conf for incoming calls<br />
<br />
;These should to be changed to your actual number<br />
; ie 15555555555<br />
exten => 1NXXNXXXXXX,1,Answer()<br />
exten => 1NXXNXXXXXX,2,Playback(ttt-weasels)<br />
exten => 1NXXNXXXXXX,3,HangUp()<br />
}}<br />
<br />
*In the outbound context, any number dialed will be sent out to your service provider. The 'whatever' in the 2 priority should match what you have in your sip.conf.<br />
*Of course, the inbound dial-plan can be modified to do what you want. For instance, you can have {{Ic|Dial(SIP/me1)}} so when someone calls your number they are routed to your SIP phone on your computer. Then add in voice-mail and so on.<br />
<br />
=====iax.conf=====<br />
The first step is to log into FWD and enable their side of IAX. It is under extra features, and keep in mind that the authors claim it takes a little while to activate. <br />
<br />
Now edit your iax.conf with the following in the 'general' section:<br />
{{bc|1=<br />
register => FWDNUMBER:PASSWORD@iax2.fwdnet.net <br />
disallow = all<br />
allow = ulaw<br />
}}<br />
<br />
And at the bottom add:<br />
{{bc|1=<br />
[iaxfwd]<br />
type=user<br />
context=fromiaxfwd<br />
auth=rsa<br />
inkeys=freeworlddialup<br />
}}<br />
<br />
This allows calls from FWD.<br />
<br />
=====extensions.conf=====<br />
Place this at the top under '[globals]':<br />
{{bc|1=<br />
FWDNUMBER=MYFWDNUMBER ; your calling number<br />
FWDCIDNAME="MyName"; your caller id<br />
FWDPASSWORD=MYFWDPASSWORD ; your password<br />
FWDRINGS=sip/office ; the phone to ring<br />
FWDVMBOX=1000 ; the VM box for this user<br />
}}<br />
<br />
Next, add this to a context for outgoing:<br />
{{bc|1=<br />
exten => _393.,1,SetCallerId,${FWDCIDNAME}<br />
exten => _393.,2,Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:3},60,r)<br />
exten => _393.,3,Congestion<br />
}}<br />
<br />
You can change the '393' to whatever you want. This is what you will dial before dialing a 'fwd' number. For instance, to dial '744561' you would dial '393744561'.<br />
<br />
And lastly, the incoming calls:<br />
{{bc|1=<br />
[fromiaxfwd]<br />
exten => ${FWDNUMBER},1,Dial(${FWDRINGS},20,r)<br />
exten => ${FWDNUMBER},2,Voicemail,u${FWDVMBOX}<br />
exten => ${FWDNUMBER},102,Voicemail,b${FWDVMBOX}<br />
}}<br />
<br />
{{Note|If you have problems try removing the variables from {{ic|extensions.conf}}. These instructions are from FWD's site and I have not been tested by this article's author.}}<br />
<br />
Extensions to try calling are 55555 (a volunteer maned test line) and 514 (conference).<br />
<br />
===Sounds===<br />
Sounds are stored in the folder {{ic|/var/lib/asterisk/xx}}, {{ic|xx}} stands for the code of the language for example "en" for English. To add new sounds copy them to the folder. Preserve the following folder structure:<br />
{{bc|<br />
/var/lib/asterisk/sounds/xx<br />
/var/lib/asterisk/sounds/xx/digits<br />
/var/lib/asterisk/sounds/xx/letters<br />
/var/lib/asterisk/sounds/xx/phonetic<br />
}}<br />
<br />
Edit the language parameter in the {{ic|sip.conf}}<br />
{{bc|1=<br />
[general]<br />
...<br />
language=en<br />
...<br />
}}<br />
Possible sources for sounds are:<br />
* http://downloads.asterisk.org/pub/telephony/sounds/ <br />
* https://packages.debian.org/wheezy/all/asterisk-prompt-xx<br />
** [https://packages.debian.org/wheezy/all/asterisk-prompt-fr fr]<br />
** [https://packages.debian.org/wheezy/all/asterisk-prompt-de de]<br />
** ...<br />
* [http://www.voip-info.org/wiki/view/Asterisk+sound+files+international voip-info.org]<br />
===MeetMe===<br />
MeetMe is the application that allows you to do conference calling. Same as everything, basic setup is easy.<br />
<br />
Edit {{ic|meetme.conf}}:<br />
conf => 1000<br />
Next is extensions.conf<br />
exten => 999,1,MeetMe(1000|M)<br />
Now dial 999 to get into conference 1000. The {{Ic||M}} enables music on hold if no one is in there. It will automatically go away when someone joins the conference.<br />
<br />
{{Note|You ''must'' have the zaptel package in order for MeetMe to work. Install it and run {{Ic|modprobe ztdummy}} before running asterisk. This provides digium timing for us without cards so we can utilize TDM.}}<br />
<br />
==Asterisk console and softphones==<br />
Now lets get Asterisk going: <br />
# asterisk -vvvvvvc<br />
This will give us the Asterisk CLI with verbose output. If Asterisk is already running you will need to use:<br />
# asterisk -r<br />
Now fire up your SIP clients and set them up with the information in the sip.conf. Switch back to your Asterisk CLI and you should see: <br />
Registered SIP 'me1' at 192.168.0.142 port 5061 expires 60<br />
<br />
Now you should be able to dial {{Ic|101}} from {{Ic|me1}} and talk to {{Ic|me2}}.<br />
<br />
==Troubleshooting==<br />
If you receive a 404 Not Found error check your {{ic|extensions.conf}} and the number you dialed.</div>Jose1711https://wiki.archlinux.org/index.php?title=Nouveau&diff=589301Nouveau2019-11-18T21:22:43Z<p>Jose1711: also check xorg.conf as it may be another reason why nouveau is not being loaded</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[es:Nouveau]]<br />
[[it:Nouveau]]<br />
[[ja:Nouveau]]<br />
[[ru:Nouveau]]<br />
[[zh-hans:Nouveau]]<br />
{{Related articles start}}<br />
{{Related|NVIDIA}}<br />
{{Related|Xorg}}<br />
{{Related|Bumblebee}}<br />
{{Related articles end}}<br />
<br />
This article covers the open-source [https://nouveau.freedesktop.org/ Nouveau] driver for NVIDIA graphics cards. For information about the proprietary driver, see [[NVIDIA]].<br />
<br />
Find your card's [https://nouveau.freedesktop.org/wiki/CodeNames code name] (a more detailed list is available on [[Wikipedia:Comparison of Nvidia Graphics Processing Units|Wikipedia]]), and compare it with the [https://nouveau.freedesktop.org/wiki/FeatureMatrix/ feature matrix] for supported features.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|mesa}} package, which provides the DRI driver for 3D acceleration.<br />
<br />
* For 32-bit application support, also install the {{Pkg|lib32-mesa}} package from the [[multilib]] repostory.<br />
* For the DDX driver (which provides 2D acceleration in [[Xorg]]), [[install]] the {{Pkg|xf86-video-nouveau}} package.<br />
<br />
Also see [[Hardware video acceleration]].<br />
<br />
== Loading ==<br />
<br />
The Nouveau kernel module should load automatically on system boot. If it does not happen, then:<br />
<br />
* Make sure you do '''not''' have {{ic|nomodeset}} or {{ic|1=vga=}} as a [[kernel parameter]], since Nouveau requires kernel mode-setting.<br />
* Also, check that you do not have Nouveau disabled using any modprobe blacklisting technique within {{ic|/etc/modprobe.d/}} or {{ic|/usr/lib/modprobe.d/}}.<br />
* If all above still fails to load nouveau check dmesg for an opcode error. Add {{ic|1=nouveau.config=NvBios=PRAMIN}} to your [[Kernel parameters]] to prevent module unloading.[https://nouveau.freedesktop.org/wiki/TroubleShooting/#index10h3]<br />
* Check if {{ic|/etc/X11/xorg.conf}} exists and is referencing {{ic|nvidia}} driver. It's probably a good idea to rename the file.<br />
<br />
=== Enable early KMS ===<br />
<br />
{{Tip|If you have problems with the resolution, check [[Kernel mode setting#Forcing modes and EDID]].}}<br />
<br />
[[Kernel mode setting]] (KMS) is required by the Nouveau driver. By default, the KMS is done after the other kernel modules are loaded. You will see the text "Loading modules" and the size of the text may change, possibly with an undesirable flicker. See the [https://nouveau.freedesktop.org/wiki/KernelModeSetting Nouveau KernelModeSetting page] for more details.<br />
<br />
It is also possible to start the KMS as early as possible in the boot process, when the [[initramfs]] is loaded. <br />
<br />
To do this, add {{ic|nouveau}} to the {{ic|MODULES}} array in {{ic|/etc/mkinitcpio.conf}} (module names are separated by spaces): <br />
<br />
MODULES="... nouveau ..."<br />
<br />
If you are using a custom EDID file, you should embed it into initramfs as well:<br />
<br />
{{hc|/etc/mkinitcpio.conf|<br />
2=FILES="/lib/firmware/edid/your_edid.bin"}}<br />
<br />
Re-generate the initial ramdisk image:<br />
<br />
# mkinitcpio -p <kernel preset; e.g. ''linux''><br />
<br />
If you're experiencing troubles with Nouveau leading to rebuild nouveau-drm several times for testing purposes, do not add {{ic|nouveau}} to the initramfs. It is too easy to forget to rebuild the initramfs and it will just make any testing harder. Just use "Late start" until you are confident the system is stable. There might be additional problems with initramfs if you need a custom firmware (generally not advised).<br />
<br />
== Tips and tricks ==<br />
<br />
=== Keep NVIDIA driver installed ===<br />
<br />
If you want to keep the proprietary NVIDIA driver installed (and are not using OpenGL), but want to use the Nouveau driver, comment out nouveau blacklisting in {{ic|/etc/modprobe.d/nouveau_blacklist.conf}} or {{ic|/usr/lib/modprobe.d/nvidia.conf}} modifying it as follows:<br />
<br />
#blacklist nouveau<br />
<br />
And tell Xorg to load nouveau instead of nvidia by creating the file {{ic|/etc/X11/xorg.conf.d/20-nouveau.conf}} with the following content:<br />
<br />
Section "Device"<br />
Identifier "Nvidia card"<br />
Driver "nouveau"<br />
EndSection<br />
<br />
If you already used the NVIDIA driver, and want to test Nouveau without reboot, make sure the 'nvidia' module is no longer loaded:<br />
<br />
# rmmod nvidia<br />
<br />
Then load the 'nouveau' module: <br />
<br />
# modprobe nouveau<br />
<br />
And check that it loaded fine by looking at kernel messages: <br />
<br />
$ dmesg<br />
<br />
=== Installing the latest development packages ===<br />
<br />
To get the latest Nouveau improvements<br />
*{{AUR|linux-git}} PKGBUILD to use the Nouveau tree at https://github.com/skeggsb/linux/, instead of making a package from scratch.<br />
*{{AUR|libdrm-git}}<br />
*{{AUR|lib32-libdrm-git}}<br />
*{{AUR|lib32-mesa-git}}<br />
*{{AUR|mesa-git}}<br />
*{{AUR|xf86-video-nouveau-git}}<br />
<br />
=== Dual head ===<br />
<br />
Nouveau supports the xrandr extension for modesetting and multiple monitors. See the [[xrandr]] page for tutorials.<br />
<br />
Here is a full sample {{ic|/etc/X11/xorg.conf.d/20-nouveau.conf}} above for running 2 monitors in dual head mode. You may prefer to use a graphical tool to configure monitors like GNOME Control Center's Display panel ({{ic|gnome-control-center display}}).<br />
<br />
{{bc|<br />
# the right one<br />
Section "Monitor"<br />
Identifier "NEC"<br />
Option "PreferredMode" "1280x1024_60.00"<br />
EndSection<br />
<br />
# the left one<br />
Section "Monitor"<br />
Identifier "FUS"<br />
Option "PreferredMode" "1280x1024_60.00"<br />
Option "LeftOf" "NEC"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "nvidia card"<br />
Driver "nouveau"<br />
Option "Monitor-DVI-I-1" "NEC"<br />
Option "Monitor-DVI-I-2" "FUS"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "screen1"<br />
Monitor "NEC"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Depth 24<br />
Virtual 2560 2048<br />
EndSubSection<br />
Device "nvidia card"<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "layout1"<br />
Screen "screen1"<br />
EndSection}}<br />
<br />
=== Setting console resolution ===<br />
<br />
Use the {{Pkg|fbset}} tool to adjust console resolution.<br />
<br />
You can also pass the resolution to nouveau with the {{ic|1=video=}} kernel line option (see [[KMS]]).<br />
<br />
=== Power management ===<br />
<br />
The lack of proper power management in the nouveau driver is one of the most important causes of performance issues, since most cards will remain in their lower power state with lower clocks during their use. Experimental support for GPU reclocking is available for some cards (see the [https://nouveau.freedesktop.org/wiki/PowerManagement Nouveau PowerManagement page]) and since kernel 4.5 can be controlled through a debugfs interface located at {{ic|/sys/kernel/debug/dri/*/pstate}}.<br />
<br />
For example, to check the available power states and the current setting for the first card in your system, run:<br />
<br />
# cat /sys/kernel/debug/dri/0/pstate<br />
<br />
It's also possible to manually set/force a certain power state by writing to said interface:<br />
<br />
# echo ''pstate'' > /sys/kernel/debug/dri/0/pstate<br />
<br />
{{Warning|The support for reclocking is highly experimental. Manually setting the power state may hang your system, cause corruption or overheat your card.}}<br />
<br />
==== Fan control ====<br />
<br />
If it is implemented for you card you can configure fan control via {{ic|/sys}}.<br />
<br />
$ find /sys -name pwm1_enable<br />
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon1/pwm1_enable<br />
$ readlink /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/driver<br />
../../../../bus/pci/drivers/nouveau<br />
<br />
{{ic|pwm1_enable}} can be set to 0, 1 or 2 meaning NONE, MANUAL and AUTO fan control. If set to manual fan control, you can set {{ic|pwm1}} manually, for example to 40 for 40%.<br />
{{Warning|Use at your own risk! Don't overheat your card!}}<br />
<br />
You can also set it by udev rule:<br />
$ cat /etc/udev/rules.d/50-nouveau-hwmon.rules<br />
ACTION=="add", SUBSYSTEM=="hwmon", DRIVERS=="nouveau", ATTR{pwm1_enable}="2"<br />
<br />
Sources:<br />
* http://floppym.blogspot.de/2013/07/fan-control-with-nouveau.html<br />
* https://kalgan.cc/blog/posts/Controlling_nVidia_cards_fans_with_nouveau_in_Debian/<br />
<br />
=== Optimus ===<br />
<br />
You have two solutions to use [[Optimus]] on a laptop (aka hybrid graphics, when you have two GPUs on your laptop): [[bumblebee]] and [[PRIME]]<br />
<br />
=== Vertical Sync ===<br />
Xorg compositors are prone to show issues with Nouveau. Unlike most of them, [[Compton]] offers lots of options to tweak for a smoother and tearing free result. A configuration which is expected to deliver a good result would be the following:<br />
compton -b --unredir-if-possible --backend xr_glx_hybrid --vsync --use-damage --glx-no-stencil<br />
{{Tip|Don't forget to turn off compositing of your DE's window manager like KWin when using a different compositor.}}<br />
<br />
== Troubleshooting ==<br />
Add {{ic|1=drm.debug=14}} and {{ic|1=log_buf_len=16M}} to your [[kernel parameters]] to turn on video debugging:<br />
<br />
Create verbose Xorg log:<br />
$ startx -- -logverbose 9 -verbose 9<br />
<br />
View loaded video module parameters and values:<br />
$ modinfo -p video<br />
<br />
===Disable MSI===<br />
If you are still having problems loading the module or starting X server append {{ic|1=nouveau.config=NvMSI=0}} to your [[Kernel parameters]].<br />
<br />
Source: https://bugs.freedesktop.org/show_bug.cgi?id=78441<br />
<br />
=== Phantom output issue ===<br />
<br />
It is possible for the nouveau driver to detect "phantom" outputs. For example, both VGA-1 and LVDS-1 are shown as connected but only LVDS-1 is present.<br />
<br />
This causes display problems and/or prevent suspending on lid closure.<br />
<br />
==== Kernel parameters ====<br />
<br />
The problem can be overcome by disabling the phantom output (VGA-1 in the examples given) with [[Kernel parameters]]:<br />
<br />
video=VGA-1:d<br />
<br />
Where '''d''' = disable.<br />
<br />
The nouveau kernel module also has an option to disable TV-out detection [https://nouveau.freedesktop.org/wiki/KernelModuleParameters/#tv_disable]:<br />
<br />
tv_disable=1<br />
<br />
==== Xorg configuration ====<br />
<br />
The phantom output can be disabled in [[Xorg]] by adding the following to {{ic|/etc/X11/xorg.conf.d/20-nouveau.conf}}:<br />
<br />
Section "Monitor"<br />
Identifier "VGA-1"<br />
Option "Ignore" "1"<br />
EndSection<br />
<br />
Source: http://gentoo-en.vfose.ru/wiki/Nouveau#Phantom_and_unpopulated_output_connector_issues{{Dead link|2017|06|01}}<br />
<br />
==== Xrandr ====<br />
<br />
[[Xrandr]] can disable the output:<br />
<br />
$ xrandr --output VGA-1 --off<br />
<br />
This can be added to the [[xinit]] configuration.<br />
<br />
===Random lockups with kernel error messages===<br />
<br />
Specific Nvidia chips with Nouveau may give random system lockups and more commonly throw many kernel messages, seen with ''dmesg''. Try adding the {{ic|1=nouveau.noaccel=1}} [[kernel parameter]]. See [https://fedoraproject.org/wiki/Common_kernel_problems#Systems_with_nVidia_adapters_using_the_nouveau_driver_lock_up_randomly] for more information.<br />
<br />
As an alternative you can also use the {{ic|1=QT_XCB_FORCE_SOFTWARE_OPENGL=1}} [[environment variable]] to disable OpenGL acceleration in Qt applications.<br />
<br />
===Flat Panel Table Invalid===<br />
{{Expansion|Missing references to the bug reports or support threads.}}<br />
<br />
NVIDIA graphics cards with recent chipsets can cause startup issues - this includes X11 being unable to start and lspci freezing indefinitely[https://bugzilla.redhat.com/show_bug.cgi?id=1425253][https://bbs.archlinux.org/viewtopic.php?id=192532][https://stackoverflow.com/questions/28062458/nouveau-error-while-booting-arch][https://bbs.archlinux.org/viewtopic.php?id=207602][https://unix.stackexchange.com/questions/207895/how-do-i-install-antergos-with-a-gtx-970]. <br />
<br />
This can break live distributions/installation media. This can be detected either by running lspci, or checking the systemd journal for the error:<br />
<br />
nouveau E[ DRM]Pointer to flat panel table invalid<br />
<br />
The system may start if the Nouveau driver is disabled by passing the following [[kernel parameters]]:<br />
<br />
modprobe.blacklist=nouveau<br />
<br />
The Nouveau driver can then be loaded using<br />
<br />
modprobe nouveau<br />
<br />
The system should then function correctly.<br />
If you have another Nvidia graphics card, or just want to be safe, you can disable the offending card using:<br />
<br />
$ echo 1 > /sys/bus/pci/devices/[card device id]/remove<br />
<br />
The [[NVIDIA]] proprietary driver currently works correctly (version 381).</div>Jose1711https://wiki.archlinux.org/index.php?title=Mirrors&diff=587446Mirrors2019-10-29T17:34:51Z<p>Jose1711: fix/update awk code to rank mirrors based on country</p>
<hr />
<div>[[Category:About Arch]]<br />
[[Category:Package management]]<br />
[[ar:Mirrors]]<br />
[[es:Mirrors]]<br />
[[fr:Miroirs]]<br />
[[it:Mirrors]]<br />
[[ja:ミラー]]<br />
[[pt:Mirrors]]<br />
[[ru:Mirrors]]<br />
[[zh-hans:Mirrors]]<br />
{{Related articles start}}<br />
{{Related|Unofficial mirrors}}<br />
{{Related|pacman}}<br />
{{Related articles end}}<br />
<br />
This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.<br />
<br />
== Official mirrors ==<br />
<br />
The official Arch Linux mirror list is available from the {{pkg|pacman-mirrorlist}} package. To get an even more up-to-date list of mirrors, use the [https://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator] page on the main site.<br />
<br />
Check the status of the Arch mirrors by visiting the [https://www.archlinux.org/mirrors/status/ Mirror Status] page. It is recommended to only use mirrors that are up to date, i.e. not out of sync.<br />
<br />
If you want your mirror to be added to the official list, see [[DeveloperWiki:NewMirrors]]. In the meantime, add it to the [[Unofficial mirrors]] article.<br />
<br />
=== IPv6-ready mirrors ===<br />
<br />
The [https://www.archlinux.org/mirrorlist/?ip_version=6 Pacman Mirrorlist Generator] can also be used to find a list of current IPv6 mirrors.<br />
<br />
== Enabling a specific mirror ==<br />
<br />
To enable mirrors, edit {{ic|/etc/pacman.d/mirrorlist}} and locate your geographic region. Uncomment mirrors you would like to use.<br />
<br />
Example:<br />
<br />
# Any<br />
# Server = <nowiki>http://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki><br />
'''Server = <nowiki>https://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki>'''<br />
<br />
See [[#Sorting mirrors]] for tools that help choosing mirrors.<br />
<br />
{{Tip|<br />
* Uncomment 5 favorite mirrors and place them at the top of the mirrorlist file. That way it's easy to find them and move them around if the first mirror on the list has problems. It also makes merging mirrorlist updates easier.<br />
* HTTP mirrors are faster than FTP due to [[Wikipedia:HTTP persistent connection|persistent HTTP connection]]: with FTP, a new connection to server has to be established each time ''pacman'' requests a package to be downloaded, which results in a brief pause.<br />
}}<br />
<br />
It is also possible to specify mirrors in {{ic|/etc/pacman.conf}}. For the ''[core]'' repository, the default setup is:<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
To use the ''HostEurope'' mirror as a default mirror, add it before the {{ic|Include}} line:<br />
[core]<br />
'''Server = <nowiki>http://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch</nowiki>'''<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
pacman will now try to connect to this mirror first. Proceed to do the same for ''[testing]'', ''[extra]'', and ''[community]'', if applicable.<br />
<br />
{{Note|If mirrors have been stated directly in {{ic|pacman.conf}}, remember to use the same mirror for all repositories. Otherwise packages that are incompatible to each other may be installed, like linux from ''[core]'' and an older kernel module from ''[extra]''.}}<br />
<br />
=== Force pacman to refresh the package lists ===<br />
<br />
Mirrors can be out of sync and the package list from the old mirror may not correspond to the package list of the new mirror, even though the dates of the lists may suggest that they do.<br />
<br />
After creating/editing {{ic|/etc/pacman.d/mirrorlist}}, issue the following command:<br />
# pacman -Syyu<br />
<br />
Passing two {{ic|--refresh}}/{{ic|-y}} flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing {{ic|pacman -Syyu}} is an unnecessary waste of bandwidth in most cases, but can sometimes fix issues when switching from a broken mirror to a working mirror. See also [https://bbs.archlinux.org/viewtopic.php?id=163124 Is -Syy safe?].<br />
<br />
{{Warning|In most cases if you force refresh the pacman database, you will want to force downgrade any potentially too-new packages to correspond to the versions offered by the new mirror. This prevents issues where packages are inconsistently upgraded, leading to a partial update.<br />
# pacman -Syyuu<br />
This is not necessary when using timestamps to ensure the mirrors are only upgraded.<br />
}}<br />
<br />
== Sorting mirrors ==<br />
<br />
When downloading packages, pacman uses the mirrors in the order they are listed in {{ic|/etc/pacman.d/mirrorlist}}. The order servers appear in the list sets their priority.<br />
<br />
It is not optimal to only rank mirrors based on speed since the fastest servers might be out-of-sync. Instead, make a list of mirrors sorted by their [[#List by speed|speed]], then remove those from the list that are out of sync according to their [https://www.archlinux.org/mirrors/status/ status].<br />
<br />
It is recommended to repeat this process before every system upgrade to keep the list of mirrors up-to-date.<br />
<br />
=== List by speed ===<br />
====Ranking an existing mirror list====<br />
The {{Pkg|pacman-contrib}} package provides a Bash script, {{ic|/usr/bin/rankmirrors}}, which can be used to rank the mirrors according to their connection and opening speeds to take advantage of using the fastest local mirror.<br />
<br />
Back up the existing {{ic|/etc/pacman.d/mirrorlist}}:<br />
<br />
# cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup<br />
<br />
To prepare {{ic|mirrorlist.backup}} for ranking with ''rankmirrors'', the following actions can be carried out:<br />
<br />
* Edit {{ic|mirrorlist.backup}} and uncomment the servers to be tested<br />
<br />
* If the servers in the file are grouped by country, one can extract all the servers of a specific country by using: {{bc|1=$ awk '/^## ''Country Name''$/{f=1; next}f==0{next}/^$/{exit}{print substr($0, 1); f=0}' /etc/pacman.d/mirrorlist.backup}}<br />
<br />
* To uncomment every mirror, run the following {{ic|sed}} line: {{bc|# sed -i 's/^#Server/Server/' /etc/pacman.d/mirrorlist.backup}}<br />
<br />
Finally, rank the mirrors, here with the operand {{ic|-n 6}} to only output the 6 fastest mirrors:<br />
<br />
# rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist<br />
<br />
====Fetching and ranking a live mirror list====<br />
<br />
In order to start with a shortlist of up-to-date mirrors based in some countries and feed it to ''rankmirrors'' one can fetch the list from the ''Pacman Mirrorlist Generator''.<br />
The command below pulls the up-to-date mirrors in either ''France'' or the ''United Kingdom'' which support the ''https'' protocol, it uncomments the servers in the list and then ranks them and outputs the 5 fastest.<br />
<br />
$ curl -s "https://www.archlinux.org/mirrorlist/?country=FR&country=GB&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 -<br />
<br />
{{Tip|This procedure can be done interactively by navigating to {{ic|1=https://www.archlinux.org/mirrorlist}} with any text-based browser, for example {{man|1|elinks}}.}}<br />
<br />
=== Server-side ranking ===<br />
<br />
The official [https://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator] provides an easy way to obtain a ranked list of mirrors. Because all ranking is done on a single server that takes multiple factors into account, the amount of load on the mirrors and the clients is significantly lower compared to ranking on each individual client.<br />
<br />
Another popular alternative is the following tool:<br />
<br />
{{App|[[Reflector]]|Retrieves the latest mirrorlist from the [https://www.archlinux.org/mirrors/status/ MirrorStatus] page, filters and sorts them by speed and overwrites {{ic|/etc/pacman.d/mirrorlist}}|https://xyne.archlinux.ca/projects/reflector/|{{pkg|reflector}}}}<br />
<br />
== Troubleshooting ==<br />
<br />
In case you encounter the following error:<br />
error: config file /etc/pacman.d/mirrorlist could not be read: No such file or directory<br />
<br />
Get the mirrorlist directly from the website:<br />
# curl -o /etc/pacman.d/mirrorlist <nowiki>https://www.archlinux.org/mirrorlist/all/</nowiki><br />
<br />
Be sure to uncomment a preferred mirror as described above, then:<br />
# pacman -Syu pacman-mirrorlist<br />
<br />
== See also ==<br />
* [https://github.com/archlinux/archweb/blob/master/mirrors/views/mirrorlist.py GitHub archweb mirrorlist.py] - source code of the archweb mirrorlist generator</div>Jose1711https://wiki.archlinux.org/index.php?title=Graphics_tablet&diff=574356Graphics tablet2019-05-31T12:01:55Z<p>Jose1711: add note about fixing aspect ratio for tuhi-supported tablets</p>
<hr />
<div>[[Category:Input devices]]<br />
[[ja:Wacom タブレット]]<br />
[[zh-hans:Wacom tablet]]<br />
[[Wikipedia:Wacom (company)|Wacom]] does not officially support Linux. Linux support is provided by the [https://linuxwacom.github.io/ Linux Wacom Project]. Supported devices are listed on the [https://github.com/linuxwacom/input-wacom/wiki/Device-IDs Device IDs] page with a version number in the ''input-wacom'' column.<br />
<br />
== Installation ==<br />
<br />
The Arch Linux [[kernels]] include the [https://github.com/linuxwacom/input-wacom input-wacom] driver.<br />
<br />
Ensure your kernel recognizes your tablet. Connect your tablet via USB or [[Bluetooth]]. It should show up in {{ic|dmesg {{!}} grep -i wacom}} and be listed in {{ic|/proc/bus/input/devices}} (and if you use USB in the {{ic|lsusb}} output). If it does not, your only chance is that your tablet is supported by a more recent driver than the one in your kernel. In that case [[install]] the {{AUR|input-wacom-dkms}} package.<br />
<br />
[[Install]] the [[X]] driver, {{Pkg|xf86-input-wacom}}, and restart X so the new [[udev]] rules take effect.<br />
<br />
The command {{ic|xsetwacom list devices}} should now list some devices. If it does not, see [[#Manual setup]].<br />
<br />
The {{Pkg|kcm-wacomtablet}} package provides a [[KDE]] graphical user interface for tablet configuration and supports tablet-specific profiles and hotplugging.<br />
<br />
Support for the following Wacom tablets is provided via {{AUR|tuhi-git}}:<br />
* Bamboo Spark<br />
* Bamboo Slate<br />
* Intuos Pro Paper<br />
<br />
Consult README for the details of initial configuration. For setups with more than one monitor you'll probably want to fix aspect ratio using {{ic|Coordinate Transformation Matrix}} as described at [https://github.com/linuxwacom/xf86-input-wacom/wiki/Dual-and-Multi-Monitor-Set-Up dual and multimonitor set up].<br />
<br />
== Configuration ==<br />
<br />
The Xorg driver can be temporarily configured with {{ic|xsetwacom}}, see {{man|1|xsetwacom}}. Changes are lost after X server restarts or replugging your tablet.<br />
<br />
List the available devices:<br />
<br />
{{hc|$ xsetwacom list devices|<br />
Wacom Bamboo 16FG 4x5 Finger touch id: 12 type: TOUCH<br />
Wacom Bamboo 16FG 4x5 Finger pad id: 13 type: PAD <br />
Wacom Bamboo 16FG 4x5 Pen stylus id: 17 type: STYLUS <br />
Wacom Bamboo 16FG 4x5 Pen eraser id: 18 type: ERASER<br />
}}<br />
<br />
For the {{ic|get}} and {{ic|set}} commands, devices can be specified by name or id. Scripts should use names because ids can change after X server restarts or replugging.<br />
<br />
=== Permanent configuration ===<br />
<br />
{{Note|Because ''xorg.conf'' lacks options ''xsetwacom'' has and only lets you map buttons to mouse buttons, you may want to [[autostart]] a script with ''xsetwacom'' commands instead of using ''xorg.conf''.}}<br />
<br />
Configuration can be made persistent in [[xorg.conf]] and {{man|5|xorg.conf}}.<br />
<br />
You firstly need to find out your product names:<br />
<br />
{{hc|$ grep "Using input driver 'wacom'" /var/log/Xorg.0.log|<br />
[ 25059.351] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen'<br />
[ 25059.409] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pad'<br />
[ 25059.428] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen eraser'<br />
[ 25059.429] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen cursor'<br />
}}<br />
<br />
For these product names the sections would be:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/72-wacom-options.conf|<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS pen"<br />
MatchDriver "wacom"<br />
MatchProduct "Pen"<br />
NoMatchProduct "eraser"<br />
NoMatchProduct "cursor"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS pad"<br />
MatchDriver "wacom"<br />
MatchProduct "Pad"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS eraser"<br />
MatchDriver "wacom"<br />
MatchProduct "eraser"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS cursor"<br />
MatchDriver "wacom"<br />
MatchProduct "cursor"<br />
EndSection<br />
}}<br />
<br />
* The options described in {{man|4|wacom}} can be added to sections.<br />
* The product name needs to contain the {{ic|MatchProduct}} value in order for a section to match. Matching of parent devices requires negative matching.<br />
* The {{ic|Identifier}} can be arbitrary and is printed into the Xorg log when the section matches. Giving your identifiers a common prefix lets you easily [[grep]] for what sections were matched: {{bc|grep "WACOM OPT" /var/log/Xorg.0.log}}<br />
* Configuration changes require a X server restart to take effect.<br />
<br />
{{Note|''xorg.conf'' options can differ from ''xsetwacom'' options.}}<br />
<br />
''xsetwacom'' can try to print all current settings of a device in ''xorg.conf'' format with:<br />
<br />
$ xsetwacom get ''device'' all<br />
<br />
=== Remapping buttons ===<br />
<br />
The X driver lets you remap the buttons on tablets and pens. Buttons are identified by numbers. Tablet buttons start at 1, pen buttons start at 2 (1 is the tip contact event). By default the X driver maps button ''M'' to mouse button ''M''. Because X uses buttons 4-7 as the four scrolling directions, physical buttons 4 and higher are mapped to mouse buttons 8 and higher by default. While ''xorg.conf'' uses the actual button numbers and only lets you map to mouse buttons, ''xsetwacom'' uses the translated mouse button numbers and allows mapping to multiple keycodes (but not keysyms).<br />
<br />
If you have not yet remapped your buttons you can easily identify their ids with {{Pkg|xorg-xev}}, by running the following command, placing the mouse cursor on the created window and pressing a button:<br />
<br />
{{hc|$ xev -event button|<br />
Outer window is 0x1a00001, inner window is 0x1a00002<br />
<br />
ButtonPress event, serial 25, synthetic NO, window 0x1a00001,<br />
root 0x2a0, subw 0x0, time 3390669, (404,422), root:(1047,444),<br />
state 0x0, button 8, same_screen YES<br />
}}<br />
<br />
In this case the button number for ''xsetwacom'' is 8 and the actual button number for ''xorg.conf'' is 4.<br />
<br />
Alternatively, if you want an overview of your tablet's button layout you can look at your tablet's layout SVG. Firstly, find out the filename with a recursive [[grep]] search for the tablet name reported by {{ic|xsetwacom list devices}}:<br />
<br />
{{hc|$ grep -rl 'Wacom Bamboo 16FG 4x5' /usr/share/libwacom/*.tablet|2=<br />
/usr/share/libwacom/bamboo-16fg-s-t.tablet<br />
}}<br />
<br />
In this case the respective layout SVG is {{ic|/usr/share/libwacom/layouts/bamboo-16fg-s-t.svg}}. The letters in the SVG correspond to the button numbers: A=1, B=2, C=3, ...<br />
<br />
==== Mapping pad buttons to function keys ====<br />
<br />
If you want to bind your tablet buttons to different shortcuts in different applications, you may want to map your tablet buttons to function keys because applications generally do not let you bind keyboard shortcuts to mouse buttons.<br />
<br />
Firstly, map the pad buttons to mouse buttons 11 and higher so that you can distinguish them from regular mouse buttons. For example:<br />
<br />
xsetwacom set ''pad'' Button 1 11<br />
xsetwacom set ''pad'' Button 2 12<br />
...<br />
<br />
Then map the mouse buttons to the function keys. This can be done with [[xbindkeys]] and [[xdotool]] by adding an entry like the following for every pad to your {{ic|~/.xbindkeysrc}}:<br />
<br />
"xdotool key F21"<br />
b:11<br />
<br />
"xdotool key F22"<br />
b:12<br />
...<br />
<br />
==== The syntax ====<br />
<br />
The syntax of {{ic|xsetwacom}} is flexible but not very well documented. The general mapping syntax (extracted from the source code) for xsetwacom 0.17.0 is the following.<br />
<br />
KEYWORD [ARGS...] [KEYWORD [ARGS...] ...]<br />
<br />
KEYWORD + ARGS:<br />
key [+,-]KEY [[+,-]KEY ...] where +:key down, -:key up, no prefix:down and up<br />
button BUTTON [BUTTON ...] (1=left,2=middle,3=right mouse button, 4/5 scroll mouse wheel)<br />
modetoggle toggle absolute/relative tablet mode <br />
displaytoggle toggle cursor movement among all displays which include individual screens<br />
plus the whole desktop for the selected tool if it is not a pad.<br />
When the tool is a pad, the function applies to all tools that are asssociated<br />
with the tablet<br />
<br />
BUTTON: button ID as integer number<br />
<br />
KEY: MODIFIER, SPECIALKEY or ASCIIKEY<br />
MODIFIER: (each can be prefix with an '''l''' or an '''r''' for the left/right modifier (no prefix = left)<br />
ctrl=ctl=control, meta, alt, shift, super, hyper<br />
SPECIALKEY: f1-f35, esc=Esc, up,down,left,right, backspace=Backspace, tab, PgUp,PgDn<br />
ASCIIKEY: (usual characters the key produces, e.g. a,b,c,1,2,3 etc.)<br />
<br />
==== Some examples ====<br />
<br />
$ xsetwacom set ''pad'' Button 1 3 # right mouse button<br />
$ xsetwacom set ''pad'' Button 1 "key +ctrl z -ctrl"<br />
$ xsetwacom get ''pad'' Button 1<br />
key +Control_L +z -z -Control_L<br />
$ xsetwacom set ''pad'' Button 1 "key +shift button 1 key -shift"<br />
<br />
Even little macros are possible:<br />
<br />
$ xsetwacom set ''pad'' Button 1 "key +shift h -shift e l l o"<br />
<br />
{{Note|If you try to run a script with {{ic|xsetwacom}} commands from a udev rule, you might find that it will not work, as the Wacom input devices will not be ready at the time. A workaround is to add {{ic|sleep 1}} at the beginning of your script.}}<br />
<br />
==== Execute custom commands ====<br />
<br />
{{Style|Duplicates [[Xbindkeys]]. There are alternatives to xbindkeys.}}<br />
<br />
Mapping custom commands to the buttons is a little bit tricky but actually very simple. First, install [[xbindkeys]].<br />
<br />
To get well defined button codes add the following to your permanent configuration file, e.g. {{ic|/etc/X11/xorg.conf.d/52-wacom-options.conf}} in the InputClass section of your '''pad''' device. Map the tablet's buttons to some unused button ids.<br />
<br />
# Setting up buttons (preferably choose the correct button order, so the topmost key is mapped to 10 and so on)<br />
Option "Button1" "10"<br />
Option "Button2" "11"<br />
Option "Button3" "12"<br />
Option "Button4" "13"<br />
<br />
Then restart your ''Xorg'' server and verify the buttons using {{ic|xev}} or {{ic|xbindkeys -mk}}.<br />
<br />
Now set up your xbindkeys configuration, if you do not already have one you might want to create a default configuration<br />
<br />
$ xbindkeys --defaults > ~/.xbindkeysrc<br />
<br />
Then add your custom key mapping to {{ic|~/.xbindkeysrc}}, for example<br />
<br />
"firefox"<br />
m:0x10 + b:10 (mouse)<br />
"xterm"<br />
m:0x10 + b:11 (mouse)<br />
"xdotool key ctrl-z"<br />
m:0x10 + b:12 (mouse)<br />
"send-notify Test "No need for escaping the quotes""<br />
m:0x10 + b:13 (mouse)<br />
<br />
=== Adjusting aspect ratios ===<br />
<br />
Drawing areas of tablets are generally more square than the usual widescreen display with a 16:9 aspect ratio, leading to a slight vertical compression of your input. To resolve such an aspect ratio mismatch you need to compromise by either reducing the drawing area height (called ''Force Proportions'' on Windows) or reducing the screen area width. The former wastes drawing area and the latter prevents you from reaching the right edge of your screen with your Stylus. It is probably still a compromise worth to be made because it prevents your strokes from being skewed.<br />
<br />
Find out your tablet's resolution by running:<br />
<br />
$ xsetwacom get ''stylus'' Area<br />
<br />
==== Reducing the drawing area height ====<br />
<br />
Run:<br />
<br />
$ xsetwacom set ''stylus'' Area 0 0 ''tablet_width'' ''height''<br />
<br />
where ''height'' is ''tablet_width * screen_height / screen_width''.<br />
<br />
The tablet resolution can be reset back to the default using:<br />
<br />
$ xsetwacom set ''stylus'' ResetArea<br />
<br />
==== Reducing the screen area width ====<br />
<br />
Run:<br />
<br />
$ xsetwacom set ''stylus'' MapToOutput ''WIDTH''x''SCREEN_HEIGHT''+0+0<br />
<br />
where ''WIDTH'' is ''screen_height * tablet_width / tablet_height''.<br />
<br />
=== LEDs ===<br />
<br />
See the [https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-driver-wacom sysfs-driver-wacom] documentation. To make changes without requiring root permissions you will likely want to create a [[udev]] rule like so:<br />
<br />
{{hc|/etc/udev/rules.d/99-wacom.rules|<nowiki><br />
# Give the users group permissions to set Wacom device LEDs.<br />
ACTION=="add", SUBSYSTEM=="hid", DRIVERS=="wacom", RUN+="/usr/bin/sh -c 'chown :users /sys/%p/wacom_led/*'"<br />
</nowiki>}}<br />
<br />
Setting the Intuos OLEDs can be done using {{AUR|i4oled}} from the AUR.<br />
<br />
=== TwinView setup ===<br />
<br />
If you are going to use two monitors the aspect ratio while using the tablet might feel unnatural. In order to fix this you need to add:<br />
<br />
Option "TwinView" "horizontal"<br />
<br />
to all of your Wacom-InputDevice entries in the ''xorg.conf'' file. You may read more about that [http://ubuntuforums.org/showthread.php?t=640898 here].{{Dead link|2018|09|05}}<br />
<br />
==== Temporary TwinView setup ====<br />
<br />
For temporary mapping of a Wacom device to a single display ''while preserving the aspect ratio'', [https://gist.github.com/Quackmatic/6c19fe907945d735c045 this script] may be used. This will letter-box the surface area of the device as required to ensure the input is not stretched on the display. This script may be executed in your {{ic|.xinitrc}} file for it to automatically run.<br />
<br />
=== xrandr setup ===<br />
<br />
{{Style|Wording can be improved, personal writing style.}}<br />
<br />
[[xrandr]] sets two monitors as one big screen, mapping the tablet to the whole virtual screen and deforming aspect ratio. For a solution see this thread: [https://bbs.archlinux.org/viewtopic.php?pid=797617 Arch Linux forum].<br />
<br />
If you just want to map the tablet to one of your screens, first find out what the screens are called:<br />
<br />
$ xrandr<br />
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384<br />
HDMI-0 disconnected (normal left inverted right x axis y axis)<br />
DVI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
VGA-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
<br />
Then you need to know what is the ID of your tablet.<br />
<br />
$ xsetwacom list devices<br />
WALTOP International Corp. Slim Tablet stylus id: 12 type: STYLUS<br />
<br />
In my case I want to map the tablet (ID: 12) to the screen on the right, which is ''VGA-0''. I can do that with this command<br />
<br />
$ xsetwacom set 12 MapToOutput VGA-0<br />
<br />
This should work immediately, no root necessary.<br />
<br />
Should this fail when using the NVIDIA binary driver, using ''HEAD-0'', ''HEAD-1'' and so on to refer to the monitors may work.<br />
<br />
If xsetwacom replies with "Unable to find an output ..." an X11 geometry string of the form {{ic|WIDTHxHEIGHT+X+Y}} can be specified instead of the screen identifier. In this example<br />
<br />
$ xsetwacom set 12 MapToOutput 1920x1080+1920+0<br />
<br />
should also map the tablet to the screen on the right.<br />
<br />
Alternatively, you can use [https://bitbucket.org/denilsonsa/small_scripts/src/3380435f92646190f860b87f566a39d0e215034c/xsetwacom_my_preferences.sh?at=default this bash script] to quickly map the tablet to one of your screens (or the entire desktop) and fix the aspect ratio.<br />
<br />
In case ''xsetwacom'' does not work, you can try ''xinput''.<br />
<br />
First, you need to find your tablet's ID.<br />
<br />
$ xinput list<br />
<br />
In my case, the output is:<br />
<br />
⎡ Virtual core pointer id=2 [master pointer (3)]<br />
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Finger id=11 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Pad id=12 [slave pointer (2)]<br />
⎜ ↳ USB Keyboard id=14 [slave pointer (2)]<br />
⎜ ↳ SynPS/2 Synaptics TouchPad id=16 [slave pointer (2)]<br />
⎜ ↳ TPPS/2 IBM TrackPoint id=17 [slave pointer (2)]<br />
⎜ ↳ SteelSeries Kinzu V2 Gaming Mouse id=9 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Pen Pen (0x6281780c) id=20 [slave pointer (2)]<br />
⎣ Virtual core keyboard id=3 [master keyboard (2)]<br />
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]<br />
↳ Power Button id=6 [slave keyboard (3)]<br />
↳ Video Bus id=7 [slave keyboard (3)]<br />
↳ Sleep Button id=8 [slave keyboard (3)]<br />
↳ Wacom Intuos PT S 2 Pen id=10 [slave keyboard (3)]<br />
↳ USB Keyboard id=13 [slave keyboard (3)]<br />
↳ AT Translated Set 2 keyboard id=15 [slave keyboard (3)]<br />
↳ ThinkPad Extra Buttons id=18 [slave keyboard (3)]<br />
↳ USB Keyboard id=19 [slave keyboard (3)]<br />
<br />
This mean, my tablet's ID is ''20''. Now we map it with ''VGA-0'' screen:<br />
<br />
$ xinput map-to-output 20 VGA-0<br />
<br />
=== Pressure curve ===<br />
<br />
Use the [https://linuxwacom.github.io/bezier.html Wacom Pressure Curve and Threshold Graph] to find P1=red (eg. 50,0) and P2=purple (eg. 100,80) of your desired curve. The x-axis is the input pressure you apply to the pen; the y-axis is the output pressure the application is given.<br />
<br />
You can change the pressure curve with:<br />
<br />
$ xsetwacom set ''stylus'' PressureCurve ''x1 y1 x2 y2''<br />
<br />
== Application-specific configuration ==<br />
<br />
=== Blender ===<br />
<br />
To enable pad buttons and extra pen buttons in [[Blender]], you can create a xsetwacom wrapper to temporarily remap buttons for your blender session.<br />
<br />
Provided example (for Bamboo fun) adapted to ''Sculpt'' mode: [http://pastebin.archlinux.fr/1887946 blender_sculpt.sh]{{Dead link|2018|06|23}}<br />
<br />
It remaps:<br />
* Left tablet buttons to {{ic|Shift}} and {{ic|Ctrl}} ''(pan/tilt/zoom/smooth/invert)''<br />
* Right tablet buttons to {{ic|F}} ''(brush size/strenght)'' and {{ic|Ctrl-z}} ''(undo)''<br />
* Top pen button ton {{ic|m}} ''(mask control)''<br />
<br />
=== GIMP ===<br />
<br />
To enable proper usage, and pressure sensitive painting in [[GIMP]], just go to ''Edit > Input Devices''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.<br />
<br />
* Please take note that if present, the ''pad'' ''device'' should be kept disabled as I do not think GIMP supports such things. Alternatively, to use such features of your tablet you should map them to keyboard commands with a program such as [http://hem.bredband.net/devel/wacom/ Wacom ExpressKeys].<br />
<br />
* You should also take note that the tool selected for the ''stylus'' is independent to that of the ''eraser''. This can actually be quite handy, as you can have the ''eraser'' set to be used as any tool you like.<br />
<br />
For more information checkout the ''Setting up GIMP'' section of [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp].<br />
<br />
If the above was not enough, you may want to try setting up the tablet's stylus (and eraser) as a second mouse pointer (separating it from your mouse) by using the {{ic|xinput create-master}} and {{ic|xinput reattach}} commands. It can help when GIMP does not start painting even if the stylus touches the tablet.<br />
<br />
=== Inkscape ===<br />
<br />
Pressure sensitivity in [[Inkscape]] is enabled the same way as in GIMP. Go to ''Edit > Input Devices...''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.<br />
<br />
=== Krita ===<br />
<br />
If your tablet does not draw in Krita (clicks/pressure are not registered) but works in the brush selection dialog which has a small test area, try putting Krita in full-screen or canvas-only mode.<br />
<br />
Krita only requires that Qt is able to use your tablet to function properly. If your tablet is not working in Krita, then make sure to check it is working in Qt first. The effect of tablet pressure can then be tweaked in the painttop configuration, for example by selecting opacity, then selecting pressure from the drop down and adjusting the curve to your preference.<br />
<br />
=== VirtualBox ===<br />
<br />
First, make sure that your tablet works well under Arch. Then, download and install the last driver from [http://www.wacom.com/downloads/drivers.php Wacom website] on the guest OS. Shutdown the virtual machine, go to ''Settings > USB''. Select ''Add Filter From Device'' and select your tablet (e.g. WACOM CTE-440-U V4.0-3 [0403]). Select ''Edit Filter'', and change the last item ''Remote'' to ''Any''.<br />
<br />
== Troubleshooting ==<br />
<br />
Newer tablets' drivers might not be in the kernel yet, and additional manipulations might be needed. A notable example is the newer Intuos line of tablets (Draw/Comic/Photo).<br />
<br />
=== Unknown device_type ===<br />
<br />
If your tablet does not get recognized by {{ic|xsetwacom}} and {{ic|dmesg}} complains about an unknown device_type, then you need to install a patched version of input-wacom.<br />
<br />
Download and install the for-4.4 branch from [http://sourceforge.net/p/linuxwacom/input-wacom/ci/jiri/for-4.4/~/tarball SourceForge].<br />
Your device should be recognized after you run<br />
<br />
# rmmod wacom<br />
# insmod /lib/modules/YOUR_KERNEL/kernel/drivers/hid/wacom.ko.gz<br />
<br />
=== Tablet recognized but xsetwacom and similar tools do not display it ===<br />
<br />
Your logs indicate that the correct driver is selected, and the tablet works. However, when running {{ic|xsetwacom list devices}} or use similar tools that depend on the correct driver, you get an empty list.<br />
<br />
A reason might be the execution order of your xorg configuration. {{ic|/usr/share/X11/xorg.conf.d}} gets executed first, then {{ic|/etc/X11/xorg.conf.d}}. The package {{pkg|xf86-input-wacom}} contains the file {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}}. If there is a catchall for tablets, executed after this file, the previously selected {{ic|wacom}} driver will be overwritten with a generic one that does not work with xsetwacom et. al.<br />
<br />
To make sure, check the rules contained in the files executed after {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}} for anything that looks like graphics tablets.<br />
<br />
=== Manual setup ===<br />
<br />
A manual configuration is done in {{ic|/etc/X11/xorg.conf}} or in a separate file in the {{ic|/etc/X11/xorg.conf.d/}} directory. The Wacom tablet device is accessed using a input event interface in {{ic|/dev/input/}} which is provided by the kernel driver. The interface number {{ic|event??}} is likely to change when unplugging and replugging into the same or especially a different ''USB'' port. Therefore it is wise to not refer to the device using its concrete {{ic|event??}} interface ('''static''' configuration) but by letting ''udev'' dynamically create a symbolic link to the correct {{ic|event}} file ('''dynamic''' configuration).<br />
<br />
==== Dynamic with udev ====<br />
<br />
{{Note|In AUR there is wacom-udev package, which includes udev-rules-file. You might skip this part and move on to the {{ic|xorg.conf}} configuration if you are using the wacom-udev package from AUR.}}<br />
<br />
Assuming ''udev'' is already installed you simply need to install {{AUR|wacom-udev}}{{Broken package link|{{aur-mirror|wacom-udev}}}} from the [[AUR]].<br />
<br />
===== USB-devices =====<br />
<br />
After (re-)plugging in your ''USB''-tablet (or at least after rebooting) some symbolic links should appear in {{ic|/dev/input}} referring to your tablet device.<br />
<br />
$ ls /dev/input/wacom* <br />
/dev/input/wacom /dev/input/wacom-stylus /dev/input/wacom-touch<br />
<br />
If not, your device is likely to be not yet included in the ''udev'' configuration from ''wacom-udev'' which resides in {{ic|/usr/lib/udev/rules.d/10-wacom.rules}}. It is a good idea to copy the file e.g. to {{ic|10-my-wacom.rules}} before modifying it, else it might be reverted by a package upgrade.<br />
<br />
Add your device to the file by duplicating some line of another device and adapting ''idVendor'',''idProduct'' and the symlink name to your device.<br />
The two id's can be determined using<br />
<br />
$ lsusb | grep -i wacom<br />
Bus 002 Device 007: ID 056a:0062 Wacom Co., Ltd<br />
<br />
In this example idVendor is 056a and idProduct 0062. In case you have device with touch (e.g. Bamboo Pen&Touch) you might need to add a second line for the touch input interface. For details check the linuxwacom wiki [http://linuxwacom.sourceforge.net/wiki/index.php/Fixed_device_files_with_udev Fixed device files with udev].<br />
<br />
Save the file and reload udev's configuration profile using the command ''udevadm control --reload-rules'' Check again the content of ''/dev/input'' to make sure that the ''wacom'' symlinks appeared. Note that you may need to plug-in the tablet again for the device to appear.<br />
<br />
The files of further interest for the ''Xorg'' configuration are {{ic|/dev/input/wacom}} and for a touch-device also {{ic|/dev/input/wacom_touch}}.<br />
<br />
===== Serial devices =====<br />
<br />
The {{AUR|wacom-udev}}{{Broken package link|{{aur-mirror|wacom-udev}}}} should also include support for serial devices. Users of serial tablets might be also interested in the inputattach tool from {{Pkg|linuxconsole}} package. The inputattach command allows to bind serial device into /dev/input tree, for example with:<br />
<br />
# inputattach --w8001 /dev/ttyS0<br />
<br />
See ''man inputattach'' for help about available options. As for USB devices one should end up with a file {{ic|/dev/input/wacom}} and proceed with the ''Xorg'' configuration.<br />
<br />
==== Static setup ====<br />
<br />
Usually it is recommended to rely on [[Xorg]]'s auto-detection or to use a '''dynamic''' setup. However for an ''internal'' tablet device one might consider a '''static''' Xorg setup in case autodetection does not work. A static [[Xorg]] setup is usually not able to recognize your Wacom tablet when it is connected to a different ''USB'' port or even after unplugging and replugging it into the same port, and as such it should be considered as deprecated.<br />
<br />
If you insist in using a static setup just refer to your tablet in the ''Xorg'' configuration in the next section using the correct {{ic|/dev/input/event??}} files as one can find out by looking into {{ic|/proc/bus/input/devices}}.<br />
<br />
==== Xorg configuration ====<br />
<br />
In either case, dynamic or static setup you got now one or two files in {{ic|/dev/input/}} which refer to the correct input event devices of your tablet. All that is left to do is add the relevant information to {{ic|/etc/X11/xorg.conf}}, or a dedicated file under {{ic|/etc/X11/xorg.conf.d/}}. The exact configuration depends on your tablet's features of course. {{ic|xsetwacom list devices}} might give helpful information on what ''InputDevice'' sections are needed for your tablet.<br />
<br />
An example configuration for a ''Volito2'' might look like this<br />
<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "stylus"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "stylus"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "eraser"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "eraser"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "cursor"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "cursor"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
EndSection<br />
<br />
Make sure that you also change the path ({{Ic|"Device"}}) to your mouse, as it will be {{Ic|/dev/input/mouse_udev}} now.<br />
<br />
Section "InputDevice"<br />
Identifier "Mouse1"<br />
Driver "mouse"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mouse_udev"<br />
Option "SendCoreEvents" "true"<br />
Option "Protocol" "IMPS/2"<br />
Option "ZAxisMapping" "4 5"<br />
Option "Buttons" "5"<br />
EndSection<br />
<br />
Add this to the ''ServerLayout'' section<br />
<br />
InputDevice "cursor" "SendCoreEvents" <br />
InputDevice "stylus" "SendCoreEvents"<br />
InputDevice "eraser" "SendCoreEvents"<br />
<br />
And finally make sure to update the identifier of your mouse in the ''ServerLayout'' section &ndash; as mine went from<br />
<br />
InputDevice "Mouse0" "CorePointer"<br />
<br />
to<br />
<br />
InputDevice "Mouse1" "CorePointer"<br />
<br />
== See also ==<br />
<br />
* [[List of applications/Documents#Stylus note-taking]]<br />
* [https://github.com/linuxwacom/input-wacom/wiki input-wacom Wiki]<br />
* [https://github.com/linuxwacom/xf86-input-wacom/wiki xf86-input-wacom Wiki] (out of date)<br />
* [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]<br />
* [https://help.ubuntu.com/community/Wacom Ubuntu Help: Wacom]<br />
* [http://ubuntuforums.org/showthread.php?t=1038949 Ubuntu Forums - Install a LinuxWacom Kernel Driver for Tablet PC's]</div>Jose1711https://wiki.archlinux.org/index.php?title=Graphics_tablet&diff=574322Graphics tablet2019-05-30T22:08:47Z<p>Jose1711: /* Installation */ - add note about tuhi project</p>
<hr />
<div>[[Category:Input devices]]<br />
[[ja:Wacom タブレット]]<br />
[[zh-hans:Wacom tablet]]<br />
[[Wikipedia:Wacom (company)|Wacom]] does not officially support Linux. Linux support is provided by the [https://linuxwacom.github.io/ Linux Wacom Project]. Supported devices are listed on the [https://github.com/linuxwacom/input-wacom/wiki/Device-IDs Device IDs] page with a version number in the ''input-wacom'' column.<br />
<br />
== Installation ==<br />
<br />
The Arch Linux [[kernels]] include the [https://github.com/linuxwacom/input-wacom input-wacom] driver.<br />
<br />
Ensure your kernel recognizes your tablet. Connect your tablet via USB or [[Bluetooth]]. It should show up in {{ic|dmesg {{!}} grep -i wacom}} and be listed in {{ic|/proc/bus/input/devices}} (and if you use USB in the {{ic|lsusb}} output). If it does not, your only chance is that your tablet is supported by a more recent driver than the one in your kernel. In that case [[install]] the {{AUR|input-wacom-dkms}} package.<br />
<br />
[[Install]] the [[X]] driver, {{Pkg|xf86-input-wacom}}, and restart X so the new [[udev]] rules take effect.<br />
<br />
The command {{ic|xsetwacom list devices}} should now list some devices. If it does not, see [[#Manual setup]].<br />
<br />
The {{Pkg|kcm-wacomtablet}} package provides a [[KDE]] graphical user interface for tablet configuration and supports tablet-specific profiles and hotplugging.<br />
<br />
Support for the following Wacom tablets is provided via {{AUR|tuhi-git}}:<br />
* Bamboo Spark<br />
* Bamboo Slate<br />
* Intuos Pro Paper<br />
<br />
Consult README for the details of initial configuration.<br />
<br />
== Configuration ==<br />
<br />
The Xorg driver can be temporarily configured with {{ic|xsetwacom}}, see {{man|1|xsetwacom}}. Changes are lost after X server restarts or replugging your tablet.<br />
<br />
List the available devices:<br />
<br />
{{hc|$ xsetwacom list devices|<br />
Wacom Bamboo 16FG 4x5 Finger touch id: 12 type: TOUCH<br />
Wacom Bamboo 16FG 4x5 Finger pad id: 13 type: PAD <br />
Wacom Bamboo 16FG 4x5 Pen stylus id: 17 type: STYLUS <br />
Wacom Bamboo 16FG 4x5 Pen eraser id: 18 type: ERASER<br />
}}<br />
<br />
For the {{ic|get}} and {{ic|set}} commands, devices can be specified by name or id. Scripts should use names because ids can change after X server restarts or replugging.<br />
<br />
=== Permanent configuration ===<br />
<br />
{{Note|Because ''xorg.conf'' lacks options ''xsetwacom'' has and only lets you map buttons to mouse buttons, you may want to [[autostart]] a script with ''xsetwacom'' commands instead of using ''xorg.conf''.}}<br />
<br />
Configuration can be made persistent in [[xorg.conf]] and {{man|5|xorg.conf}}.<br />
<br />
You firstly need to find out your product names:<br />
<br />
{{hc|$ grep "Using input driver 'wacom'" /var/log/Xorg.0.log|<br />
[ 25059.351] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen'<br />
[ 25059.409] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pad'<br />
[ 25059.428] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen eraser'<br />
[ 25059.429] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen cursor'<br />
}}<br />
<br />
For these product names the sections would be:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/72-wacom-options.conf|<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS pen"<br />
MatchDriver "wacom"<br />
MatchProduct "Pen"<br />
NoMatchProduct "eraser"<br />
NoMatchProduct "cursor"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS pad"<br />
MatchDriver "wacom"<br />
MatchProduct "Pad"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS eraser"<br />
MatchDriver "wacom"<br />
MatchProduct "eraser"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "WACOM OPTIONS cursor"<br />
MatchDriver "wacom"<br />
MatchProduct "cursor"<br />
EndSection<br />
}}<br />
<br />
* The options described in {{man|4|wacom}} can be added to sections.<br />
* The product name needs to contain the {{ic|MatchProduct}} value in order for a section to match. Matching of parent devices requires negative matching.<br />
* The {{ic|Identifier}} can be arbitrary and is printed into the Xorg log when the section matches. Giving your identifiers a common prefix lets you easily [[grep]] for what sections were matched: {{bc|grep "WACOM OPT" /var/log/Xorg.0.log}}<br />
* Configuration changes require a X server restart to take effect.<br />
<br />
{{Note|''xorg.conf'' options can differ from ''xsetwacom'' options.}}<br />
<br />
''xsetwacom'' can try to print all current settings of a device in ''xorg.conf'' format with:<br />
<br />
$ xsetwacom get ''device'' all<br />
<br />
=== Remapping buttons ===<br />
<br />
The X driver lets you remap the buttons on tablets and pens. Buttons are identified by numbers. Tablet buttons start at 1, pen buttons start at 2 (1 is the tip contact event). By default the X driver maps button ''M'' to mouse button ''M''. Because X uses buttons 4-7 as the four scrolling directions, physical buttons 4 and higher are mapped to mouse buttons 8 and higher by default. While ''xorg.conf'' uses the actual button numbers and only lets you map to mouse buttons, ''xsetwacom'' uses the translated mouse button numbers and allows mapping to multiple keycodes (but not keysyms).<br />
<br />
If you have not yet remapped your buttons you can easily identify their ids with {{Pkg|xorg-xev}}, by running the following command, placing the mouse cursor on the created window and pressing a button:<br />
<br />
{{hc|$ xev -event button|<br />
Outer window is 0x1a00001, inner window is 0x1a00002<br />
<br />
ButtonPress event, serial 25, synthetic NO, window 0x1a00001,<br />
root 0x2a0, subw 0x0, time 3390669, (404,422), root:(1047,444),<br />
state 0x0, button 8, same_screen YES<br />
}}<br />
<br />
In this case the button number for ''xsetwacom'' is 8 and the actual button number for ''xorg.conf'' is 4.<br />
<br />
Alternatively, if you want an overview of your tablet's button layout you can look at your tablet's layout SVG. Firstly, find out the filename with a recursive [[grep]] search for the tablet name reported by {{ic|xsetwacom list devices}}:<br />
<br />
{{hc|$ grep -rl 'Wacom Bamboo 16FG 4x5' /usr/share/libwacom/*.tablet|2=<br />
/usr/share/libwacom/bamboo-16fg-s-t.tablet<br />
}}<br />
<br />
In this case the respective layout SVG is {{ic|/usr/share/libwacom/layouts/bamboo-16fg-s-t.svg}}. The letters in the SVG correspond to the button numbers: A=1, B=2, C=3, ...<br />
<br />
==== Mapping pad buttons to function keys ====<br />
<br />
If you want to bind your tablet buttons to different shortcuts in different applications, you may want to map your tablet buttons to function keys because applications generally do not let you bind keyboard shortcuts to mouse buttons.<br />
<br />
Firstly, map the pad buttons to mouse buttons 11 and higher so that you can distinguish them from regular mouse buttons. For example:<br />
<br />
xsetwacom set ''pad'' Button 1 11<br />
xsetwacom set ''pad'' Button 2 12<br />
...<br />
<br />
Then map the mouse buttons to the function keys. This can be done with [[xbindkeys]] and [[xdotool]] by adding an entry like the following for every pad to your {{ic|~/.xbindkeysrc}}:<br />
<br />
"xdotool key F21"<br />
b:11<br />
<br />
"xdotool key F22"<br />
b:12<br />
...<br />
<br />
==== The syntax ====<br />
<br />
The syntax of {{ic|xsetwacom}} is flexible but not very well documented. The general mapping syntax (extracted from the source code) for xsetwacom 0.17.0 is the following.<br />
<br />
KEYWORD [ARGS...] [KEYWORD [ARGS...] ...]<br />
<br />
KEYWORD + ARGS:<br />
key [+,-]KEY [[+,-]KEY ...] where +:key down, -:key up, no prefix:down and up<br />
button BUTTON [BUTTON ...] (1=left,2=middle,3=right mouse button, 4/5 scroll mouse wheel)<br />
modetoggle toggle absolute/relative tablet mode <br />
displaytoggle toggle cursor movement among all displays which include individual screens<br />
plus the whole desktop for the selected tool if it is not a pad.<br />
When the tool is a pad, the function applies to all tools that are asssociated<br />
with the tablet<br />
<br />
BUTTON: button ID as integer number<br />
<br />
KEY: MODIFIER, SPECIALKEY or ASCIIKEY<br />
MODIFIER: (each can be prefix with an '''l''' or an '''r''' for the left/right modifier (no prefix = left)<br />
ctrl=ctl=control, meta, alt, shift, super, hyper<br />
SPECIALKEY: f1-f35, esc=Esc, up,down,left,right, backspace=Backspace, tab, PgUp,PgDn<br />
ASCIIKEY: (usual characters the key produces, e.g. a,b,c,1,2,3 etc.)<br />
<br />
==== Some examples ====<br />
<br />
$ xsetwacom set ''pad'' Button 1 3 # right mouse button<br />
$ xsetwacom set ''pad'' Button 1 "key +ctrl z -ctrl"<br />
$ xsetwacom get ''pad'' Button 1<br />
key +Control_L +z -z -Control_L<br />
$ xsetwacom set ''pad'' Button 1 "key +shift button 1 key -shift"<br />
<br />
Even little macros are possible:<br />
<br />
$ xsetwacom set ''pad'' Button 1 "key +shift h -shift e l l o"<br />
<br />
{{Note|If you try to run a script with {{ic|xsetwacom}} commands from a udev rule, you might find that it will not work, as the Wacom input devices will not be ready at the time. A workaround is to add {{ic|sleep 1}} at the beginning of your script.}}<br />
<br />
==== Execute custom commands ====<br />
<br />
{{Style|Duplicates [[Xbindkeys]]. There are alternatives to xbindkeys.}}<br />
<br />
Mapping custom commands to the buttons is a little bit tricky but actually very simple. First, install [[xbindkeys]].<br />
<br />
To get well defined button codes add the following to your permanent configuration file, e.g. {{ic|/etc/X11/xorg.conf.d/52-wacom-options.conf}} in the InputClass section of your '''pad''' device. Map the tablet's buttons to some unused button ids.<br />
<br />
# Setting up buttons (preferably choose the correct button order, so the topmost key is mapped to 10 and so on)<br />
Option "Button1" "10"<br />
Option "Button2" "11"<br />
Option "Button3" "12"<br />
Option "Button4" "13"<br />
<br />
Then restart your ''Xorg'' server and verify the buttons using {{ic|xev}} or {{ic|xbindkeys -mk}}.<br />
<br />
Now set up your xbindkeys configuration, if you do not already have one you might want to create a default configuration<br />
<br />
$ xbindkeys --defaults > ~/.xbindkeysrc<br />
<br />
Then add your custom key mapping to {{ic|~/.xbindkeysrc}}, for example<br />
<br />
"firefox"<br />
m:0x10 + b:10 (mouse)<br />
"xterm"<br />
m:0x10 + b:11 (mouse)<br />
"xdotool key ctrl-z"<br />
m:0x10 + b:12 (mouse)<br />
"send-notify Test "No need for escaping the quotes""<br />
m:0x10 + b:13 (mouse)<br />
<br />
=== Adjusting aspect ratios ===<br />
<br />
Drawing areas of tablets are generally more square than the usual widescreen display with a 16:9 aspect ratio, leading to a slight vertical compression of your input. To resolve such an aspect ratio mismatch you need to compromise by either reducing the drawing area height (called ''Force Proportions'' on Windows) or reducing the screen area width. The former wastes drawing area and the latter prevents you from reaching the right edge of your screen with your Stylus. It is probably still a compromise worth to be made because it prevents your strokes from being skewed.<br />
<br />
Find out your tablet's resolution by running:<br />
<br />
$ xsetwacom get ''stylus'' Area<br />
<br />
==== Reducing the drawing area height ====<br />
<br />
Run:<br />
<br />
$ xsetwacom set ''stylus'' Area 0 0 ''tablet_width'' ''height''<br />
<br />
where ''height'' is ''tablet_width * screen_height / screen_width''.<br />
<br />
The tablet resolution can be reset back to the default using:<br />
<br />
$ xsetwacom set ''stylus'' ResetArea<br />
<br />
==== Reducing the screen area width ====<br />
<br />
Run:<br />
<br />
$ xsetwacom set ''stylus'' MapToOutput ''WIDTH''x''SCREEN_HEIGHT''+0+0<br />
<br />
where ''WIDTH'' is ''screen_height * tablet_width / tablet_height''.<br />
<br />
=== LEDs ===<br />
<br />
See the [https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-driver-wacom sysfs-driver-wacom] documentation. To make changes without requiring root permissions you will likely want to create a [[udev]] rule like so:<br />
<br />
{{hc|/etc/udev/rules.d/99-wacom.rules|<nowiki><br />
# Give the users group permissions to set Wacom device LEDs.<br />
ACTION=="add", SUBSYSTEM=="hid", DRIVERS=="wacom", RUN+="/usr/bin/sh -c 'chown :users /sys/%p/wacom_led/*'"<br />
</nowiki>}}<br />
<br />
Setting the Intuos OLEDs can be done using {{AUR|i4oled}} from the AUR.<br />
<br />
=== TwinView setup ===<br />
<br />
If you are going to use two monitors the aspect ratio while using the tablet might feel unnatural. In order to fix this you need to add:<br />
<br />
Option "TwinView" "horizontal"<br />
<br />
to all of your Wacom-InputDevice entries in the ''xorg.conf'' file. You may read more about that [http://ubuntuforums.org/showthread.php?t=640898 here].{{Dead link|2018|09|05}}<br />
<br />
==== Temporary TwinView setup ====<br />
<br />
For temporary mapping of a Wacom device to a single display ''while preserving the aspect ratio'', [https://gist.github.com/Quackmatic/6c19fe907945d735c045 this script] may be used. This will letter-box the surface area of the device as required to ensure the input is not stretched on the display. This script may be executed in your {{ic|.xinitrc}} file for it to automatically run.<br />
<br />
=== xrandr setup ===<br />
<br />
{{Style|Wording can be improved, personal writing style.}}<br />
<br />
[[xrandr]] sets two monitors as one big screen, mapping the tablet to the whole virtual screen and deforming aspect ratio. For a solution see this thread: [https://bbs.archlinux.org/viewtopic.php?pid=797617 Arch Linux forum].<br />
<br />
If you just want to map the tablet to one of your screens, first find out what the screens are called:<br />
<br />
$ xrandr<br />
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384<br />
HDMI-0 disconnected (normal left inverted right x axis y axis)<br />
DVI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
VGA-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
<br />
Then you need to know what is the ID of your tablet.<br />
<br />
$ xsetwacom list devices<br />
WALTOP International Corp. Slim Tablet stylus id: 12 type: STYLUS<br />
<br />
In my case I want to map the tablet (ID: 12) to the screen on the right, which is ''VGA-0''. I can do that with this command<br />
<br />
$ xsetwacom set 12 MapToOutput VGA-0<br />
<br />
This should work immediately, no root necessary.<br />
<br />
Should this fail when using the NVIDIA binary driver, using ''HEAD-0'', ''HEAD-1'' and so on to refer to the monitors may work.<br />
<br />
If xsetwacom replies with "Unable to find an output ..." an X11 geometry string of the form {{ic|WIDTHxHEIGHT+X+Y}} can be specified instead of the screen identifier. In this example<br />
<br />
$ xsetwacom set 12 MapToOutput 1920x1080+1920+0<br />
<br />
should also map the tablet to the screen on the right.<br />
<br />
Alternatively, you can use [https://bitbucket.org/denilsonsa/small_scripts/src/3380435f92646190f860b87f566a39d0e215034c/xsetwacom_my_preferences.sh?at=default this bash script] to quickly map the tablet to one of your screens (or the entire desktop) and fix the aspect ratio.<br />
<br />
In case ''xsetwacom'' does not work, you can try ''xinput''.<br />
<br />
First, you need to find your tablet's ID.<br />
<br />
$ xinput list<br />
<br />
In my case, the output is:<br />
<br />
⎡ Virtual core pointer id=2 [master pointer (3)]<br />
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Finger id=11 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Pad id=12 [slave pointer (2)]<br />
⎜ ↳ USB Keyboard id=14 [slave pointer (2)]<br />
⎜ ↳ SynPS/2 Synaptics TouchPad id=16 [slave pointer (2)]<br />
⎜ ↳ TPPS/2 IBM TrackPoint id=17 [slave pointer (2)]<br />
⎜ ↳ SteelSeries Kinzu V2 Gaming Mouse id=9 [slave pointer (2)]<br />
⎜ ↳ Wacom Intuos PT S 2 Pen Pen (0x6281780c) id=20 [slave pointer (2)]<br />
⎣ Virtual core keyboard id=3 [master keyboard (2)]<br />
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]<br />
↳ Power Button id=6 [slave keyboard (3)]<br />
↳ Video Bus id=7 [slave keyboard (3)]<br />
↳ Sleep Button id=8 [slave keyboard (3)]<br />
↳ Wacom Intuos PT S 2 Pen id=10 [slave keyboard (3)]<br />
↳ USB Keyboard id=13 [slave keyboard (3)]<br />
↳ AT Translated Set 2 keyboard id=15 [slave keyboard (3)]<br />
↳ ThinkPad Extra Buttons id=18 [slave keyboard (3)]<br />
↳ USB Keyboard id=19 [slave keyboard (3)]<br />
<br />
This mean, my tablet's ID is ''20''. Now we map it with ''VGA-0'' screen:<br />
<br />
$ xinput map-to-output 20 VGA-0<br />
<br />
=== Pressure curve ===<br />
<br />
Use the [https://linuxwacom.github.io/bezier.html Wacom Pressure Curve and Threshold Graph] to find P1=red (eg. 50,0) and P2=purple (eg. 100,80) of your desired curve. The x-axis is the input pressure you apply to the pen; the y-axis is the output pressure the application is given.<br />
<br />
You can change the pressure curve with:<br />
<br />
$ xsetwacom set ''stylus'' PressureCurve ''x1 y1 x2 y2''<br />
<br />
== Application-specific configuration ==<br />
<br />
=== Blender ===<br />
<br />
To enable pad buttons and extra pen buttons in [[Blender]], you can create a xsetwacom wrapper to temporarily remap buttons for your blender session.<br />
<br />
Provided example (for Bamboo fun) adapted to ''Sculpt'' mode: [http://pastebin.archlinux.fr/1887946 blender_sculpt.sh]{{Dead link|2018|06|23}}<br />
<br />
It remaps:<br />
* Left tablet buttons to {{ic|Shift}} and {{ic|Ctrl}} ''(pan/tilt/zoom/smooth/invert)''<br />
* Right tablet buttons to {{ic|F}} ''(brush size/strenght)'' and {{ic|Ctrl-z}} ''(undo)''<br />
* Top pen button ton {{ic|m}} ''(mask control)''<br />
<br />
=== GIMP ===<br />
<br />
To enable proper usage, and pressure sensitive painting in [[GIMP]], just go to ''Edit > Input Devices''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.<br />
<br />
* Please take note that if present, the ''pad'' ''device'' should be kept disabled as I do not think GIMP supports such things. Alternatively, to use such features of your tablet you should map them to keyboard commands with a program such as [http://hem.bredband.net/devel/wacom/ Wacom ExpressKeys].<br />
<br />
* You should also take note that the tool selected for the ''stylus'' is independent to that of the ''eraser''. This can actually be quite handy, as you can have the ''eraser'' set to be used as any tool you like.<br />
<br />
For more information checkout the ''Setting up GIMP'' section of [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp].<br />
<br />
If the above was not enough, you may want to try setting up the tablet's stylus (and eraser) as a second mouse pointer (separating it from your mouse) by using the {{ic|xinput create-master}} and {{ic|xinput reattach}} commands. It can help when GIMP does not start painting even if the stylus touches the tablet.<br />
<br />
=== Inkscape ===<br />
<br />
Pressure sensitivity in [[Inkscape]] is enabled the same way as in GIMP. Go to ''Edit > Input Devices...''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.<br />
<br />
=== Krita ===<br />
<br />
If your tablet does not draw in Krita (clicks/pressure are not registered) but works in the brush selection dialog which has a small test area, try putting Krita in full-screen or canvas-only mode.<br />
<br />
Krita only requires that Qt is able to use your tablet to function properly. If your tablet is not working in Krita, then make sure to check it is working in Qt first. The effect of tablet pressure can then be tweaked in the painttop configuration, for example by selecting opacity, then selecting pressure from the drop down and adjusting the curve to your preference.<br />
<br />
=== VirtualBox ===<br />
<br />
First, make sure that your tablet works well under Arch. Then, download and install the last driver from [http://www.wacom.com/downloads/drivers.php Wacom website] on the guest OS. Shutdown the virtual machine, go to ''Settings > USB''. Select ''Add Filter From Device'' and select your tablet (e.g. WACOM CTE-440-U V4.0-3 [0403]). Select ''Edit Filter'', and change the last item ''Remote'' to ''Any''.<br />
<br />
== Troubleshooting ==<br />
<br />
Newer tablets' drivers might not be in the kernel yet, and additional manipulations might be needed. A notable example is the newer Intuos line of tablets (Draw/Comic/Photo).<br />
<br />
=== Unknown device_type ===<br />
<br />
If your tablet does not get recognized by {{ic|xsetwacom}} and {{ic|dmesg}} complains about an unknown device_type, then you need to install a patched version of input-wacom.<br />
<br />
Download and install the for-4.4 branch from [http://sourceforge.net/p/linuxwacom/input-wacom/ci/jiri/for-4.4/~/tarball SourceForge].<br />
Your device should be recognized after you run<br />
<br />
# rmmod wacom<br />
# insmod /lib/modules/YOUR_KERNEL/kernel/drivers/hid/wacom.ko.gz<br />
<br />
=== Tablet recognized but xsetwacom and similar tools do not display it ===<br />
<br />
Your logs indicate that the correct driver is selected, and the tablet works. However, when running {{ic|xsetwacom list devices}} or use similar tools that depend on the correct driver, you get an empty list.<br />
<br />
A reason might be the execution order of your xorg configuration. {{ic|/usr/share/X11/xorg.conf.d}} gets executed first, then {{ic|/etc/X11/xorg.conf.d}}. The package {{pkg|xf86-input-wacom}} contains the file {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}}. If there is a catchall for tablets, executed after this file, the previously selected {{ic|wacom}} driver will be overwritten with a generic one that does not work with xsetwacom et. al.<br />
<br />
To make sure, check the rules contained in the files executed after {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}} for anything that looks like graphics tablets.<br />
<br />
=== Manual setup ===<br />
<br />
A manual configuration is done in {{ic|/etc/X11/xorg.conf}} or in a separate file in the {{ic|/etc/X11/xorg.conf.d/}} directory. The Wacom tablet device is accessed using a input event interface in {{ic|/dev/input/}} which is provided by the kernel driver. The interface number {{ic|event??}} is likely to change when unplugging and replugging into the same or especially a different ''USB'' port. Therefore it is wise to not refer to the device using its concrete {{ic|event??}} interface ('''static''' configuration) but by letting ''udev'' dynamically create a symbolic link to the correct {{ic|event}} file ('''dynamic''' configuration).<br />
<br />
==== Dynamic with udev ====<br />
<br />
{{Note|In AUR there is wacom-udev package, which includes udev-rules-file. You might skip this part and move on to the {{ic|xorg.conf}} configuration if you are using the wacom-udev package from AUR.}}<br />
<br />
Assuming ''udev'' is already installed you simply need to install {{AUR|wacom-udev}}{{Broken package link|{{aur-mirror|wacom-udev}}}} from the [[AUR]].<br />
<br />
===== USB-devices =====<br />
<br />
After (re-)plugging in your ''USB''-tablet (or at least after rebooting) some symbolic links should appear in {{ic|/dev/input}} referring to your tablet device.<br />
<br />
$ ls /dev/input/wacom* <br />
/dev/input/wacom /dev/input/wacom-stylus /dev/input/wacom-touch<br />
<br />
If not, your device is likely to be not yet included in the ''udev'' configuration from ''wacom-udev'' which resides in {{ic|/usr/lib/udev/rules.d/10-wacom.rules}}. It is a good idea to copy the file e.g. to {{ic|10-my-wacom.rules}} before modifying it, else it might be reverted by a package upgrade.<br />
<br />
Add your device to the file by duplicating some line of another device and adapting ''idVendor'',''idProduct'' and the symlink name to your device.<br />
The two id's can be determined using<br />
<br />
$ lsusb | grep -i wacom<br />
Bus 002 Device 007: ID 056a:0062 Wacom Co., Ltd<br />
<br />
In this example idVendor is 056a and idProduct 0062. In case you have device with touch (e.g. Bamboo Pen&Touch) you might need to add a second line for the touch input interface. For details check the linuxwacom wiki [http://linuxwacom.sourceforge.net/wiki/index.php/Fixed_device_files_with_udev Fixed device files with udev].<br />
<br />
Save the file and reload udev's configuration profile using the command ''udevadm control --reload-rules'' Check again the content of ''/dev/input'' to make sure that the ''wacom'' symlinks appeared. Note that you may need to plug-in the tablet again for the device to appear.<br />
<br />
The files of further interest for the ''Xorg'' configuration are {{ic|/dev/input/wacom}} and for a touch-device also {{ic|/dev/input/wacom_touch}}.<br />
<br />
===== Serial devices =====<br />
<br />
The {{AUR|wacom-udev}}{{Broken package link|{{aur-mirror|wacom-udev}}}} should also include support for serial devices. Users of serial tablets might be also interested in the inputattach tool from {{Pkg|linuxconsole}} package. The inputattach command allows to bind serial device into /dev/input tree, for example with:<br />
<br />
# inputattach --w8001 /dev/ttyS0<br />
<br />
See ''man inputattach'' for help about available options. As for USB devices one should end up with a file {{ic|/dev/input/wacom}} and proceed with the ''Xorg'' configuration.<br />
<br />
==== Static setup ====<br />
<br />
Usually it is recommended to rely on [[Xorg]]'s auto-detection or to use a '''dynamic''' setup. However for an ''internal'' tablet device one might consider a '''static''' Xorg setup in case autodetection does not work. A static [[Xorg]] setup is usually not able to recognize your Wacom tablet when it is connected to a different ''USB'' port or even after unplugging and replugging it into the same port, and as such it should be considered as deprecated.<br />
<br />
If you insist in using a static setup just refer to your tablet in the ''Xorg'' configuration in the next section using the correct {{ic|/dev/input/event??}} files as one can find out by looking into {{ic|/proc/bus/input/devices}}.<br />
<br />
==== Xorg configuration ====<br />
<br />
In either case, dynamic or static setup you got now one or two files in {{ic|/dev/input/}} which refer to the correct input event devices of your tablet. All that is left to do is add the relevant information to {{ic|/etc/X11/xorg.conf}}, or a dedicated file under {{ic|/etc/X11/xorg.conf.d/}}. The exact configuration depends on your tablet's features of course. {{ic|xsetwacom list devices}} might give helpful information on what ''InputDevice'' sections are needed for your tablet.<br />
<br />
An example configuration for a ''Volito2'' might look like this<br />
<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "stylus"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "stylus"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "eraser"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "eraser"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "cursor"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "cursor"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
EndSection<br />
<br />
Make sure that you also change the path ({{Ic|"Device"}}) to your mouse, as it will be {{Ic|/dev/input/mouse_udev}} now.<br />
<br />
Section "InputDevice"<br />
Identifier "Mouse1"<br />
Driver "mouse"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mouse_udev"<br />
Option "SendCoreEvents" "true"<br />
Option "Protocol" "IMPS/2"<br />
Option "ZAxisMapping" "4 5"<br />
Option "Buttons" "5"<br />
EndSection<br />
<br />
Add this to the ''ServerLayout'' section<br />
<br />
InputDevice "cursor" "SendCoreEvents" <br />
InputDevice "stylus" "SendCoreEvents"<br />
InputDevice "eraser" "SendCoreEvents"<br />
<br />
And finally make sure to update the identifier of your mouse in the ''ServerLayout'' section &ndash; as mine went from<br />
<br />
InputDevice "Mouse0" "CorePointer"<br />
<br />
to<br />
<br />
InputDevice "Mouse1" "CorePointer"<br />
<br />
== See also ==<br />
<br />
* [[List of applications/Documents#Stylus note-taking]]<br />
* [https://github.com/linuxwacom/input-wacom/wiki input-wacom Wiki]<br />
* [https://github.com/linuxwacom/xf86-input-wacom/wiki xf86-input-wacom Wiki] (out of date)<br />
* [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]<br />
* [https://help.ubuntu.com/community/Wacom Ubuntu Help: Wacom]<br />
* [http://ubuntuforums.org/showthread.php?t=1038949 Ubuntu Forums - Install a LinuxWacom Kernel Driver for Tablet PC's]</div>Jose1711https://wiki.archlinux.org/index.php?title=Firejail&diff=573428Firejail2019-05-17T18:31:45Z<p>Jose1711: remove unnecessary colon (@Lahwaacz: when undoing do it right)</p>
<hr />
<div>[[Category:Sandboxing]]<br />
[[ja:Firejail]]<br />
{{Related articles start}}<br />
{{Related|Security}}<br />
{{Related articles end}}<br />
[https://firejail.wordpress.com/ Firejail] is an easy to use SUID sandbox program that reduces the risk of security breaches by restricting the running environment of untrusted applications using Linux namespaces, seccomp-bpf and Linux capabilities.<br />
<br />
== Installation ==<br />
<br />
[[Install]] either {{Pkg|firejail}}, {{aur|firejail-git}} or the {{aur|firejail-apparmor}} package. A GUI application for use with Firejail is also available, {{aur|firetools}}.<br />
<br />
{{Note|For information about {{man|7|user_namespaces}} support in Arch Linux kernels see [[Security#Sandboxing applications]]. [https://github.com/netblue30/firejail/issues/1842#issuecomment-376642039 Firejail can use it even if it is disabled].}}<br />
{{Warning|While upstream is gradually adopting whitelists, (cf {{ic|/etc/firejail/firefox.profile}},) most of the supplied profiles still rely heavily on blacklists. This means that anything not explicitly forbidden by the profile will be accessible to the application. For example, if you have btrfs snapshots available in {{ic|/mnt/btrfs}}, a jailed program may be forbidden from accessing {{ic|$HOME/.ssh}}, but would still be able to access {{ic|/mnt/btrfs/@some-snapshot/$HOME/.ssh}}. Make sure to audit your profiles, see [[#Testing profiles]]}}<br />
<br />
=== Apparmor integration ===<br />
<br />
Since 0.9.42, {{aur|firejail-apparmor}}, has supported more direct integration with Apparmor through a generic apparmor profile. During installation, the profile, {{ic|firejail-default}}, is placed in {{ic|/etc/apparmor.d}} directory, and needs to be loaded into the kernel by running the following command as root:<br />
<br />
# apparmor_parser -r /etc/apparmor.d/firejail-default<br />
<br />
To quote the manual: <br />
<br />
:''The installed profile is supplemental for main firejail functions and among other things does the following:''<br />
<br />
::''- Disable ptrace. With ptrace it is possible to inspect and hijack running programs. Usually this is needed only for debugging.''<br />
<br />
::''- Whitelist write access to several files under /run, /proc and /sys.''<br />
<br />
::''- Allow running programs only from well-known system paths, such as /bin, /sbin, /usr/bin etc. Those paths are available as read-only. Running programs and scripts from user home or other directories writable by the user is not allowed.''<br />
<br />
::''- Prevent using non-standard network sockets. Only unix, inet, inet6, netlink, raw and packet are allowed.''<br />
<br />
::''- Deny access to known sensitive paths like .snapshots.''<br />
<br />
Local customizations of the apparmor profile are supported by editing the file {{ic|/etc/apparmor.d/local/firejail-local}}<br />
<br />
== Configuration ==<br />
<br />
Most users will not require any custom configuration and can proceed to [[#Usage]].<br />
<br />
Firejail uses profiles to set the security protections for each of the applications executed inside of it - you can find the default profiles in {{ic|/etc/firejail/''application''.profile}}. Should you require custom profiles for applications not included, or wish to modify the defaults, you may place new rules or copies of the defaults in the {{ic|~/.config/firejail/}} directory. You may have multiple custom profile files for a single application, and you may share the same profile file among several applications.<br />
<br />
If firejail does not have a profile for a particular application, it uses its restrictive system-wide default profile. This can result in the application not functioning as desired, without first creating a custom, and less restrictive profile.<br />
<br />
Refer to {{man|5|firejail-profile}}.<br />
<br />
== Usage ==<br />
<br />
To execute an application using firejail's default protections for that application (the default profile), execute the following:<br />
<br />
$ firejail <program name><br />
<br />
One-time additions to the default profile can be added as command line options (see the man page). For example, to execute ''okular'' with seccomp protection, execute the following:<br />
<br />
$ firejail --seccomp okular<br />
<br />
You may define multiple non-default profiles for a single program. Once you create your profile file, you can use it by executing:<br />
<br />
$ firejail --profile=/absolute/path/to/profile <program name><br />
<br />
=== Using Firejail by default ===<br />
<br />
To use Firejail by default for all applications for which it has profiles, run the ''firecfg'' tool as root.<br />
<br />
# firecfg<br />
<br />
This creates symbolic links in {{ic|/usr/local/bin}} pointing to {{ic|/usr/bin/firejail}}, for all programs for which firejail has default profiles.<br />
<br />
{{Tip|A [[pacman hook]] can be used to automatically run {{ic|firecfg}} on [[pacman]] operations:<br />
{{hc|/etc/pacman.d/hooks/firejail.hook|2=<br />
[Trigger]<br />
Type = File<br />
Operation = Install<br />
Operation = Upgrade<br />
Operation = Remove<br />
Target = usr/bin/*<br />
Target = usr/local/bin/*<br />
Target = usr/share/applications/*.desktop<br />
<br />
[Action]<br />
Description = Configure symlinks in /usr/local/bin based on firecfg.config...<br />
When = PostTransaction<br />
Depends = firejail<br />
Exec = /bin/sh -c 'firecfg &>/dev/null'}}}}<br />
<br />
To manually map individual applications execute:<br />
<br />
# ln -s /usr/bin/firejail /usr/local/bin/<application><br />
<br />
{{Note|1=<nowiki></nowiki><br />
* {{ic|/usr/local/bin}} should be set before {{ic|/usr/bin}} in the {{ic|PATH}} [[environment variable]].<br />
* To run a symbolic program with custom Firejail setting, simple prefix ''firejail'' as seen in [[#Usage]].<br />
* For a daemon, you will need to overwrite the systemd unit file for that daemon to call firejail, see [[systemd#Editing provided units]].<br />
* {{ic|firecfg}} doesn't work with some cli shells such as: {{ic|tar}}, {{ic|curl}}, {{ic|wget}}, and {{ic|git}} which need to be symlinked manually.<br />
* Symbolic links to {{ic|gzip}} and {{ic|xz}} interfere with {{ic|makepkg}}'s ability to preload {{ic|libfakeroot.so}}. See [https://bbs.archlinux.org/viewtopic.php?id=230913 BBS#230913].}}<br />
<br />
{{Warning|Upstream provides profiles for {{ic|gpg}} and {{ic|gpg-agent}}. If gpg is symlinked with the supplied profile, pacman will be unable to update {{pkg|archlinux-keyring}}.}}<br />
<br />
=== Use With hardened_malloc ===<br />
{{AUR|hardened-malloc-git}} is a hardened implementiation of glibc's malloc() allocator, originally written for Android but extended for use on the desktop. While not integrated into glibc yet, it can be used selectively with LD_PRELOAD. The proper way to launch an application within firejail using hardened_malloc is demonstrated below. To make it permanent, you'd need to create your own entry in /usr/local/bin for the desired application.''<br />
<br />
{{bc|1=firejail --env=LD_PRELOAD='/usr/lib/libhardened_malloc.so' /usr/bin/firefox}}<br />
<br />
The various environment variables and settings that can be used to tune hardened_malloc can be found on it's [https://github.com/GrapheneOS/hardened_malloc github page].<br />
<br />
=== Enable AppArmor support ===<br />
There are a number of ways to enable [[AppArmor]] confinement on top of a Firejail security profile:<br />
<br />
* Pass the {{ic|--apparmor}} flag to Firejail in the command line, e.g. {{ic|$ firejail --apparmor firefox}}<br />
* Use a custom profile.<br />
* Enable Apparmor globally in {{ic|/etc/firejail/globals.local}} and disable as needed through the use of {{ic|ignore apparmor}} in {{ic|/etc/firejail/<ProgramName>.local}}.<br />
<br />
=== Verifying Firejail is being used ===<br />
<br />
$ firejail --list<br />
<br />
== Creating custom profiles ==<br />
<br />
=== Whitelists and Blacklists ===<br />
<br />
Blacklists are permissive:<br />
<br />
* Permit everything not explicitly forbidden: {{ic|blacklist <location/file>}}<br />
* Permit file or location in any later blacklist: {{ic|noblacklist <location/file>}} <br />
<br />
Whitelists are restrictive: <br />
<br />
* Forbid everything not explicitly permitted: {{ic|whitelist <location/file>}}<br />
* Forbid file or location in any later whitelist: {{ic|nowhitelist <location/file>}}<br />
<br />
=== Profile writing ===<br />
<br />
The basic process is:<br />
<br />
# Copy the default profile (which uses blacklists) to your work folder and give it a unique name<br />
# Change the line {{ic|include /etc/firejail/default.local}} to {{ic|include /etc/firejail/ProfileName.local}}<br />
# Gradually comment/uncomment the various options while checking at each stage that the application runs inside the new sandbox<br />
# Desirable options not available in the copied default profile can be found by consulting the manual<br />
# [https://firejail.wordpress.com/documentation-2/building-whitelisted-profiles/ Build a whitelist] of permitted locations. For portability, it may be advisable to place at least some of this list it in a {{ic|.local}} file<br />
# Test the profile for security holes, see [[#Testing profiles]]<br />
# Once satisfied, copy your new profile to either {{ic|/etc/firejail/}} or {{ic|~/.config/firejail/}}<br />
<br />
You may find the following to be useful:<br />
<br />
# {{ic|firejail --debug $OtherOptions $PathToProfile $Program > $PathToOutputFile}} Gives a detailed breakdown of the sandbox<br />
# {{ic|firejail --debug-caps}} gives a list of caps supported by the current Firejail software build. This is useful when building a [https://l3net.wordpress.com/2015/03/16/firejail-linux-capabilities-guide/ caps whitelist].<br />
# {{ic|firejail --help}} for a full list of {{ic|--debug}} options<br />
# {{ic|firemon PID}} monitors the running process. See {{ic|firemon --help}} for details<br />
# {{Pkg|checksec}} may also be useful in testing which standard security features are being used<br />
<br />
{{Note|<nowiki></nowiki><br />
* The idea is to be as restrictive as possible, while still maintaining usability. This may involve sacrificing potentially dangerous functionality and a change in cavalier work habits.<br />
* By default, seccomp filters work on a blacklist (which can be found in the manual). It is possible to use {{ic|seccomp.keep}} to build a custom whitelist of filters for an application. [https://firejail.wordpress.com/documentation-2/seccomp-guide/].<br />
* The list of possible options for a firejail profile is extensive, and users should consult the firejail-profile(5) man page.<br />
}}<br />
<br />
==== Persistent local customisation ====<br />
<br />
The standard profile layout now includes the capability to make persistent local customisations through the inclusion of {{ic|.local}} files. Basically, each officially supported profile contains the lines {{ic|include /etc/firejail/ProgramName.local}} and {{ic|include /etc/firejail/globals.local}}. Since the order of precedence is determined by which is read first, this makes for a very powerful way of making local customisations.<br />
For example, with reference [https://github.com/netblue30/firejail/issues/1510#issuecomment-326443650 this firejail question], to globally enable Apparmor and disable Internet connectivity, one could simply create/edit {{ic|/etc/firejail/globals.local}} to include the lines<br />
<br />
# enable Apparmor and disable Internet globally<br />
net none<br />
apparmor<br />
<br />
Then, to allow, for example, "curl" to connect to the internet, yet still maintain its apparmor confinement, one would create/edit {{ic|/etc/firejail/curl.local}} to include the lines.<br />
<br />
# enable internet for curl<br />
ignore net<br />
<br />
Since {{ic|curl.local}} is read before {{ic|globals.local}}, {{ic|ignore net}} overrides {{ic|net none}}, and, as a bonus, the above changes would be persistent across future updates.<br />
<br />
=== Testing profiles ===<br />
<br />
Firejail's built in audit feature allows the user to find gaps in a security profile by replacing the program to be sandboxed with a test program. By default, firejail uses the {{ic|faudit}} program distributed with Firejail. (Note: A custom test program supplied by the user can also be used.) <br />
Examples:<br />
<br />
# Run the default audit program: {{ic|$ firejail --audit transmission-gtk}}<br />
# Run a custom audit program: {{ic|1=$ firejail --audit=~/sandbox-test transmission-gtk}} <br />
<br />
In the examples above, the sandbox configures the transmission-gtk profile and starts the test program. The real program, transmission-gtk, will not be started.<br />
<br />
{{Note|The audit feature is not implemented for --x11 commands.}}<br />
<br />
== Firejail with Xephyr ==<br />
<br />
[[Xephyr]] will allow you to sandbox [[Xorg]]. If you want to be able to resize windows, install a window manager such as [[Openbox]].<br />
<br />
{{ic|xephyr-screen ''Width''x''Height''}} can be set in {{ic|/etc/firejail/firejail.config}} where {{ic|''Width''}} and {{ic|''Height''}} are in pixels and based on your screen resolution.<br />
<br />
To open the sandbox:<br />
<br />
$ firejail --x11 --net=''device'' openbox<br />
<br />
{{ic|''device''}} is your active [[network interface]]. Then right click and select your applications to run.<br />
<br />
{{Note|If you use [[Unbound]], [[dnsmasq]], [[Pdnsd]] or any other local cache as your resolver on 127.0.0.1 for example, you would leave {{ic|1=--net=''device''}} out of the command as your network should work automatically.}}<br />
<br />
A great guide can be found on the [https://firejail.wordpress.com/documentation-2/x11-guide/#configurexephyr Firejail Wordpress].<br />
<br />
According to the guide:<br />
<br />
:The sandbox replaces the regular X11 server with Xpra or Xephyr server. This prevents X11 keyboard loggers and screenshot utilities from accessing the main X11 server.<br />
<br />
Note that the statement:<br />
<br />
:The only way to disable the abstract socket {{ic|@/tmp/.X11-unix/X0}} is by using a network namespace. If for any reasons you cannot use a network namespace, the abstract socket will still be visible inside the sandbox. Hackers can attach keylogger and screenshot programs to this socket.<br />
<br />
is incorrect, [[Xinit#xserverrc|xserverrc]] can be edited to {{ic|-nolisten local}} which disables the abstract sockets of X11 and helps isolate it.<br />
<br />
=== Sandboxing a browser ===<br />
<br />
[[Openbox]] can be configured to start a certain browser at startup. {{ic|''program''.profile}} is the respective profile contained in {{ic|/etc/firejail}}, and {{ic|--startup "''command''"}} is the command line used to start the program. For example, to start Chromium in the sandbox:<br />
<br />
$ firejail --x11 --profile=/etc/firejail/chromium.profile openbox --startup "chromium"<br />
<br />
==Tips and tricks==<br />
<br />
=== Paths containing spaces ===<br />
<br />
If you need to reference, whitelist, or blacklist a directory within a custom profile, such as with {{aur|palemoon}}, you must do so using the absolute path, without encapsulation or escapes:<br />
/home/user/.moonchild productions<br />
<br />
===Private mode===<br />
<br />
Firejail also includes a one time private mode, in which no mounts are made in the chroots to your home directory. In doing this, you can execute applications without performing any changes to disk. For example, to execute okular in private mode, do the following:<br />
<br />
$ firejail --seccomp --private okular<br />
<br />
== Troubleshooting ==<br />
<br />
Some applications do not work properly with Firejail, and others simply require special configuration. In the instance any directories are disallowed or blacklisted for any given application, you may have to further edit the profile to enable nonstandard directories that said application needs to access. One example is wine; wine will not work with seccomp in most cases.<br />
<br />
Other configurations exist; it is suggested you check out the man page for firejail to see them all, as firejail is in rapid development.<br />
<br />
=== Remove Firejail symbolic links ===<br />
<br />
To remove Firejail created symbolic links (e.g. reset to default):<br />
<br />
# firecfg --clean<br />
<br />
Verify if any leftovers of [[Desktop entries]] are still overruled by Firejail.<br />
<br />
=== Desktop files ===<br />
<br />
Some GUI application launchers ({{ic|.desktop}} files) are coded using absolute paths to an executable, which circumvents firejail's symlink method of ensuring that it is being used. The ''firecfg'' tool includes an option to over-ride this on a per-user basis by copying the {{ic|.desktop}} files from {{ic|/usr/share/applications/*.desktop}} to {{ic|~/.local/share/applications/}} and replacing the absolute paths with simple file names.<br />
<br />
$ firecfg --fix<br />
<br />
There may be cases for which you need to manually modify the EXEC line of the {{ic|.desktop}} file in {{ic|~/.local/share/applications/}} to explicitly call Firejail.<br />
<br />
=== PulseAudio ===<br />
{{Note|Using PulseAudio version 9.0 or later should fix this issue.}}<br />
<br />
If Firejail causes [[PulseAudio]] issues with sandboxed applications [https://firejail.wordpress.com/support/known-problems/#pulseaudio], the following command may be used:<br />
<br />
$ firecfg --fix-sound<br />
<br />
This commands creates a custom {{ic|~/.config/pulse/client.conf}} file for the ''current'' user with {{ic|1=enable-shm = no}} and possible other workarounds.<br />
<br />
=== Hidepid ===<br />
<br />
If you have [[hidepid]] installed, Firemon can only be run as root. This, among other things, will cause problems with the Firetools GUI incorrectly reporting "Capabilities", "Protocols" and the status of "Seccomp". See [https://github.com/netblue30/firejail/issues/1564]<br />
<br />
=== Proprietary Nvidia drivers ===<br />
<br />
Some users report problems when using Firejail and proprietary graphic drivers from [[NVIDIA]] (e.g. [https://github.com/netblue30/firejail/issues/1753], [https://github.com/netblue30/firejail/issues/879] or [https://github.com/netblue30/firejail/issues/841]). This can often be solved by disabling the {{ic|noroot}} Firejail option in the application's profile file.<br />
<br />
=== --net options and Linux kernel >=4.20.0 ===<br />
<br />
There is a bug on firejail 0.5.96 with linux >= 4.20.0, see [https://github.com/netblue30/firejail/issues/2314] and [https://github.com/netblue30/firejail/pull/2327]<br />
<br />
Example error message:<br />
<br />
$ firejail --noprofile --net=eth0 ls<br />
Parent pid 8521, child pid 8522<br />
Error send: arp.c:182 arp_check: Invalid argument<br />
Error: proc 8521 cannot sync with peer: unexpected EOF<br />
Peer 8522 unexpectedly exited with status 1<br />
<br />
==See also==<br />
* [https://github.com/netblue30/firejail Firejail GitHub project page]<br />
* [[bubblewrap]], a minimal alternative to Firejail</div>Jose1711https://wiki.archlinux.org/index.php?title=Firejail&diff=573373Firejail2019-05-17T07:42:55Z<p>Jose1711: add copy command example + paths in .profile are no longer absolute</p>
<hr />
<div>[[Category:Sandboxing]]<br />
[[ja:Firejail]]<br />
{{Related articles start}}<br />
{{Related|Security}}<br />
{{Related articles end}}<br />
[https://firejail.wordpress.com/ Firejail] is an easy to use SUID sandbox program that reduces the risk of security breaches by restricting the running environment of untrusted applications using Linux namespaces, seccomp-bpf and Linux capabilities.<br />
<br />
== Installation ==<br />
<br />
[[Install]] either {{Pkg|firejail}}, {{aur|firejail-git}} or the {{aur|firejail-apparmor}} package. A GUI application for use with Firejail is also available, {{aur|firetools}}.<br />
<br />
{{Note|For information about {{man|7|user_namespaces}} support in Arch Linux kernels see [[Security#Sandboxing applications]]. [https://github.com/netblue30/firejail/issues/1842#issuecomment-376642039 Firejail can use it even if it is disabled].}}<br />
{{Warning|While upstream is gradually adopting whitelists, (cf {{ic|/etc/firejail/firefox.profile}},) most of the supplied profiles still rely heavily on blacklists. This means that anything not explicitly forbidden by the profile will be accessible to the application. For example, if you have btrfs snapshots available in {{ic|/mnt/btrfs}}, a jailed program may be forbidden from accessing {{ic|$HOME/.ssh}}, but would still be able to access {{ic|/mnt/btrfs/@some-snapshot/$HOME/.ssh}}. Make sure to audit your profiles, see [[#Testing profiles]]}}<br />
<br />
=== Apparmor integration ===<br />
<br />
Since 0.9.42, {{aur|firejail-apparmor}}, has supported more direct integration with Apparmor through a generic apparmor profile. During installation, the profile, {{ic|firejail-default}}, is placed in {{ic|/etc/apparmor.d}} directory, and needs to be loaded into the kernel by running the following command as root:<br />
<br />
# apparmor_parser -r /etc/apparmor.d/firejail-default<br />
<br />
To quote the manual: <br />
<br />
:''The installed profile is supplemental for main firejail functions and among other things does the following:''<br />
<br />
::''- Disable ptrace. With ptrace it is possible to inspect and hijack running programs. Usually this is needed only for debugging.''<br />
<br />
::''- Whitelist write access to several files under /run, /proc and /sys.''<br />
<br />
::''- Allow running programs only from well-known system paths, such as /bin, /sbin, /usr/bin etc. Those paths are available as read-only. Running programs and scripts from user home or other directories writable by the user is not allowed.''<br />
<br />
::''- Prevent using non-standard network sockets. Only unix, inet, inet6, netlink, raw and packet are allowed.''<br />
<br />
::''- Deny access to known sensitive paths like .snapshots.''<br />
<br />
Local customizations of the apparmor profile are supported by editing the file {{ic|/etc/apparmor.d/local/firejail-local}}<br />
<br />
== Configuration ==<br />
<br />
Most users will not require any custom configuration and can proceed to [[#Usage]].<br />
<br />
Firejail uses profiles to set the security protections for each of the applications executed inside of it - you can find the default profiles in {{ic|/etc/firejail/''application''.profile}}. Should you require custom profiles for applications not included, or wish to modify the defaults, you may place new rules or copies of the defaults in the {{ic|~/.config/firejail/}} directory. You may have multiple custom profile files for a single application, and you may share the same profile file among several applications.<br />
<br />
If firejail does not have a profile for a particular application, it uses its restrictive system-wide default profile. This can result in the application not functioning as desired, without first creating a custom, and less restrictive profile.<br />
<br />
Refer to {{man|5|firejail-profile}}.<br />
<br />
== Usage ==<br />
<br />
To execute an application using firejail's default protections for that application (the default profile), execute the following:<br />
<br />
$ firejail <program name><br />
<br />
One-time additions to the default profile can be added as command line options (see the man page). For example, to execute ''okular'' with seccomp protection, execute the following:<br />
<br />
$ firejail --seccomp okular<br />
<br />
You may define multiple non-default profiles for a single program. Once you create your profile file, you can use it by executing:<br />
<br />
$ firejail --profile=/absolute/path/to/profile <program name><br />
<br />
=== Using Firejail by default ===<br />
<br />
To use Firejail by default for all applications for which it has profiles, run the ''firecfg'' tool as root.<br />
<br />
# firecfg<br />
<br />
This creates symbolic links in {{ic|/usr/local/bin}} pointing to {{ic|/usr/bin/firejail}}, for all programs for which firejail has default profiles.<br />
<br />
{{Tip|A [[pacman hook]] can be used to automatically run {{ic|firecfg}} on [[pacman]] operations:<br />
{{hc|/etc/pacman.d/hooks/firejail.hook|2=<br />
[Trigger]<br />
Type = File<br />
Operation = Install<br />
Operation = Upgrade<br />
Operation = Remove<br />
Target = usr/bin/*<br />
Target = usr/local/bin/*<br />
Target = usr/share/applications/*.desktop<br />
<br />
[Action]<br />
Description = Configure symlinks in /usr/local/bin based on firecfg.config...<br />
When = PostTransaction<br />
Depends = firejail<br />
Exec = /bin/sh -c 'firecfg &>/dev/null'}}}}<br />
<br />
To manually map individual applications execute:<br />
<br />
# ln -s /usr/bin/firejail /usr/local/bin/<application><br />
<br />
{{Note|1=<nowiki></nowiki><br />
* {{ic|/usr/local/bin}} should be set before {{ic|/usr/bin}} in the {{ic|PATH}} [[environment variable]].<br />
* To run a symbolic program with custom Firejail setting, simple prefix ''firejail'' as seen in [[#Usage]].<br />
* For a daemon, you will need to overwrite the systemd unit file for that daemon to call firejail, see [[systemd#Editing provided units]].<br />
* {{ic|firecfg}} doesn't work with some cli shells such as: {{ic|tar}}, {{ic|curl}}, {{ic|wget}}, and {{ic|git}} which need to be symlinked manually.<br />
* Symbolic links to {{ic|gzip}} and {{ic|xz}} interfere with {{ic|makepkg}}'s ability to preload {{ic|libfakeroot.so}}. See [https://bbs.archlinux.org/viewtopic.php?id=230913 BBS#230913].}}<br />
<br />
{{Warning|Upstream provides profiles for {{ic|gpg}} and {{ic|gpg-agent}}. If gpg is symlinked with the supplied profile, pacman will be unable to update {{pkg|archlinux-keyring}}.}}<br />
<br />
=== Use With hardened_malloc ===<br />
{{AUR|hardened-malloc-git}} is a hardened implementiation of glibc's malloc() allocator, originally written for Android but extended for use on the desktop. While not integrated into glibc yet, it can be used selectively with LD_PRELOAD. The proper way to launch an application within firejail using hardened_malloc is demonstrated below. To make it permanent, you'd need to create your own entry in /usr/local/bin for the desired application.''<br />
<br />
{{bc|1=firejail --env=LD_PRELOAD='/usr/lib/libhardened_malloc.so' /usr/bin/firefox}}<br />
<br />
The various environment variables and settings that can be used to tune hardened_malloc can be found on it's [https://github.com/GrapheneOS/hardened_malloc github page].<br />
<br />
=== Enable AppArmor support ===<br />
There are a number of ways to enable [[AppArmor]] confinement on top of a Firejail security profile:<br />
<br />
* Pass the {{ic|--apparmor}} flag to Firejail in the command line, e.g. {{ic|$ firejail --apparmor firefox}}<br />
* Use a custom profile.<br />
* Enable Apparmor globally in {{ic|/etc/firejail/globals.local}} and disable as needed through the use of {{ic|ignore apparmor}} in {{ic|/etc/firejail/<ProgramName>.local}}.<br />
<br />
=== Verifying Firejail is being used ===<br />
<br />
$ firejail --list<br />
<br />
== Creating custom profiles ==<br />
<br />
=== Whitelists and Blacklists ===<br />
<br />
Blacklists are permissive:<br />
<br />
* Permit everything not explicitly forbidden: {{ic|blacklist <location/file>}}<br />
* Permit file or location in any later blacklist: {{ic|noblacklist <location/file>}} <br />
<br />
Whitelists are restrictive: <br />
<br />
* Forbid everything not explicitly permitted: {{ic|whitelist <location/file>}}<br />
* Forbid file or location in any later whitelist: {{ic|nowhitelist <location/file>}}<br />
<br />
=== Profile writing ===<br />
<br />
The basic process is:<br />
<br />
# Copy the default profile (which uses blacklists) to your work folder and give it a unique name:<br />
#:{{ic|cp /etc/firejail/default.profile ~/my_work_dir/ProfileName.profile}}<br />
# Change the line {{ic|include default.local}} to {{ic|include ProfileName.local}}<br />
# Gradually comment/uncomment the various options while checking at each stage that the application runs inside the new sandbox<br />
# Desirable options not available in the copied default profile can be found by consulting the manual<br />
# [https://firejail.wordpress.com/documentation-2/building-whitelisted-profiles/ Build a whitelist] of permitted locations. For portability, it may be advisable to place at least some of this list it in a {{ic|.local}} file<br />
# Test the profile for security holes, see [[#Testing profiles]]<br />
# Once satisfied, copy your new profile to either {{ic|/etc/firejail/}} or {{ic|~/.config/firejail/}}<br />
<br />
You may find the following to be useful:<br />
<br />
# {{ic|firejail --debug $OtherOptions $PathToProfile $Program > $PathToOutputFile}} Gives a detailed breakdown of the sandbox<br />
# {{ic|firejail --debug-caps}} gives a list of caps supported by the current Firejail software build. This is useful when building a [https://l3net.wordpress.com/2015/03/16/firejail-linux-capabilities-guide/ caps whitelist].<br />
# {{ic|firejail --help}} for a full list of {{ic|--debug}} options<br />
# {{ic|firemon PID}} monitors the running process. See {{ic|firemon --help}} for details<br />
# {{Pkg|checksec}} may also be useful in testing which standard security features are being used<br />
<br />
{{Note|<nowiki></nowiki><br />
* The idea is to be as restrictive as possible, while still maintaining usability. This may involve sacrificing potentially dangerous functionality and a change in cavalier work habits.<br />
* By default, seccomp filters work on a blacklist (which can be found in the manual). It is possible to use {{ic|seccomp.keep}} to build a custom whitelist of filters for an application. [https://firejail.wordpress.com/documentation-2/seccomp-guide/].<br />
* The list of possible options for a firejail profile is extensive, and users should consult the firejail-profile(5) man page.<br />
}}<br />
<br />
==== Persistent local customisation ====<br />
<br />
The standard profile layout now includes the capability to make persistent local customisations through the inclusion of {{ic|.local}} files. Basically, each officially supported profile contains the lines {{ic|include /etc/firejail/ProgramName.local}} and {{ic|include /etc/firejail/globals.local}}. Since the order of precedence is determined by which is read first, this makes for a very powerful way of making local customisations.<br />
For example, with reference [https://github.com/netblue30/firejail/issues/1510#issuecomment-326443650 this firejail question], to globally enable Apparmor and disable Internet connectivity, one could simply create/edit {{ic|/etc/firejail/globals.local}} to include the lines<br />
<br />
# enable Apparmor and disable Internet globally<br />
net none<br />
apparmor<br />
<br />
Then, to allow, for example, "curl" to connect to the internet, yet still maintain its apparmor confinement, one would create/edit {{ic|/etc/firejail/curl.local}} to include the lines.<br />
<br />
# enable internet for curl<br />
ignore net<br />
<br />
Since {{ic|curl.local}} is read before {{ic|globals.local}}, {{ic|ignore net}} overrides {{ic|net none}}, and, as a bonus, the above changes would be persistent across future updates.<br />
<br />
=== Testing profiles ===<br />
<br />
Firejail's built in audit feature allows the user to find gaps in a security profile by replacing the program to be sandboxed with a test program. By default, firejail uses the {{ic|faudit}} program distributed with Firejail. (Note: A custom test program supplied by the user can also be used.) <br />
Examples:<br />
<br />
# Run the default audit program: {{ic|$ firejail --audit transmission-gtk}}<br />
# Run a custom audit program: {{ic|1=$ firejail --audit=~/sandbox-test transmission-gtk}} <br />
<br />
In the examples above, the sandbox configures the transmission-gtk profile and starts the test program. The real program, transmission-gtk, will not be started.<br />
<br />
{{Note|The audit feature is not implemented for --x11 commands.}}<br />
<br />
== Firejail with Xephyr ==<br />
<br />
[[Xephyr]] will allow you to sandbox [[Xorg]]. If you want to be able to resize windows, install a window manager such as [[Openbox]].<br />
<br />
{{ic|xephyr-screen ''Width''x''Height''}} can be set in {{ic|/etc/firejail/firejail.config}} where {{ic|''Width''}} and {{ic|''Height''}} are in pixels and based on your screen resolution.<br />
<br />
To open the sandbox:<br />
<br />
$ firejail --x11 --net=''device'' openbox<br />
<br />
{{ic|''device''}} is your active [[network interface]]. Then right click and select your applications to run.<br />
<br />
{{Note|If you use [[Unbound]], [[dnsmasq]], [[Pdnsd]] or any other local cache as your resolver on 127.0.0.1 for example, you would leave {{ic|1=--net=''device''}} out of the command as your network should work automatically.}}<br />
<br />
A great guide can be found on the [https://firejail.wordpress.com/documentation-2/x11-guide/#configurexephyr Firejail Wordpress].<br />
<br />
According to the guide:<br />
<br />
:The sandbox replaces the regular X11 server with Xpra or Xephyr server. This prevents X11 keyboard loggers and screenshot utilities from accessing the main X11 server.<br />
<br />
Note that the statement:<br />
<br />
:The only way to disable the abstract socket {{ic|@/tmp/.X11-unix/X0}} is by using a network namespace. If for any reasons you cannot use a network namespace, the abstract socket will still be visible inside the sandbox. Hackers can attach keylogger and screenshot programs to this socket.<br />
<br />
is incorrect, [[Xinit#xserverrc|xserverrc]] can be edited to {{ic|-nolisten local}} which disables the abstract sockets of X11 and helps isolate it.<br />
<br />
=== Sandboxing a browser ===<br />
<br />
[[Openbox]] can be configured to start a certain browser at startup. {{ic|''program''.profile}} is the respective profile contained in {{ic|/etc/firejail}}, and {{ic|--startup "''command''"}} is the command line used to start the program. For example, to start Chromium in the sandbox:<br />
<br />
$ firejail --x11 --profile=/etc/firejail/chromium.profile openbox --startup "chromium"<br />
<br />
==Tips and tricks==<br />
<br />
=== Paths containing spaces ===<br />
<br />
If you need to reference, whitelist, or blacklist a directory within a custom profile, such as with {{aur|palemoon}}, you must do so using the absolute path, without encapsulation or escapes:<br />
/home/user/.moonchild productions<br />
<br />
===Private mode===<br />
<br />
Firejail also includes a one time private mode, in which no mounts are made in the chroots to your home directory. In doing this, you can execute applications without performing any changes to disk. For example, to execute okular in private mode, do the following:<br />
<br />
$ firejail --seccomp --private okular<br />
<br />
== Troubleshooting ==<br />
<br />
Some applications do not work properly with Firejail, and others simply require special configuration. In the instance any directories are disallowed or blacklisted for any given application, you may have to further edit the profile to enable nonstandard directories that said application needs to access. One example is wine; wine will not work with seccomp in most cases.<br />
<br />
Other configurations exist; it is suggested you check out the man page for firejail to see them all, as firejail is in rapid development.<br />
<br />
=== Remove Firejail symbolic links ===<br />
<br />
To remove Firejail created symbolic links (e.g. reset to default):<br />
<br />
# firecfg --clean<br />
<br />
Verify if any leftovers of [[Desktop entries]] are still overruled by Firejail.<br />
<br />
=== Desktop files ===<br />
<br />
Some GUI application launchers ({{ic|.desktop}} files) are coded using absolute paths to an executable, which circumvents firejail's symlink method of ensuring that it is being used. The ''firecfg'' tool includes an option to over-ride this on a per-user basis by copying the {{ic|.desktop}} files from {{ic|/usr/share/applications/*.desktop}} to {{ic|~/.local/share/applications/}} and replacing the absolute paths with simple file names.<br />
<br />
$ firecfg --fix<br />
<br />
There may be cases for which you need to manually modify the EXEC line of the {{ic|.desktop}} file in {{ic|~/.local/share/applications/}} to explicitly call Firejail.<br />
<br />
=== PulseAudio ===<br />
{{Note|Using PulseAudio version 9.0 or later should fix this issue.}}<br />
<br />
If Firejail causes [[PulseAudio]] issues with sandboxed applications [https://firejail.wordpress.com/support/known-problems/#pulseaudio], the following command may be used:<br />
<br />
$ firecfg --fix-sound<br />
<br />
This commands creates a custom {{ic|~/.config/pulse/client.conf}} file for the ''current'' user with {{ic|1=enable-shm = no}} and possible other workarounds.<br />
<br />
=== Hidepid ===<br />
<br />
If you have [[hidepid]] installed, Firemon can only be run as root. This, among other things, will cause problems with the Firetools GUI incorrectly reporting "Capabilities", "Protocols" and the status of "Seccomp". See [https://github.com/netblue30/firejail/issues/1564]<br />
<br />
=== Proprietary Nvidia drivers ===<br />
<br />
Some users report problems when using Firejail and proprietary graphic drivers from [[NVIDIA]] (e.g. [https://github.com/netblue30/firejail/issues/1753], [https://github.com/netblue30/firejail/issues/879] or [https://github.com/netblue30/firejail/issues/841]). This can often be solved by disabling the {{ic|noroot}} Firejail option in the application's profile file.<br />
<br />
=== --net options and Linux kernel >=4.20.0 ===<br />
<br />
There is a bug on firejail 0.5.96 with linux >= 4.20.0, see [https://github.com/netblue30/firejail/issues/2314] and [https://github.com/netblue30/firejail/pull/2327]<br />
<br />
Example error message:<br />
<br />
$ firejail --noprofile --net=eth0 ls<br />
Parent pid 8521, child pid 8522<br />
Error send: arp.c:182 arp_check: Invalid argument<br />
Error: proc 8521 cannot sync with peer: unexpected EOF<br />
Peer 8522 unexpectedly exited with status 1<br />
<br />
==See also==<br />
* [https://github.com/netblue30/firejail Firejail GitHub project page]<br />
* [[bubblewrap]], a minimal alternative to Firejail</div>Jose1711https://wiki.archlinux.org/index.php?title=Mkinitcpio/Minimal_initramfs&diff=573297Mkinitcpio/Minimal initramfs2019-05-15T15:09:36Z<p>Jose1711: the empty execution block in awk is not necessary</p>
<hr />
<div>[[Category:Boot process]]<br />
[[ja:Initramfs の最小化]]<br />
{{Related articles start}}<br />
{{Related|mkinitcpio}}<br />
{{Related articles end}}<br />
<br />
This article shows how to create a slim, minimal initramfs for a system with a specific, known and static hardware configuration. The procedure is expounded from [http://blog.falconindy.com/articles/optmizing-bootup-with-mkinitcpio.html Optimizing Bootup With mkinitcpio] by Falconindy (Dave Reisner).<br />
<br />
==Udev requirement==<br />
<br />
The big advantage of creating your own initramfs images is that you can eliminate {{ic|udev}}. This hook alone is responsible for quite a bit of size (~700-800 KiB with LZ4 and LZOP, less with other algorithms) in the initramfs image. Not only will the bigger size lead to longer boots (more data to decompress) but initializing {{ic|udev}} itself will also take some extra time. '''However, some things require {{ic|udev}}.''' This includes resolving UUID, LABEL, PARTUUID and PARTLABEL identifiers ([http://unix.stackexchange.com/questions/352381/how-to-boot-into-root-btrfs-file-system-with-minimal-initramfs-without-udev-hook/352932#answer-352932 workaround hook without-udev]) and the assembly of LVM and mdadm devices that contain the {{ic|root}} partition. If you are unsure if you need {{ic|udev}}, continue with the directions on this page up until the [[#Initial test]]. If not everything works without {{ic|udev}}, re-enable the hook and try again.<br />
<br />
Also, while most keyboards (AT, PS/2, USB) don't require the use of the {{ic|udev}} hook, Logitech USB devices using the Logitech Unified Receiver do. At this point you could either include {{ic|udev}} in all images or rely on a {{ic|fallback}} image that does.<br />
<br />
If you need {{ic|udev}}, your minimization efforts will most likely be in vain. You may still be able to shrink the image size by ~600 KiB, but boot times will not be significantly improved. Continuing on in this scenario can still be a worthwhile learning experience.<br />
<br />
==Editing .preset files==<br />
<br />
In Falconidy's tutorial, he edits {{ic|/etc/mkinitcpio.conf}} and runs {{ic|mkinitcpio -g}} to create the test initramfs image, leaving the known-good initramfs images on the system untouched. However, if you blindly run {{ic|mkinitcpio -P}} afterwards, even the {{ic|fallback}} image will be stripped down.<br />
<br />
A safer way to prepare for taking the creation of the initramfs files into your own hands is to modify the {{ic|.preset}} files in {{ic|/etc/mkinitcpio.d}}. The following example configuration will supplant {{ic|default}} with the minimal initramfs image and create a new {{ic|normal}} image that is built The Arch Way. If things go wrong, you can rely on the {{ic|normal}} or {{ic|fallback}} images. When you are finished, you can drop the {{ic|normal_*}} lines from the config and remove the {{ic|initramfs-linux*-normal.img}} files.<br />
<br />
...<br />
<br />
PRESETS=('default' 'normal' 'fallback')<br />
...<br />
<br />
default_options="-S udev,block,mdadm_udev,filesystems,keyboard,fsck,consolefont"<br />
...<br />
<br />
#normal_config="/etc/mkinitcpio.conf"<br />
normal_image="/boot/initramfs-linux-normal.img"<br />
#normal_options=""<br />
...<br />
<br />
{{Note|The {{ic|mdadm_udev}} and {{ic|consolefont}} hooks are not present in the default Arch configuration. Having extraneous hooks in the {{ic|-S}} parameter in the {{ic|*_options}} line will not result in an error.}}<br />
<br />
==Finding needed modules==<br />
<br />
The quickest way to find out what modules you need is to reboot your system with the {{ic|fallback}} initramfs image and add {{ic|1=break=postmount}} to the kernel parameters in your boot loader so you get dropped to the command line once the root filesystem is mounted.<br />
<br />
Once your system reboots, run the following command to see what modules you need:<br />
<br />
lsmod | awk 'NF==3{print $1}'<br />
<br />
{{Note|The {{ic|awk}} command returns only the first field, using {{ic|{print $1} }}, of every line with exactly 3 fields, enforced by {{ic|1=NF==3}}. Module dependencies include the 4th field to show which module pulled in the dependency, thus being filtered out due to that fourth field. Arch's {{ic|mkinitcpio}} takes care of dependencies for legitimate values included in the arrays {{ic|1=MODULES=()}}, {{ic|1=FILES=()}}, and {{ic|1=BINARIES=()}}.}}<br />
<br />
Write down the modules that were loaded and type {{ic|exit}} to continue booting.<br />
<br />
Alternatively, [[Install]] the package {{pkg|hwdetect}} to help determine necessary modules. Though unmaintained, it can provide valuable information. Also, see [[Kernel modules]] to get started with the native tools.<br />
<br />
==Initial edit of mkinitcpio.conf==<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} and modify the {{ic|1=MODULES=}} line. A worthwhile note is that {{ic|/etc/mkinitcpio.conf}} is sourced, so you can build the MODULES line like a variable in a bash script.<br />
<br />
MODULES="" # filesystems<br />
MODULES+="" # storage<br />
MODULES+="" # keyboard<br />
MODULES+="" # miscellaneous<br />
<br />
Add all your modules to the last {{ic|miscellaneous}} line. As you sort through your modules, you can place them in the appropriate line.<br />
<br />
You will also need the binaries to do filesystem checks on the {{ic|root}} device '''and any other mount points''' in {{ic|/etc/fstab}} that have been set to do so.<br />
<br />
* For ext[2|3|4] devices:<br />
BINARIES="fsck fsck.ext[2|3|4] e2fsck"<br />
* For vfat (UEFI boot) partitions:<br />
BINARIES="fsck fsck.vfat dosfsck"<br />
* For btrfs single disk device:<br />
BINARIES="fsck fsck.btrfs btrfsck"<br />
* For btrfs multi disk device:<br />
BINARIES="fsck fsck.btrfs btrfs btrfsck"<br />
* For xfs devices<br />
BINARIES="fsck fsck.xfs xfs_repair"<br />
<br />
{{Note|The third option in each of these example are optional, but their exclusion will prevent you from repairing a damaged filesystem, necessitating a boot from another initramfs.}}<br />
<br />
{{Note|Users are encouraged to add entries pertaining to other filesystems.}}<br />
<br />
==Initial test==<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} and run {{ic|mkinitcpio -P}} to rebuild all of your initramfs images. Then reboot.<br />
<br />
Your first boot should be successful '''if you don't need {{ic|udev}}'''. If something doesn't work (eg, Arch can't find your root partition or your keyboard doesn't work) then you will need to go back and remove {{ic|udev}} from the {{ic|-S}} parameter in the {{ic|default_options}} line and try again. If you need {{ic|udev}}, keep in mind that you won't see a significant improvement in boot time and continuing on is only good for a learning experience.<br />
<br />
==Sorting out modules==<br />
<br />
Now that you have a known-good bootable initramfs, it's time to slim down the initramfs even further. The normal method is to remove a few modules at a time, rebuild the initramfs images, and reboot to see if everything is still OK. If you find out that everything is not OK, reboot with the {{ic|fallback}} initramfs image and re-add the deleted modules until everything is OK again. Rinse and repeat until you have only the modules you need. As this can be a tedious experience, the following lists are provided to give people a head-start in the elimination process.<br />
<br />
{{Note|The following are examples and are not meant to be definitive.}}<br />
<br />
===Filesystem modules===<br />
<br />
{{Note|You will need the filesystem modules for the {{ic|root}} device and any other device in {{ic|/etc/fstab}} that will have its filesystem checked on boot.}}<br />
<br />
*{{ic|ext[2,3,4]}}<br />
*{{ic|xfs}}<br />
*{{ic|jfs}}<br />
*{{ic|reiserfs}}<br />
<br />
===Storage device modules===<br />
<br />
*{{ic|sd_mod}} for all SCSI, SATA, and PATA (IDE) devices<br />
*{{ic|ahci}} for SATA devices on modern AHCI controllers<br />
*{{ic|sata_*}} for SATA devices on IDE-mode controllers<br />
*{{ic|pata_*}} for PATA (IDE) devices<br />
*{{ic|ehci_pci}} and {{ic|usb_storage}} for USB storage devices<br />
*{{ic|virtio_blk}} and {{ic|virtio_pci}} for QEMU/KVM VMs using VirtIO for storage<br />
<br />
===Keyboard modules===<br />
<br />
*{{ic|atkbd}} for AT and PS/2 keyboards, and the emulated keyboard in QEMU/KVM.<br />
*{{ic|hid_generic}}, {{ic|ohci_pci}}, and {{ic|usbhid}} for normal USB keyboards.<br />
*{{ic|hid_logitech_dj}}, {{ic|uhci_hcd}}, and {{ic|usbhid}} for Logitech USB keyboards using the Logitech Unified Receiver. '''(Requires the {{ic|udev}} hook).'''<br />
<br />
==Finishing up==<br />
<br />
Once you've slimmed your initramfs as far as it will go, remove (or comment-out) the {{ic|normal_*}} lines from your {{ic|.preset}} files and remove the {{ic|initramfs-linux*-normal.img}} files from {{ic|/boot}}.</div>Jose1711https://wiki.archlinux.org/index.php?title=Mkinitcpio/Minimal_initramfs&diff=572953Mkinitcpio/Minimal initramfs2019-05-11T18:23:26Z<p>Jose1711: corrected typo</p>
<hr />
<div>[[Category:Boot process]]<br />
[[ja:Initramfs の最小化]]<br />
{{Related articles start}}<br />
{{Related|mkinitcpio}}<br />
{{Related articles end}}<br />
<br />
This article shows how to create a slim, minimal initramfs for a system with a specific, known and static hardware configuration. The procedure is expounded from [http://blog.falconindy.com/articles/optmizing-bootup-with-mkinitcpio.html Optimizing Bootup With mkinitcpio] by Falconindy (Dave Reisner).<br />
<br />
==Udev requirement==<br />
<br />
The big advantage of creating your own initramfs images is that you can eliminate {{ic|udev}}. This hook alone is responsible for quite a bit of size (~700-800 KiB with LZ4 and LZOP, less with other algorithms) in the initramfs image. Not only will the bigger size lead to longer boots (more data to decompress) but initializing {{ic|udev}} itself will also take some extra time. '''However, some things require {{ic|udev}}.''' This includes resolving UUID, LABEL, PARTUUID and PARTLABEL identifiers ([http://unix.stackexchange.com/questions/352381/how-to-boot-into-root-btrfs-file-system-with-minimal-initramfs-without-udev-hook/352932#answer-352932 workaround hook without-udev]) and the assembly of LVM and mdadm devices that contain the {{ic|root}} partition. If you are unsure if you need {{ic|udev}}, continue with the directions on this page up until the [[#Initial test]]. If not everything works without {{ic|udev}}, re-enable the hook and try again.<br />
<br />
Also, while most keyboards (AT, PS/2, USB) don't require the use of the {{ic|udev}} hook, Logitech USB devices using the Logitech Unified Receiver do. At this point you could either include {{ic|udev}} in all images or rely on a {{ic|fallback}} image that does.<br />
<br />
If you need {{ic|udev}}, your minimization efforts will most likely be in vain. You may still be able to shrink the image size by ~600 KiB, but boot times will not be significantly improved. Continuing on in this scenario can still be a worthwhile learning experience.<br />
<br />
==Editing .preset files==<br />
<br />
In Falconidy's tutorial, he edits {{ic|/etc/mkinitcpio.conf}} and runs {{ic|mkinitcpio -g}} to create the test initramfs image, leaving the known-good initramfs images on the system untouched. However, if you blindly run {{ic|mkinitcpio -P}} afterwards, even the {{ic|fallback}} image will be stripped down.<br />
<br />
A safer way to prepare for taking the creation of the initramfs files into your own hands is to modify the {{ic|.preset}} files in {{ic|/etc/mkinitcpio.d}}. The following example configuration will supplant {{ic|default}} with the minimal initramfs image and create a new {{ic|normal}} image that is built The Arch Way. If things go wrong, you can rely on the {{ic|normal}} or {{ic|fallback}} images. When you are finished, you can drop the {{ic|normal_*}} lines from the config and remove the {{ic|initramfs-linux*-normal.img}} files.<br />
<br />
...<br />
<br />
PRESETS=('default' 'normal' 'fallback')<br />
...<br />
<br />
default_options="-S udev,block,mdadm_udev,filesystems,keyboard,fsck,consolefont"<br />
...<br />
<br />
#normal_config="/etc/mkinitcpio.conf"<br />
normal_image="/boot/initramfs-linux-normal.img"<br />
#normal_options=""<br />
...<br />
<br />
{{Note|The {{ic|mdadm_udev}} and {{ic|consolefont}} hooks are not present in the default Arch configuration. Having extraneous hooks in the {{ic|-S}} parameter in the {{ic|*_options}} line will not result in an error.}}<br />
<br />
==Finding needed modules==<br />
<br />
The quickest way to find out what modules you need is to reboot your system with the {{ic|fallback}} initramfs image and add {{ic|1=break=postmount}} to the kernel parameters in your boot loader so you get dropped to the command line once the root filesystem is mounted.<br />
<br />
Once your system reboots, run the following command to see what modules you need:<br />
<br />
lsmod | awk 'NF==3{print $1}{}'<br />
<br />
{{Note|The {{ic|awk}} command returns only the first field, using {{ic|{print $1} }}, of every line with exactly 3 fields, enforced by {{ic|1=NF==3}}. Module dependencies include the 4th field to show which module pulled in the dependency, thus being filtered out due to that fourth field. Arch's {{ic|mkinitcpio}} takes care of dependencies for legitimate values included in the arrays {{ic|1=MODULES=()}}, {{ic|1=FILES=()}}, and {{ic|1=BINARIES=()}}.}}<br />
<br />
Write down the modules that were loaded and type {{ic|exit}} to continue booting.<br />
<br />
Alternatively, [[Install]] the package {{pkg|hwdetect}} to help determine necessary modules. Though unmaintained, it can provide valuable information. Also, see [[Kernel modules]] to get started with the native tools.<br />
<br />
==Initial edit of mkinitcpio.conf==<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} and modify the {{ic|1=MODULES=}} line. A worthwhile note is that {{ic|/etc/mkinitcpio.conf}} is sourced, so you can build the MODULES line like a variable in a bash script.<br />
<br />
MODULES="" # filesystems<br />
MODULES+="" # storage<br />
MODULES+="" # keyboard<br />
MODULES+="" # miscellaneous<br />
<br />
Add all your modules to the last {{ic|miscellaneous}} line. As you sort through your modules, you can place them in the appropriate line.<br />
<br />
You will also need the binaries to do filesystem checks on the {{ic|root}} device '''and any other mount points''' in {{ic|/etc/fstab}} that have been set to do so.<br />
<br />
* For ext[2|3|4] devices:<br />
BINARIES="fsck fsck.ext[2|3|4] e2fsck"<br />
* For vfat (UEFI boot) partitions:<br />
BINARIES="fsck fsck.vfat dosfsck"<br />
* For btrfs single disk device:<br />
BINARIES="fsck fsck.btrfs btrfsck"<br />
* For btrfs multi disk device:<br />
BINARIES="fsck fsck.btrfs btrfs btrfsck"<br />
* For xfs devices<br />
BINARIES="fsck fsck.xfs xfs_repair"<br />
<br />
{{Note|The third option in each of these example are optional, but their exclusion will prevent you from repairing a damaged filesystem, necessitating a boot from another initramfs.}}<br />
<br />
{{Note|Users are encouraged to add entries pertaining to other filesystems.}}<br />
<br />
==Initial test==<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} and run {{ic|mkinitcpio -P}} to rebuild all of your initramfs images. Then reboot.<br />
<br />
Your first boot should be successful '''if you don't need {{ic|udev}}'''. If something doesn't work (eg, Arch can't find your root partition or your keyboard doesn't work) then you will need to go back and remove {{ic|udev}} from the {{ic|-S}} parameter in the {{ic|default_options}} line and try again. If you need {{ic|udev}}, keep in mind that you won't see a significant improvement in boot time and continuing on is only good for a learning experience.<br />
<br />
==Sorting out modules==<br />
<br />
Now that you have a known-good bootable initramfs, it's time to slim down the initramfs even further. The normal method is to remove a few modules at a time, rebuild the initramfs images, and reboot to see if everything is still OK. If you find out that everything is not OK, reboot with the {{ic|fallback}} initramfs image and re-add the deleted modules until everything is OK again. Rinse and repeat until you have only the modules you need. As this can be a tedious experience, the following lists are provided to give people a head-start in the elimination process.<br />
<br />
{{Note|The following are examples and are not meant to be definitive.}}<br />
<br />
===Filesystem modules===<br />
<br />
{{Note|You will need the filesystem modules for the {{ic|root}} device and any other device in {{ic|/etc/fstab}} that will have its filesystem checked on boot.}}<br />
<br />
*{{ic|ext[2,3,4]}}<br />
*{{ic|xfs}}<br />
*{{ic|jfs}}<br />
*{{ic|reiserfs}}<br />
<br />
===Storage device modules===<br />
<br />
*{{ic|sd_mod}} for all SCSI, SATA, and PATA (IDE) devices<br />
*{{ic|ahci}} for SATA devices on modern AHCI controllers<br />
*{{ic|sata_*}} for SATA devices on IDE-mode controllers<br />
*{{ic|pata_*}} for PATA (IDE) devices<br />
*{{ic|ehci_pci}} and {{ic|usb_storage}} for USB storage devices<br />
*{{ic|virtio_blk}} and {{ic|virtio_pci}} for QEMU/KVM VMs using VirtIO for storage<br />
<br />
===Keyboard modules===<br />
<br />
*{{ic|atkbd}} for AT and PS/2 keyboards, and the emulated keyboard in QEMU/KVM.<br />
*{{ic|hid_generic}}, {{ic|ohci_pci}}, and {{ic|usbhid}} for normal USB keyboards.<br />
*{{ic|hid_logitech_dj}}, {{ic|uhci_hcd}}, and {{ic|usbhid}} for Logitech USB keyboards using the Logitech Unified Receiver. '''(Requires the {{ic|udev}} hook).'''<br />
<br />
==Finishing up==<br />
<br />
Once you've slimmed your initramfs as far as it will go, remove (or comment-out) the {{ic|normal_*}} lines from your {{ic|.preset}} files and remove the {{ic|initramfs-linux*-normal.img}} files from {{ic|/boot}}.</div>Jose1711https://wiki.archlinux.org/index.php?title=I3&diff=572642I32019-05-06T07:05:59Z<p>Jose1711: added note about py3status'es xrandr module</p>
<hr />
<div>{{DISPLAYTITLE:i3}}<br />
[[Category:Tiling WMs]]<br />
[[Category:Dynamic WMs]]<br />
[[fr:i3]]<br />
[[hu:I3]]<br />
[[ja:i3]]<br />
[[ko:I3]]<br />
[[ru:I3]]<br />
[[zh-hans:I3]]<br />
{{Related articles start}}<br />
{{Related|Comparison of tiling window managers}}<br />
{{Related|Window manager}}<br />
{{Related articles end}}<br />
[http://i3wm.org/ i3] is a dynamic [[Wikipedia:Tiling window manager|tiling window manager]] inspired by [[wmii]] that is primarily targeted at developers and advanced users.<br />
<br />
The stated goals for ''i3'' include clear documentation, proper multi-monitor support, a tree structure for windows, and different modes like in [[vim]].<br />
<br />
== Installation ==<br />
<br />
''i3'' can be installed with the {{Pkg|i3-wm}} package.<br />
<br />
An {{Grp|i3}} package group is also available. It includes the window manager, a screen locker and two programs which write a status line to i3bar through [[Wikipedia:Standard streams#Standard output (stdout)|stdout]].<br />
<br />
{{Note|{{Pkg|i3-wm}} conflicts with {{Pkg|i3-gaps}} and by default {{Pkg|i3-gaps}} (a fork of ''i3'' with gaps and other features) will be installed.}}<br />
<br />
Additional packages are available in the [[Arch User Repository]]. See [[#Patches]] for examples.<br />
<br />
== Starting ==<br />
<br />
=== From tty ===<br />
<br />
Run {{ic|i3}} with [[xinit]].<br />
<br />
=== Display manager ===<br />
<br />
{{Pkg|i3-wm}} includes {{ic|i3.desktop}} as [[Xsession]] which starts the window manager. {{ic|i3-with-shmlog.desktop}} enables logs (useful for debugging). {{AUR|i3-gnome}}/{{AUR|i3-gnome-git}} integrates ''i3'' into [[GNOME]].<br />
<br />
== Usage ==<br />
<br />
See the [http://i3wm.org/docs official documentation] for more information, namely the [http://i3wm.org/docs/userguide.html i3 User’s Guide].<br />
<br />
=== Keybindings ===<br />
<br />
In ''i3'', commands are invoked with a modifier key, referred to as {{ic|$mod}}. This is {{ic|Alt}} (Mod1) by default, with {{ic|Super}} (Mod4) being a popular alternative. Super is the key usually represented on a keyboard as a Windows icon, or on an Apple keyboard as a Command key.<br />
<br />
See the [http://i3wm.org/docs/refcard.html i3 reference card] and [http://i3wm.org/docs/userguide.html#_using_i3 Using i3] for the defaults. See [http://i3wm.org/docs/userguide.html#keybindings Keyboard bindings] to add new shortcuts.<br />
<br />
Users of non-Qwerty keyboard layouts may wish to circumvent the "configuration wizard" as [[#Configuration wizard and alternative keyboard layouts|described below]].<br />
<br />
=== Containers and layouts ===<br />
<br />
''i3'' manages windows in a tree structure, with containers as building blocks. This structure branches with horizontal or vertical splits. Containers are tiled by default, but can be set to [https://i3wm.org/docs/userguide.html#_layout_mode_for_new_containers tabbed or stacking] layouts, as well as made floating (such as for dialog windows). Floating windows are always on top.<br />
<br />
See [http://i3wm.org/docs/userguide.html#_tree i3 Tree] and [http://www.youtube.com/watch?v=AWA8Pl57UBY Containers and the tree data structure] for details.<br />
<br />
=== Application launcher ===<br />
<br />
''i3'' uses [[dmenu]] as an application launcher, which is bound by default to {{ic|$mod+d}}. As it is an optional dependency {{Pkg|dmenu}} must first be installed before this functionality can be used.<br />
<br />
{{Pkg|i3-wm}} contains ''i3-dmenu-desktop'', a [[Wikipedia:Perl|Perl]] wrapper for ''dmenu'' which uses [[desktop entries]] to create a list of all installed applications. Alternatively, the package {{AUR|j4-dmenu-desktop-git}} can be used.<br />
<br />
==== KRunner as application launcher in KDE Plasma/i3 ====<br />
<br />
When running the KDE [[Plasma]] DE with KDEWM=/usr/bin/i3, one can set [[KRunner]] as alternative application launcher with {{ic|$mod+d}} by adding the following to the ''i3'' config:<br />
<br />
{{hc|~/.config/i3/config|2=<br />
set $menu --no-startup-id qdbus org.kde.krunner /App display<br />
bindsym $mod+d exec $menu<br />
}}<br />
<br />
== Configuration ==<br />
<br />
See [http://i3wm.org/docs/userguide.html#configuring Configuring i3] for details. The rest of this article assumes the ''i3'' configuration file to be in the folder {{ic|~/.config/}}.<br />
<br />
=== Configuration wizard and alternative keyboard layouts ===<br />
<br />
When ''i3'' is first started, it offers to run the configuration wizard ''i3-config-wizard''. This tool creates {{ic|~/.config/i3/config}} by rewriting a template configuration file in {{ic|/etc/i3/config.keycodes}}. It makes two modifications to the default template: <br />
<br />
# It asks the user to choose a default modifier key, which it adds to the template as a single line, like {{ic|set $mod Mod1}}; and <br />
# it replaces all ''bindcode'' lines with ''bindsym'' lines corresponding to the user's current keyboard layout.<br />
<br />
Step 2 is designed to ensure that the four navigation shortcuts, {{ic|j}}, {{ic|k}}, {{ic|l}} and "semicolon" on a Qwerty keyboard, will be mapped to keysyms which have the same location, e.g. {{ic|h}}, {{ic|t}}, {{ic|n}}, {{ic|s}} on a [[Dvorak]] keyboard. The side-effect of this magic is that up to fifteen other keysyms may be remapped in ways which break the mnemonics - so that, for a Dvorak user, "restart" is bound to {{ic|$mod1+p}} instead of {{ic|$mod1+r}}, "split horizontally" is bound to {{ic|$mod1+d}} instead of {{ic|$mod1+h}}, and so on.<br />
<br />
Therefore, users of alternate keyboard layouts who want straightforward key bindings, which match the bindings given in tutorials, may prefer to circumvent the "config wizard". This can be done by just copying {{ic|/etc/i3/config}} into {{ic|~/.config/i3/config}} (or {{ic|~/.i3/config}}), and editing that file.<br />
<br />
Note that a keycode-based configuration is also possible, e.g. for users who often switch between keyboard layouts, but want the ''i3'' bindings to stay the same.<br />
<br />
=== Colorschemes ===<br />
<br />
The configuration file allows for customization of window decoration colors, but the syntax makes it impractical to create or share themes. There are several projects which make this easier and include a variety of user-contributed themes.<br />
<br />
* {{App|j4-make-config|Merge your config with a collection of themes or personal config parts, for example host-specific configuration, allowing quick changing of the theme and flexible, dynamic customization of the configuration|https://github.com/okraits/j4-make-config|{{Aur|j4-make-config-git}}}}<br />
<br />
=== i3bar ===<br />
<br />
In addition to showing workspace information, i3bar can act as an input for i3status or an alternative, such as those mentioned in the next section. For example:<br />
<br />
{{hc|~/.config/i3/config|2=<br />
bar {<br />
output LVDS1<br />
status_command i3status<br />
position top<br />
mode hide<br />
workspace_buttons yes<br />
tray_output none<br />
<br />
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1<br />
<br />
colors {<br />
background #000000<br />
statusline #ffffff<br />
<br />
focused_workspace #ffffff #285577<br />
active_workspace #ffffff #333333<br />
inactive_workspace #888888 #222222<br />
urgent_workspace #ffffff #900000<br />
}<br />
}<br />
}}<br />
<br />
See the [http://i3wm.org/docs/userguide.html#_configuring_i3bar Configuring i3bar] for details.<br />
<br />
==== i3bar alternatives ====<br />
<br />
Some users may prefer panels such as those provided by conventional [[Desktop environment|Desktop Environments]]. This can be achieved within ''i3'' by launching the panel application of choice during startup.<br />
<br />
For example, to use the [[Xfce]] panel ({{Pkg|xfce4-panel}}), add the following line anywhere in {{ic|~/.config/i3/config}}:<br />
<br />
exec --no-startup-id xfce4-panel --disable-wm-check<br />
<br />
i3bar can be disabled by commenting the {{ic|<nowiki>bar{ }</nowiki>}} section of {{ic|~/.config/i3/config}}, or defining a keybind to toggle the bar:<br />
<br />
{{hc|~/.config/i3/config|<br />
# bar toggle, hide or show <br />
bindsym $mod+m bar mode toggle<br />
}}<br />
<br />
=== i3status ===<br />
<br />
Copy over the default configuration files to the home directory:<br />
<br />
$ cp /etc/i3status.conf ~/.config/i3status/config<br />
<br />
Not all plugins are defined in the default configuration and some configuration values may be invalid for your system, so the need to be updated accordingly. See {{man|1|i3status}} for details.<br />
<br />
==== i3status replacements ====<br />
<br />
* {{App|[[conky]]| Highly extensible system monitor. For usage with i3bar see [http://i3wm.org/docs/user-contributed/conky-i3bar.html this tutorial] |https://github.com/brndnmtthws/conky|{{Pkg|conky}}}}<br />
* {{App|i3blocks|Extensible via shell scripts. It can handle click events, interrupts, and defining of refresh intervals on a per-block basis.|https://github.com/vivien/i3blocks|{{Pkg|i3blocks}}, {{AUR|i3blocks-git}} }}<br />
* {{App|i3pystatus|Extensible Python 3 status bar with many plugins and configuration options by default.|https://github.com/enkore/i3pystatus i3pystatus|{{AUR|i3pystatus-git}}}}<br />
* {{App|i3situation|Another Python 3 status bar generator.|https://github.com/HarveyHunt/i3situation|{{Aur|i3situation-git}}}}<br />
* {{App|j4status|Provides a statusline, configurable via plugins, and written in C. Extra plugins are provided by {{Aur|j4status-plugins-git}}.|http://j4status.j4tools.org/|{{Aur|j4status-git}}}}<br />
* {{App|goi3bar|i3status replacement written in Go. Configuration-file driven with several plugins, concurrency options, and rich plugin support.|https://github.com/denbeigh2000/goi3bar/|{{Aur|goi3bar-git}}}}<br />
* {{App|goblocks|Fast, lightweight i3status replacement written in Go.|https://github.com/davidscholberg/goblocks|{{Aur|goblocks}}}}<br />
* {{App|bumblebee-status|Theme-able Python status bar generator.|https://github.com/tobi-wan-kenobi/bumblebee-status|{{Aur|bumblebee-status}} {{Aur|bumblebee-status-git}}}}<br />
* {{App|ty3status|i3status replacement written in Typescript. Built with first class support for javascript blocks.|https://github.com/mrkmg/ty3status|{{Aur|ty3status-git}}}}<br />
* {{App|i3status-rust|Highly efficient and feature-rich replacement written in Rust. Can handle push updates, individual update intervals, theming and click events|https://github.com/greshake/i3status-rust|{{Aur|i3status-rust-git}}}}<br />
* {{App|polybar|A fast and easy-to-use tool for creating status bars.|https://github.com/jaagr/polybar|{{Aur|polybar}}}}<br />
* {{App|excalibar|Lightweight yet customizable status bar written in C.|https://github.com/cylgom/excalibar|{{Aur|excalibar-git}}}}<br />
<br />
==== i3status wrappers ====<br />
<br />
* {{App|i3cat|A [[go]] based wrapper which can concatenate inputs from multiple external sources. It can handle click events and forwarding user specified signals to its subprocesses.|http://vincent-petithory.github.io/i3cat/|{{AUR|i3cat-git}}}}<br />
* {{App|py3status|An extensible i3status wrapper written in Python.|https://github.com/ultrabug/py3status|{{Pkg|py3status}}}}<br />
* {{App|YaGoStatus|Yet Another i3status replacement written in Go.|https://github.com/burik666/yagostatus|{{Aur|yagostatus-git}}}}<br />
<br />
==== Iconic fonts in the status bar ====<br />
<br />
''i3bar'' can be [[#Patches|patched]] for XBM icon support, but you can use iconic font sets instead.<br />
<br />
* {{App|ttf-font-awesome|Scalable vector icons that can be customized with CSS. A [http://fortawesome.github.io/Font-Awesome/cheatsheet/ cheatsheet] shows the Unicode point for each glyph.|http://fortawesome.github.io/Font-Awesome/|{{Pkg|ttf-font-awesome}}}}<br />
* {{App|ttf-font-icons|Non-overlapping and consistently sized mix of Awesome and Ionicons. This also avoids minor overlapping between DejaVu Sans and Awesome.|http://kageurufu.net/icons.pdf|{{AUR|ttf-font-icons}}}}.<br />
* {{App|ttf-ionicons|The premium icon font for Ionic Framework.|https://ionicframework.com/docs/ionicons/|{{Pkg|ttf-ionicons}}}}.<br />
<br />
To combine fonts, define a font fallback sequence in your configuration file, separating fonts with {{ic|,}} like so:<br />
{{hc|~/.config/i3/config|2=<br />
bar {<br />
...<br />
font pango:DejaVu Sans Mono, Icons 8<br />
...<br />
}<br />
}}<br />
<br />
In accordance with [https://developer.gnome.org/pango/stable/pango-Fonts.html#pango-font-description-from-string pango syntax], font size is specified only once, at the end of the comma-separated list of font families. Setting a size for each font would cause all but the last font to be ignored.<br />
<br />
Add icons to the format strings in {{ic|~/.config/i3status/config}} using the unicode numbers given in the cheatsheets linked above. The input method will vary between text editors. For instance, to insert the "heart" icon (unicode number f004):<br />
<br />
{{Merge|Internationalization|Should be described in one place; see also [[ArchWiki:Requests#Input methods]].}}<br />
<br />
* in various gui text editors (e.g. [[gedit]], Leafpad) and terminals (e.g. GNOME Terminal, xfce4-terminal): {{ic|Ctrl+Shift+u}}, {{ic|f004}}, {{ic|Enter}}<br />
* in [[Emacs]]: {{ic|C-x}}, {{ic|8}}, {{ic|RET}}, {{ic|f004}}, {{ic|RET}}<br />
* in [[Vim]] (while in insert mode): {{ic|Ctrl+v}}, {{ic|uf004}}<br />
* in [[urxvt]]: while holding {{ic|Ctrl+Shift}}, type {{ic|f004}}<br />
<br />
=== Terminal emulator ===<br />
<br />
By default when pressing {{ic|$mod+Return}} it launches the {{ic|i3-sensible-terminal}} which is a script that invokes a terminal. See {{man|1|i3-sensible-terminal}} for the order terminals are invoked in.<br />
<br />
To instead launch a terminal of choice, modify this line in {{ic|~/.config/i3/config}}:<br />
<br />
bindsym $mod+Return exec i3-sensible-terminal<br />
<br />
Alternatively, set the {{ic|$TERMINAL}} [[environment variable]].<br />
<br />
== Tips and tricks ==<br />
<br />
=== Jump to open window ===<br />
<br />
*{{App|quickswitch-i3|Python utility to quickly change to and locate windows in ''i3''|https://github.com/OliverUv/quickswitch-for-i3/|{{Aur|quickswitch-i3}}}}<br />
*{{App|i3-wm-scripts|search for and jump to windows with particular names matching regexp|https://github.com/yiuin/i3-wm-scripts||}}<br />
*{{App|winmenupy|Launches dmenu with a list of clients, sorted after workspaces. Selecting a client jumps to that window.|https://github.com/ziberna/i3-py/blob/master/examples/winmenu.py||}}<br />
*{{App|[[rofi]]|Search and jump to open and scratchpad window|https://davedavenport.github.io/rofi/|{{Pkg|rofi}}}}<br />
*{{App|i3-easyfocus|Focus and select windows in ''i3''|https://github.com/cornerman/i3-easyfocus|{{Aur|i3-easyfocus-git}}}}<br />
*{{App|wmfocus|Focus and select windows in ''i3'' and other window managers|https://github.com/svenstaro/wmfocus|{{Aur|wmfocus}}}}<br />
*{{App|i3-cycle-focus|Provides an Alt-Tab functionality for ''i3''|https://github.com/acrisci/i3ipc-python/blob/master/examples/i3-cycle-focus.py||}}<br />
<br />
=== Jump to urgent window ===<br />
<br />
Add to {{ic|.i3/config}}: [https://faq.i3wm.org/question/853/how-to-jump-to-urgent-workspace/]<br />
<br />
bindsym $mod+x [urgent=latest] focus<br />
<br />
=== Save and restore the window layout ===<br />
<br />
From version 4.8, and onward ''i3'' can save and restore workspace layouts. To do this, the following packages are needed: {{Pkg|perl-anyevent-i3}} and {{Pkg|perl-json-xs}} from the [[official repositories]].<br />
<br />
{{note| This section only provides quick tutorial on how to save the current window layout of a single workspace and how to restore it for later use. Refer to the [http://i3wm.org/docs/layout-saving.html official documentation] for more details}}<br />
<br />
==== Save the current window layout of a single workspace ====<br />
<br />
To save the current window layout, follow these steps:<br />
<br />
# First, execute various commands to open windows in a preferred workspace and resize them if needed. Make sure to write down each executed command for each window.<br />
# Now, in a new workspace, open a terminal and run the following: {{bc|i3-save-tree --workspace N > ~/.i3/workspace_N.json}} where N is the number of the preferred workspace. This will save the current layout of workspace N to the file {{ic|~/.i3/workspace_N.json}}.<br />
# The newly created file needs to be edited, however this may be done with the following commands: {{bc|<nowiki>tail -n +2 ~/.i3/workspace_N.json | fgrep -v '// splitv' | sed 's|//||g' > ~/.i3/workspace_N.json</nowiki>}}<br />
<br />
==== Restore the window layout of the workspace ====<br />
<br />
There are two ways to restore the layout of the workspace: by writing a script, or by editing {{ic|~/.i3/config}} to automatically load the layout. In this section only the first case will be considered, refer to the [http://i3wm.org/docs/layout-saving.html#_restoring_the_layout official documentation] for the second case.<br />
<br />
To restore the saved layout in the previous section, write a file named {{ic|load_layout.sh}} with the following contents:<br />
<br />
* The starting lines:<br />
<br />
{{hc|head=~/load_layout.sh|output=<br />
#!/bin/bash<br />
i3-msg "workspace M; append_layout ~/.i3/workspace_N.json"<br />
}}<br />
<br />
where M is the number of the workspace in which you would like to load the previously saved layout and N is the number of workspace saved in the previous section.<br />
* And the commands used in the previous section to get the preferred windows, but enclosed in parentheses and with an ampersand appended before the last parentheses.<br />
<br />
For example, if the saved layout contained three {{ic|uxterm}} windows:<br />
<br />
{{hc|head=~/load_layout.sh|output=<br />
#!/bin/bash<br />
<br />
# First we append the saved layout of worspace N to workspace M<br />
i3-msg "workspace M; append_layout ~/.i3/workspace_N.json"<br />
<br />
# And finally we fill the containers with the programs they had<br />
(uxterm &)<br />
(uxterm &)<br />
(uxterm &)<br />
}}<br />
<br />
Then set the file as executable:<br />
<br />
chmod u+x ~/load_layout.sh<br />
<br />
And finally, the layout of worskpace N can be loaded onto to workspace M by running:<br />
<br />
~/load_layout.sh<br />
<br />
{{tip|Adding {{ic|bindsym $mod+g exec ~/load_layout.sh}} to {{ic|~/.i3/config}} and restarting ''i3'' will bind Mod+g to run the above script.}}<br />
<br />
{{note|If the above script does not work properly, refer to the [http://i3wm.org/docs/layout-saving.html#_editing_layout_files official documentation]. The ''swallows'' sections of {{ic|~/.i3/workspace_N.json}} needs to be manually edited.}}<br />
<br />
=== Scratchpad containers ===<br />
<br />
By default, [http://i3wm.org/docs/userguide.html#_scratchpad scratchpads] only contain a single window. However, containers can also be made a scratchpad.<br />
<br />
Create a new container (for example, {{ic|Mod+Enter}}), split it ({{ic|Mod+v}}) and create another container. Focus the parent ({{ic|Mod+a}}), split in the opposite direction ({{ic|Mod+h}}), and create again. <br />
<br />
Focus the first container (with focus parent as needed), make the window floating ({{ic|Mod+Shift+Space}}), and move it to the scratchpad ({{ic|Mod+Shift+-}}). You can now split containers to preference.<br />
<br />
{{Note|Containers cannot be resized individually in floating windows. Resize the containers before making windows floating.}}<br />
{{Tip|When only using terminal applications, consider a multiplexer such as [[tmux]] instead.}}<br />
<br />
See also [https://faq.i3wm.org/question/138/multiple-scratchpad/i3] for multiple scratchpads.<br />
<br />
=== Screensaver and power management ===<br />
<br />
With [[Power management#xss-lock]] you can register a screenlocker for your ''i3'' session. The {{ic|-time}} option with ''xautolock'' locks the screen after a given time period:<br />
<br />
xautolock -time 10 -locker "i3lock -i 'background_image.png'" &<br />
<br />
A [[systemd]] service file can be used to lock the screen before the system is being sent to sleep or hibernation state. See [[Power management#Suspend/resume service files]]. Note that i3lock requires the type of the service to be {{ic|forking}}.<br />
<br />
See also [[DPMS]].<br />
<br />
=== Shutdown, reboot, lock screen ===<br />
<br />
Key combinations for shutdown, reboot and screenlock can be added to {{ic|~/.config/i3/config}}. The below example assumes you have {{Pkg|polkit}} installed to allow unprivileged users to run [[systemd#Power_management|power management]] commands.<br />
<br />
{{bc|<br />
set $Locker i3lock && sleep 1<br />
<br />
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown<br />
mode "$mode_system" {<br />
bindsym l exec --no-startup-id $Locker, mode "default"<br />
bindsym e exec --no-startup-id i3-msg exit, mode "default"<br />
bindsym s exec --no-startup-id $Locker && systemctl suspend, mode "default"<br />
bindsym h exec --no-startup-id $Locker && systemctl hibernate, mode "default"<br />
bindsym r exec --no-startup-id systemctl reboot, mode "default"<br />
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default" <br />
<br />
# back to normal: Enter or Escape<br />
bindsym Return mode "default"<br />
bindsym Escape mode "default"<br />
}<br />
<br />
bindsym $mod+Pause mode "$mode_system"<br />
}}<br />
<br />
Once completed, you will be presented with a prompt whenever you press {{ic|$mod+pause}}. For more complex behaviour, use a separate script, and refer to it in the mode. [https://gist.github.com/anonymous/c8cd0a59bf4acb273068]<br />
<br />
{{Note|1=<br><br />
* {{ic|sleep 1}} adds a small delay to prevent possible race conditions with suspend [https://bugs.launchpad.net/ubuntu/+source/unity-2d/+bug/830348]<br />
* The {{ic|-i}} argument for {{ic|systemctl poweroff}} causes a shutdown even if other users are logged-in (this requires {{Pkg|polkit}}), or when ''logind'' (wrongly) assumes so. [https://bugs.freedesktop.org/show_bug.cgi?id=62676]<br />
}}<br />
<br />
For a list of alternative screen lockers, see [[List of applications/Security#Screen lockers]].<br />
<br />
===External displays manual management===<br />
<br />
Thanks to [[xrandr]] there are many ways to easily manage systems displays. The below example integrates it in the ''i3'' config file, and behave as the Power Management section above.<br />
<br />
Here a laptop with both VGA and HDMI outputs will use a menu selection to switch them On/Off:<br />
<br />
## Manual management of external displays<br />
# Set the shortcuts and what they do<br />
set $mode_display Ext Screen (v) VGA ON, (h) HDMI ON, (x) VGA OFF, (y) HDMI OFF<br />
mode "$mode_display" {<br />
bindsym v exec --no-startup-id xrandr --output VGA1 --auto --right-of LVDS1, mode "default"<br />
bindsym h exec --no-startup-id xrandr --output HDMI1 --auto --right-of LVDS1, mode "default"<br />
bindsym x exec --no-startup-id xrandr --output VGA1 --auto --off, mode "default"<br />
bindsym y exec --no-startup-id xrandr --output HDMI1 --auto --off, mode "default"<br />
<br />
# back to normal: Enter or Escape<br />
bindsym Return mode "default"<br />
bindsym Escape mode "default"<br />
}<br />
# Declare here the shortcut to bring the display selection menu<br />
bindsym $mod+x mode "$mode_display"<br />
<br />
Any window that is still open in a switched Off display will automatically come back to the remaining active display.<br />
<br />
The simplest way to determine names of your devices is to plug the device you wish to use and run:<br />
<br />
$ xrandr --query<br />
<br />
which will output the available, recognized devices and their in-system names to set your config file appropriately. <br />
<br />
Refer to the [[xrandr]] page or man page for the complete list of available options, the [http://i3wm.org/docs/userguide.html i3 userguide] and/or the [https://www.reddit.com/r/i3wm i3 FAQ on reddit] for more info.<br />
<br />
If you're using py3status make sure to check out [https://py3status.readthedocs.io/en/latest/modules.html#xrandr xrandr] module.<br />
<br />
=== Tabbed or stacked web-browsing ===<br />
<br />
Some web-browsers intentionally do not implement tabs, since managing tabs is considered to be the task of the window manager, not the task of the browser.<br />
<br />
To let ''i3'' manage your tab-less web-browser, in this example for [[uzbl]], add the following line to your {{ic|~/.config/i3/config}}<br />
<br />
for_window [class="Uzbl-core"] focus child, layout stacking, focus<br />
<br />
This is for stacked web browsing, meaning that the windows will be shown vertically. The advantage over tabbed browsing is that the window-titles are fully visible, even if a lot of browser windows are open.<br />
<br />
If you prefer tabbed browsing, with windows in horizontal direction ('tabs'), use<br />
<br />
for_window [class="Uzbl-core"] focus child, layout tabbed, focus<br />
<br />
=== Workspace variables ===<br />
<br />
As workspaces are defined multiple times in ''i3'', assigning workspace variables can be helpful. For example:<br />
<br />
set $WS1 term<br />
set $WS2 web<br />
set $WS3 misc<br />
set $WS4 media<br />
set $WS5 code<br />
<br />
Then replace workspace names with their matching variables:<br />
<br />
bindsym $mod+1 workspace $WS1<br />
...<br />
bindsym $mod+Shift+1 move container to workspace $WS1<br />
<br />
See [http://i3wm.org/docs/userguide.html#_changing_named_workspaces_moving_to_workspaces Changing named workspaces] for more information.<br />
<br />
=== Correct handling of floating dialogs ===<br />
<br />
While dialogs should open in floating mode by default [http://i3wm.org/docs/userguide.html#_floating], many still open in tiling mode. To change this behaviour, check the dialog's {{ic|WM_WINDOW_ROLE}} with {{pkg|xorg-xprop}} and add the correct rules to {{ic|~/.i3/config}} (using [http://www.pcre.org/ pcre] syntax):<br />
<br />
for_window [window_role="pop-up"] floating enable<br />
for_window [window_role="task_dialog"] floating enable<br />
<br />
You can also use title rules and regular expressions:<br />
<br />
for_window [title="Preferences$"] floating enable<br />
<br />
or {{ic|WM_CLASS}}:<br />
<br />
for_window [class="(?i)mplayer"] floating enable<br />
<br />
=== Network Download/Upload speed in statusbar ===<br />
<br />
You might adapt this upstream [http://code.stapelberg.de/git/i3status/tree/contrib/net-speed.sh script]. For that,<br />
<br />
* rename both network cards according to your system (use {{ic|ip addr}})<br />
* find them on {{ic|/sys/devices}} then replace them appropriately:<br />
$ find /sys/devices -name ''network_interface''<br />
<br />
{{Tip|Use {{ic|/sys/class/net/''interface''/statistics/}} to not depend on PCI location.}}<br />
<br />
Now, just save the script in a suitable place (for example {{ic|~/.config/i3}}) and point your status program to it.<br />
<br />
=== Alternating layouts ===<br />
<br />
The {{AUR|alternating-layouts-git}} package can be used for alternating layouts resulting in a similar behavior to the spiral tiling of bspwm. After installation add the following to your {{ic|~/.config/i3/config}} and reload i3.<br />
<br />
exec --no-startup-id ''/path/to/alternating_layouts.py''<br />
<br />
== Patches ==<br />
<br />
{{Merge|#Installation|One package does not warrant a separate section}}<br />
<br />
Packages with patches not merged upstream are available in the [[AUR]]:<br />
<br />
* {{App|i3-wm-iconpatch|Titlebar icon support|https://github.com/ashinkarov/i3-extras|{{AUR|i3-wm-iconpatch}}}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== General ===<br />
<br />
In many cases, bugs are fixed in the development versions {{AUR|i3-git}} and {{AUR|i3status-git}}, and upstream will ask to reproduce any errors with this version. [http://i3wm.org/docs/debugging.html] See also [[Debug - Getting Traces#General]].<br />
<br />
=== Buttons in the i3 message bar do not work ===<br />
<br />
Buttons such as "Edit config" in {{ic|i3-nagbar}} call {{ic|i3-sensible-terminal}}, so make sure your [[#Terminal_emulator|Terminal emulator]] is recognized by ''i3''.<br />
<br />
=== Faulty line wraps in tiled terminals ===<br />
<br />
''i3'' v4.3 and higher ignore size increment hints for tiled windows [https://www.mail-archive.com/i3-discuss@i3.zekjur.net/msg00709.html]. This may cause terminals to wrap lines prematurely, amongst other issues. As a workaround, make the offending window floating, before tiling it again.<br />
<br />
=== Mouse cursor remains in waiting mode ===<br />
<br />
When starting a script or application which does not support startup notifications, the mouse cursor will remain in busy/watch/clock mode for 60 seconds.<br />
<br />
To solve this for a particlar application, use the {{ic|--no-startup-id}} parameter, for example:<br />
exec --no-startup-id ~/script<br />
bindsym $mod+d exec --no-startup-id dmenu_run<br />
<br />
To disable this animation globally, see [[Cursor themes#Create links to missing cursors]].<br />
<br />
=== Unresponsive key bindings ===<br />
<br />
Some tools such as [[Taking_a_screenshot#scrot|scrot]] may not work when used with a regular key binding (executed after key press). In those cases, execute commands after key release with the {{ic|--release}} argument [http://i3wm.org/docs/userguide.html#keybindings]:<br />
<br />
bindsym --release Print exec --no-startup-id scrot<br />
bindsym --release Shift+Print exec --no-startup-id scrot -s<br />
<br />
=== Tearing ===<br />
<br />
''i3'' does not properly implement double buffering [https://github.com/i3/i3/issues/661] hence tearing or flickering may occur. See [[Compton]] and [https://faq.i3wm.org/question/3279/do-i-need-a-composite-manager-compton.1#post-id-3282].<br />
<br />
=== Tray icons not visible ===<br />
<br />
The {{ic|tray_output primary}} directive may require setting a primary output with ''xrandr'', specifying the output explicitly or simply removing this directive. [https://github.com/i3/i3/issues/1144] See [[Xrandr]] for details. The default configuration created by i3-config-wizard no longer adds this directive to the configuration from ''i3'' 4.12.<br />
<br />
=== Default workspace for Spotify ===<br />
<br />
To assign a default workspace for spotify windows one cannot use the standard route with {{ic|assign}} and should rather use a {{ic|for_window}} command, such as<br />
{{hc|~/.config/i3/config|2=<br />
...<br />
for_window [class="Spotify"] move to workspace $ws10<br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://i3wm.org Official website]<br />
* [http://www.funtoo.org/I3_Tiling_Window_Manager funtoo Wiki]<br />
* [https://github.com/i3/i3 i3 Source code]<br />
* [https://github.com/ashinkarov/i3-extras i3-extras] - Collection of scripts and patches<br />
* [https://github.com/acrisci/i3ipc-glib i3ipc-glib] - A library for ''i3'' extensions<br />
* [https://github.com/veelenga/i3ipc-ruby i3ipc-ruby] - An improved library for ''i3'' extensions in Ruby<br />
* [https://j4tools.github.io/ j4tools] - non-official tools designed to work with ''i3''<br />
<br />
'''Arch Linux Forums'''<br />
* [https://bbs.archlinux.org/viewtopic.php?id=99064 The i3 thread] - A general discussion about ''i3''<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103369 i3 desktop screenshots and config sharing]<br />
<br />
'''Screencasts'''<br />
* [http://www.youtube.com/watch?v=Wx0eNaGzAZU i3 window manager v4.1 screencast]<br />
* [https://www.youtube.com/watch?v=j1I63wGcvU4&index=1&list=PL5ze0DjYv5DbCv9vNEzFmP6sU7ZmkGzcf i3 window manager v4.1X screencasts]</div>Jose1711https://wiki.archlinux.org/index.php?title=Input_Leap&diff=572327Input Leap2019-05-02T08:17:31Z<p>Jose1711: add daemon-reload before starting the service</p>
<hr />
<div>[[Category:Input]]<br />
[[fr:Synergy]]<br />
[[it:Synergy]]<br />
[[ja:Synergy]]<br />
[http://synergy-project.org/ Synergy] lets you easily share a single mouse and keyboard between multiple computers (even with different operating systems) without the need for special hardware. It is intended for users with multiple computers on their desk since each system uses its own monitor(s).<br />
<br />
Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems. Furthermore, it synchronizes screen savers so they all start and stop together and, if screen locking is enabled, only one screen requires a password to unlock them all.<br />
<br />
Work on Synergy has stalled recently due to Symless (the company behind Synergy) halting further development of the the 1.x branch and concentrating on 2.x branch, which is primarily closed-source, configured through a hosted web interface and requires a paid subscription. A fork called [https://github.com/debauchee/barrier Barrier] was created to continue development of the 1.x branch, containing many bug fixes and new features.<br />
<br />
==Installation==<br />
<br />
===Arch Linux===<br />
You can [[install]] the {{pkg|synergy}} or {{aur|barrier}} package.<br />
{{Note|If you install Barrier, commands and configuration files below are named "barrier" instead of "synergy" - you should use barrierc instead of synergyc, barriers instead of synergys, etc.}}<br />
<br />
===Windows and macOS===<br />
[https://symless.com/synergy/ Download] and run the newest Synergy installer from the official website. The official version is paid, although you may compile and run your own builds for free using [https://github.com/symless/synergy-core sources on GitHub]. You can also install [https://github.com/debauchee/barrier/releases Barrier] for free instead.<br />
<br />
==Pre-configuration==<br />
First determine the IP addresses and [[Network_configuration#Set_the_hostname|host names]] for each machine and make sure each has a correct hosts file. (You may use IP addresses instead of hostnames as well.)<br />
<br />
* Arch Linux - {{ic|/etc/hosts}}<br />
* Windows - {{ic|C:\WINDOWS\system32\drivers\etc\hosts}}<br />
* macOS - [http://support.apple.com/kb/TA27291 How to Add Hosts to Local Hosts File].<br />
<br />
{{hc|/etc/hosts|<br />
10.10.66.1 archserver.localdomain archserver<br />
10.10.66.100 archleft.localdomain archleft<br />
10.10.66.105 archright.localdomain archright}}<br />
<br />
{{Note|Check that the clients can reach the server.}}<br />
<br />
==Server configuration==<br />
In Synergy, the computer with keyboard and mouse you want to share is called the server. See [https://github.com/symless/synergy-core/wiki/Text-Config Synergy Configuration File Format] for a detailed description of all available sections and options.<br />
<br />
===Arch Linux===<br />
Synergy stores its configuration under {{ic|/etc/synergy.conf}}, Barrier uses {{ic|/etc/barrier.conf}} or {{ic|$HOME/.local/share/barrier/.barrier.conf}}. If the configuration file does not exist, you can use the provided GUI (started with {{ic|$ synergy}} or {{ic|$ barrier}}, or the desktop launcher) to create it visually. Alternatively you may create it by copying {{ic|/etc/synergy.conf.example}} or {{ic|/usr/share/doc/barrier/barrier.conf.example}}, whose comments should give you enough information for a basic configuration; if you need further reference or would like to use more advanced options not available from the GUI, read the guide mentioned above.<br />
<br />
{{Tip|1=Make sure the server port is not blocked. By default, synergy uses port 24800.}}<br />
<br />
If you experience problems and you wish to run the server in the foreground, you can run the following command instead:<br />
# synergys -f<br />
<br />
The synergy server process needs to attach to your user's X session, which means it needs to run as your user. [[Enable]] {{ic|synergys.service}} with {{ic|--user}} option.<br />
{{Tip|1=You can enable {{ic|synergys.socket}} to start the server when a client tries to connect instead. This is useful when the service can't connect to an X server on boot.}}<br />
<br />
==== Set up encryption on server ==== <br />
<br />
To generate a certificate and fingerprint for the server to use.<br />
$ mkdir -p ~/.synergy/SSL/Fingerprints<br />
$ openssl req -x509 -nodes -days 365 -subj /CN=Synergy -newkey rsa:1024 -keyout ~/.synergy/SSL/Synergy.pem -out ~/.synergy/SSL/Synergy.pem<br />
$ openssl x509 -fingerprint -sha1 -noout -in ~/.synergy/SSL/Synergy.pem > ~/.synergy/SSL/Fingerprints/Local.txt<br />
$ sed -e "s/.*=//" -i ~/.synergy/SSL/Fingerprints/Local.txt<br />
<br />
To activate the SSL plugin, add the {{ic|--enable-crypto}} option. (Note that the Synergy GUI will not let you enable encryption without a valid license, whereas the Barrier GUI allows doing so.)<br />
<br />
* Starting from the command line:<br />
$ synergys --enable-crypto<br />
<br />
* Starting with systemd:<br />
$ systemctl --user start synergys<br />
<br />
===Windows===<br />
<br />
# Open the Synergy program<br />
# Select the option ''Server (share this computer's mouse and keyboard)''<br />
# Select ''Configure interactively''<br />
# Click the ''Configure Server...'' button<br />
# This opens a window in which you can add screens depending on how many computers/screens you have: just drag the screen icon in the top-right corner to the screens area, and double-click it to edit its settings<br />
# Click ''OK'' to close the screens window when you are ready, then click on ''Start'' to start the server<br />
<br />
On Windows, configuration is saved by default in a {{ic|synergy.sgc}} file, but its name and location can of course be changed at pleasure.<br />
<br />
If you want to start the Synergy server everytime Windows starts, you have to launch the program '''as administrator''', then go to ''Edit -> Services'' and select ''Install'' in the ''Server'' section; note that at the following reboot Synergy will indeed automatically start, but the tray icon will not display automatically (at least for version 1.4.2 beta on Windows 7). To uninstall the service, do the same thing but obviously select ''Uninstall''.<br />
<br />
If you want to start the server from the command-line, here is a Windows command you can place in a {{ic|.bat}} file or just run from {{ic|cmd.exe}}:<br />
<br />
C:\Program Files\Synergy+\bin\synergys.exe -f --debug ERROR --name left --log c:\windows\synergy.log -c C:/windows/synergy.sgc --address 10.66.66.2:24800<br />
<br />
===macOS===<br />
<br />
macOS has a similar configuration as Unix: check [https://github.com/symless/synergy-core/wiki/Developer the official documentation] for more information.<br />
<br />
===Configuration examples===<br />
<br />
This is an example for a basic 3-computers setup:<br />
<br />
{{hc|/etc/synergy.conf|<nowiki><br />
section: screens<br />
server-fire:<br />
archright-fire:<br />
archleft-fire:<br />
end<br />
<br />
section: links<br />
archleft-fire:<br />
right = server-fire<br />
server-fire:<br />
right = archright-fire<br />
left = archleft-fire<br />
archright-fire:<br />
left = server-fire<br />
end<br />
</nowiki>}}<br />
<br />
This should be the example bundled with the Arch Linux package:<br />
<br />
{{hc|/etc/synergy.conf|2=<br />
section: screens<br />
# three hosts named: moe, larry, and curly<br />
moe:<br />
larry:<br />
curly:<br />
end<br />
<br />
section: links<br />
# larry is to the right of moe and curly is above moe<br />
moe:<br />
right = larry<br />
up = curly<br />
<br />
# moe is to the left of larry and curly is above larry.<br />
# note that curly is above both moe and larry and moe<br />
# and larry have a symmetric connection (they're in<br />
# opposite directions of each other).<br />
larry:<br />
left = moe<br />
up = curly<br />
<br />
# larry is below curly. if you move up from moe and then<br />
# down, you'll end up on larry.<br />
curly:<br />
down = larry<br />
end<br />
<br />
section: aliases<br />
# curly is also known as shemp<br />
curly:<br />
shemp<br />
end<br />
<br />
}}<br />
<br />
The following is a more customized example:<br />
<br />
{{hc|synergy.sgc|2=<br />
section: screens<br />
leftpc:<br />
halfDuplexCapsLock = false<br />
halfDuplexNumLock = false<br />
halfDuplexScrollLock = false<br />
xtestIsXineramaUnaware = false<br />
switchCorners = none +top-left +top-right +bottom-left +bottom-right <br />
switchCornerSize = 0<br />
rightpc:<br />
halfDuplexCapsLock = false<br />
halfDuplexNumLock = false<br />
halfDuplexScrollLock = false<br />
xtestIsXineramaUnaware = false<br />
switchCorners = none +top-left +top-right +bottom-left +bottom-right <br />
switchCornerSize = 0<br />
end<br />
<br />
section: aliases<br />
leftpc:<br />
10.66.66.2<br />
rightpc:<br />
10.66.66.1<br />
end<br />
<br />
section: links<br />
leftpc:<br />
right = rightpc<br />
rightpc:<br />
left = leftpc<br />
end<br />
<br />
section: options<br />
heartbeat = 1000<br />
relativeMouseMoves = false<br />
screenSaverSync = false<br />
win32KeepForeground = false<br />
switchCorners = none +top-left +top-right +bottom-left +bottom-right <br />
switchCornerSize = 4<br />
end<br />
}}<br />
<br />
==Clients configuration==<br />
<br />
{{Note|This assumes a server has been set up and configured '''properly'''. Make sure the server is already configured to accept the client(s) before continuing.}}<br />
{{Tip|You don't need to setup a client on the host server as the server includes one.}}<br />
<br />
===Arch Linux===<br />
In a console window, type:<br />
$ synergyc server-host-name<br />
<br />
Or, to run synergy in the foreground:<br />
$ synergyc -f server-host-name<br />
<br />
Here, {{ic|server-host-name}} is the host name of the server.<br />
<br />
==== Set up encryption on client ==== <br />
<br />
If you use the synergy command line client, copy the file containing the fingerprint [[synergy|{{ic|~/.synergy/SSL/Fingerprints/Local.txt}}]] from the server into the clients home directory [[synergy|{{ic|~/.synergy/SSL/Fingerprints/TrustedServers.txt}}]]. To start the synergy command line client with encryption, type:<br />
$ synergyc --enable-crypto<br />
<br />
If you want to enable the SSL trust without requiring the GUI on the client you can follow the steps below, but you should confirm the fingerprint that gets displays is the same one your server has in its GUI or in the [[synergy|{{ic|~/.synergy/SSL/Fingerprints/Local.txt}}]] on the server per above. The `echo -n` is required to avoid the openssl client hanging waiting for input.<br />
<br />
$ mkdir -p ~/.synergy/SSL/Fingerprints<br />
$ echo -n | openssl s_client -connect $YOUR_SYNERGY_SERVER:24800 2>/dev/null | openssl x509 -noout -fingerprint | cut -f2 -d'=' | tee ~/.synergy/SSL/Fingerprints/TrustedServers.txt<br />
<br />
{{Note| There is an open issue with the GUI client of synergy (see https://github.com/symless/synergy-core/issues/4737). The dialog to prompt for confirmation of the server's fingerprint, only pops up if the logging level is set to INFO, DEBUG or DEBUG2.}}<br />
<br />
====Autostart====<br />
<br />
There exist several ways to automatically start the Synergy client, and they are actually the same that can be used for every other application.<br />
<br />
{{Note|In all of the following examples, you always have to substitute {{ic|server-host-name}} with the real server host name.}}<br />
<br />
* You can add the next line to your [[xinitrc|{{ic|~/.xinitrc}}]]:<br />
<br />
{{hc|~/.xinitrc|<br />
...<br />
<br />
#replace server-host-name with the real name<br />
synergyc server-host-name<br />
}}<br />
<br />
The following is an alternative:<br />
<br />
{{hc|~/.xinitrc|<br />
<nowiki>XINIT_CMD='/usr/bin/synergyc -d FATAL -n galileo-fire 10.66.66.2:24800'<br />
/usr/bin/pgrep -lxf "$XINIT_CMD" || ( ( $XINIT_CMD ) & )</nowiki><br />
}}<br />
<br />
* Otherwise, if you are using a [[display manager]] ([[GDM]], [[SDDM]], ...), or a stand-alone [[window manager]] (Openbox, ...), you could exploit its start-up script and add the following:<br />
synergyc server-host-name<br />
<br />
* To start the Synergy client with systemd, create a service file:<br />
<br />
{{hc|~/.config/systemd/user/synergyc.service|2=<br />
[Unit]<br />
Description=Synergy Client Daemon<br />
After=network.target<br />
<br />
[Service]<br />
ExecStart=/usr/bin/synergyc --no-daemon ''server-name''<br />
Restart=always<br />
RestartSec=3<br />
<br />
[Install]<br />
WantedBy=default.target}}<br />
<br />
To start the service for your user:<br />
<br />
$ systemctl --user daemon-reload<br />
$ systemctl --user start synergyc<br />
<br />
To start the service at login for your user:<br />
<br />
$ systemctl --user enable synergyc<br />
<br />
Automatically starting Synergy is also documented in its [https://github.com/symless/synergy-core/wiki/Startup official reference page].<br />
<br />
===Windows===<br />
<br />
After installation, open the Synergy program, select the option ''Client (use another computer's keyboard and mouse)'' and type the host name of the server computer in the text box, then click ''Start'' to start the client.<br />
{{Note|You can use the tray icon to stop the client.}}<br />
<br />
If you want to start the Synergy client every time Windows starts, you have to launch the program '''as an administrator''', then go to ''Edit -> Services'' and select ''Install'' in the ''Client'' section.<br />
<br />
If you want to start the client from the command-line, here is a Windows command you can place in a {{ic|.bat}} file or just run from {{ic|cmd.exe}}. This points to a configuration file in {{ic|C:\synergy.sgc}} and runs in the background like a service.<br />
<br />
{{bc|<nowiki>START /MIN /D"C:\Program Files\Synergy+\bin" synergys.exe -d ERROR -n m6300 -c C:\synergy.sgc -a 10.66.66.2:24800</nowiki>}}<br />
<br />
===macOS===<br />
<br />
Locate the synergyc program in the synergyc folder and drag it onto the terminal window: the full path will appear in the terminal.<br />
Now append the host name of the server, so that the complete command will look like this:<br />
<br />
{{bc|/path/to/synergyc/synergyc server-host-name}}<br />
<br />
Then press {{ic|Enter}}.<br />
<br />
==Known issues==<br />
If Arch is being used as a client in a Synergy installation, the server may not be able to wake the client monitor. There are some workarounds, such as executing the following via [[SSH]], if ACPI is enabled (see: [[Display Power Management Signaling#Modify DPMS and screensaver settings with a command]]):<br />
{{bc|# xset dpms force on}}<br />
<br />
==Troubleshooting==<br />
The official documentation has a [https://github.com/symless/synergy-core/wiki/User-FAQ FAQ] and also a [https://github.com/symless/synergy-core/wiki/User-Guide#Troubleshooting troubleshooting page].<br />
<br />
===Keyboard AltGr===<br />
If you encounter problems with AltGr add <br />
<br />
altgr = alt #1.8.2<br />
altgr = shift #v1.8.3 and higher<br />
<br />
on the screen/client section in /etc/synergys.conf.<br />
<br />
===Keyboard repeat===<br />
If you experience problems with your keyboard repeat on the client machine (Linux host), simply type:<br />
{{bc|# /usr/bin/xset r on}}<br />
in any console.<br />
<br />
===Keyboard mapping===<br />
If you experience problems with the keyboard mapping when using the server's keyboard in a client window (e.g a terminal) then re-setting the X key map after starting synergyc may help. The following command sets the keymap to its current value:<br />
<br />
# setxkbmap $(setxkbmap -query | grep "^layout:" | awk -F ": *" '{print $2}')<br />
<br />
===No cursor in Gnome===<br />
When [[GNOME]] doesn't detect a mouse, it will default to touchscreen mode and hide the cursor. To enable run:<br />
<br />
# dconf write /org/gnome/settings-daemon/plugins/cursor/active false<br />
<br />
This can be added to an init script or systemd unit:<br />
<br />
ExecStartPost=dconf write /org/gnome/settings-daemon/plugins/cursor/active false<br />
<br />
===Client is returning "failed to verify server certificate fingerprint"===<br />
<br />
You need to copy the content of server's "~/.synergy/SSL/Fingerprints/Local.txt" into client's "~/.synergy/SSL/Fingerprints/TrustedServers.txt". See [[#Set up encryption on client]].<br />
<br />
===Scroll Lock LED does not light===<br />
When using Scroll Lock to lock to a client (or to enter relative mouse move mode), you may run into an issue with your keyboard's Scroll Lock LED not lighting. This can be solved by binding the {{ic|Scroll_Lock}} key to an empty modifier key.<br />
<br />
First, find an empty modifier. In this case, mod3 is available:<br />
$ xmodmap<br />
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):<br />
<br />
shift Shift_L (0x32), Shift_R (0x3e)<br />
lock Caps_Lock (0x42)<br />
control Control_L (0x25), Control_R (0x69)<br />
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)<br />
mod2 Num_Lock (0x4d)<br />
mod3<br />
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)<br />
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)<br />
<br />
Then, add the new mapping.<br />
$ xmodmap -e 'add mod3 = Scroll_Lock'<br />
$ "echo "add mod3 = Scroll_Lock" >> ~/.Xmodmap<br />
<br />
See [[Xmodmap#Activating the custom table]] to have {{ic|~/.Xmodmap}} loaded on login.<br />
<br />
After making this change, test the LED and screen locking. If you find that you need to press Scroll Lock twice to lock screens, enable {{ic|halfDuplexScrollLock}} on all screens in {{ic|section: screens}}.<br />
<br />
===Additional mouse buttons do not work in client===<br />
If you find that additional mouse buttons (i.e. Mouse4/Mouse5) do not translate to a client, try adding the following to {{ic|section: options}}:<br />
<br />
mousebutton(6) = mousebutton(4)<br />
mousebutton(7) = mousebutton(5)<br />
<br />
This will re-map the mouse keys to the proper number. If that does not fix the problem, remove the configuration, stop Synergy, and start it in the foreground with debug logging enabled:<br />
<br />
$ synergys -f -d DEBUG1<br />
<br />
Then, move your cursor to the screen of the client with the issue. Click the non-functioning keys, and watch for log entries like this:<br />
<br />
[2017-09-30T14:56:45] DEBUG1: onMouseDown id=6<br />
...<br />
[2017-09-30T14:56:46] DEBUG1: onMouseUp id=6<br />
<br />
The {{ic|<nowiki>id=...</nowiki>}} part will have the right number to use in {{ic|mousebutton(...)}}<br />
<br />
===mouse fixed in certain games===<br />
In some applications (like Overwatch or other games) the cursor gets trapped in the middle of the screen.<br />
<br />
According to https://github.com/symless/synergy-core/issues/2631 this is an issue that is known.<br />
<br />
Just set relative mouse movement in your settings and make sure to lock the screen.<br />
<br />
==External links==<br />
* Synergy website: https://symless.com/synergy/<br />
* Official documentation: https://github.com/symless/synergy-core/wiki/User-Guide</div>Jose1711https://wiki.archlinux.org/index.php?title=Improving_performance/Boot_process&diff=572131Improving performance/Boot process2019-04-27T21:29:52Z<p>Jose1711: corrected typo</p>
<hr />
<div>[[Category:Boot process]]<br />
[[ar:Improving performance/Boot process]]<br />
[[cs:Improving performance/Boot process]]<br />
[[es:Improving performance/Boot process]]<br />
[[it:Improving performance/Boot process]]<br />
[[ja:ブートパフォーマンスの向上]]<br />
[[ru:Improving performance/Boot process]]<br />
[[zh-hans:Improving performance/Boot process]]<br />
{{Related articles start}}<br />
{{Related|Improving performance}}<br />
{{Related|Silent boot}}<br />
{{Related|Daemon}}<br />
{{Related|e4rat}}<br />
{{Related|Kexec}}<br />
{{Related articles end}}<br />
<br />
Improving the boot performance of a system can provide reduced boot wait times and a means to learn more about how certain system files and scripts interact with one another. This article attempts to aggregate methods on how to improve the boot performance of an Arch Linux system.<br />
<br />
== Analyzing the boot process ==<br />
<br />
=== Using systemd-analyze ===<br />
<br />
[[systemd]] provides a tool called {{ic|systemd-analyze}} that can be used to show timing details about the boot process, including an svg plot showing units waiting for their dependencies. You can see which unit files are causing your boot process to slow down. You can then optimize your system accordingly.<br />
<br />
To see how much time was spent in kernelspace and userspace on boot, simply use:<br />
<br />
$ systemd-analyze<br />
<br />
{{Tip|If you boot via [[UEFI]] and use a boot loader which implements systemd's [http://www.freedesktop.org/wiki/Software/systemd/BootLoaderInterface Boot Loader Interface] (which currently [[systemd-boot]] and [[GRUB]] do), ''systemd-analyze'' can additionally show you how much time was spent in the EFI firmware and the boot loader itself.}}<br />
<br />
To list the started unit files, sorted by the time each of them took to start up:<br />
<br />
$ systemd-analyze blame<br />
<br />
At some points of the boot process, things can not proceed until a given unit succeeds. To see which units find themselves at these critical points in the startup chain, do:<br />
<br />
$ systemd-analyze critical-chain<br />
<br />
You can also create an SVG file which describes your boot process graphically, similar to [[Bootchart]]:<br />
<br />
$ systemd-analyze plot > plot.svg<br />
<br />
See {{man|1|systemd-analyze}} for details.<br />
<br />
=== Using bootchart2 ===<br />
<br />
{{Merge|Bootchart#Running Bootchart2|different instructions from the main page}}<br />
<br />
You could also use a version of bootchart to visualize the boot sequence. Since you are not able to put a second init into the kernel command line you won't be able to use any of the standard bootchart setups. However the {{AUR|bootchart2-git}} package from [[AUR]] comes with an undocumented '''systemd''' service. After you've installed bootchart2 do:<br />
<br />
# systemctl enable bootchart2<br />
<br />
You can visualize the results by opening ''/var/log/bootchart.png'', or if you would like more features by launching <br />
<br />
$ pybootchartgui -i<br />
<br />
Read the [https://github.com/mmeeks/bootchart bootchart2 documentation] for further details on using this version of bootchart.<br />
<br />
== Compiling a custom kernel ==<br />
<br />
Compiling a custom kernel can reduce boot time and memory usage. Though with the standardization of the 64 bit architecture and the modular nature of the Linux kernel, these benefits may not be as great as expected. [[Kernel Compilation|Read more about compiling a kernel]].<br />
<br />
== Initramfs ==<br />
<br />
In a similar approach to [[#Compiling a custom kernel]], the initramfs can be slimmed down. A simple way is to include the [[mkinitcpio]] {{ic|autodetect}} hook. If you want to go further than that, see [[Minimal initramfs]].<br />
<br />
== Early start for services ==<br />
<br />
One central feature of systemd is [[D-Bus]] and socket activation. This causes services to be started when they are first accessed and is generally a good thing. However, if you know that a service (like [[UPower]]) will always be started during boot, then the overall boot time might be reduced by starting it as early as possible. This can be achieved (if the service file is set up for it, which in most cases it is) by issuing:<br />
<br />
# systemctl enable upower<br />
<br />
This will cause systemd to start UPower as soon as possible, without causing races with the socket or D-Bus activation.<br />
<br />
== Staggered spin-up ==<br />
<br />
Some hardware implements [[Wikipedia:Spin-up#Staggered spin-up|staggered spin-up]], which causes the OS to probe ATA interfaces serially, which can spin up the drives one-by-one and reduce the peak power usage. This slows down the boot speed, and on most consumer hardware provides no benefits at all since the drives will already spin-up immediately when the power is turned on. To check if SSS is being used:<br />
<br />
$ dmesg | grep SSS<br />
<br />
If it wasn't used during boot, there will be no output.<br />
<br />
To disable it, add {{ic|1=libahci.ignore_sss=1}} [[kernel parameter]].<br />
<br />
== Filesystem mounts ==<br />
<br />
Thanks to [[mkinitcpio]]'s {{ic|fsck}} hook, you can avoid a possibly costly remount of the root partition by changing {{ic|ro}} to {{ic|rw}} on the kernel line: options can be set with {{ic|1=rootflags='''rw''',''other_mount_options''}}. The entry must be removed from the {{ic|/etc/fstab}} file, otherwise the {{ic|systemd-remount-fs.service}} will continue to try applying these settings. Alternatively, one could try to mask that unit.<br />
<br />
If [[btrfs]] is in use for the root filesystem, there is no need for a fsck on every boot like other filesystems. If this is the case, [[mkinitcpio]]'s {{ic|fsck}} hook can be removed. You may also want to mask the {{ic|systemd-fsck-root.service}}, or tell it not to fsck the root filesystem from the kernel command line using {{ic|fsck.mode&#61;skip}}. Without [[mkinitcpio]]'s {{ic|fsck}} hook, systemd will still fsck any relevant filesystems with the {{ic|systemd-fsck@.service}}<br />
<br />
You can also remove API filesystems from {{ic|/etc/fstab}}, as systemd will mount them itself (see {{ic|pacman -Ql systemd <nowiki>|</nowiki> grep '\.mount$'}} for a list). It is not uncommon for users to have a /tmp entry carried over from sysvinit, but you may have noticed from the command above that systemd already takes care of this. Ergo, it may be safely removed.<br />
<br />
Other filesystems like {{ic|/home}} or [[EFI system partition]] can be mounted with custom mount units. Adding {{ic|noauto,x-systemd.automount}} to mount options will buffer all access to that partition, and will fsck and mount it on first access, reducing the number of filesystems it must fsck/mount during the boot process.<br />
<br />
{{Note|<br />
* This will make your {{ic|/home}} filesystem type {{ic|autofs}}, which is ignored by [[mlocate]] by default. The speedup of automounting {{ic|/home}} may not be more than a second or two, depending on your system, so this trick may not be worth it.<br />
* If the system is installed into a ''btrfs'' subvolume (specifically: the root directory {{ic|/}} itself is a subvolume) and {{ic|/home}} is a separate file system, you may also want to prevent the creation of a {{ic|/home}} subvolume. Mask the {{ic|home.conf}} tmpfile: {{ic|ln -s /dev/null /etc/tmpfiles.d/home.conf}}.<br />
}}<br />
<br />
== Less output during boot ==<br />
<br />
For some systems, particularly those with an SSD, the slow performance of the TTY is actually a bottleneck, and so less output means faster booting. See the [[Silent boot]] article for suggestions.<br />
<br />
== Suspend to RAM ==<br />
<br />
The best way to reduce boot time is not booting at all. Consider [[Power management/Suspend and hibernate|suspending your system to RAM]] instead.</div>Jose1711https://wiki.archlinux.org/index.php?title=Arch_Linux_Archive&diff=570921Arch Linux Archive2019-04-12T09:19:04Z<p>Jose1711: add a procedure to get PKGBUILD and source files from official package that has been deleted</p>
<hr />
<div>[[Category:Package management]]<br />
[[Category:Arch projects]]<br />
[[fr:Arch Linux Archive]]<br />
[[ja:Arch Linux Archive]]<br />
[[pt:Arch Linux Archive]]<br />
[[zh-hans:Arch Linux Archive]]<br />
{{Related articles start}}<br />
{{Related|Downgrading packages}}<br />
{{Related articles end}}<br />
<br />
The '''Arch Linux Archive''' (a.k.a '''ALA'''), formerly known as '''Arch Linux Rollback Machine''' (a.k.a '''ARM'''), stores ''official repositories snapshots'', ''iso images'' and ''bootstrap tarballs'' across time.<br />
<br />
'''You can use it to'''<br />
* Downgrade to a previous version of one package (last version is broken, I want the previous one)<br />
* Restore all your packages at a precise moment (my system is broken, I want to go back 2 months ago)<br />
* Find a previous version of an ISO image<br />
<br />
Packages are only kept for a few years, afterwards they are moved to the [[#Historical_Archive|Arch Linux Historical Archive]] on archive.org.<br />
<br />
== Location ==<br />
<br />
The Arch Linux Archive is available at https://archive.archlinux.org/.<br />
<br />
The [https://github.com/seblu/archivetools source code] is also available for setting up your own mirror.<br />
<br />
== Directories ==<br />
<br />
The '''Archive''' is split into 3 main directories detailed below.<br />
<br />
├── iso<br />
├── packages<br />
└── repos<br />
<br />
=== /repos ===<br />
<br />
The [https://archive.archlinux.org/repos repos] directory contains daily snapshots of official mirror organized by date like in the following example.<br />
<br />
repos<br />
├── 2013<br />
│ ├── 08<br />
│ │ └── 31<br />
│ │ ├── community<br />
│ │ ├── community-staging<br />
│ │ ├── community-testing<br />
│ │ ├── core<br />
│ │ ├── extra<br />
│ │ ├── gnome-unstable<br />
│ │ ├── kde-unstable<br />
│ │ ├── lastsync<br />
│ │ ├── multilib<br />
│ │ ├── multilib-staging<br />
│ │ ├── multilib-testing<br />
│ │ ├── pool<br />
│ │ ├── staging<br />
│ │ └── testing<br />
│ ├── 09<br />
│ │ ├── 01<br />
│ │ ├── 02<br />
│ │ ├── ...<br />
│ │ ├── 21<br />
│ │ └── 22<br />
│ ├── 10<br />
│ │ ├── 01<br />
│ │ ├── 02<br />
│ │ ├── ...<br />
│ │<br />
│ ├── 11<br />
│ └── 12<br />
├── 2014<br />
│ ├── 01<br />
│ │ ├── 01<br />
│ │ ├── 02<br />
│ │ ├── ...<br />
│ │<br />
│ ├── 02<br />
│ ├── 03<br />
│ ├── ...<br />
│ └── 09<br />
│ ├── 01<br />
│ ├── ...<br />
│ └── 28<br />
├── last<br />
├── month<br />
└── week<br />
<br />
Note: The last 3 special directories ('''last''', '''week''' and '''month''') which links respectively to the last synced repository, to the last monday and to the first of the current month.<br />
<br />
=== /packages ===<br />
<br />
The [https://archive.archlinux.org/packages packages] directory contains all versions of each package with their signatures. One directory by package and package directories are grouped by their first letter.<br />
<br />
├── packages<br />
│ ├── a<br />
│ │ ├── awesome<br />
│ │ │ ├── awesome-3.5.0-1-i686.pkg.tar.xz<br />
│ │ │ ├── awesome-3.5.0-1-i686.pkg.tar.xz.sig<br />
│ │ │ ├── awesome-3.5.0-1-x86_64.pkg.tar.xz<br />
│ │ │ ├── awesome-3.5.0-1-x86_64.pkg.tar.xz.sig<br />
│ │ │ ├── awesome-3.5.1-1-i686.pkg.tar.xz<br />
│ │ │ ├── awesome-3.5.1-1-i686.pkg.tar.xz.sig<br />
│ │ │ ├── ...<br />
│ │ │ <br />
│ │ ├── ...<br />
│ │ ├── awstats<br />
│ │ └── axel<br />
│ │ <br />
│ ├── b<br />
│ ├── ...<br />
│ └── z<br />
<br />
You can use the magic subdirectory [https://archive.archlinux.org/packages/.all .all] to access all packages by their name. It acts as a flat directory containing all versions of every package.<br />
<br />
├── packages<br />
│ ├── .all<br />
│ │ ├── awesome-3.5.1-1-i686.pkg.tar.xz<br />
│ │ ├── ...<br />
│ │ ├── zsh-5.0.2-3-i686.pkg.tar.xz<br />
│ │ ├── zsh-5.0.2-4-i686.pkg.tar.xz<br />
│ │ └── ...<br />
<br />
You can download the full package list (there are over a hundred thousand packages) as a compressed index: [https://archive.archlinux.org/packages/.all/index.0.xz index.0.xz].<br />
<br />
{{hc|$ curl <nowiki>https://archive.archlinux.org/packages/.all/index.0.xz |</nowiki> unxz|<br />
0ad-a14-1-i686<br />
0ad-a14-1-x86_64<br />
0ad-a14-2-i686<br />
...<br />
zziplib-0.13.62-1-x86_64<br />
zziplib-0.13.62-2-i686<br />
zziplib-0.13.62-2-x86_64}}<br />
<br />
=== /iso ===<br />
<br />
The [https://archive.archlinux.org/iso iso] directory contains official ISO images and bootstrap tarballs sorted by release date.<br />
<br />
├── 2014.09.03<br />
├── 2014.10.01<br />
├── 2014.11.01<br />
├── 2014.12.01<br />
├── 2015.07.01<br />
├── 2015.08.01<br />
├── 2015.09.01<br />
└── 2017.04.01<br />
├── arch<br />
├── archlinux-2017.04.01-x86_64.iso<br />
├── archlinux-2017.04.01-x86_64.iso.sig<br />
├── archlinux-2017.04.01-x86_64.iso.torrent<br />
├── archlinux-bootstrap-2017.04.01-x86_64.tar.gz<br />
├── archlinux-bootstrap-2017.04.01-x86_64.tar.gz.sig<br />
├── md5sums.txt<br />
└── sha1sums.txt<br />
<br />
== FAQ ==<br />
<br />
=== How to downgrade one package ===<br />
<br />
Find the package you want under [[#/packages|/packages]] and let pacman fetch it for installation. For example:<br />
<br />
# pacman -U <nowiki>https://archive.archlinux.org/packages/</nowiki> ... ''packagename''.pkg.tar.xz<br />
<br />
Letting pacman fetch it will automatically download the package's detached ''.sig'' file and verify it according to {{ic|/etc/pacman.conf}} settings.<br />
<br />
Alternatively, download and install the package manually using {{ic|pacman -U}}. <br />
<br />
See also [[Downgrading packages#Automation]] for tools that simplify the process.<br />
<br />
=== How to restore all packages to a specific date ===<br />
<br />
To restore all packages to their version at a specific date, let's say 30 March 2014, you have to direct [[pacman]] to this date, by editing your {{ic|/etc/pacman.conf}} and use the following server directive:<br />
<br />
{{bc|<nowiki><br />
[core]<br />
SigLevel = PackageRequired<br />
Server=https://archive.archlinux.org/repos/2014/03/30/$repo/os/$arch<br />
<br />
[extra]<br />
SigLevel = PackageRequired<br />
Server=https://archive.archlinux.org/repos/2014/03/30/$repo/os/$arch<br />
<br />
[community]<br />
SigLevel = PackageRequired<br />
Server=https://archive.archlinux.org/repos/2014/03/30/$repo/os/$arch<br />
</nowiki>}}<br />
<br />
or by replacing your {{ic|/etc/pacman.d/mirrorlist}} with the following content:<br />
<br />
{{bc|<nowiki><br />
## <br />
## Arch Linux repository mirrorlist <br />
## Generated on 2042-01-01 <br />
##<br />
Server=https://archive.archlinux.org/repos/2014/03/30/$repo/os/$arch<br />
</nowiki>}}<br />
<br />
Then update the database and force downgrade:<br />
# pacman -Syyuu<br />
<br />
{{Note|It's [[partial upgrades|not safe]] to mix Archive and up-to-date mirrors. In case of a download failure, you will fall-back on an upstream package and you will have packages not from the same epoch in the rest of the system.}}<br />
<br />
=== How to restore PKGBUILD and source files from a deleted package ===<br />
<br />
If you run into a situation when a package from official repositories has been deleted and you cannot find it in AUR either this may help you:<br />
<br />
{{bc|<nowiki><br />
$ git clone git://git.archlinux.org/svntogit/packages.git<br />
$ cd packages<br />
# replace PKGNAME with the real package name<br />
$ git rev-list --all | xargs git grep -E '(pkgbase|pkgname)=PKGNAME' | head -1<br />
<REVISION>:foo/repos/repository-any/PKGBUILD:pkgbase=foo<br />
# use revision id from the output above<br />
$ git checkout <REVISION><br />
# cd PKGNAME/repos/*<br />
# check the contents of the directory (PKGBUILD, .install, etc)<br />
</nowiki>}}<br />
<br />
== Historical Archive ==<br />
<br />
Maintaining the Arch Linux Archive consumes significant amount of resources, so old packages are cleaned up from time to time.<br />
<br />
Before removing them, old packages are uploaded to a [https://archive.org/details/archlinuxarchive dedicated collection "Arch Linux Historical Archive" on archive.org].<br />
<br />
The Historical Archive does not provide a way to access a "snapshot" of Arch packages at a given point in time. However, there is a redirection on {{ic|archive.archlinux.org}} so that downloads for old packages are redirected to the Historical Archive on {{ic|archive.org}}. There should be no visible impact from the user side, except from the fact that {{ic|archive.org}} is generally quite slow for downloading.<br />
<br />
=== Finding packages in the Historical Archive ===<br />
<br />
The '''Arch Linux Historical Archive''' collection has an index of all packages: https://archive.org/details/archlinuxarchive<br />
<br />
It is also possible to directly access a package by its '''identifier'''. The general pattern for identifiers is:<br />
<br />
{{bc|<nowiki><br />
archlinux_pkg_<sanitized package name><br />
</nowiki>}}<br />
<br />
To obtain the '''sanitized''' package name, simply replace any {{ic|@}}, {{ic|+}} or {{ic|.}} character in the package name by an underscore {{ic|_}}.<br />
<br />
For instance, the identifier for {{pkg|lucene++}} is {{ic|archlinux_pkg_lucene__}}.<br />
<br />
You can then access the details page of a package via its identifier, for instance: https://archive.org/details/archlinux_pkg_lucene__<br />
<br />
It is also possible to run searches with the [https://github.com/jjjake/internetarchive archive.org Python client]:<br />
<br />
{{bc|<nowiki><br />
$ ia search subject:"archlinux package" subject:'mysql' <br />
{"identifier": "archlinux_pkg_ejabberd-mod_mysql"} <br />
{"identifier": "archlinux_pkg_ejabberd-mod_mysql-svn"}<br />
{"identifier": "archlinux_pkg_gambas3-gb-db-mysql"}<br />
{"identifier": "archlinux_pkg_gambas3-gb-mysql"}<br />
{"identifier": "archlinux_pkg_libgda-mysql"}<br />
</nowiki>}}<br />
<br />
=== Downloading packages from the Historical Archive ===<br />
<br />
All available package versions (and their signature) can be accessed via the download page of a package: https://archive.org/download/archlinux_pkg_lucene__<br />
<br />
To download, verify and install a package using [[pacman]]:<br />
<br />
# pacman -U <nowiki>https://archive.org/download/archlinux_pkg_cjdns/cjdns-16.1-3-x86_64.pkg.tar.xz</nowiki><br />
<br />
Package verification is controlled by pacman's {{ic|RemoteFileSigLevel}} option. Note that if you use pacman, you have to figure out the dependencies yourself.<br />
<br />
It is also possible to use the [https://github.com/jjjake/internetarchive archive.org Python client]:<br />
<br />
{{bc|<nowiki><br />
# Download a specific version of a package<br />
$ ia download archlinux_pkg_cjdns cjdns-16.1-3-x86_64.pkg.tar.xz{,.sig}<br />
<br />
# Download all x86_64 versions of a package, with signatures<br />
$ ia download archlinux_pkg_cjdns --glob="*x86_64.pkg.tar.xz*"<br />
</nowiki>}}<br />
<br />
== History ==<br />
<br />
* The original ARM (''Archlinux Rollback Machine'') was closed on 2013-08-18.[https://bbs.archlinux.org/viewtopic.php?pid=1313360#p1313360]<br />
* The new one is hosted on [http://seblu.net seblu.net] since 2013-08-31.<br />
* New URL and closing the old ARM hierarchy on 2015-10-13. A new software, {{AUR|agetpkg-git}} was introduced.<br />
* Moved to [https://archive.archlinux.org archive.archlinux.org] on 2015-12-19.[https://lists.archlinux.org/pipermail/arch-dev-public/2015-December/027635.html]<br />
* Old packages from 2013-2016 uploaded to [https://archive.org/details/archlinuxarchive archive.org] on 2018-06-05.</div>Jose1711https://wiki.archlinux.org/index.php?title=Pam_oath&diff=570708Pam oath2019-04-07T18:21:47Z<p>Jose1711: /* Setting up the PAM */ add a way how to force OATH when key-auth is configured between client and server</p>
<hr />
<div>{{DISPLAYTITLE:pam_oath}}<br />
[[Category:Secure Shell]]<br />
[[Category:Authentication]]<br />
[[ja:Pam oath]]<br />
The [http://www.nongnu.org/oath-toolkit/index.html OATH Toolkit] provides a two-step authentication procedure using one-time passcodes (OTP). It complies to two OTP method RFC standards ([[w:HMAC-based_One-time_Password_Algorithm|HOTP]], [[w:Time-based_One-time_Password_Algorithm|TOTP]]). The OTP generator applications are available for iOS, Android, Blackberry and other devices. Similar to [[Google Authenticator]] the authentication mechanism integrates into the Linux [[PAM]] system. This guide shows the installation and configuration of this mechanism.<br />
<br />
== Installation ==<br />
<br />
Install the {{Pkg|oath-toolkit}} package.<br />
<br />
== Setting up the oath ==<br />
<br />
The oath seed is an hexadecimal number that should be unique per user. To generate a new seed for a user, you could use the following command line:<br />
<br />
$ head -10 /dev/urandom | sha512sum | cut -b 1-30<br />
1ab4321412aebcw<br />
<br />
Note the above output seed is used as example seed in this article and '''must not''' be used. There needs to be one oath per user and link to it in a configuration file {{ic|/etc/users.oath}}. While being root create the file and insert the user seed:<br />
<br />
{{hc|/etc/users.oath|# Option User Prefix Seed<br />
HOTP/T30/6 ''user'' - ''1ab4321412aebcw''}}<br />
<br />
Make sure that the file can only be accessed by root:<br />
<br />
# chmod 600 /etc/users.oath<br />
# chown root /etc/users.oath<br />
<br />
== Setting up the PAM ==<br />
<br />
To enable oath for a specific service only, like ssh, you can edit the file {{ic|/etc/pam.d/sshd}} and add at the beginning of the file the following line:<br />
<br />
auth sufficient pam_oath.so usersfile=/etc/users.oath window=30 digits=6<br />
<br />
This will allow authentication if you just enter the right oath code. You can make it a requirement and let the rest of the pam stack be processed if you use the following line instead:<br />
<br />
auth required pam_oath.so usersfile=/etc/users.oath window=30 digits=6<br />
<br />
For ssh login to work make sure that both {{ic|ChallengeResponseAuthentication}} and {{ic|UsePAM}} options are enabled:<br />
<br />
ChallengeResponseAuthentication yes<br />
UsePAM yes<br />
<br />
If you want to force OATH request-response even if there is a working public/private key authentication also add the following:<br />
<br />
AuthenticationMethods publickey,keyboard-interactive<br />
PasswordAuthentication yes<br />
<br />
== Logging with an oath pass ==<br />
<br />
Run the following command if you are logging in and need the current oath pass :<br />
<br />
oathtool -v -d6 ''1ab4321412aebcw''<br />
<br />
Of course replace ''1ab4321412aebcw'' by the seed corresponding to your user. It will display something like that :<br />
<br />
Hex secret: 1ab4321412aebc<br />
Base32 secret: DK2DEFASV26A====<br />
Digits: 6<br />
Window size: 0<br />
Start counter: 0x0 (0)<br />
<br />
820170<br />
<br />
The last number is actually the code you can use to log in right now, but more interestingly the Base32 secret, is actually what we need to generate a qr code for this user. To do so install the package {{Pkg|qrencode}} to run the following command :<br />
<br />
qrencode -o ''user''.png 'otpauth://totp/''user''@''machine''?secret=''DK2DEFASV26A===='''<br />
<br />
Of course change ''user'', ''machine'' and ''DK2DEFASV26A===='' accordingly. Once done, you can visualize your qrcode with your preferred image visualizer application and use that to configure your phone. It is pretty straight forward to use FreeOTP to then take a screenshot of that ''.png'' and get it to display OTP pass when needed.<br />
<br />
{{Note|The secret key of your users is the most important information in this system. Once you setup a phone to provide OTP, it does have that key. The qr code in that ''.png'' file does have that key. You need to take extra care of this file. They should only be stored on encrypted medium (Your phone need to be using encryption for any sane level of security). If not even confined in a sandbox like Samsung Knox to prevent third party application to potentially access them.}}<br />
<br />
== See also ==<br />
<br />
* [http://spod.cx/blog/two-factor-ssh-auth-with-pam_oath-google-authenticator.shtml Two-factor time based (TOTP) SSH authentication with pam_oath and Google Authenticator]<br />
* [http://www.nongnu.org/oath-toolkit/pam_oath.html pam_oath man page]</div>Jose1711https://wiki.archlinux.org/index.php?title=Pam_oath&diff=570644Pam oath2019-04-06T21:43:01Z<p>Jose1711: add note about additional requirements for ssh</p>
<hr />
<div>{{DISPLAYTITLE:pam_oath}}<br />
[[Category:Secure Shell]]<br />
[[Category:Authentication]]<br />
[[ja:Pam oath]]<br />
The [http://www.nongnu.org/oath-toolkit/index.html OATH Toolkit] provides a two-step authentication procedure using one-time passcodes (OTP). It complies to two OTP method RFC standards ([[w:HMAC-based_One-time_Password_Algorithm|HOTP]], [[w:Time-based_One-time_Password_Algorithm|TOTP]]). The OTP generator applications are available for iOS, Android, Blackberry and other devices. Similar to [[Google Authenticator]] the authentication mechanism integrates into the Linux [[PAM]] system. This guide shows the installation and configuration of this mechanism.<br />
<br />
== Installation ==<br />
<br />
Install the {{Pkg|oath-toolkit}} package.<br />
<br />
== Setting up the oath ==<br />
<br />
The oath seed is an hexadecimal number that should be unique per user. To generate a new seed for a user, you could use the following command line:<br />
<br />
$ head -10 /dev/urandom | sha512sum | cut -b 1-30<br />
1ab4321412aebcw<br />
<br />
Note the above output seed is used as example seed in this article and '''must not''' be used. There needs to be one oath per user and link to it in a configuration file {{ic|/etc/users.oath}}. While being root create the file and insert the user seed:<br />
<br />
{{hc|/etc/users.oath|# Option User Prefix Seed<br />
HOTP/T30/6 ''user'' - ''1ab4321412aebcw''}}<br />
<br />
Make sure that the file can only be accessed by root:<br />
<br />
# chmod 600 /etc/users.oath<br />
# chown root /etc/users.oath<br />
<br />
== Setting up the PAM ==<br />
<br />
To enable oath for a specific service only, like ssh, you can edit the file {{ic|/etc/pam.d/sshd}} and add at the beginning of the file the following line:<br />
<br />
auth sufficient pam_oath.so usersfile=/etc/users.oath window=30 digits=6<br />
<br />
This will allow authentication if you just enter the right oath code. You can make it a requirement and let the rest of the pam stack be processed if you use the following line instead:<br />
<br />
auth required pam_oath.so usersfile=/etc/users.oath window=30 digits=6<br />
<br />
For ssh login to work make sure that both {{ic|ChallengeResponseAuthentication}} and {{ic|UsePAM}} options are enabled:<br />
<br />
ChallengeResponseAuthentication yes<br />
UsePAM yes<br />
<br />
== Logging with an oath pass ==<br />
<br />
Run the following command if you are logging in and need the current oath pass :<br />
<br />
oathtool -v -d6 ''1ab4321412aebcw''<br />
<br />
Of course replace ''1ab4321412aebcw'' by the seed corresponding to your user. It will display something like that :<br />
<br />
Hex secret: 1ab4321412aebc<br />
Base32 secret: DK2DEFASV26A====<br />
Digits: 6<br />
Window size: 0<br />
Start counter: 0x0 (0)<br />
<br />
820170<br />
<br />
The last number is actually the code you can use to log in right now, but more interestingly the Base32 secret, is actually what we need to generate a qr code for this user. To do so install the package {{Pkg|qrencode}} to run the following command :<br />
<br />
qrencode -o ''user''.png 'otpauth://totp/''user''@''machine''?secret=''DK2DEFASV26A===='''<br />
<br />
Of course change ''user'', ''machine'' and ''DK2DEFASV26A===='' accordingly. Once done, you can visualize your qrcode with your preferred image visualizer application and use that to configure your phone. It is pretty straight forward to use FreeOTP to then take a screenshot of that ''.png'' and get it to display OTP pass when needed.<br />
<br />
{{Note|The secret key of your users is the most important information in this system. Once you setup a phone to provide OTP, it does have that key. The qr code in that ''.png'' file does have that key. You need to take extra care of this file. They should only be stored on encrypted medium (Your phone need to be using encryption for any sane level of security). If not even confined in a sandbox like Samsung Knox to prevent third party application to potentially access them.}}<br />
<br />
== See also ==<br />
<br />
* [http://spod.cx/blog/two-factor-ssh-auth-with-pam_oath-google-authenticator.shtml Two-factor time based (TOTP) SSH authentication with pam_oath and Google Authenticator]<br />
* [http://www.nongnu.org/oath-toolkit/pam_oath.html pam_oath man page]</div>Jose1711https://wiki.archlinux.org/index.php?title=Pam_oath&diff=570346Pam oath2019-04-01T20:38:08Z<p>Jose1711: improve formatting</p>
<hr />
<div>{{DISPLAYTITLE:pam_oath}}<br />
[[Category:Secure Shell]]<br />
[[Category:Authentication]]<br />
[[ja:Pam oath]]<br />
The [http://www.nongnu.org/oath-toolkit/index.html OATH Toolkit] provides a two-step authentication procedure using one-time passcodes (OTP). It complies to two OTP method RFC standards ([[w:HMAC-based_One-time_Password_Algorithm|HOTP]], [[w:Time-based_One-time_Password_Algorithm|TOTP]]). The OTP generator applications are available for iOS, Android, Blackberry and other devices. Similar to [[Google Authenticator]] the authentication mechanism integrates into the Linux [[PAM]] system. This guide shows the installation and configuration of this mechanism.<br />
<br />
== Installation ==<br />
<br />
Install the {{Pkg|oath-toolkit}} package.<br />
<br />
== Setting up the oath ==<br />
<br />
The oath seed is an hexadecimal number that should be unique per user. To generate a new seed for a user, you could use the following command line:<br />
<br />
$ head -10 /dev/urandom | sha512sum | cut -b 1-30<br />
1ab4321412aebcw<br />
<br />
Note the above output seed is used as example seed in this article and '''must not''' be used. There needs to be one oath per user and link to it in a configuration file {{ic|/etc/users.oath}}. While being root create the file and insert the user seed:<br />
<br />
{{hc|/etc/users.oath|# Option User Prefix Seed<br />
HOTP/T30/6 ''user'' - ''1ab4321412aebcw''}}<br />
<br />
Make sure that the file can only be accessed by root:<br />
<br />
# chmod 600 /etc/users.oath<br />
# chown root /etc/users.oath<br />
<br />
== Setting up the PAM ==<br />
<br />
To enable oath for a specific service only, like ssh, you can edit the file {{ic|/etc/pam.d/sshd}} and add at the beginning of the file the following line :<br />
<br />
auth sufficient pam_oath.so usersfile=/etc/users.oath window=30 digits=6<br />
<br />
This will allow authentication if you just enter the right oath code. You can make it a requirement and let the rest of the pam stack be processed if you use the following line instead :<br />
<br />
auth required pam_oath.so usersfile=/etc/users.oath window=30 digits=6<br />
<br />
== Logging with an oath pass ==<br />
<br />
Run the following command if you are logging in and need the current oath pass :<br />
<br />
oathtool -v -d6 ''1ab4321412aebcw''<br />
<br />
Of course replace ''1ab4321412aebcw'' by the seed corresponding to your user. It will display something like that :<br />
<br />
Hex secret: 1ab4321412aebc<br />
Base32 secret: DK2DEFASV26A====<br />
Digits: 6<br />
Window size: 0<br />
Start counter: 0x0 (0)<br />
<br />
820170<br />
<br />
The last number is actually the code you can use to log in right now, but more interestingly the Base32 secret, is actually what we need to generate a qr code for this user. To do so install the package {{Pkg|qrencode}} to run the following command :<br />
<br />
qrencode -o ''user''.png 'otpauth://totp/''user''@''machine''?secret=''DK2DEFASV26A===='''<br />
<br />
Of course change ''user'', ''machine'' and ''DK2DEFASV26A===='' accordingly. Once done, you can visualize your qrcode with your preferred image visualizer application and use that to configure your phone. It is pretty straight forward to use FreeOTP to then take a screenshot of that ''.png'' and get it to display OTP pass when needed.<br />
<br />
{{Note|The secret key of your users is the most important information in this system. Once you setup a phone to provide OTP, it does have that key. The qr code in that ''.png'' file does have that key. You need to take extra care of this file. They should only be stored on encrypted medium (Your phone need to be using encryption for any sane level of security). If not even confined in a sandbox like Samsung Knox to prevent third party application to potentially access them.}}<br />
<br />
== See also ==<br />
<br />
* [http://spod.cx/blog/two-factor-ssh-auth-with-pam_oath-google-authenticator.shtml Two-factor time based (TOTP) SSH authentication with pam_oath and Google Authenticator]<br />
* [http://www.nongnu.org/oath-toolkit/pam_oath.html pam_oath man page]</div>Jose1711https://wiki.archlinux.org/index.php?title=Gamepad&diff=565409Gamepad2019-01-31T23:28:02Z<p>Jose1711: /* Dance pads */ - add note about alternative solutions for fixing axis issue</p>
<hr />
<div>[[Category:Input devices]]<br />
[[Category:Gaming]]<br />
[[ja:ゲームパッド]]<br />
[[ru:Gamepad]]<br />
Joysticks can be a bit of a hassle to get working in Linux. Not because they are poorly supported, but simply because you need to determine which modules to load to get your joystick working, and it's not always very obvious!<br />
<br />
== Joystick input systems ==<br />
<br />
Linux has two different input systems for Joysticks – the original Joystick interface and the newer evdev-based interface.<br />
<br />
{{ic|1=/dev/input/jsX}} maps to the Joystick API interface and {{ic|/dev/input/event*}} maps to the evdev ones (this also includes other input devices such as mice and keyboards). Symbolic links to those devices are also available in {{ic|/dev/input/by-id/}} and {{ic|/dev/input/by-path/}} where the legacy Joystick API has names ending with {{ic|-joystick}} while the evdev have names ending with {{ic|-event-joystick}}.<br />
<br />
Most new games will default to the evdev interface as it gives more detailed information about the buttons and axes available and also adds support for force feedback.<br />
<br />
While SDL1 defaults to evdev interface you can force it to use the old Joystick API by setting the environment variable {{ic|1=SDL_JOYSTICK_DEVICE=/dev/input/js0}}. This can help many games such as X3. SDL2 supports only the new evdev interface.<br />
<br />
== Determining which modules you need ==<br />
<br />
Unless you're using very old joystick that uses gameport or proprietary USB protocol, you will need just the generic USB human interface device (HID) modules.<br />
<br />
For an extensive overview of all joystick related modules in Linux, you will need access to the Linux kernel sources -- specifically the Documentation section. Unfortunately, pacman kernel packages do not include what we need. If you have the kernel sources downloaded, have a look at {{ic|Documentation/input/joydev/}}. You can browse the kernel source tree at [https://kernel.org/ kernel.org] by clicking the "browse" (cgit - the git frontend) link for the kernel that you're using, then clicking the "tree" link near the top. Here's a link to the [https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/Documentation/input/joydev/joystick.rst documentation from the latest kernel].<br />
<br />
Some joysticks need specific modules, such as the Microsoft Sidewinder controllers ({{ic|sidewinder}}), or the Logitech digital controllers ({{ic|adi}}). Many older joysticks will work with the simple {{ic|analog}} module. If your joystick is plugging in to a gameport provided by your soundcard, you will need your soundcard drivers loaded - however, some cards, like the Soundblaster Live, have a specific gameport driver ({{ic|emu10k1-gp}}). Older ISA soundcards may need the {{ic|ns558}} module, which is a standard gameport module.<br />
<br />
As you can see, there are many different modules related to getting your joystick working in Linux, so I couldn't possibly cover everything here. Please have a look at the documentation mentioned above for details.<br />
<br />
=== Loading the modules for analogue devices ===<br />
<br />
You need to load a module for your gameport ({{ic|ns558}}, {{ic|emu10k1-gp}}, {{ic|cs461x}}, etc...), a module for your joystick ({{ic|analog}}, {{ic|sidewinder}}, {{ic|adi}}, etc...), and finally the kernel joystick device driver ({{ic|joydev}}). Add these to a new file in {{ic|/etc/modules-load.d/}}, or simply modprobe them. The {{ic|gameport}} module should load automatically, as this is a dependency of the other modules.<br />
<br />
=== USB joysticks ===<br />
<br />
You need to get USB working, and then modprobe your joystick driver, which is {{ic|usbhid}}, as well as {{ic|joydev}}. <br />
If you use a usb mouse or keyboard, {{ic|usbhid}} will be loaded already and you just have to load the {{ic|joydev}} module.<br />
<br />
== Testing your configuration ==<br />
<br />
Once the modules are loaded, you should be able to find a new device: {{ic|/dev/input/js0}} and a file ending with {{ic|-event-joystick}} in {{ic|/dev/input/by-id}} directory. You can simply {{ic|cat}} those devices to see if the joystick works - move the stick around, press all the buttons - you should see mojibake printed when you move the sticks or press buttons. <br />
<br />
Both interfaces are also supported in wine and reported as separate devices. You can test them with {{ic|1=wine control joy.cpl}}.<br />
<br />
{{Tip| Input devices by default have '''input''' group; for example, {{pkg|pcsx2}} have no access to gamepad without rights. Make sure your user is in the '''input''' group.}}<br />
<br />
<br />
=== Joystick API ===<br />
There are a lot of applications that can test this old API, {{ic|jstest}} from the {{pkg|joyutils}} package is the simplest one. If the output is unreadable because the line printed is too long you can also use graphical tools. Plasma has a built in one in Input Devices panel in System Settings or {{AUR|jstest-gtk-git}} is an alternative.<br />
<br />
Use of {{ic|jstest}} is fairly simple, you just run {{ic|jstest /dev/input/js0}} and it will print a line with state of all the axes (normalised to {-32767,32767}) and buttons.<br />
<br />
After you start {{ic|jstest-gtk}}, it will just show you a list of joysticks available, you just need to select one and press Properties.<br />
<br />
=== evdev API ===<br />
<br />
The new 'evdev' API can be tested using the SDL2 joystick test application or using {{ic|evtest}} from community repository. Install {{AUR|sdl2-jstest-git}} and then run {{ic|sdl2-jstest --test 0}}. Use {{ic|sdl2-jstest --list}} to get IDs of other controllers if you have multiple ones connected.<br />
<br />
To test force feedback on the device, use {{ic|fftest}} from {{ic|linuxconsole}} package:<br />
$ fftest /dev/input/by-id/usb-*event-joystick<br />
<br />
==Setting up deadzones and calibration==<br />
If you want to set up the deadzones (or remove them completely) of your analog input you have to do it separately for the xorg (for mouse and keyboard emulation), Joystick API and evdev API.<br />
<br />
===Wine deadzones===<br />
Add the following registry entry and set it to a string from 0 to 10000 (affects all axes):<br />
HKEY_CURRENT_USER\Software\Wine\DirectInput\DefaultDeadZone<br />
Source: [http://wiki.winehq.org/UsefulRegistryKeys UsefulRegistryKeys]<br />
<br />
===Xorg deadzones===<br />
Add a similar line to {{ic|/etc/X11/xorg.conf.d/51-joystick.conf}} (create if it doesn't exist):<br />
{{hc|1=/etc/X11/xorg.conf.d/51-joystick.conf|2=<nowiki><br />
Section "InputClass"<br />
Option "MapAxis1" "deadzone=1000"<br />
EndSection<br />
</nowiki>}}<br />
1000 is the default value, but you can set anything between 0 and 30 000. To get the axis number see the "Testing Your Configuration" section of this article.<br />
If you already have an option with a specific axis just type in the {{ic|1=deadzone=value}} at the end of the parameter separated by a space.<br />
<br />
===Joystick API deadzones===<br />
The easiest way is using {{ic|jstest-gtk}} from {{AUR|jstest-gtk-git}}. Select the controller you want to edit, then click the Calibration button at the bottom of the dialog ('''don't''' click Start Calibration there). You can then set the CenterMin and CenterMax values (which control the center deadzone), RangeMin and RangeMax which control the end of throw deadzones. Note that the calibration settings are applied when the application opens the device, so you need to restart your game or test application to see updated calibration settings.<br />
<br />
After you set the deadzones use {{ic|jscal}} to dump the new values into a shell script:<br />
$ jscal -p /dev/input/jsX > jscal.sh # replace X with your joystick's number <br />
$ chmod +x jscal.sh<br />
<br />
Now you need to make a [[udev]] rule (for example {{ic|/etc/udev/rules.d and name it 85-jscal.rules}}) so the script will automatically run when you connect the controller:<br />
SUBSYSTEM=="input", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="c268", ACTION=="add", RUN+="/usr/bin/jscal.sh"<br />
To get the idVendor and idProduct use {{ic|udevadm info --attribute-walk --name /dev/input/jsX}}<br />
<br />
Use the `/dev/input/by-id/*-joystick` device names in case you use multiple controllers.<br />
<br />
===evdev API deadzones===<br />
The {{ic|evdev-joystick}} tool from the {{pkg|linuxconsole}} package can be used to view and change deadzones and calibration for {{ic|evdev}} API devices.<br />
<br />
To view your device configuration:<br />
$ evdev-joystick --showcal /dev/input/by-id/usb-*-event-joystick<br />
<br />
To change the deadzone for a particular axis, use a command like:<br />
$ evdev-joystick --evdev /dev/input/by-id/usb-*-event-joystick --axis 0 --deadzone 0<br />
<br />
To set the same deadzone for all axes at once, omit the "--axis 0" option.<br />
<br />
Use udev rules file to set them automatically when the controller is connected.<br />
<br />
Note that inside the kernel, the value is called {{ic|flatness}} and is set using the {{ic|EVIOCSABS}} {{ic|ioctl}}.<br />
<br />
Default configuration will look like similar to this:<br />
{{hc|$ evdev-joystick --showcal /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Stick_G0000090-event-joystick|2= Supported Absolute axes:<br />
Absolute axis 0x00 (0) (X Axis) (min: 0, max: 65535, flatness: 4095 (=6.25%), fuzz: 255)<br />
Absolute axis 0x01 (1) (Y Axis) (min: 0, max: 65535, flatness: 4095 (=6.25%), fuzz: 255)<br />
Absolute axis 0x05 (5) (Z Rate Axis) (min: 0, max: 4095, flatness: 255 (=6.23%), fuzz: 15)<br />
Absolute axis 0x10 (16) (Hat zero, x axis) (min: -1, max: 1, flatness: 0 (=0.00%), fuzz: 0)<br />
Absolute axis 0x11 (17) (Hat zero, y axis) (min: -1, max: 1, flatness: 0 (=0.00%), fuzz: 0)}}<br />
<br />
While a more reasonable setting would be achieved with something like this (repeat for other axes):<br />
{{hc|$ evdev-joystick --evdev /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Stick_G0000090-event-joystick --axis 0 --deadzone 512|2= Event device file: /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Stick_G0000090-event-joystick<br />
Axis index to deal with: 0<br />
New dead zone value: 512<br />
Trying to set axis 0 deadzone to: 512<br />
Absolute axis 0x00 (0) (X Axis) Setting deadzone value to : 512<br />
(min: 0, max: 65535, flatness: 512 (=0.78%), fuzz: 255)}}<br />
<br />
===Configuring curves and responsivness===<br />
In case your game requires just limited amount of buttons or has good support for multiple controllers, you may have good results with using {{ic|xboxdrv}} to change response curves of the joystick.<br />
<br />
Below are the setups I use for Saitek X-55 HOTAS:<br />
$ xboxdrv --evdev /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Throttle_G0000021-event-joystick \<br />
--evdev-no-grab --evdev-absmap 'ABS_#40=x1,ABS_#41=y1,ABS_X=x2,ABS_Y=y2' --device-name 'Hat and throttle' \<br />
--ui-axismap 'x2^cal:-32000:0:32000=,y2^cal:-32000:0:32000=' --silent<br />
<br />
this maps the EV_ABS event with id of 40 and 41 (use xboxdrv with --evdev-debug to see the events registered), which is the normally inaccessible "mouse pointer" on the throttle, to first gamepad joystick and throttles to second joystick, it also clamps the top and lower ranges as they not always register fully.<br />
<br />
A bit more interesting is the setup for the stick:<br />
$ xboxdrv --evdev /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Stick_G0000090-event-joystick \<br />
--evdev-no-grab --evdev-absmap 'ABS_X=x1' --evdev-absmap 'ABS_Y=y1' --device-name 'Joystick' \<br />
--ui-axismap 'x1^cal:-32537:-455:32561=,x1^dead:-900:700:1=,x1^resp:-32768:-21845:-2000:0:2000:21485:32767=' \<br />
--ui-axismap 'y1^cal:-32539:-177:32532=,y1^dead:-700:2500:1=,y1^resp:-32768:-21845:-2000:0:2000:21485:32767=' \<br />
--evdev-absmap 'ABS_RZ=x2' --ui-axismap 'x2^cal:-32000:-100:32000,x2^dead:-1500:1000:1=,x2^resp:-32768:-21845:-2000:0:2000:21485:32767=' \<br />
--silent<br />
<br />
this maps the 3 joystick axes to gamepad axes and changes the calibration (min value, centre value, max value), dead zones (negative side, positive side, flag to turn smoothing) and finally change of response curve to a more flat one in the middle.<br />
<br />
You can also modify the responsiveness by setting the 'sen' (sensitivity). Setting it to value of 0 will give you a linear sensitivity, value of -1 will give very insensitive axis while value of 1 will give very sensitive axis. You can use intermediate values to make it less or more sensitive. Internally xboxdrv uses a quadratic formula to calculate the resulting value, so this setting gives a more smooth result than 'resp' shown above.<br />
<br />
Nice thing about xboxdrv is that it exports resulting device as both old Joystick API and new style evdev API so it should be compatible with basically any application.<br />
<br />
== Disable joystick from controlling mouse ==<br />
If you want to play games with your controller, you might want to disable joystick control over mouse cursor. To do this, edit {{ic|/etc/X11/xorg.conf.d/51-joystick.conf}} (create if it doesn't exists) so that it looks like this:<br />
{{hc|/etc/X11/xorg.conf.d/51-joystick.conf |<br />
Section "InputClass"<br />
Identifier "joystick catchall"<br />
MatchIsJoystick "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Driver "joystick"<br />
Option "StartKeysEnabled" "False" #Disable mouse<br />
Option "StartMouseEnabled" "False" #support<br />
EndSection}}<br />
<br />
== Using Joystick to send keystrokes ==<br />
<br />
A couple joystick to keystroke programs exist like {{AUR|qjoypad}} or {{AUR|antimicro}}, all work well without the need for X.org configuration.<br />
<br />
=== Xorg configuration example ===<br />
<br />
This is a good solution for systems where restarting Xorg is a rare event because it is a static configuration loaded only on X startup. The example runs on a [[Kodi]] media PC, controlled with a Logitech Cordless RumblePad 2. Due to a problem with the d-pad (a.k.a. "hat") being recognized as another axis, [[Joy2key]] was used as a workaround. Since upgrade to Kodi version 11.0 and joy2key 1.6.3-1, this setup no longer worked and the following was created for letting Xorg handle joystick events.<br />
<br />
First, [[install]] the {{AUR|xf86-input-joystick}} package. Then, create {{ic|/etc/X11/xorg.conf.d/51-joystick.conf}} like so:<br />
{{bc|<nowiki><br />
Section "InputClass"<br />
Identifier "Joystick hat mapping"<br />
Option "StartKeysEnabled" "True"<br />
#MatchIsJoystick "on"<br />
Option "MapAxis5" "keylow=113 keyhigh=114"<br />
Option "MapAxis6" "keylow=111 keyhigh=116"<br />
EndSection<br />
</nowiki>}}<br />
{{Note|The {{ic|MatchIsJoystick "on"}} line does not seem to be required for the setup to work, but you may want to uncomment it.}}<br />
<br />
== Specific devices ==<br />
<br />
While most joysticks, especially USB based ones should just work, some may require (or give better results) if you use alternative drivers. If it doesn't work the first time, do not give up, and read those docs thoroughly!<br />
<br />
=== Dance pads ===<br />
Most dance pads should work. However some pads, especially those used from a video game console via an adapter, have a tendency to map the directional buttons as axis buttons. This prevents hitting left-right or up-down simultaneously. This behavior can be fixed for devices recognized by xpad via a module option:<br />
<br />
# modprobe -r xpad<br />
# modprobe xpad dpad_to_buttons=1<br />
<br />
If that did not work, you can try {{AUR|axisfix-git}} or patching the {{ic|joydev}} kernel module (https://github.com/adiel-mittmann/dancepad).<br />
<br />
=== Logitech Thunderpad Digital ===<br />
<br />
Logitech Thunderpad Digital won't show all the buttons if you use the {{ic|analog}} module. Use the device specific {{ic|adi}} module for this controller.<br />
<br />
=== Nintendo Gamecube Controller ===<br />
<br />
Dolphin Emulator has a [https://wiki.dolphin-emu.org/index.php?title=How_to_use_the_Official_GameCube_Controller_Adapter_for_Wii_U_in_Dolphin page on their wiki] that explains how to use the official Nintendo USB adapter with a Gamecube controller. This configuration also works with the Mayflash Controller Adapter if the switch is set to "Wii U".<br />
<br />
By default, the controller will register with [[udev]], but will only be readable by the root user. You can fix this by adding a udev device rule, like the below. <br />
<br />
{{hc<br />
|head=/etc/udev/rules.d/51-gcadapter.rules<br />
|output=<nowiki>SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", MODE="0666"</nowiki><br />
}}<br />
<br />
This only matches the USB device with the specified vendor and product IDs, which match those of the official USB adapter. It sets the permissions of the device file to 0666 so that programs that aren't running as root can read the device's input. <br />
<br />
udev can be reloaded with the new configuration by executing<br />
<br />
# udevadm control --reload-rules<br />
<br />
=== Nintendo Switch Wired Pro Controller ===<br />
<br />
While the controller works for native Linux games, this controller isn't detected by Steam. To fix this, we'll need to add a line to 70-steam-controller.rules.<br />
<br />
{{hc<br />
|head=/lib/udev/rules.d/70-steam-controller.rules<br />
|output=<nowiki># NS PRO Controller USB<br />
KERNEL=="hidraw*", ATTRS{idVendor}=="20d6", ATTRS{idProduct}=="a711", MODE="0660", TAG+="uaccess"</nowiki><br />
}}<br />
<br />
udev can be reloaded with the new configuration by executing<br />
<br />
# udevadm control --reload-rules<br />
<br />
=== PlayStation 3/4 controller ===<br />
<br />
The DualShock 3, DualShock 4 and Sixaxis controllers work out of the box when plugged in via USB (the PS button will need to be pushed to begin). They can also be used wirelessly via Bluetooth.<br />
<br />
Steam properly recognizes it as a PS3 pad and Big Picture can be launched with the PS button. Big Picture and some games may act as if it was a 360 controller. Gamepad control over mouse is on by default. You may want to turn it off before playing games, see [[#Joystick moving mouse]].<br />
<br />
=====Connecting via Bluetooth=====<br />
<br />
Install the {{Pkg|bluez}}, {{Pkg|bluez-plugins}}, and {{Pkg|bluez-utils}} packages, which includes the ''sixaxis'' plugin. Then [[start]] {{ic|bluetooth.service}}, plug the controller in via USB, and the plugin should program your PC's bluetooth address into the controller automatically.<br />
<br />
You can now disconnect your controller. The next time you hit the PlayStation button it will connect without asking anything else.<br />
<br />
Alternatively, you can hold the share button and the PlayStation button simultaneously (for a few seconds) to put the gamepad in pairing mode, and pair as you would normally.<br />
<br />
GNOME's Settings also provides a graphical interface to pair sixaxis controllers when connected by wire.<br />
<br />
Remember to disconnect the controller when you are done as the controller will stay on when connected and drain the battery.<br />
<br />
{{Note|If the controller does not connect, make sure the bluetooth interface is turned on and the controllers have been trusted. (See [[Bluetooth]])}}<br />
<br />
=====Using generic/clone controllers=====<br />
<br />
Using generic/clone Dualshock controllers is possible, however there are some issues that may require to install patched packages. The default Bluetooth protocol stack doesn't detect some of the clone controllers, the {{AUR|bluez-ps3}} package is a version patched to be able to detect them. Another issue is a bug where the controller starts to non-stop rumble as soon as it gets connected via USB. That can be fixed by using a patched version of the hid-sony driver, which is available on the {{AUR|dkms-hid-sony-shanwan}} package.<br />
<br />
=== iPEGA-9017s and other Bluetooth gamepads ===<br />
<br />
If you want to use one of the widely available bluetooth gamepads, such as iPEGA-9017s designed mostly for Android and iOS devices you would need {{AUR|xboxdrv}}, {{Pkg|bluez}}, {{Pkg|bluez-plugins}}, and {{Pkg|bluez-utils}}. You should connect it in gamepad mode (if there are different modes, choose the gamepad one). Technically it's ready to be used, but in most cases games would not recognize it, and you would have to map it individually for all application. The best way to simplify it and make it work with all applications is to mimic Microsoft X360 controller with {{AUR|xboxdrv}}.<br />
Once connected you can create a udev rule to give it a persistent name, that would come in handy when setting it up.<br />
<br />
{{hc<br />
|/etc/udev/rules.d/99-btjoy.rules|2=<br />
#Create a symlink to appropriate /dev/input/eventX at /dev/btjoy<br />
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="Bluetooth Gamepad", ATTRS{uniq}=="00:17:02:01:ae:2a", SYMLINK+="btjoy"<br />
}}<br />
<br />
Replace "Bluetooth Gampad" with your device name and "00:17:02:01:ae:2a" with your device's address.<br />
<br />
Next, create a configuration for {{AUR|xboxdrv}} somewhere, for example:<br />
<br />
{{hc<br />
|~/.config/xboxdrv/ipega.conf|2=<br />
#iPEGA PG-9017S Config <br />
<br />
[xboxdrv]<br />
evdev-debug = true<br />
evdev-grab = true<br />
rumble = false<br />
mimic-xpad = true<br />
<br />
[evdev-absmap]<br />
ABS_HAT0X = dpad_x<br />
ABS_HAT0Y = dpad_y<br />
<br />
ABS_X = X1<br />
ABS_Y = Y1<br />
<br />
ABS_Z = X2<br />
ABS_RZ = Y2<br />
<br />
[axismap]<br />
-Y1 = Y1<br />
-Y2 = Y2<br />
<br />
[evdev-keymap]<br />
BTN_EAST=a<br />
BTN_C=b<br />
BTN_NORTH=y<br />
BTN_SOUTH=x<br />
BTN_TR2=start<br />
BTN_TL2=back<br />
BTN_Z=rt<br />
BTN_WEST=lt<br />
<br />
BTN_MODE = guide<br />
}}<br />
<br />
Refer to the xboxdrv man to see all the options.<br />
<br />
Now when you have the config and your device is connected you can start the {{AUR|xboxdrv}} like so:<br />
<br />
{{ic | sudo xboxdrv --evdev /dev/btjoy --config .config/xboxdrv/ipega.conf}}<br />
<br />
Your games will now work with bluetooth gamepad as long as xboxdrv is running.<br />
<br />
==== iPEGA-9068 and 9087 ====<br />
<br />
For this model, use the same procedures as above, but with the configs:<br />
<br />
{{hc<br />
|~/.config/xboxdrv/ipega.conf|2=<br />
#iPEGA PG-9068 and PG-9087 Config <br />
<br />
[xboxdrv]<br />
evdev-debug = true<br />
evdev-grab = true<br />
rumble = false<br />
mimic-xpad = true<br />
<br />
[evdev-absmap]<br />
ABS_HAT0X = dpad_x<br />
ABS_HAT0Y = dpad_y<br />
<br />
ABS_X = X1<br />
ABS_Y = Y1<br />
<br />
ABS_Z = X2<br />
ABS_RZ = Y2<br />
<br />
[axismap]<br />
-Y1 = Y1<br />
-Y2 = Y2<br />
<br />
[evdev-keymap]<br />
BTN_A=a<br />
BTN_B=b<br />
BTN_Y=y<br />
BTN_X=x<br />
BTN_TR=rb<br />
BTN_TL=lb<br />
BTN_TR2=rt<br />
BTN_TL2=lt<br />
BTN_START=start<br />
BTN_SELECT=back<br />
<br />
BTN_MODE = guide<br />
}}<br />
<br />
=== Steam Controller ===<br />
<br />
{{Note|Kernel 4.18 [https://lkml.org/lkml/2018/4/16/380 provides a kernel driver] for wired/wireless use of the steam controller as a controller input device without [[Steam]].}}<br />
<br />
The [[Steam]] client will recognize the controller and provide keyboard/mouse/gamepad emulation while Steam is running. The in-game Steam overlay needs to be enabled and working in order for gamepad emulation to work. You may need to run {{ic|udevadm trigger}} with root privileges or plug the dongle out and in again, if the controller doesn't work immediately after installing and running Steam. If all else fails, try restarting the computer while the dongle is plugged in.<br />
<br />
For Steam client to be able to emulate other gamepads in games, you will need to follow this [https://steamcommunity.com/app/353370/discussions/2/1735465524711324558/ post] from Valve. Note that name of the file with udev rules may be different, for example {{ic|/usr/lib/udev/rules.d/70-steam-input.rules}}. A reboot may be required after making changes.<br />
<br />
If you can't get the Steam Controller to work, see [[#Steam Controller not pairing]].<br />
<br />
Alternatively you can install {{AUR|python-steamcontroller-git}} to have controller and mouse emulation without Steam or {{AUR|sc-controller}} for a versatile graphical configuration tool simillar to what is provided by the Steam client.<br />
<br />
On some desktop environments the on-screen keyboard might freeze when trying to input text after one or two characters. This is a problem with window focus. Check the settings for your [[window manager]] to see if it is possible to have focus follow the mouse or automatically focus new windows. Preventing the keyboard from receiving focus will fix the issue in [[Awesome]], see [[Awesome#Steam Keyboard]].<br />
<br />
{{Note|If you do not use the [[Steam runtime]], you might actually need to disable the overlay for the controller to work in certain games (Rocket Wars, Rocket League, Binding of Isaac, etc.). Right click on a game in your library, select "Properties", and uncheck "Enable Steam Overlay".}}<br />
<br />
==== Wine ====<br />
<br />
{{AUR|python-steamcontroller-git}} can also be used to make the Steam Controller work for games running under Wine. You need to find and download the application {{ic|xbox360cemu.v.3.0}} (e.g. from [https://github.com/jacobmischka/ds4-in-wine/tree/master/xbox360cemu.v.3.0 here]). Then copy the files {{ic|dinput8.dll}}, {{ic|xbox360cemu.ini}}, {{ic|xinput1_3.dll}} and {{ic|xinput_9_1_0.dll}} to the directory that contains your game executable. Edit {{ic|xbox360cemu.ini}} and only change the following values under {{ic|[PAD1]}} to remap the Steam Controller correctly to a XBox controller.<br />
<br />
{{hc|xbox360cemu.ini|2= Right Analog X=4<br />
Right Analog Y=-5<br />
A=1<br />
B=2<br />
X=3<br />
Y=4<br />
Back=7<br />
Start=8<br />
Left Thumb=10<br />
Right Thumb=11<br />
Left Trigger=a3<br />
Right Trigger=a6}}<br />
<br />
Now start python-steamcontroller in Xbox360 mode ({{ic|sc-xbox.py start}}). You might also want to copy {{ic|XInputTest.exe}} from {{ic|xbox360cemu.v.3.0}} to the same directory and run it with Wine in order to test if the mappings work correctly. However neither mouse nor keyboard emulation work with this method.<br />
<br />
Alternatively you can use {{AUR|sc-controller}} for a similar graphical setup as Steam's own configurator. As of writing, it's a bit buggy here and there but offers an easy click and go way of configuring the controller.<br />
<br />
=== Xbox 360 controller ===<br />
<br />
Both the wired and wireless (with the ''Xbox 360 Wireless Receiver for Windows'') controllers are supported by the {{ic|xpad}} kernel module and should work without additional packages.<br />
<br />
It has been reported that the default xpad driver has some issues with a few newer wired and wireless controllers, such as:<br />
* incorrect button mapping. ([https://github.com/ValveSoftware/steam-for-linux/issues/95#issuecomment-14009081 discussion in Steam bugtracker])<br />
* not-working sync. All four leds keep blinking, but controller works. ([https://bbs.archlinux.org/viewtopic.php?id=156028 discussion in Arch Forum])<br />
<br />
If you experience such issues, you can use either [[#SteamOS xpad]] or [[#xboxdrv]] instead of the default {{ic|xpad}} driver.<br />
<br />
If you wish to use the controller for controlling the mouse, or mapping buttons to keys, etc. you should use the {{AUR|xf86-input-joystick}} package (configuration help can be found using {{ic|man joystick}}). If the mouse locks itself in a corner, it might help changing the {{ic|MatchDevicePath}} in {{ic|/etc/X11/xorg.conf.d/50-joystick.conf}} from {{ic|/dev/input/event*}} to {{ic|/dev/input/js*}}.<br />
<br />
{{Tip|If you use the [[TLP]] power management tool, you may experience connection issues with your Microsoft wireless adapter (e.g. the indicator LED will go out after the adapter has been connected for a few seconds, and controller connection attempts fail). This is due to TLP's USB autosuspend functionality, and the solution is to add the Microsoft wireless adapter's device ID to this feature's blacklist (USB_BLACKLIST, check [http://linrunner.de/en/tlp/docs/tlp-configuration.html#usb TLP configuration] for more details).}}<br />
<br />
==== SteamOS xpad ====<br />
<br />
If you have issues with the default {{ic|xpad}} kernel module, you can install the SteamOS version. There is still a known issue with compatibility between wireless Xbox360 controllers and games made in GameMaker Studio. If you encounter this problem, the only known workaround is to use xboxdrv. YoYo Games has refused to acknowledge this as a bug with their product and it is unlikely to ever be fixed.<br />
<br />
First make sure you have [[DKMS]] installed and running, then install the modified kernel module {{AUR|steamos-xpad-dkms}}. During the installation you'll see that new xpad kernel module is strapped to your current kernel:<br />
<br />
Creating symlink /var/lib/dkms/steamos-xpad-dkms/0.1/source -&gt;<br />
/usr/src/steamos-xpad-dkms-0.1<br />
<br />
DKMS: add completed.<br />
<br />
Kernel preparation unnecessary for this kernel. Skipping...<br />
<br />
Building module:<br />
cleaning build area....<br />
make KERNELRELEASE=3.12.8-1-ARCH KVERSION=3.12.8-1-ARCH....<br />
cleaning build area....<br />
<br />
Then unload the old xpad module and load new one:<br />
<br />
# rmmod xpad<br />
# modprobe steamos-xpad<br />
<br />
Or just restart your computer.<br />
<br />
==== xboxdrv ====<br />
<br />
xboxdrv is an alternative to {{ic|xpad}} which provides more functionality and might work better with certain controllers. It works in userspace and can be launched as system service. <br />
<br />
Install it with the {{AUR|xboxdrv}} package. Then [[start]]/[[enable]] {{ic|xboxdrv.service}}.<br />
<br />
If you have issues with the controller being recognized but not working in steam games or working but with incorrect mappings, it may be required to modify you config as such:<br />
{{hc<br />
|/etc/default/xboxdrv|2=<br />
[xboxdrv]<br />
silent = true<br />
device-name = "Xbox 360 Wireless Receiver"<br />
mimic-xpad = true<br />
deadzone = 4000<br />
<br />
[xboxdrv-daemon]<br />
dbus = disabled<br />
}}<br />
<br />
Then [[restart]] {{ic|xboxdrv.service}}.<br />
<br />
===== Multiple controllers =====<br />
<br />
xboxdrv supports a multitude of controllers, but they need to be set up in {{ic|/etc/default/xboxdrv}}. For each extra controller, add an {{ic|1=next-controller = true}} line. For example, when using 4 controllers, add it 3 times:<br />
<br />
{{bc|<nowiki><br />
[xboxdrv]<br />
silent = true<br />
next-controller = true<br />
next-controller = true<br />
next-controller = true<br />
[xboxdrv-daemon]<br />
dbus = disabled<br />
</nowiki>}}<br />
<br />
Then [[restart]] {{ic|xboxdrv.service}}.<br />
<br />
===== Mimic Xbox 360 controller with other controllers =====<br />
<br />
xboxdrv can be used to make any controller register as an Xbox 360 controller with the {{ic|--mimic-xpad}} switch. This may be desirable for games that support Xbox 360 controllers out of the box, but have trouble detecting or working with other gamepads.<br />
<br />
First, you need to find out what each button and axis on the controller is called. You can use {{Pkg|evtest}} for this. Run {{ic|evtest}} and select the device event ID number ({{ic|/dev/input/event*}}) that corresponds to your controller. Press the buttons on the controller and move the axes to read the names of each button and axis.<br />
<br />
Here is an example of the output:<br />
{{bc|<nowiki><br />
<br />
Event: time 1380985017.964843, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003<br />
Event: time 1380985017.964843, type 1 (EV_KEY), code 290 (BTN_THUMB2), value 1<br />
Event: time 1380985017.964843, -------------- SYN_REPORT ------------<br />
Event: time 1380985018.076843, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003<br />
Event: time 1380985018.076843, type 1 (EV_KEY), code 290 (BTN_THUMB2), value 0<br />
Event: time 1380985018.076843, -------------- SYN_REPORT ------------<br />
Event: time 1380985018.460841, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002<br />
Event: time 1380985018.460841, type 1 (EV_KEY), code 289 (BTN_THUMB), value 1<br />
Event: time 1380985018.460841, -------------- SYN_REPORT ------------<br />
Event: time 1380985018.572835, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002<br />
Event: time 1380985018.572835, type 1 (EV_KEY), code 289 (BTN_THUMB), value 0<br />
Event: time 1380985018.572835, -------------- SYN_REPORT ------------<br />
Event: time 1380985019.980824, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006<br />
Event: time 1380985019.980824, type 1 (EV_KEY), code 293 (BTN_PINKIE), value 1<br />
Event: time 1380985019.980824, -------------- SYN_REPORT ------------<br />
Event: time 1380985020.092835, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006<br />
Event: time 1380985020.092835, type 1 (EV_KEY), code 293 (BTN_PINKIE), value 0<br />
Event: time 1380985020.092835, -------------- SYN_REPORT ------------<br />
Event: time 1380985023.596806, type 3 (EV_ABS), code 3 (ABS_RX), value 18<br />
Event: time 1380985023.596806, -------------- SYN_REPORT ------------<br />
Event: time 1380985023.612811, type 3 (EV_ABS), code 3 (ABS_RX), value 0<br />
Event: time 1380985023.612811, -------------- SYN_REPORT ------------<br />
Event: time 1380985023.708768, type 3 (EV_ABS), code 3 (ABS_RX), value 14<br />
Event: time 1380985023.708768, -------------- SYN_REPORT ------------<br />
Event: time 1380985023.724772, type 3 (EV_ABS), code 3 (ABS_RX), value 128<br />
Event: time 1380985023.724772, -------------- SYN_REPORT ------------<br />
</nowiki>}}<br />
<br />
In this case, {{ic|BTN_THUMB}}, {{ic|BTN_THUMB2}} and {{ic|BTN_PINKIE}} are buttons and {{ic|ABS_RX}} is the X axis of the right analogue stick.<br />
You can now mimic an Xbox 360 controller with the following command:<br />
<br />
$ xboxdrv --evdev /dev/input/event* --evdev-absmap ABS_RX=X2 --evdev-keymap BTN_THUMB2=a,BTN_THUMB=b,BTN_PINKIE=rt --mimic-xpad<br />
<br />
The above example is incomplete. It only maps one axis and 3 buttons for demonstration purposes. Use {{ic|xboxdrv --help-button}} to see the names of the Xbox controller buttons and axes and bind them accordingly by expanding the command above. Axes mappings should go after {{ic|--evdev-absmap}} and button mappings follow {{ic|--evdev-keymap}} (comma separated list; no spaces).<br />
<br />
By default, xboxdrv outputs all events to the terminal. You can use this to test that the mappings are correct. Append the {{ic|--silent}} option to keep it quiet.<br />
<br />
=== Xbox Wireless Controller / Xbox One Wireless Controller ===<br />
<br />
==== Connect Xbox Wireless Controller with usb cable ====<br />
<br />
This is supported by the kernel and should work without additional packages.<br />
<br />
==== Connect Xbox Wireless Controller with Bluetooth ====<br />
<br />
You will probably have to disable Enhanced Retransmission Mode (ERTM) to make it work.<br />
<br />
Use either:<br />
<br />
# echo 1 > /sys/module/bluetooth/parameters/disable_ertm<br />
<br />
Or add this file to your module configuration:<br />
<br />
{{hc<br />
|/etc/modprobe.d/xbox_bt.conf|2=<br />
options bluetooth disable_ertm=1<br />
}}<br />
<br />
===== xpadneo =====<br />
<br />
A relatively new driver which does (yet) support only the Xbox One S controller via Bluetooth is called [https://github.com/atar-axis/xpadneo/ xpadneo].<br />
In exchange for supporting just one controller so far, it enables one to read out the correct battery level, supports rumble (even the one on the trigger buttons - L2/R2), corrects the (sometimes wrong) button mapping and more.<br />
<br />
Installation is done using DKMS: {{AUR|xpadneo-dkms-git}}<br />
<br />
==== Connect Xbox Wireless Controller with Microsoft Xbox Wireless Adapter ====<br />
<br />
It does not work on Linux.<br />
<br />
===Logitech Dual Action===<br />
<br />
The Logitech Dual Action gamepad has a very similar mapping to the PS2 pad, but some buttons and triggers need to be swapped to mimic the Xbox controller.<br />
<br />
# xboxdrv --evdev /dev/input/event* \<br />
--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RZ=x2,ABS_Z=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \<br />
--axismap -Y1=Y1,-Y2=Y2 \<br />
--evdev-keymap BTN_TRIGGER=x,BTN_TOP=y,BTN_THUMB=a,BTN_THUMB2=b,BTN_BASE3=back,BTN_BASE4=start,BTN_BASE=lt,BTN_BASE2=rt,BTN_TOP2=lb,BTN_PINKIE=rb,BTN_BASE5=tl,BTN_BASE6=tr \<br />
--mimic-xpad --silent<br />
<br />
===PlayStation 2 controller via USB adapter===<br />
<br />
To fix the button mapping of PS2 dual adapters and mimic the Xbox controller you can run the following command:<br />
<br />
# xboxdrv --evdev /dev/input/event* \<br />
--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RZ=x2,ABS_Z=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \<br />
--axismap -Y1=Y1,-Y2=Y2 \<br />
--evdev-keymap BTN_TOP=x,BTN_TRIGGER=y,BTN_THUMB2=a,BTN_THUMB=b,BTN_BASE3=back,BTN_BASE4=start,BTN_BASE=lb,BTN_BASE2=rb,BTN_TOP2=lt,BTN_PINKIE=rt,BTN_BASE5=tl,BTN_BASE6=tr \<br />
--mimic-xpad --silent<br />
<br />
===PlayStation 3 controller via USB===<br />
<br />
If you own a PS3 controller and can connect with USB, xboxdrv has the mappings built in. Just run the program (and detach the running driver) and it works! <br />
<br />
# xboxdrv --silent --detach-kernel-driver<br />
<br />
There are some games which might also need the {{ic|--mimic-xpad}} option, additionally.<br />
<br />
===PlayStation 3 controller via Bluetooth===<br />
<br />
With your controller connected via Bluetooth, find the device address with {{ic|bluetoothctl}}. Then create a new udev rule with the following content:<br />
<br />
{{hc|1=/etc/udev/rules.d/99-dualshock.rules|2=<br />
KERNEL=="event*", SUBSYSTEM=="input", ATTRS{uniq}=="<device_addr_you_got_on_pairing>", SYMLINK+="input/dualshock3"<br />
}}<br />
<br />
The address must be in lowercase, like {{ic|06:9a:b4:c8:ef:8b}}.<br />
<br />
Now run xboxdrv over the new device:<br />
<br />
$ xboxdrv --evdev /dev/input/dualshock3 --mimic-xpad<br />
<br />
===PlayStation 4 controller===<br />
<br />
====Button mapping====<br />
<br />
To fix the button mapping of PS4 controller you can use the following command with xboxdrv (or try with the [https://github.com/chrippa/ds4drv ds4drv] program):<br />
<br />
# xboxdrv \<br />
--evdev /dev/input/by-id/usb-Sony_Computer_Entertainment_Wireless_Controller-event-joystick\<br />
--evdev-absmap ABS_X=x1,ABS_Y=y1 \<br />
--evdev-absmap ABS_Z=x2,ABS_RZ=y2 \<br />
--evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \<br />
--evdev-keymap BTN_A=x,BTN_B=a \<br />
--evdev-keymap BTN_C=b,BTN_X=y \<br />
--evdev-keymap BTN_Y=lb,BTN_Z=rb \<br />
--evdev-keymap BTN_TL=lt,BTN_TR=rt \<br />
--evdev-keymap BTN_SELECT=tl,BTN_START=tr \<br />
--evdev-keymap BTN_TL2=back,BTN_TR2=start \<br />
--evdev-keymap BTN_MODE=guide \<br />
--axismap -y1=y1,-y2=y2 \<br />
--mimic-xpad \<br />
--silent<br />
<br />
<br />
<br />
====Fix Motion control conflict (gamepad won't work on somes apps)====<br />
<br />
Dualshock 4 V1 and V2 are both like 3 devices, touchpad, motion control, and joypad.<br />
<br />
With somes softwares like Parsec and Shadow cloud gaming streaming apps, motion control is in conflict with joypad, you can disable touchpad and motion control by adding the following udev rule :<br />
<br />
{{hc|1=/etc/udev/rules.d/51-disable-DS3-and-DS4-motion-controls.rules|2=<br />
SUBSYSTEM=="input", ATTRS{name}=="*Controller Motion Sensors", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""<br />
SUBSYSTEM=="input", ATTRS{name}=="*Controller Touchpad", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""<br />
}}<br />
<br />
This should work in USB and Bluetooth mode. (If you want use bluetooth mode, press "home" button and "share" button together, white led of gamepad should blink very quickly, then add wireless controller with your bluetooth manager (bluez, gnome-bluetooth...)<br />
<br />
====Disable touchpad acting as mouse====<br />
<br />
This fixes conflicts with games that actually use touchpad as part of the gamepad, such as Rise of the Tomb Raider.<br />
<br />
<code>sudo vim /etc/X11/xorg.conf.d/30ds4.conf</code><br />
<br />
And then paste the following and restart X11:<br />
Section "InputClass"<br />
Identifier "ds4-touchpad"<br />
Driver "libinput"<br />
MatchProduct "Sony Interactive Entertainment Wireless Controller Touchpad"<br />
Option "Ignore" "True"<br />
EndSection<br />
<br />
== Troubleshooting ==<br />
<br />
=== Joystick moving mouse ===<br />
<br />
Sometimes USB joystick can be recognized as HID mouse (only in X, it is still being installed as {{ic|/dev/input/js0}} as well). Known issue is cursor being moved by the joystick, or escaping to en edge of a screen right after plugin. If your application can detect joystick by it self, you can remove the {{AUR|xf86-input-joystick}} package.<br />
<br />
A more gentle solution is described in [[#Disable joystick from controlling mouse]].<br />
<br />
=== Joystick not working in FNA/SDL based games ===<br />
If you are using a generic non-widely used gamepad you may encounter issues getting the gamepad recognized in games based on SDL. Since [https://github.com/flibitijibibo/FNA/commit/e55742cfe7e38b778a21ed8a12cb2f2081490d8d 14 May 2015], FNA supports dropping a {{ic|gamecontrollerdb.txt }} into the executable folder of the game, for example the [https://github.com/gabomdq/SDL_GameControllerDB SDL_GameControllerDB].<br />
<br />
As an alternative and for older versions of FNA or for SDL you can generate a mapping yourself by downloading the SDL source code via http://libsdl.org/, navigating to {{ic|/test/}}, compile the {{ic|controllermap.c}} program (alternatively install {{AUR|controllermap}}) and run the test. After completing the controllermap test, a guid will be generated that you can put in the {{ic|SDL_GAMECONTROLLERCONFIG}} environment variable which will then be picked up by SDL/FNA games. For example:<br />
<br />
$ export SDL_GAMECONTROLLERCONFIG="030000008f0e00000300000010010000,GreenAsia Inc. USB Joystick ,platform:Linux,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a2,"<br />
<br />
=== Joystick not recognized by all programs ===<br />
<br />
Some software, Steam for example, will only recognize the first joystick it encounters. Due to a bug in the driver for Microsoft wireless periphery devices this can in fact be the bluetooth dongle. If you find you have a {{ic|/dev/input/js*}} and {{ic|/dev/input/event*}} belonging to you keyboard's bluetooth transceiver you can get automatically get rid of it by creating according udev rules.<br />
Create a {{ic|/}}:<br />
{{hc|/etc/udev/rules.d/99-btcleanup.rules|<nowiki><br />
ACTION=="add", KERNEL=="js[0-9]*", SUBSYSTEM=="input", KERNELS=="...", ATTRS{bInterfaceSubClass}=="00", ATTRS{bInterfaceProtocol}=="00", ATTRS{bInterfaceNumber}=="02", RUN+="/usr/bin/rm /dev/input/js%n"<br />
ACTION=="add", KERNEL=="event*", SUBSYSTEM=="input", KERNELS=="...", ATTRS{bInterfaceSubClass}=="00", ATTRS{bInterfaceProtocol}=="00", ATTRS{bInterfaceNumber}=="02", RUN+="/usr/bin/rm /dev/input/event%n"<br />
</nowiki>}}<br />
Correct the {{ic|<nowiki>KERNELS=="..."</nowiki>}} to match your device. The correct value can be found by running<br />
<br />
# udevadm info -an /dev/input/js0<br />
<br />
Assuming the device in question is {{ic|/dev/input/js0}}. After you placed the rule reload the rules with<br />
<br />
# udevadm control --reload<br />
<br />
Then replug the device making you trouble. The joystick and event devices should be gone, although their number will still be reserved. But the files are out of the way.<br />
<br />
=== Steam Controller not pairing ===<br />
<br />
There are some unknown cases where the packaged udev rule for the Steam controller does not work ({{bug|47330}}). The most reliable workaround is to make the controller world readable. Copy the rule {{ic|/usr/lib/udev/rules.d/70-steam-controller.rules}} to {{ic|/etc/udev/rules.d}} with a later prioritiy and change anything that says {{ic|1=MODE="0660"}} to {{ic|1=MODE="066'''6'''"}} e.g.<br />
<br />
{{hc|/etc/udev/rules.d/99-steam-controller-perms.rules|<nowiki><br />
...<br />
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"<br />
...<br />
</nowiki>}}<br />
<br />
You may have to reboot in order for the change to take effect.<br />
<br />
=== Steam Controller makes a game crash or not recognized ===<br />
<br />
If your Steam Controller is working well in Steam Big Picture mode, but not recognized by a game or the game starts crashing when you plug in the controller, this may be because of the native driver that has been added to the Linux kernel 4.18. Try to unload it, restart Steam and replug the controller.<br />
<br />
The module name of the driver is ''hid_steam'', so to unload it you may perform:<br />
# sudo rmmod hid_steam</div>Jose1711https://wiki.archlinux.org/index.php?title=Professional_audio&diff=559311Professional audio2018-12-17T10:33:10Z<p>Jose1711: list working instructions how to run realtimeconfigquickscan - not just url</p>
<hr />
<div>[[Category:Sound]]<br />
[[ja:プロオーディオ]]<br />
[[ru:Professional audio]]<br />
{{Related articles start}}<br />
{{Related|Sound system}}<br />
{{Related|JACK}}<br />
{{Related|Realtime kernel}}<br />
{{Related|envy24control}}<br />
{{Related articles end}}<br />
Modern Linux systems are more than capable of supporting your (semi-)professional audio needs. Latencies of 5ms down to even as low as 1ms can be achieved with good hardware and proper configuration.<br />
<br />
== Getting started ==<br />
<br />
Arch Linux provides the package groups {{Grp|pro-audio}} (holding all relevant (semi-) professional applications), {{Grp|lv2-plugins}}, {{Grp|ladspa-plugins}}, {{Grp|dssi-plugins}} and {{Grp|vst-plugins}} (the latter being subgroups of the first group).<br />
<br />
{{Tip| See [[Pacman/Tips and tricks#Listing packages]] for listing members of and [[Pacman#Installing package groups]] for installing package groups.}}<br />
<br />
Low-latency audio on Linux is achieved using [[JACK]] (all applications in the {{Grp|pro-audio}} group are [[JACK]] clients).<br />
<br />
{{Note| [[JACK]] uses audio backends, such as [[ALSA]], [http://ffado.org FFADO], [[OSS]] or [http://www.portaudio.com/ Portaudio]. Depending on your setup, make sure those are configured properly!}}<br />
<br />
=== System configuration ===<br />
<br />
{{Note| The quality of information on best practices and system configuration vary a great deal (and are outdated or sometimes even contradictory in many locations). While for some systems and setups a higher level of optimization is necessary, for most users this will not be the case. Try a standard setup with the vanilla Arch Linux kernel first. Only if you require a setup with lower latency and greater stability, start considering optimizations!}}<br />
<br />
You may want to consider the following often seen system optimizations:<br />
<br />
* Setting the [[CPU frequency scaling]] governor to ''performance''.<br />
* [[Realtime_process_management#Configuring_PAM|Configuring pam_limits]] (e.g. by installing {{pkg|realtime-privileges}} and adding your user to the {{ic|realtime}} group).<br />
* Using the {{ic|threadirqs}} [[kernel parameter]] (consult [https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html] for reference) - enforced by default by the [[realtime kernel patchset]].<br />
* Using the [[realtime kernel patchset]].<br />
* Add {{ic|noatime}} to [[fstab]] (see [[Improving performance#Mount options]]).<br />
* Increasing the highest requested RTC interrupt frequency (default is 64 Hz) by [[systemd FAQ#How can I make a script start during the boot process?|running the following at boot]]:<br />
echo 2048 > /sys/class/rtc/rtc0/max_user_freq<br />
echo 2048 > /proc/sys/dev/hpet/max-user-freq<br />
* Reducing ''swappiness'' (aka swap frequency, set to {{ic|60}} by default) to e.g. {{ic|10}} will make the system wait much longer before trying to swap to disk (see [[wikipedia:Paging#Swappiness]]). This can be done on the fly with {{ic|1=sysctl vm.swappiness=10}} (see {{man|8|sysctl}}) or setup permanently, using a configuration file (see {{man|5|sysctl.d}}) such as:<br />
{{hc|/etc/sysctl.d/90-swappiness.conf|<nowiki><br />
vm.swappiness = 10<br />
</nowiki>}}<br />
* Increasing the maximum watches on files (defaults to {{ic|524288}}) to e.g. {{ic|600000}}, that ''inotify'' keeps track of for your user, can help with applications, that require many file handles (such as [[List_of_applications#Digital_audio_workstations|DAWs]]). This again can be done on the fly with {{ic|1=sysctl fs.inotify.max_user_watches=600000}} or in a dedicated configuration file:<br />
{{hc|/etc/sysctl.d/90-max_user_watches.conf|<nowiki><br />
fs.inotify.max_user_watches = 600000<br />
</nowiki>}}<br />
<br />
You may also want to maximize the PCI latency timer of the PCI sound card and raise the latency timer of all other PCI peripherals (default is 64).<br />
$ setpci -v -d *:* latency_timer&#61;'''b0'''<br />
$ setpci -v -s ''$SOUND_CARD_PCI_ID'' latency_timer&#61;'''ff''' # eg. SOUND_CARD_PCI_ID&#61;03:00.0 (see below)<br />
The SOUND_CARD_PCI_ID can be obtained like so:<br />
{{hc|$ lspci &#166; grep -i audio|<br />
'''03:00.0''' Multimedia audio controller: Creative Labs SB Audigy (rev 03)<br />
'''03:01.0''' Multimedia audio controller: VIA Technologies Inc. VT1720/24 [Envy24PT/HT] PCI Multi-Channel Audio Controller (rev 01)}}<br />
<br />
==== Checklist ====<br />
<br />
The steps below are mostly to double-check that you have a working multimedia system:<br />
* Have I set up sound properly? See [[ALSA]] or [[OSS]].<br />
<br />
$ speaker-test<br />
<br />
* Is PulseAudio, OSS or something else grabbing my device?<br />
<br />
$ lsof +c 0 /dev/snd/pcm* /dev/dsp*<br />
<br />
-OR-<br />
<br />
$ fuser -fv /dev/snd/pcm* /dev/dsp* <br />
<br />
* Is PAM-security and realtime working OK?<br />
<br />
See: [[Realtime for Users#PAM-enabled login]] (Pay special attention especially if you do not run KDM, GDM or Slim.)<br />
<br />
* Have I rebooted after having done all that?<br />
<br />
=== JACK ===<br />
<br />
The aim here is to find the best possible combination of buffer size and periods, given the hardware you have. '''Frames/Period = 256''' is a sane starter. For onboard and USB devices, try '''Periods/Buffer = 3'''. Commonly used values are: 256/3, 256/2, 128/3.<br />
<br />
Also, the sample rate must match the hardware sample rate. To check what sample and bit rates your device supports:<br />
$ cat /proc/asound/card0/codec#0<br />
Replace ''card0'' and ''codec#0'' depending on what you have. You will be looking for '''rates''' or ''VRA'' in '''Extended ID'''. A common sample rate across many of today's devices is '''48000 Hz'''. Others common rates include 44100 Hz and 96000 Hz.<br />
<br />
Almost always, when recording or sequencing with external gear is concerned, '''realtime''' is a must. Also, you may like to set maximum priority (at least 10 lower than system limits defined in {{ic|/etc/security/limits.d/99-realtime-privileges.conf}}); the highest is for the device itself).<br />
<br />
Start jack with the options you just found out:<br />
$ /usr/bin/jackd -R -P89 -dalsa -dhw:0 -r48000 -p256 -n3<br />
<br />
{{pkg|qjackctl}}, {{Pkg|cadence}} and {{pkg|patchage}} can all be used to as GUIs to monitor JACK's status and simplify its configuration . <br />
<br />
{{Note|Once you set up JACK, try different audio applications to test your configuration results. I spent days trying to troubleshoot JACK xrun issues with LMMS which in the end turned out to be the problem with the latter.}}<br />
<br />
''Further reading: [http://www.linux-magazine.com/content/download/63041/486886/version/1/file/JACK_Audio_Server.pdf Linux Magazine article]''<br />
<br />
==== FireWire ====<br />
<br />
{{Note|Nothing much is needed to be done as most things have been automated, especially with the introduction of the [https://ieee1394.wiki.kernel.org/articles/j/u/j/Juju_Migration_e8a6.html new FireWire stack], deprecation of HAL and more focus on [[udev]]. You should not need to edit device permissions, but if you suspect that your device may not be working due to such issues, see {{ic|/lib/udev/rules.d/60-ffado.rules}} and if needed, create and put your changes into {{ic|/etc/udev/rules.d/60-ffado.rules}}.}}<br />
<br />
JACK(2) is built against FFADO, you only need to install it with the {{Pkg|libffado}} package.<br />
<br />
To test whether you have any chances of getting FireWire devices to work:<br />
<br />
* Ensure the proper kernel modules are loaded:<br />
<br />
# modprobe firewire-core firewire-ohci<br />
<br />
* Is my chipset sane enough to initiate a device?<br />
<br />
http://www.ffado.org/?q=node/622<br />
<br />
* Is my chipset sane enough to make a device work to its capacity?<br />
<br />
We cannot say for sure, particularly for those based on Ricoh (cross-platform issue). Most of the time, your device will run fine, but on occasion you will be faced with funny quirks. For unlucky ones, you will be facing hell.<br />
<br />
{{Note|As stated by Takashi Sakamoto [http://mailman.alsa-project.org/pipermail/alsa-devel/2014-September/081731.html on the alsa-devel mailing list], if you use the FireWire backend with jackd, the DICE module is incompatible. If you see a line like this :<br />
Warning (dice_eap.cpp)[1811] read: No routes found. Base 0x7, offset 0x4000<br />
you need to disable the "snd_dice" module.}}<br />
<br />
==== Jack Flash ====<br />
<br />
If after getting jack setup you will find that Flash has no audio.<br />
<br />
In order to get flash to work with jack you will need to [[install]] the {{AUR|libflashsupport-jack}} package.<br />
<br />
You can also use more flexible method to allow Alsa programs (including Flash) play sound while jack is running:<br />
<br />
First you must install the jack plugin for Alsa by [[install]]ing the {{Pkg|alsa-plugins}} package. Enable it by editing (or creating) {{Ic|/etc/asound.conf}} (system wide settings) to have these lines:<br />
<br />
{{Bc|<br />
# convert alsa API over jack API<br />
# use it with<br />
# % aplay foo.wav<br />
<br />
# use this as default<br />
pcm.!default {<br />
type plug<br />
slave { pcm "jack" }<br />
}<br />
<br />
ctl.mixer0 {<br />
type hw<br />
card 1<br />
}<br />
<br />
# pcm type jack<br />
pcm.jack {<br />
type jack<br />
playback_ports {<br />
0 system:playback_1<br />
1 system:playback_2<br />
}<br />
capture_ports {<br />
0 system:capture_1<br />
1 system:capture_2<br />
}<br />
}<br />
}}<br />
<br />
You do not need to restart your computer or anything. Just edit the alsa config files, start up jack.<br />
<br />
==== Quickscan JACK script ====<br />
<br />
Most people will probably want to run JACK in realtime mode, there are however a lot of knobs and buttons to press in order for that to happen.<br />
<br />
A great way to quickly diagnose your system and find out what it is missing in order to have JACK work properly in real time mode is to run the Quickscan script. <br />
<br />
git clone git://github.com/raboof/realtimeconfigquickscan.git<br />
cd realtimeconfigquickscan<br />
perl ./realTimeConfigQuickScan.pl<br />
<br />
The output should tell you where your system is lacking and will point you to places to find more information.<br />
<br />
==== Desktop Effects vs JACK ====<br />
<br />
In addition to the factors listed under the System Configuration section above as well as the settings checked by realTimeConfigQuickScan.pl, it is also worth noting that desktop environments can cause xruns and hence JACK audio glitches, especially memory/process intensive ones and those desktops that utilize composited desktop effects. It is recommended you disable desktop effects when using JACK. You are likely to get the least xruns and best performance by running a lightweight desktop or just a window manager instead.<br />
<br />
==== A general example ====<br />
<br />
A general configuration example is [[JACK Audio Connection Kit#A shell-based example setup]].<br />
<br />
== Realtime kernel ==<br />
<br />
Since a while ago, the stock Linux kernel has proven to be adequate for realtime uses. The stock kernel (with {{Ic|CONFIG_PREEMPT&#61;y}}, default in Arch) can operate with a worst case latency of [https://rt.wiki.kernel.org/index.php/Frequently_Asked_Questions#What_are_real-time_capabilities_of_the_stock_2.6_linux_kernel.3F upto 10ms] (time between the moment an interrupt occurs in hardware, and the moment the corresponding interrupt-thread gets running), although some device drivers can introduce latency much worse than that. So depending on your hardware and driver (and requirement), you might want a kernel with hard realtime capabilities.<br />
<br />
The [https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO RT_PREEPMT] patch by Ingo Molnar and Thomas Gleixner is an interesting option for hard and firm realtime applications, reaching from professional audio to industrial control. <br />
Most audio-specific distro Linux ships with this patch applied. A realtime-preemptible kernel will also make it possible to tweak priorities of IRQ handling threads and help ensure smooth audio almost regardless of the load.<br />
<br />
If you are going to compile your own kernel, remember that removing modules/options does not equate to a "leaner and meaner" kernel. It is true that the size of the kernel image is reduced, but in today's systems it is not as much of an issue as it was back in '''1995'''. <br />
<br />
In any way, you should also ensure that:<br />
* '''Timer Frequency''' is set to '''1000Hz''' (CONFIG_HZ_1000=y; if you do not do ''MIDI'' you can ignore this)<br />
* '''APM''' is '''DISABLED''' (CONFIG_APM=n; Troublesome with some hardware - default in x86_64)<br />
<br />
If you truly want a slim system, we suggest you go your own way and deploy one with ''static /devs''. You should, however, set your CPU architecture. Selecting "Core 2 Duo" for appropriate hardware will allow for a good deal of optimisation, but not so much as you go down the scale.<br />
<br />
General issue(s) with (realtime) kernels:<br />
<br />
* Hyperthreading (if you suspect, disable in BIOS)<br />
<br />
There are ready-to-run/compile patched kernels available in the ABS and AUR.<br />
<br />
{{note|Before you decide to use a patched kernel, see [http://jackaudio.org/faq/realtime_vs_realtime_kernel.html http://jackaudio.org/faq/realtime_vs_realtime_kernel.html].}}<br />
<br />
=== AUR ===<br />
<br />
From the [[AUR]] itself, you have the following options:<br />
<br />
* {{AUR|linux-rt}}<br />
* {{AUR|linux-rt-lts}} (Long Term Support, stable release)<br />
<br />
The first two are standard kernels with the CONFIG_PREEMPT_RT patch, while -ice includes patches some may consider to be nasty, while to others are a blessing.<br />
:''See: [https://rt.wiki.kernel.org/ Real-Time Linux Wiki]''<br />
<br />
==== Binaries ====<br />
<br />
Some users provide binaries for the AUR packages above in [[Unofficial user repositories]]:<br />
<br />
* [https://www.suruatoel.xyz/arch coderkun-aur-audio]<br />
<br />
== MIDI ==<br />
To decrease MIDI jitter when using external MIDI equipment jack2's -Xalsarawmidi option should be used. When doing this you need to use a2jmidid, too.<br />
<br />
With [https://github.com/koppi/alsa-midi-latency-test alsa-midi-latency-test] you could test how much jitter you get. PCI and PCIe cards are usually much better than USB MIDI devices.<br />
<br />
To work with MIDI, it is highly recommended that you install a2j ({{Pkg|a2jmidid}}), a bridge between alsa midi and jack midi. It allows you to connect applications that only communicate with alsa midi to applications that only use jack midi. Laditray can also start/stop a2j.<br />
:''See: [[JACK#MIDI]]''<br />
<br />
== Environment variables ==<br />
<br />
If you install things to non-standard directories, it is often necessary to set environment path variables so that applications know where to look (for plug-ins and other libraries). This usually affects only VST since users might have a Wine or external Windows location.<br />
<br />
We would usually not have Linux plug-ins (LADSPA, LV2, DSSI, LXVST) beyond standard paths, so it is not necessary to export them. But if you do, be sure to include those standard paths as well since Arch does not do anything for ''dssi'' or ''ladspa'', and some applications like ''dssi-vst'' will not look anywhere else if it finds predefined paths.<br />
<br />
{{hc|~/.bashrc|2=<br />
...<br />
export VST_PATH=/usr/lib/vst:/usr/local/lib/vst:~/.vst:/someother/custom/dir<br />
export LXVST_PATH=/usr/lib/lxvst:/usr/local/lib/lxvst:~/.lxvst:/someother/custom/dir<br />
export LADSPA_PATH=/usr/lib/ladspa:/usr/local/lib/ladspa:~/.ladspa:/someother/custom/dir<br />
export LV2_PATH=/usr/lib/lv2:/usr/local/lib/lv2:~/.lv2:/someother/custom/dir<br />
export DSSI_PATH=/usr/lib/dssi:/usr/local/lib/dssi:~/.dssi:/someother/custom/dir<br />
}}<br />
<br />
== Tips and tricks ==<br />
<br />
* Disable WiFi and close any programs that don't need to be open when recording such as browsers. Many have reported disabling WiFi has led to more reliable JACK performance.<br />
<br />
* Some USB audio hardware is known not to work properly when plugged into USB 3 ports so try USB 2/1 ports instead. <br />
<br />
* IRQ issues can occur and cause problems. An example is video hardware reserving the bus, causing needless interrupts in the system I/O path. See discussion at [http://subversion.ffado.org/wiki/IrqPriorities FFADO IRQ Priorities How-To]. If you have a realtime or a recent kernel, you can use {{Pkg|rtirq}} to adjust priorities of IRQ handling threads.<br />
<br />
* Do not use the '''irqbalance''' daemon, or do so carefully [http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.3/html/Realtime_Tuning_Guide/sect-Realtime_Tuning_Guide-General_System_Tuning-Interrupt_and_Process_Binding.html].<br />
<br />
* If you need to use multiple audio devices with JACK2, the '''alsa_in''' and '''alsa_out''' utilities. can be used to have extra devices wrapped and show up as outputs in the JACK patchbay.<br />
<br />
* Some daemons/processes can unexpectedly cause '''xruns'''. If you do not need it - kill it. No questions asked.<br />
<br />
$ ls /var/run/daemons<br />
$ top # or htop, ps aux, whatever you are comfortable with<br />
$ killall -9 $processname<br />
# systemctl stop $daemonname<br />
<br />
* If you are facing a lot of ''xruns'' especially with {{Pkg|nvidia}}, disable your GPU throttling. This can be done via the card's control applet and for nvidia it is "prefer maximum performance" (thanks to a mail in LAU by Frank Kober).<br />
<br />
* You may like to read more on ALSA: http://www.volkerschatz.com/noise/alsa.html<br />
<br />
== Hardware ==<br />
The majority of sound cards and audio devices will work with no extra configuration or packages, simply set the sound card jack is using to them and restart.<br />
<br />
This is not true for all devices, and so special cases are also listed.<br />
<br />
=== M-Audio Delta 1010 ===<br />
<br />
The M-Audio Delta series cards are based on the VIA Ice1712 audio chipset.<br />
Cards using this chip require that you install the alsa-tools package, because <br />
it contains the [[envy24control]] program. [[Envy24control]] is a hardware level<br />
mixer/controller. You ''can'' use alsa-mixer but you will save yourself some<br />
hassle not to try it. Note that this section has no information on MIDI setup or<br />
usage. <br />
<br />
Open the mixer application:<br />
$ envy24control<br />
<br />
This application can be more than a bit confusing; see [[envy24control]] for guidance<br />
on its use. That said, here is a very simple working setup for multitracking with Ardour.<br />
<br />
# On the "Monitor Inputs" and "Monitor PCMs" tabs, set all monitor inputs and monitor PCM's to around 20.<br />
# On the "Patchbay / Router" tab, set all to PCM out.<br />
# On the "Hardware Settings" tab, verify that the Master Clock setting matches what is set in Qjackctl. If these do not match you will have xruns out of control!<br />
<br />
=== M-Audio Fast Track Pro ===<br />
<br />
The M-Audio Fast Track Pro is an USB 4x4 audio interface, working at 24bit/96kHz. Due to limitation of USB 1, this device requires additional setup to get access to all its features. Device works in one of two configuration:<br />
<br />
* Configuration 1, or "Class compliant mode" - with reduced functionality, only 16bit, 48kHz, analogue input (2 channels) and digital/analogue output (4 channels).<br />
* Configuration 2 - with access to all features of interface.<br />
<br />
Currently with stock kernel it runs in configuration 2, but if you want to make sure in what mode you are, you can check kernel log for entries:<br />
<br />
usb-audio: Fast Track Pro switching to config #2<br />
usb-audio: Fast Track Pro config OK<br />
<br />
The interface also needs extra step of cofiguration to switch modes. It is done using option {{ic|device_setup}} during module loading. The recommended way to setup the interface is using file in {{ic|modprobe.d}}:<br />
{{hc|/etc/modprobe.d/ftp.conf|2=<br />
options snd_usb_audio vid=0x763 pid=0x2012 device_setup=XXX index=YYY enable=1<br />
}}<br />
where {{ic|vid}} and {{ic|pid}} are vendor and product id for M-Audio Fast Track Pro, {{ic|index}} is desired device number and {{ic|device_setup}} is desired device setup. Possible values for {{ic|device_setup}} are:<br />
<br />
{| class="wikitable"<br />
|+ device modes<br />
! device_setup value !! bit depth !! frequency !! analog output !! digital output !! analog input !! digital input !! IO mode<br />
|-<br />
| 0x0 || 16 bit || 48kHz || + || + || + || + || 4x4<br />
|-<br />
| 0x9 || 24 bit || 48kHz || + || + || + || - || 2x4<br />
|-<br />
| 0x13 || 24 bit || 48kHz || + || + || - || + || 2x4<br />
|-<br />
| 0x5 || 24 bit || 96kHz || * || * || * || * || 2x0 or 0x2<br />
|}<br />
<br />
The 24 bit/96kHz mode is special: it provides all input/output, but you can open only one of 4 interfaces at a time. If you for example open output interface and then try to open second output or input interface, you will see error in kernel log:<br />
<br />
cannot submit datapipe for urb 0, error -28: not enough bandwidth<br />
<br />
which is perfectly normal, because this is USB 1 device and cannot provide enough bandwidth to support more than single (2 channel) destination/source of that quality at a time.<br />
<br />
Depending on the value of {{ic|index}} it will setup two devices: {{ic|hwYYY:0}} and {{ic|hwYYY:1}}, which will contain available inputs and outputs. First device is most likely to contain analog output and digital input, while second one will contain analog input and digital output. To find out which devices are linked where and if they are setup correctly, you can check {{ic|/proc/asound/cardYYY/stream{0,1} }}. Below is list of important endpoints that will help in correctly identifying card connections (it easy to mistake analog and digital input or output connections before you get used to the device):<br />
<br />
EP 3 (analgoue output = TRS on back, mirrored on RCA outputs 1 and 2 on back)<br />
EP 4 (digital output = S/PDIF output on back, mirrored on RCA outputs 3 and 4 on back)<br />
EP 5 (analogue input = balanced TRS or XLR microphone, unbalanced TS line on front)<br />
EP 6 (digital input = S/PDIF input on back)<br />
<br />
This .asoundrc file enables 24-bit IO on the fast-track pro (and I'm sure it could be modified to work with other 3-byte usb devices) within the context of jack's 32-bit interface while routing default alsa traffic to jack outputs on the audio interface. Alsa will be in S24_3BE mode but jack can plug S32_LE data in and out of the interface and other alsa programs will be able to plug almost anything into jack.<br />
<br />
{{bc|<nowiki><br />
### ~/.asoundrc<br />
### default alsa config file, for a fast-track pro configured in 24-bit mode as so:<br />
### options snd_usb_audio device_setup=0x9<br />
### invoke jack with: (if you use -r48000, change the rate in the plugs as well)<br />
### $jackd -dalsa -P"hw:Pro" -C"hw:Pro,1" -r44100<br />
<br />
## setup input and output plugs so jack can write S24_3BE data to the audio interface<br />
<br />
pcm.maud0 {<br />
type hw<br />
card Pro<br />
}<br />
<br />
#jack_out plug makes sure that S32_LE data can be written to hw:Pro<br />
pcm.jack_out{<br />
type plug<br />
format S32_LE<br />
channels 2<br />
rate 44100<br />
slave pcm.maud0<br />
}<br />
<br />
pcm.maud1 {<br />
type hw<br />
card Pro<br />
device 1<br />
}<br />
## jack_in plug makes sure that hw:Pro,1 can read S32_LE data<br />
pcm.jack_in {<br />
type plug<br />
format S32_LE<br />
channels 2<br />
rate 44100<br />
slave pcm.maud1<br />
}<br />
#####<br />
# route default alsa traffic through jack system io<br />
<br />
pcm.jack {<br />
type jack<br />
playback_ports {<br />
0 system:playback_1<br />
1 system:playback_2<br />
}<br />
capture_ports {<br />
0 system:capture_1<br />
1 system:capture_2<br />
}<br />
} <br />
pcm.amix {<br />
type asym<br />
playback.pcm "jack"<br />
capture.pcm "jack"<br />
}<br />
pcm.!default {<br />
type plug<br />
slave.pcm amix<br />
}<br />
</nowiki>}}<br />
<br />
=== PreSonus Firepod ===<br />
<br />
#Startup: Either from command line or QjackCtl, the driver is called firewire.<br />
#Specs: The card contains 8/8 preamp'ed XLR plus a stereo pair, in total 10 channels.<br />
#Linking: Cards can be linked together without any problems.<br />
#Hardware Settings: Nothing particular, tweak the settings in QjackCtl to your likings.<br />
<br />
Volume levels are hardware and routing can be done through QjackCtl, even with more cards linked together, this is not a problem.<br />
The ffadomixer does not work with this card yet, hopefully in the future we can control more aspects of the card through a software interface like that.<br />
<br />
=== PreSonus AudioBox USB ===<br />
<br />
#Startup: It is called "USB" by ALSA. <br />
#Specs: Two mono TRS+XLR in, two mono TRS out, MIDI in and out, plus separate stereo headphone jack. Knob controls for both inputs, for main out, and for headphone, four in all.<br />
#Hardware: Works very well, audio and MIDI too. No software mixer controls at all.<br />
<br />
===Tascam US-122===<br />
'''''This does not apply to the US-122L'''''<br />
<br />
# Required packages: {{Pkg|alsa-tools}} {{Pkg|alsa-firmware}} {{Aur|fxload}}<br />
# udev rules: create the following rules file, then reload udev rules, [[Udev#Loading new rules]]<br />
{{hc|/etc/udev/rules.d/51-tascam-us-122.rules|<nowiki>SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idProduct}=="8006", ATTRS{idVendor}=="1604", RUN+="/bin/sh -c '/sbin/fxload -D %N -s /usr/share/alsa/firmware/usx2yloader/tascam_loader.ihx -I /usr/share/alsa/firmware/usx2yloader/us122fw.ihx'"<br />
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idProduct}=="8007", ATTRS{idVendor}=="1604", RUN+="/bin/sh -c '/usr/bin/usx2yloader'"</nowiki><br />
}}<br />
Plug in the unit<br />
The device should now be working, there are no software mixer controls<br />
<br />
=== RME Babyface ===<br />
<br />
It works very well at low latencies (~5ms) with {{Pkg|alsa-utils}}, {{Pkg|jack2}} and {{AUR|linux-rt}}. Running on ALSA only with the standard kernel may cause crackling at lower latencies.<br />
<br />
To be recognized and work, the firmware version of the Babyface needs to be >= 200, which introduces the Class Compliant Mode. To enter Class Compliant Mode hold the "Select" and "Recall" buttons while connecting the Babyface to the computer via USB. It should now be recognized. <br />
<br />
To check if it is recognized:<br />
<br />
grep -i baby /proc/asound/cards<br />
<br />
For more info about the Class Compliant Mode visit RME's website, they have PDF which covers all the functionality.<br />
<br />
The Babyface does not need any special Jack Settings. But if you want to use the built in MIDI In/Out then you need to set the "MIDI Driver" to "seq" and optionally disable "Enable Alsa Sequencer Support" to use it in combination with other MIDI Devices (a USB Midi Keyboard for example).<br />
<br />
== Restricted software ==<br />
<br />
=== Steinberg's SDKs ===<br />
<br />
It is very clear - we can distribute neither the VST nor the ASIO headers in '''binary package form'''. However, whenever you are building a program which would host Windows ''.dll'' VST plug-ins, check for the following hints (that do not require use of any SDK):<br />
<br />
* dssi-vst<br />
* fst<br />
* vestige<br />
<br />
With that said, if you are building a program which would host native ''.so'' VST plug-ins, then there is no escape. For such cases, Arch yet again allows us to maintain a uniform local software database. We can "install" the SDK ''system-wide'' - you simply have to download it yourself and place it in the packaging directory.<br />
<br />
[https://aur.archlinux.org/packages.php?O=0&K=steinberg-&do_Search=Go Get them from AUR]<br />
<br />
''Note: Steinberg does not forbid redistribution of resulting products, nor dictate what license they can be under. There are many GPL-licensed VST plug-ins. As such, distributing binary packages of software built with these restricted headers is '''not''' a problem, because the headers are simply '''buildtime dependencies'''.''<br />
<br />
== Linux and Arch Linux Pro Audio in the news ==<br />
<br />
* [https://www.linux.com/learn/tutorials/607117-build-a-serious-multimedia-production-workstation-with-arch-linux Build a Serious Multimedia Production Workstation with Arch] - Linux.com article, July 2012<br />
* [http://www.linuxjournal.com/content/arch-tale An Arch Tale] - Article by fellow musician and writer Dave Phillips, October 2011<br />
* [http://www.itwire.com/opinion-and-analysis/open-sauce/36698-from-windows-to-linux-a-sound-decision From Windows to Linux: a sound decision] - Interview with Geoff "songshop" Beasley, February 2010<br />
<br />
== Mailing lists ==<br />
<br />
* [https://lists.archlinux.org/listinfo/arch-proaudio Arch Linux Pro-audio] Discussion about real-time multimedia, including (semi-)pro audio and video<br />
* [https://lists.linuxaudio.org/listinfo/linux-audio-dev Linux Audio Developer] The Linux pro-audio related mailing list with much traffic and a huge subscriber community of mainly developers.<br />
* [https://lists.linuxaudio.org/listinfo/linux-audio-user Linux Audio User] The Linux pro-audio related mailing list with much traffic and a huge subscriber community of users and developers.<br />
<br />
== IRC ==<br />
<br />
* #archlinux-proaudio on freenode.net: Arch Linux pro-audio channel<br />
* #lau on freenode.net: General Linux Audio channel for users<br />
* #lad on freenode.net: General Linux AUdio channel for developers<br />
* #opensourcemusicians on freenode.net: Large general OSS musician discussion channel<br />
<br />
== See also ==<br />
<br />
* [[List of applications#Audio|Audio]] A comprehensive list of audio applications on Arch Linux<br />
* [[Realtime kernel]]<br />
* [https://github.com/nodiscc/awesome-linuxaudio awesome-linuxaudio] A list of software and resources for professional audio/video/live events production on the Linux platform<br />
* [https://wiki.linuxfoundation.org/realtime/start Realtime] The Linux Foundation wiki on the PREEMPT_RT patches<br />
* [http://archaudio.org ArchAudio] - the now legacy - pro-audio related package repository overlay ([https://bbs.archlinux.org/viewtopic.php?id=30547 some history])</div>Jose1711https://wiki.archlinux.org/index.php?title=Wine&diff=535788Wine2018-08-17T08:01:42Z<p>Jose1711: /* CSMT */ - Add a note that disabling CSMT may help to improve performance</p>
<hr />
<div>[[Category:Emulation]]<br />
[[Category:Gaming]]<br />
[[cs:Wine]]<br />
[[de:Wine]]<br />
[[es:Wine]]<br />
[[fr:Wine]]<br />
[[it:Wine]]<br />
[[ja:Wine]]<br />
[[ru:Wine]]<br />
[[zh-hans:Wine]]<br />
[[zh-hant:Wine]]<br />
{{Related articles start}}<br />
{{Related|CrossOver}}<br />
{{Related|Wine package guidelines}}<br />
{{Related articles end}}<br />
[[Wikipedia:Wine (software)|Wine]] is a ''compatibility layer'' capable of running Microsoft Windows applications on Unix-like operating systems. Programs running in Wine act as native programs would, without the performance/memory penalties of an emulator.<br />
<br />
{{Warning|If you can access a file or resource with your user account, programs running in Wine can too. See [[#Running Wine under a separate user account]] and [[Security#Sandboxing applications]] for possible precautions.}}<br />
<br />
== Installation ==<br />
<br />
Wine can be installed by enabling the [[multilib]] repository and [[install]]ing the {{Pkg|wine}} (stable) or {{Pkg|wine-staging}} (testing) package. [https://wine-staging.com/ Wine Staging] is a patched version of [https://www.winehq.org/ Wine], which contains bug fixes and features that have not been integrated into the stable branch yet. See also [[#Graphics drivers]] and [[#Sound]].<br />
<br />
Consider installing {{pkg|wine_gecko}} and {{pkg|wine-mono}} for applications that depend on Internet Explorer and .NET, respectively. These packages are not strictly required as Wine will download the relevant files as needed. However, having the files downloaded in advance allows you to work off-line and makes it so Wine does not download the files for each Wine prefix needing them.<br />
<br />
== Configuration ==<br />
Configuring Wine is typically accomplished using:<br />
* [https://wiki.winehq.org/Winecfg winecfg] is a GUI configuration tool for Wine, which can be started by running {{ic|winecfg}}.<br />
* [https://wiki.winehq.org/Regedit regedit] is Wine's registry editing tool, which can be started by running {{ic|regedit}}. See WineHQ's article on [https://wiki.winehq.org/Useful_Registry_Keys Useful Registry Keys].<br />
* [https://wiki.winehq.org/Control control] is Wine's implementation of the Windows Control Panel, which can be started by running {{ic|wine control}}.<br />
* See WineHQ's [https://wiki.winehq.org/List_of_Commands List of Commands] for the full list.<br />
<br />
=== WINEPREFIX ===<br />
By default, Wine stores its configuration files and installed Windows programs in {{ic|~/.wine}}. This directory is commonly called a "Wine prefix" or "Wine bottle". It is created/updated automatically whenever you run a Windows program or one of Wine's bundled programs such as ''winecfg''. The prefix directory also contains a tree which your Windows programs will see as {{ic|C:}} (the C-drive).<br />
<br />
You can override the location Wine uses for a prefix with the {{ic|WINEPREFIX}} [[environment variable]]. This is useful if you want to use separate configurations for different Windows programs. The first time a program is run with a new Wine prefix, Wine will automatically create a directory with a bare C-drive and registry.<br />
<br />
For example, if you run one program with {{ic|1= $ env WINEPREFIX=~/.win-a wine program-a.exe}}, and another with {{ic|1= $ env WINEPREFIX=~/.win-b wine program-b.exe}}, the two programs will each have a separate C-drive and separate registries.<br />
<br />
{{Note|Wine prefixes are not [[Wikipedia:Sandbox (computer security)|sandboxes]]! Programs running under Wine can still access the rest of the system! (for example, {{ic|Z:}} is mapped to {{ic|/}}, regardless of the Wine prefix).}}<br />
<br />
To create a default prefix without running a Windows program or other GUI tool you can use:<br />
$ env WINEPREFIX=~/.customprefix wineboot -u<br />
<br />
=== WINEARCH ===<br />
<br />
Wine will start an 64-bit environment by default. You can change this behavior using the {{ic|WINEARCH}} [[environment variable]]. Rename your {{ic|~/.wine}} directory and create a new Wine environment by running {{ic|1=$ WINEARCH=win32 winecfg}}. This will get you a 32-bit Wine environment. Not setting {{ic|WINEARCH}} will get you a 64-bit one.<br />
<br />
You can combine this with {{ic|WINEPREFIX}} to make a separate {{ic|win32}} and {{ic|win64}} environment:<br />
<br />
$ WINEARCH=win32 WINEPREFIX=~/win32 winecfg<br />
$ WINEPREFIX=~/win64 winecfg<br />
<br />
You can also use {{ic|WINEARCH}} in combination with other Wine programs, such as ''winetricks'' (using Steam as an example):<br />
<br />
WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefixes/steam winetricks steam<br />
<br />
=== Graphics drivers ===<br />
<br />
You need to install the 32-bit version of your graphics driver. Please install the package that is listed in the ''OpenGL (multilib)'' column in the table in [[Xorg#Driver installation]].<br />
<br />
A good sign that your drivers are inadequate or not properly configured is when Wine reports the following in your terminal window:<br />
Direct rendering is disabled, most likely your OpenGL drivers have not been installed correctly<br />
<br />
{{Note|You might need to restart X after having installed the correct library.}}<br />
<br />
=== Sound ===<br />
<br />
By default sound issues may arise when running Wine applications. Ensure only one sound device is selected in ''winecfg''.<br />
<br />
* If you want to use the [[ALSA]] driver in Wine, you will need to install {{Pkg|lib32-alsa-lib}} and {{Pkg|lib32-alsa-plugins}}.<br />
* If you want to use the [[PulseAudio]] driver in Wine, you will need to install the {{Pkg|lib32-libpulse}} package.<br />
* If you want to use the [[OSS]] driver in Wine, you will need to install the {{Pkg|lib32-alsa-oss}} package. The OSS driver in the kernel will not suffice.<br />
* Games that use advanced sound systems (''e.g.'' TESV: Skyrim) may additionally require installations of {{Pkg|lib32-openal}}.<br />
<br />
If ''winecfg'' '''still''' fails to detect the audio driver (Selected driver: (none)), [https://www.winehq.org/docs/wineusr-guide/using-regedit#Configuring_Sound configure it via the registry]. For example, in a case where the microphone was not working in a 32-bit Windows application on a 64-bit stock install of wine-1.9.7, this provided full access to the sound hardware (sound playback and mic): open ''regedit'', look for the key HKEY_CURRENT_USER → Software → Wine → Drivers, and add a string called ''Audio'' and give it the value ''alsa''. Also, it may help to [[#WINEARCH|recreate the prefix]]. <br />
<br />
==== MIDI support ====<br />
<br />
[[MIDI]] was a quite popular system for video games music in the 90's. If you are trying out old games, it is not uncommon that the music will not play out of the box.<br />
Wine has excellent MIDI support. However you first need to make it work on your host system, as explained in [[MIDI]]. Last but not least you need to make sure Wine will use the correct MIDI output.<br />
<br />
=== Other libraries ===<br />
<br />
*Some applications (e.g. Office 2003/2007) require the MSXML library to parse HTML or XML, in such cases you need to install {{Pkg|lib32-libxml2}}.<br />
<br />
*Some applications that play music may require {{Pkg|lib32-mpg123}}.<br />
<br />
*Some applications that use a color management engine (e.g. pdf viewers, image viewers, etc) may require {{Pkg|lib32-lcms2}}.<br />
<br />
*Some applications that use native image manipulation libraries may require {{Pkg|lib32-giflib}} and {{Pkg|lib32-libpng}}.<br />
<br />
*Some applications that require encryption support may require {{Pkg|lib32-gnutls}}.<br />
<br />
*Some applications require 32-bit video codecs or the program crashes. Install {{Pkg|lib32-gst-plugins-base}}, {{Pkg|lib32-gst-plugins-good}}, {{Aur|lib32-gst-plugins-bad}} and {{Aur|lib32-gst-plugins-ugly}}.<br />
<br />
=== Fonts ===<br />
<br />
If Wine applications are not showing easily readable fonts, you may not have any fonts installed. To easily link all of the system fonts so they are accessible from wine:<br />
<br />
cd ${WINEPREFIX:-~/.wine}/drive_c/windows/Fonts && for i in /usr/share/fonts/**/*.{ttf,otf}; do ln -s "$i" ; done<br />
<br />
Wine uses freetype to render fonts, and freetype's defaults changed a few releases ago. Try using this environment setting for wine programs:<br />
<br />
FREETYPE_PROPERTIES="truetype:interpreter-version=35"<br />
<br />
Another possibility is to install Microsoft's Truetype fonts into your wine prefix. See [[MS Fonts]]. If this does not help, try running {{ic|winetricks corefonts}} first, then {{ic|winetricks allfonts}} as a last resort.<br />
<br />
After running such programs, kill all Wine servers and run {{ic|winecfg}}. Fonts should be legible now.<br />
<br />
If the fonts look somehow smeared, import the following text file into the Wine registry with [https://wiki.winehq.org/FAQ#How_do_I_edit_the_Wine_registry.3F regedit]:<br />
<br />
Windows Registry Editor Version 5.00<br />
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]<br />
"ClientSideWithRender"="N"<br />
<br />
For high resolution displays, you can adjust dpi values in winecfg.<br />
<br />
See also [[Font configuration#Applications without fontconfig support]].<br />
<br />
==== Enable font smoothing ====<br />
A good way to improve wine font rendering is to enable cleartype font smoothing.<br />
To enable "Subpixel smoothing (ClearType) RGB":<br />
<br />
{{bc|<nowiki>cat << EOF > /tmp/fontsmoothing<br />
REGEDIT4<br />
<br />
[HKEY_CURRENT_USER\Control Panel\Desktop]<br />
"FontSmoothing"="2"<br />
"FontSmoothingOrientation"=dword:00000001<br />
"FontSmoothingType"=dword:00000002<br />
"FontSmoothingGamma"=dword:00000578<br />
EOF<br />
<br />
WINE=${WINE:-wine} WINEPREFIX=${WINEPREFIX:-$HOME/.wine} $WINE regedit /tmp/fontsmoothing 2> /dev/null</nowiki>}}<br />
<br />
For more information, check [https://askubuntu.com/a/219795/514682 the original answer]<br />
<br />
=== Desktop launcher menus ===<br />
<br />
When a Windows application installer creates a shortcut Wine creates a {{ic|.desktop}} file instead. The default locations for those files in Arch Linux are:<br />
* Desktop shortcuts are put in {{ic|~/Desktop}}<br />
* Start menu shortcuts are put in {{ic|~/.local/share/applications/wine/Programs/}}<br />
<br />
{{Note|1=Wine does not support installing Windows applications for all users, so it will not put {{ic|.desktop}} files in {{ic|/usr/share/applications}}. See WineHQ bug [https://bugs.winehq.org/show_bug.cgi?id=11112 11112]}}<br />
<br />
{{Tip|If menu items were ''not'' created while installing software or have been lost, {{ic|wine winemenubuilder}} may be of some use.}}<br />
<br />
==== Creating menu entries for Wine utilities ====<br />
<br />
By default, installation of Wine does not create desktop menus/icons for the software which comes with Wine (e.g. for ''winecfg'', ''winebrowser'', etc). These instructions will add entries for these applications.<br />
<br />
First, install a Windows program using Wine to create the base menu. After the base menu is created, you can create the following files in {{ic|~/.local/share/applications/wine/}}:<br />
<br />
{{hc|wine-browsedrive.desktop|2=<br />
[Desktop Entry]<br />
Name=Browse C: Drive<br />
Comment=Browse your virtual C: drive<br />
Exec=wine winebrowser c:<br />
Terminal=false<br />
Type=Application<br />
Icon=folder-wine<br />
Categories=Wine;<br />
}}<br />
<br />
{{hc|wine-uninstaller.desktop|2=<br />
[Desktop Entry]<br />
Name=Uninstall Wine Software<br />
Comment=Uninstall Windows applications for Wine<br />
Exec=wine uninstaller<br />
Terminal=false<br />
Type=Application<br />
Icon=wine-uninstaller<br />
Categories=Wine;<br />
}}<br />
<br />
{{hc|wine-winecfg.desktop|2=<br />
[Desktop Entry]<br />
Name=Configure Wine<br />
Comment=Change application-specific and general Wine options<br />
Exec=winecfg<br />
Terminal=false<br />
Icon=wine-winecfg<br />
Type=Application<br />
Categories=Wine;<br />
}}<br />
<br />
And create the following file in {{ic|~/.config/menus/applications-merged/}}:<br />
<br />
{{hc|wine.menu|<nowiki><br />
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"<br />
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd"><br />
<Menu><br />
<Name>Applications</Name><br />
<Menu><br />
<Name>wine-wine</Name><br />
<Directory>wine-wine.directory</Directory><br />
<Include><br />
<Category>Wine</Category><br />
</Include><br />
</Menu><br />
</Menu><br />
</nowiki>}}<br />
<br />
If these settings produce a ugly/non-existent icon, it means that there are no icons for these launchers in the icon set that you have enabled. You should replace the icon settings with the explicit location of the icon that you want. Clicking the icon in the launcher's properties menu will have the same effect. A great icon set that supports these shortcuts is [http://www.gnome-look.org/content/show.php/GNOME-colors?content=82562 GNOME-colors].<br />
<br />
==== Removing menu entries ====<br />
<br />
Menu entries created by Wine are located in {{ic|~/.local/share/applications/wine/Programs/}}. Remove the program's ''.desktop'' entry to remove the application from the menu.<br />
<br />
In addition to remove unwanted extensions binding by Wine, execute the following commands (taken from the Wine website):<br />
$ rm ~/.local/share/mime/packages/x-wine*<br />
$ rm ~/.local/share/applications/wine-extension*<br />
$ rm ~/.local/share/icons/hicolor/*/*/application-x-wine-extension*<br />
$ rm ~/.local/share/mime/application/x-wine-extension*<br />
<br />
=== Appearance ===<br />
<br />
A similar to XP looking theme can be downloaded from [http://download.microsoft.com/download/e/a/9/ea9af5ae-b48e-473e-85fe-dcde7472e644/ZuneDesktopTheme.msi here]. To install it see [https://wiki.winehq.org/Wine_User%27s_Guide#Running_.msi_files here]. Lastly use ''winecfg'' to select it.<br />
<br />
=== Printing ===<br />
<br />
In order to use your installed printers (both local and network) with wine applications in ''win32 prefixes'' (e.g. MS Word), install the {{Pkg|lib32-libcups}} package, reboot wine (''wineboot'') and restart your wine application.<br />
<br />
== Usage ==<br />
<br />
{{Warning|Do not run or install Wine applications as root! See [https://wiki.winehq.org/FAQ#Should_I_run_Wine_as_root.3F Wine FAQ] for details.}}<br />
<br />
See [https://wiki.winehq.org/FAQ Wine FAQ] and [https://wiki.winehq.org/Wine_User%27s_Guide Wine User's Guide] for general information on Wine usage.<br />
<br />
See [https://appdb.winehq.org/ Wine Application Database (AppDB)] for information on running Windows applications in Wine.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Wineconsole ===<br />
<br />
Often you may need to run ''.exe'''s to patch game files, for example a widescreen mod for an old game, and running the ''.exe'' normally through Wine might yield nothing happening. In this case, you can open a terminal and run the following command:<br />
<br />
$ wineconsole cmd<br />
<br />
Then navigate to the directory and run the ''.exe'' file from there.<br />
<br />
=== Winetricks ===<br />
<br />
[https://wiki.winehq.org/Winetricks Winetricks] is a script to allow one to install base requirements needed to run Windows programs. Installable components include DirectX 9.x, MSXML (required by Microsoft Office 2007 and Internet Explorer), Visual Runtime libraries and many more.<br />
<br />
[[Install]] the {{pkg|winetricks}} package (or alternatively {{AUR|winetricks-git}}). Then run it with:<br />
$ winetricks<br />
<br />
=== Performance ===<br />
<br />
==== CSMT ====<br />
<br />
CSMT is a technology used by Wine to use a separate thread for the OpenGL calls to improve performance noticeably. Since Wine 3.3, CSMT is enabled by default. However, CSMT support needs to be enabled manually for Wine versions lower than 3.3. For vanilla Wine run {{ic|wine regedit}} and set the DWORD value for ''HKEY_CURRENT_USER -> Software > Wine > Direct3D > csmt'' to 0x01 (enabled). For wine-staging run {{ic|winecfg}} and enable it in the staging tab.<br />
<br />
Note that CSMT may actually hurt performance for some applications - if this is the case, disable it by creating/setting the registry value to 0x00 (disabled).<br />
<br />
Further information:<br />
*[http://www.phoronix.com/forums/showthread.php?93967-Wine-s-Big-Command-Stream-D3D-Patch-Set-Updated/page3&s=7775d7c3d4fa698089d5492bb7b1a435 Phoronix Forum discussion] with the CSMT developer Stefan Dösinger<br />
<br />
==== Force OpenGL mode in games ====<br />
<br />
Some games might have an OpenGL mode which ''may'' perform better than their default DirectX mode. While the steps to enable OpenGL rendering is ''application specific'', many games accept the {{Ic|-opengl}} parameter.<br />
$ wine ''/path/to/3d_game.exe'' -opengl<br />
<br />
You should of course refer to your application's documentation and Wine's [http://appdb.winehq.org AppDB] for such application specific information.<br />
<br />
==== DXVK ====<br />
[https://github.com/doitsujin/dxvk DXVK] is a promising new implementation for DirectX 11 over Vulkan. This should allow for greater performance, and in some cases, even better compatibility. Battlefield 1 for example, only runs under DXVK. On the other hand, DXVK does not support all Wine games (yet).<br />
<br />
To use it, install {{aur|dxvk-bin}} for official binaries, or {{aur|dxvk-git}} for the development version. Then run the following command to activate it in your Wineprefix (by default {{ic|~/.wine}}):<br />
$ WINEPREFIX=''your-prefix'' setup_dxvk64<br />
<br />
Use {{ic|setup_dxvk32}} for 32-bit applications.<br />
<br />
{{note|For Wine versions below 3.5 you need to configure Vulkan support manually, following the instructions at [https://github.com/roderickc/wine-vulkan GitHub]. {{Pkg|wine}}, {{Pkg|wine-staging}} and {{Pkg|wine-staging-nine}} work out of the box.}}<br />
<br />
{{warning|DXVK overrides the DirectX 11 DLLS, which may be considered cheating in online multiplayer games, and may get your account '''banned'''. Use at your own risk!}}<br />
<br />
=== Unregister existing Wine file associations ===<br />
<br />
By default, Wine takes over as the default application for a lot of formats. Some (e.g. {{ic|vbs}} or {{ic|chm}}) are Windows-specific, and opening them with Wine can be a convenience. However, having other formats (e.g. {{ic|gif}}, {{ic|jpeg}}, {{ic|txt}}, {{ic|js}}) open in Wine's bare-bones simulations of Internet Explorer and Notepad can be annoying.<br />
<br />
Wine's file associations are set in {{ic|~/.local/share/applications/}} as {{ic|wine-extension-''extension''.desktop}} files. Delete the files corresponding to the extensions you want to unregister. Or, to remove all wine extensions:<br />
<br />
$ rm -f ~/.local/share/applications/wine-extension*.desktop<br />
$ rm -f ~/.local/share/icons/hicolor/*/*/application-x-wine-extension*<br />
<br />
Next, remove the old cache:<br />
<br />
$ rm -f ~/.local/share/applications/mimeinfo.cache<br />
$ rm -f ~/.local/share/mime/packages/x-wine*<br />
$ rm -f ~/.local/share/mime/application/x-wine-extension*<br />
<br />
And, update the cache:<br />
<br />
$ update-desktop-database ~/.local/share/applications<br />
$ update-mime-database ~/.local/share/mime/<br />
<br />
Alternatively you can delete all wine related stuff:<br />
<br />
$ find ~/.local/share -name "*wine*" | xargs --no-run-if-empty rm -r<br />
<br />
And update the cache as above.<br />
<br />
Please note Wine will still create new file associations and even recreate the file associations if the application sets the file associations again.<br />
<br />
=== Prevent new Wine file associations ===<br />
<br />
Prevent wine from creating any file associations by editing the registry:<br />
<br />
{{hc|1=associations.reg|2=<br />
Windows Registry Editor Version 5.00<br />
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices]<br />
"winemenubuilder"="C:\\windows\\system32\\winemenubuilder.exe -r"<br />
}}<br />
<br />
Add this to your Wine registry, by running {{ic|wine regedit associations.reg}}, or alternatively by running {{ic|wine regedit}} and importing it from the menu in ''Registry > Import Registry File''.<br />
<br />
This has to be done for each WINEPREFIX which should not update file associations.<br />
<br />
You can disable winemenubuilder for all WINEPREFIXes by setting an environment variable:<br />
<br />
$ export WINEDLLOVERRIDES="winemenubuilder.exe=d"<br />
<br />
=== Execute Windows binaries with Wine implicitly ===<br />
<br />
The {{pkg|wine}} package installs a ''binfmt'' file which will allow you to run Windows programs directly, e.g. {{ic|''./myprogram.exe''}} will launch as if you had typed {{ic|wine ''./myprogram.exe''}}. All you have to do in order to use this is to [[start]]/[[enable]] {{ic|systemd-binfmt.service}}.<br />
<br />
{{Note|Make sure the Windows binary is executable, otherwise the binary will not be executed: e.g. run {{ic|chmod +x ''windows-binary''}}.}}<br />
<br />
=== Dual Head with different resolutions ===<br />
<br />
If you have issues with dual-head setups and different display resolutions you are probably missing {{Pkg|lib32-libxrandr}}.<br />
<br />
Also installing {{Pkg|lib32-libxinerama}} might fix dual-head issues with wine.<br />
<br />
=== 16-bit programs ===<br />
<br />
Upon running older Windows 9x programs, the following error may be encountered:<br />
<br />
modify_ldt: Invalid argument<br />
err:winediag:build_module Failed to create module for "krnl386.exe",<br />
16-bit LDT support may be missing.<br />
err:module:attach_process_dlls "krnl386.exe16" failed to initialize,<br />
aborting<br />
<br />
If you need to run these programs under Wine, you will have to [[Kernels/Arch Build System|compile and install a custom kernel]] (unless bug {{Bug|57408}} is fixed). Your kernel config will need the following options:<br />
<br />
CONFIG_X86_16BIT=y<br />
CONFIG_X86_ESPFIX64=y<br />
CONFIG_MODIFY_LDT_SYSCALL=y<br />
<br />
=== Burning optical media ===<br />
<br />
To burn CDs or DVDs, you will need to load the {{ic|sg}} [[kernel module]].<br />
<br />
=== Proper mounting of optical media images ===<br />
<br />
Some applications will check for the optical media to be in drive. They may check for data only, in which case it might be enough to configure the corresponding path as being a CD-ROM drive in ''winecfg''.<br />
However, other applications will look for a media name and/or a serial number, in which case the image has to be mounted with these special properties.<br />
<br />
Some virtual drive tools do not handle these metadata, like fuse-based virtual drives (Acetoneiso for instance). CDEmu will handle it correctly.<br />
<br />
=== Show FPS overlay in games ===<br />
<br />
Wine features an embedded FPS monitor which works for all graphical applications if the environment variable {{ic|1=WINEDEBUG=fps}} is set. This will output the framerate to stdout. You can display the FPS on top of the window thanks to {{ic|osd_cat}} from the {{pkg|xosd}} package. See [https://gist.github.com/anonymous/844aefd70bb50bf72b35 winefps.sh] for a helper script.<br />
<br />
=== Running Wine under a separate user account ===<br />
<br />
It may be desirable to run Wine under a specifically created user account in order to reduce concerns about Windows applications having access to your home directory.<br />
<br />
First, create a [[Users and groups|user account]] for Wine:<br />
<br />
# useradd -m -s /bin/bash wineuser<br />
<br />
Now switch to another TTY and start your X WM or DE as you normally would or keep reading...<br />
<br />
{{Note|The following approach only works when enabling root for Xorg. See [[Xorg#Rootless Xorg]] for more information.}}<br />
<br />
Afterwards, in order to open Wine applications using this new user account you need to add the new user to the X server permissions list:<br />
<br />
$ xhost +SI:localuser:wineuser<br />
<br />
Finally, you can run Wine via the following command, which uses {{ic|env}} to launch Wine with the environment variables it expects:<br />
<br />
$ sudo -u wineuser env HOME=/home/wineuser USER=wineuser USERNAME=wineuser LOGNAME=wineuser wine ''arguments''<br />
<br />
It is possible to automate the process of running Windows applications with Wine via this method by using a shell script as follows:<br />
{{hc|1=/usr/local/bin/runaswine|2=<br />
#!/bin/bash<br />
xhost +SI:localuser:wineuser<br />
sudo -u wineuser env HOME=/home/wineuser USER=wineuser USERNAME=wineuser LOGNAME=wineuser wine "$@"}}<br />
<br />
Wine applications can then be launched via:<br />
<br />
$ runaswine ''"C:\path\to\application.exe"''<br />
<br />
In order to not be asked for a password each time Wine is run as another user the following entry can be added to the sudoers file: {{ic|1=''mainuser'' ALL=(wineuser) NOPASSWD: ALL}}. See [[Sudo#Configuration]] for more information.<br />
<br />
It is recommended to run {{ic|winecfg}} as the Wine user and remove all bindings for directories outside the home directory of the Wine user in the "Desktop Integration" section of the configuration window so no program run with Wine has read access to any file outside the special user's home directory.<br />
<br />
Keep in mind that audio will probably be non-functional in Wine programs which are run this way if [[PulseAudio]] is used. See [[PulseAudio/Examples#Allowing multiple users to use PulseAudio at the same time]] for information about allowing the Wine user to access the PulseAudio daemon of the principal user.<br />
<br />
=== Temp directory on tmpfs ===<br />
<br />
To prevent Wine from writing its temporary files to a physical disk, one can define an alternative location, like ''tmpfs''. Remove Wine's default directory for temporary files and creating a symlink:<br />
<br />
$ rm -r ~/.wine/drive_c/users/$USER/Temp<br />
$ ln -s /tmp/ ~/.wine/drive_c/users/$USER/Temp<br />
<br />
=== Prevent installing Mono/Gecko ===<br />
If Gecko and/or Mono are not present on the system nor in the Wine prefix, Wine will prompt to download them from the internet. If you do not need Gecko and/or Mono, you might want to disable this dialog, by setting the {{ic|WINEDLLOVERRIDES}} [[environment variable]] to {{ic|1=mscoree=d;mshtml=d}}.<br />
<br />
=== Vulkan ===<br />
Vulkan support is included, since Wine 3.3. The default Wine Vulkan ICD loader works fine for most applications, but does not support advanced features, like Vulkan layers. To use these features, you have to install the official Vulkan SDK, see step 2-4 on the original Vulkan patches author's [https://github.com/roderickc/wine-vulkan GitHub page].<br />
<br />
{{note|The Wine ICD loader was added in Wine 3.5, you need to install the official Vulkan SDK to use Vulkan in Wine 3.3 and 3.4}}<br />
<br />
=== Remove Wine file bindings ===<br />
For security reasons it may be useful to remove the preinstalled Wine bindings so Windows applications can't be launched directly from a file manager or from the browser (Firefox offers to open EXE files directly with Wine!).<br />
If you want to do this, you may add the following to the {{ic|1= [options]}} section in {{ic|1= /etc/pacman.conf}}<br />
<br />
NoExtract = usr/lib/binfmt.d/wine.conf<br />
NoExtract = usr/share/applications/wine.desktop<br />
<br />
== Third-party applications ==<br />
<br />
These have their own communities and websites, and are '''not supported''' by greater Wine community. See [https://wiki.winehq.org/Third_Party_Applications Wine Wiki] for more details.<br />
<br />
*{{App|[[CrossOver]]|Paid, commercialized version of Wine which provides more comprehensive end-user support.|{{AUR|crossover}}|https://www.codeweavers.com/}}<br />
<br />
*{{App|exe-thumbnailer|Generates thumbnails for Windows executable files (.exe, .lnk, .msi, and .dll).|{{AUR|exe-thumbnailer}}|https://github.com/exe-thumbnailer/exe-thumbnailer}}<br />
<br />
*{{App|Lutris|Gaming launcher for all types of games, including Wine games (with prefix management), native Linux games and emulators.|{{AUR|lutris}}|https://lutris.net/}}<br />
<br />
*{{App|PlayOnLinux|Graphical prefix manager for Wine. Contains scripts to assist with program installation and configuration.|{{Pkg|playonlinux}}|https://www.playonlinux.com/}}<br />
<br />
*{{App|PyWinery|Simple graphical prefix manager for Wine.|{{AUR|pywinery}}|https://github.com/ergoithz/pywinery}}<br />
<br />
*{{App|Q4Wine|Graphical prefix manager for Wine. Can export [[Qt]] themes into the Wine configuration for better integration.|{{AUR|q4wine}}|https://sourceforge.net/projects/q4wine/}}<br />
<br />
== See also ==<br />
<br />
* [https://www.winehq.org/ Wine Homepage]<br />
* [https://wiki.winehq.org/ Wine Wiki]<br />
* [https://appdb.winehq.org/ Wine Application Database (AppDB)] - Information about running specific Windows applications (Known issues, ratings, guides, etc tailored to specific applications)<br />
* [https://forum.winehq.org/ Wine Forums] - A great place to ask questions ''after'' you have looked through the FAQ and AppDB<br />
* [https://wiki.gentoo.org/wiki/Wine Wine - Gentoo Wiki]</div>Jose1711https://wiki.archlinux.org/index.php?title=CUPS/Printer_sharing&diff=483645CUPS/Printer sharing2017-08-02T09:41:15Z<p>Jose1711: /* Windows server - Linux client */ python3 is the default for arch linux so let's use that instead of python2 code</p>
<hr />
<div>[[Category:Printers]]<br />
[[ja:CUPS/プリンター共有]]<br />
[[ru:CUPS/Printer sharing]]<br />
[[zh-hans:CUPS/Printer sharing]]<br />
{{Related articles start}}<br />
{{Related|Samba}}<br />
{{Related|CUPS}}<br />
{{Related articles end}}<br />
<br />
This article contains instruction on sharing printers between systems, be it between two GNU/Linux systems or between a GNU/Linux system and Microsoft Windows. <br />
<br />
==Between GNU/Linux systems==<br />
<br />
The server can be configured using either the web interface or by manually editing {{ic|/etc/cups/cupsd.conf}}.<br />
To configure the client, see [[CUPS#Network 2]].<br />
<br />
===Using the web interface===<br />
<br />
Open up the web interface to the server, select the ''Administration'' tab, look under the ''Server'' heading, and enable the "Share printers connected to this system" option. Save your change by clicking on the ''Change Settings'' button. The server will automatically restart.<br />
<br />
For more complex configurations, you can directly edit the {{ic|/etc/cups/cupsd.conf}} file by selecting ''Edit Configuration File''. See [[#Manual setup]] for more information.<br />
<br />
===Manual setup===<br />
<br />
On the server computer (the one directly connected to the printer), allow access to the server by modifying the location directive. For instance:<br />
{{hc|/etc/cups/cupsd.conf|<br />
<Location /><br />
Order allow,deny<br />
Allow localhost<br />
Allow 192.168.0.*<br />
</Location><br />
...<br />
}}<br />
<br />
Also make sure the server is listening on the IP address the client will use:<br />
{{hc|/etc/cups/cupsd.conf|<br />
...<br />
Listen <hostname>:631<br />
...<br />
}}<br />
<br />
There are more configuration possibilities, including automatic methods, which are described in detail in [http://localhost:631/help/network.html Using Network Printers].<br />
<br />
After making any modifications, [[restart]] the {{ic|org.cups.cupsd}} service.<br />
<br />
If CUPS is started using socket activation, create a [[drop-in snippet]] for {{ic|org.cups.cupsd.socket}} so that socket activation also works for remote connections:<br />
{{hc|/etc/systemd/system/org.cups.cupsd.socket.d/override.conf|<nowiki><br />
[Socket]<br />
ListenStream=631<br />
</nowiki>}}<br />
<br />
===Enabling browsing===<br />
<br />
To enable browsing (shared printer discovery), [[Avahi]] must be installed and running on the server.<br />
If you do not need printer discovery, Avahi is not required on either the server or the client.<br />
<br />
To enable browsing, either select ''Share printers connected to this system'' in the web interface, or manually turn on Browsing and set the BrowseAddress:<br />
{{hc|/etc/cups/cupsd.conf|<br />
...<br />
Browsing On<br />
BrowseAddress 192.168.0.*:631<br />
...<br />
}}<br />
and [[restart]] the {{ic|org.cups.cupsd}} service.<br />
<br />
Note that "browsing" at the print server is a different thing from "browsing" at a remote networked host. On the print server, {{ic|cupsd}} provides the DNS-SD protocol support which the {{ic|avahi-daemon}} broadcasts. The {{ic|cups-browsed}} service is unnecessary on the print server, unless also broadcasting the old CUPS protocol, or the print server is also "browsing" for other networked printers. On the remote networked host, the {{ic|cups-browsed}} service is ''required'' to "browse" for network broadcasts of print services, and running {{ic|cups-browsed}} will also automatically start {{ic|cupsd}}.<br />
<br />
The {{ic|org.cups.cupsd.service}} service will be automatically started when a USB printer is plugged in, however this may not be the case for other connection types. If {{ic|cupsd}} is not running, {{ic|avahi-daemon}} does not broadcast the print services, so in that case the systemd unit service file must be modified to start on boot, and then the service must again be "enabled/installed" with the new dependency. To do this, [[edit]] the service file {{ic|[Install]}} section to add a {{ic|1=WantedBy=default.target}} dependency, and then [[enable]] and [[start]] the {{ic|org.cups.cupsd.service}} service.<br />
<br />
==Between GNU/Linux and Windows==<br />
<br />
===Linux server - Windows client===<br />
<br />
====Sharing via IPP====<br />
<br />
The '''preferred way''' to connect a Windows client to a Linux print server is using [[wikipedia:Internet_Printing_Protocol|IPP]], as the configuration is simpler than using Samba. It is a standard printer protocol based on HTTP, allowing you to use port forwarding, tunneling etc.<br />
IPP has been natively supported by Windows since Windows 2000.<br />
{{Note|You may have to add the Internet Printing Client to Windows (''Control Panel > Programs > Turn Windows features on or off > Print and Document Services'')}}<br />
<br />
First, configure the server as described in the section [[#Between GNU/Linux systems]].<br />
<br />
On the Windows computer, go to ''Control Panel > Devices and Printers'' and choose 'Add a printer'. If on Windows 10, click "The printer that I want isn't listed". Next, choose 'Select a shared printer by name' and type in the location of the printer:<br />
<br />
http://''hostname'':631/printers/''printer_name''<br />
<br />
(where ''hostname'' is the GNU/Linux server's hostname or IP address and ''printer_name'' is the name of the print queue being connected to. You can also use the server's fully qualified domain name, if it has one, but you may need to set {{ic|ServerAlias my_fully_qualified_domain_name}} in {{ic|/etc/cups/cupsd.conf}} for this to work).<br />
<br />
{{Note|<br />
* The 'Add Printer' dialog in Windows suggests the format {{ic|<nowiki>http://computername/printers/printername/.printer</nowiki>}}, which it will not accept. Instead, use the syntax suggested above.<br />
* If you are using a proxy carefully check any used proxy '''exclusions'''. A wrong setting here may result in you being unable to add a printer until the next reboot even if you disable the proxy afterwards (at least on Windows 7).}}<br />
<br />
After this, install the native printer drivers for your printer on the Windows computer. If the CUPS server's print queue is set up to use its own printer drivers instead of as a {{ic|raw}} queue, you can just select a generic postscript printer driver for the Windows client (e.g. 'HP Color LaserJet 8500 PS' or 'Xerox DocuTech 135 PS2').<br />
<br />
====Sharing via Samba====<br />
<br />
If your client's Windows version is below Windows 2000 or if you experienced troubles with IPP you can also use Samba for sharing.<br />
Note of course that with Samba this involves another complex piece of software. This makes this way '''more difficult to configure''' and thus sometimes also '''more error-prone''', mostly due to authentication problems.<br />
<br />
To configure Samba on the Linux server, edit {{ic|/etc/samba/smb.conf}} file to allow access to printers. File {{ic|smb.conf}} can look something like this:<br />
{{hc|/etc/samba/smb.conf|2=<br />
[global]<br />
workgroup=Heroes<br />
server string=Arch Linux Print Server<br />
security=user<br />
<br />
[printers]<br />
comment=All Printers<br />
path=/var/spool/samba<br />
browseable=yes<br />
# to allow user 'guest account' to print.<br />
guest ok=no<br />
writable=no<br />
printable=yes<br />
create mode=0700<br />
write list=@adm root yourusername<br />
}}<br />
<br />
That should be enough to share the printer, yet adding an individual printer entry may be desirable:<br />
{{hc|/etc/samba/smb.conf|2=<br />
[ML1250]<br />
comment=Samsung ML-1250 Laser Printer<br />
printer=ml1250<br />
path=/var/spool/samba<br />
printing=cups<br />
printable=yes<br />
printer admin=@admin root yourusername<br />
user client driver=yes<br />
# to allow user 'guest account' to print.<br />
guest ok=no<br />
writable=no<br />
write list=@adm root yourusername<br />
valid users=@adm root yourusername<br />
}}<br />
<br />
Please note that this assumes configuration was made so that users must have a valid account to access the printer. To have a public printer, set ''guest ok'' to ''yes'', and remove the ''valid users'' line. To add accounts, set up a regular GNU/Linux account and then set up a Samba password on the server. For instance:<br />
# useradd yourusername<br />
# smbpasswd -a yourusername<br />
<br />
<!--<br />
After setting up all the needed user accounts, the samba spool directory also needs configuration:<br />
{{bc|<br />
# mkdir /var/spool/samba<br />
# chmod 777 /var/spool/samba<br />
}}<br />
<br />
The next items that need changing are {{ic|/etc/cups/mime.convs}} and {{ic|/etc/cups/mime.types}}:<br />
<br />
{{ic|mime.convs}}:<br />
{{bc|<br />
# The following line is found at near the end of the file. Uncomment it.<br />
application/octet-stream application/vnd.cups-raw 0 -<br />
}}<br />
<br />
{{ic|mime.types}}:<br />
{{bc|<br />
# Again near the end of the file.<br />
application/octet-stream<br />
}}<br />
<br />
The changes to {{ic|mime.convs}} and {{ic|mime.types}} are needed to make CUPS print Microsoft Office document files. Many users seem to need that.<br />
--><br />
<br />
After this, restart the Samba daemon.<br />
<br />
Obviously, there are a lot of tweaks and customizations that can be done with setting up a Samba print server, so it is advised to look at the Samba and CUPS documentation for more help. The {{ic|smb.conf.example}} file also has some good samples that might warrant imitating.<br />
<br />
===Windows server - Linux client===<br />
{{Warning|Any special characters in the printer URIs need to be appropriately quoted, or, if your Windows printer name or user passwords have spaces, CUPS will throw a "lpadmin: Bad device-uri" error.<br />
For example:<br />
<code>smb://BEN-DESKTOP/HP Color LaserJet CP1510 series PCL6</code><br />
<br />
becomes:<br />
<br />
<code>smb://BEN-DESKTOP/HP%20Color%20LaserJet%20CP1510%20series%20PCL6</code><br />
<br />
This result string can be obtained by running the following command:<br />
$ python -c 'from urllib.parse import quote; print("smb://" + quote("BEN-DESKTOP/HP Color LaserJet CP1510 series PCL6"))'<br />
<br />
====Sharing via LPD====<br />
<br />
Windows 7 has a built-in LPD server - using it will probably be the easiest approach as it does neither require an installation of ''Samba'' on the client nor heavy configuration on the server. It can be activated in the ''Control Panel'' under ''Programs'' -> ''Activate Windows functions'' in the section ''Print services''. The printer must have ''shared'' activated in its properties. Use a share name without any special characters like spaces, commas, etc.<br />
<br />
Then the printer can be added in CUPS, choosing LPD protocol. The printer address will look like this:<br />
<br />
# lpd://windowspc/printersharename<br />
<br />
Before adding the printer, you will most likely have to install an appropriate printer driver depending on your printer model. Generic PostScript or RAW drivers might also work.<br />
<br />
====Sharing via IPP====<br />
<br />
As above, IPP is also the '''preferred''' protocol for printer sharing. However this way might be a bit '''more difficult''' than the native Samba approach below, since you need a greater effort to set up an IPP-Server on Windows.<br />
The commonly chosen server software is Microsoft's Internet Information Services (IIS).<br />
<br />
{{Note|This section is incomplete. Here is a description how to set up IIS in Windows XP and Windows 2000, unfortunately in German [http://www.heise.de/netze/artikel/Ueberall-drucken-221652.html]}}<br />
<br />
====Sharing via Samba====<br />
<br />
A '''much simpler way''' is using Window's native printer sharing via Samba. There is almost no configuration needed, and all of it can be done from the CUPS Backend. As above noted, if there are any problems the reason is mostly related to authentication trouble and Windows access restrictions.<br />
<br />
On the server side enable sharing for your desired printer and ensure that the user on the client machine has the right to access the printer.<br />
<br />
The following section describes how to set up the client, assuming that both daemons (cupsd and smbd) are running.<br />
<br />
=====Configuration using the web interface=====<br />
<br />
The Samba CUPS back-end is enabled by default, if for any reason it is not activate it by entering the following command and restarting CUPS.<br />
# ln -s $(which smbspool) /usr/lib/cups/backend/smb<br />
<br />
Next, simply log in on the CUPS web interface and choose to add a new printer. As a device choose "Windows Printer via SAMBA".<br />
<br />
For the device location, enter:<br />
smb://username:password@hostname/printer_name<br />
<br />
Or without a password:<br />
smb://username@hostname/printer_name<br />
<br />
Make sure that the user actually has access to the printer on the Windows computer and select the appropriate drivers. If the computer is located on a domain, make sure the URI includes the domain: <br />
smb://username:password@domain/hostname/printer_name<br />
<br />
=====Manual configuration=====<br />
<br />
{{Accuracy|This should probably use lpadmin instead of editing the config file}}<br />
<br />
For manual configuration stop the CUPS daemon and add your printer to {{ic|/etc/cups/printers.conf}}, which might for example look like this<br />
{{hc|/etc/cups/printers.conf|2=<br />
<DefaultPrinter MyPrinter><br />
AuthInfoRequired username,password<br />
Info My printer via SAMBA<br />
Location In my Office<br />
MakeModel Samsung ML-1250 - CUPS+Gutenprint v5.2.7 # <= use 'lpinfo -m' to list available models<br />
DeviceURI smb://username:password@hostname/printer_name # <= server URI as described in previous section<br />
State Idle<br />
Type 4<br />
Accepting Yes<br />
Shared No<br />
JobSheets none none<br />
QuotaPeriod 0<br />
PageLimit 0<br />
KLimit 0<br />
AllowUser yourusername # <= do not forget to change this<br />
OpPolicy default<br />
ErrorPolicy stop-printer<br />
</Printer><br />
}}<br />
<br />
Then restart the CUPS daemon and try to print a test page.<br />
<br />
=====Finding URIs for Windows print servers=====<br />
<br />
Sometimes Windows is a little less than forthcoming about exact device URIs (device locations). If having trouble specifying the correct device location in CUPS, run the following command to list all shares available to a certain windows username:<br />
$ smbtree -U ''windowsusername''<br />
This will list every share available to a certain Windows username on the local area network subnet, as long as Samba is set up and running properly. It should return something like this:<br />
{{bc| WORKGROUP<br />
\\REGULATOR-PC <br />
\\REGULATOR-PC\Z <br />
\\REGULATOR-PC\Public <br />
\\REGULATOR-PC\print$ Printer Drivers<br />
\\REGULATOR-PC\G <br />
\\REGULATOR-PC\EPSON Stylus CX8400 Series EPSON Stylus CX8400 Series}}<br />
What is needed here is first part of the last line, the resource matching the printer description. So to print to the EPSON Stylus printer, one would enter:<br />
smb://username.password@REGULATOR-PC/EPSON Stylus CX8400 Series<br />
as the URI into CUPS.<br />
<br />
==Remote administration==<br />
<br />
Once the server is set up as described in [[#Between GNU/Linux systems]], it can also be configured so that it can be remotely administered. Add the allowed hosts to the {{ic|<Location /admin>}} block in {{ic|/etc/cups/cupsd.conf}}, using the same syntax as described in [[#Manual setup]]. Note that three levels of access can be granted:<br />
<br />
<Location /> #access to the server<br />
<Location /admin> #access to the admin pages<br />
<Location /admin/conf> #access to configuration files<br />
<br />
To give remote hosts access to one of these levels, add an {{ic|Allow}} statement to that level's section. An {{ic|Allow}} statement can take one or more of the forms listed below:<br />
Allow from all<br />
Allow from host.domain.com<br />
Allow from *.domain.com<br />
Allow from ip-address<br />
Allow from ip-address/netmask<br />
Allow from @LOCAL<br />
<br />
Deny statements can also be used. For example, to give full access to all hosts on your local network interfaces, edit {{ic|/etc/cups/cupsd.conf}} to include this:<br />
# Restrict access to the server...<br />
# By default only localhost connections are possible<br />
<Location /><br />
Order allow,deny<br />
'''Allow from @LOCAL'''<br />
</Location><br />
<br />
# Restrict access to the admin pages...<br />
<Location /admin><br />
Order allow,deny<br />
'''Allow from @LOCAL'''<br />
</Location><br />
<br />
# Restrict access to configuration files...<br />
<Location /admin/conf><br />
AuthType Basic<br />
Require user @SYSTEM<br />
Order allow,deny<br />
'''Allow from @LOCAL'''<br />
</Location><br />
<br />
{{Accuracy|CUPS generates a certificate automatically so this should not be an issue}}<br />
<br />
You might also need to add:<br />
<br />
DefaultEncryption Never<br />
<br />
This should avoid the error: 426 - Upgrade Required when using the CUPS web interface from a remote machine.<br />
<br />
=== Kerberos ===<br />
<br />
[[Kerberos]] can be used to authenticate users accessing a remote CUPS server. This assumes that your machine has a keytab and it will need a ticket for "HTTP". Instead of using {{ic|<nowiki>http://localhost:631</nowiki>}} you must use {{ic|<nowiki>https://host.example.co.uk:631</nowiki>}} - encryption is required for auth (hence https) and the full hostname is needed so that Kerberos/Negotiate can work. In addition, the server must be configured in {{ic|/etc/cups/cupsd.conf}} to use a {{ic|DefaultAuthType}} of {{ic|Negotiate}}.<br />
<br />
If you are using [[Samba]]'s winbind NSS support, you can add an AD group name to {{ic|/etc/cups/cups-files.conf}} - in the following example {{ic|sysadmin}} might be an AD group: <br />
SystemGroup sys root sysadmin<br />
<br />
==Troubleshooting==<br />
<br />
See [[CUPS/Troubleshooting]] for general troubleshooting tips.<br />
<br />
===Cannot print with GTK applications===<br />
If you get a ''getting printer information failed'' message when you try to print from GTK applications, add this line to your {{ic|/etc/hosts}}:<br />
# serverip some.name.org ServersHostname<br />
<br />
=== Permission errors on Windows ===<br />
<br />
Some users fixed 'NT_STATUS_ACCESS_DENIED' (Windows clients) errors by using a slightly different syntax:<br />
smb://workgroup/username:password@hostname/printer_name<br />
<br />
==Other operating systems==<br />
More information on interfacing CUPS with other printing systems can be found in the CUPS manual, e.g. on http://localhost:631/help/network.html</div>Jose1711https://wiki.archlinux.org/index.php?title=Talk:CUPS/Printer_sharing&diff=483643Talk:CUPS/Printer sharing2017-08-02T09:29:58Z<p>Jose1711: reply to tip for windows 8.1 users</p>
<hr />
<div>==Tip for Windows 8.1 users==<br />
<br />
I was unable to share printer to a Windows 8.1 client (via ipp) until I renamed it to a short ascii-only queue name (the original had 23 characters, containing ascii letters, hyphen and underscores). Hope this helps someone.<br />
<br />
[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 21:16, 31 July 2017 (UTC)<br />
<br />
:Is this a different problem from that mentioned in the warning at [[CUPS/Printer sharing#Windows server - Linux client]]? -- [[User:Pypi|Pypi]] ([[User talk:Pypi|talk]]) 00:39, 2 August 2017 (UTC)<br />
<br />
::Ok, after inspecting it a bit more it turns out it was my mistake (typo - hyphen instead of underscore). It is okay to paste the IPP printer address into a browser as a validation step but you should only accept the result if it does '''not''' look like this (this could be mentioned on the main page maybe):<br />
::{|<br />
|Description:<br />
|{printer_info}<br />
|-<br />
|Location:<br />
|{printer_location}<br />
|-<br />
|Driver<br />
|{printer_make_and_model} (grayscale)<br />
|-<br />
|Connection:<br />
|{device_uri} Defaults job-sheets={job_sheets_default} media=unknown}<br />
|-<br />
::[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 09:29, 2 August 2017 (UTC)</div>Jose1711https://wiki.archlinux.org/index.php?title=SANE&diff=483442SANE2017-07-31T21:30:35Z<p>Jose1711: added note about sharing scanner with windows hosts</p>
<hr />
<div>[[Category:Imaging]]<br />
[[es:SANE]]<br />
[[fr:Sane]]<br />
[[it:SANE]]<br />
[[ja:SANE]]<br />
[[zh-hans:SANE]]<br />
{{Related articles start}}<br />
{{Related|SANE/Scanner-specific problems}}<br />
{{Related|Scanner Button Daemon}}<br />
{{Related articles end}}<br />
<br />
[http://www.sane-project.org/ SANE] ([[wikipedia:Scanner Access Now Easy|Scanner Access Now Easy]]) provides a library and a command-line tool to use scanners under GNU/Linux.<br />
[http://www.sane-project.org/sane-supported-devices.html Here] you can check if sane supports your scanner.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|sane}} package.<br />
<br />
== Verification ==<br />
<br />
Now you can try to see if sane recognizes your scanner<br />
<br />
$ scanimage -L<br />
<br />
If that fails, run the command again as root to check for permission problems. If that fails as well, check that your scanner is plugged into the computer. You also might have to unplug/plug your scanner for {{ic|/usr/lib/udev/rules.d/49-sane.rules}} to recognize your scanner.<br />
<br />
Now you can see if it actually works<br />
<br />
$ scanimage --format=png > test.png<br />
<br />
If the scanning fails with the message {{ic|scanimage: sane_start: Invalid argument}} you may need to specify the device.<br />
<br />
{{hc|$ scanimage -L|<br />
device `v4l:/dev/video0' is a Noname Video WebCam virtual device<br />
device `pixma:04A91749_247936' is a CANON Canon PIXMA MG5200 multi-function peripheral<br />
}}<br />
<br />
Then you would need to run<br />
<br />
$ scanimage --device "pixma:04A91749_247936" --format=tiff > test.tiff<br />
<br />
Sane provides many special backend options for numerous scanner types. To see what these are for your device:<br />
<br />
$ scanimage -A<br />
<br />
== Installing a scanner driver ==<br />
<br />
Most scanners should work out of the box. If yours does not, see [[SANE/Scanner-specific problems]] for installation instructions.<br />
<br />
=== Firmware ===<br />
<br />
{{Note|This section is only needed if you need to upload firmware to your scanner.}}<br />
<br />
Firmwares usually have the '''{{ic|.bin}}''' extension. <br />
<br />
Firstly you need to put the firmware someplace safe, it is recommended to put it in a subdirectory of {{ic|/usr/share/sane/}}.<br />
<br />
Then you need to tell sane where the firmware is:<br />
<br />
* Find the name of the backend for your scanner from the [http://www.sane-project.org/sane-supported-devices.html sane supported devices list].<br />
* Open the file {{ic|/etc/sane.d/''<backend-name>''.conf}}.<br />
* Make sure the firmware entry is uncommented and let the file-path point to where you put the firmware file for your scanner. Be sure that members of the group {{ic|scanner}} can access the {{ic|/etc/sane.d/''<backend-name>''.conf}} file.<br />
<br />
If the backend of your scanner is not part of the sane package (such as {{ic|hpaio.conf}} which is part of {{pkg|hplip}}), you need to uncomment the relevant entry in {{ic|/etc/sane.d/dll.conf}}.<br />
<br />
== Install a frontend ==<br />
<br />
Many frontends exist for SANE, a non-exhaustive list of which can be found on the [http://www.sane-project.org/sane-frontends.html sane-project website]. Another way to find them is to use {{ic|pacman}} to [[Pacman#Querying_package_databases|search the repositories]] for keywords such as "sane" or "scanner".<br />
<br />
* {{App|[[Wikipedia:Scanner Access Now Easy#gscan2pdf|gscan2pdf]]|A GTK2-based GUI to produce PDFs, TIFFs or DjVus from scanned documents. It is also able to apply OCR in the process using different engines.|http://gscan2pdf.sourceforge.net/|{{AUR|gscan2pdf}}}}<br />
* {{App|[[Wikipedia:Scanner Access Now Easy#Simple_Scan|Simple Scan]]|A simplified GUI that is intended to be easier to use and better integrated into the [[GNOME]] desktop than XSane. It was initially written for Ubuntu and is maintained by Robert Ancell of Canonical Ltd. for GNU/Linux.|https://launchpad.net/simple-scan|{{Pkg|simple-scan}}}}<br />
* {{App|[[Wikipedia:Skanlite|Skanlite]]|A simple image scanning application that does nothing more than scan and save images, based on the KSane backend.|https://www.kde.org/applications/graphics/skanlite|{{Pkg|skanlite}}}}<br />
* {{App|[[Wikipedia:Scanner Access Now Easy#XSane|XSane]]| A full-featured GTK-based frontend looking a bit old but providing extended functionalities.|http://www.xsane.org/|{{Pkg|xsane}}}}<br />
<br />
{{Note|Scanning directly to PDF using XSane in 16bit color depth mode is known to produces [https://bugs.launchpad.net/ubuntu/+source/xsane/+bug/539162 corrupted files] and a note in {{ic|pacman}} output warns so. 8bit mode is known to work.}}<br />
<br />
== Network scanning ==<br />
<br />
=== Sharing your scanner over a network ===<br />
<br />
You can share your scanner with other hosts on your network who use ''sane'', ''xsane'' or xsane-enabled ''GIMP''. To set up the server, first indicate which hosts on your network are allowed access.<br />
<br />
Change the {{ic|/etc/sane.d/saned.conf}} file to your liking, for example:<br />
<br />
# required<br />
localhost<br />
# allow local subnet<br />
192.168.0.0/24<br />
<br />
If you use [[iptables]], [[Kernel_modules|insert]] the {{ic|nf_conntrack_sane}} module to let the firewall track {{ic|saned}} connections.<br />
<br />
Now [[start/enable]] {{ic|saned.socket}}. Your scanner is now available over the network. For more information, see {{man|8|saned|url=http://www.sane-project.org/man/saned.8.html}}.<br />
<br />
{{Note|saned intentionally refuses to share scanners that use the net: backend (which includes some USB scanners). There is a crude patch to allow this in {{Bug|54786}}, but note it may cause problems on some networks. Check output of {{ic|scanimage -L}} on the server to see the scanner url.}}<br />
<br />
=== Accessing your scanner from a remote workstation ===<br />
<br />
{{Note|Some network scanners require a different approach. See [[SANE/Scanner-specific problems]].}}<br />
<br />
You can access your network-enabled scanner from a remote Arch Linux workstation.<br />
<br />
First, specify the server's host name or IP address in the {{ic|/etc/sane.d/net.conf}} file:<br />
<br />
# static IP address<br />
192.168.0.1<br />
# or host name<br />
stratus<br />
<br />
Now test your workstation's connection:<br />
<br />
$ scanimage -L<br />
<br />
The network scanner should now also show up in any [[#Install a frontend|front-end]].<br />
<br />
=== Sane Windows client ===<br />
<br />
Since win32 port of SANE seems to be [http://www.xsane.org/xsane-download.html unsupported, outdated and difficult to get], you can try [http://sanetwain.ozuzo.net/ SaneTwain] instead. Installer is provided and configuration is done via graphical user interface.<br />
<br />
== Troubleshooting ==<br />
<br />
:See also: [[SANE/Scanner-specific problems]]<br />
<br />
=== Invalid argument ===<br />
<br />
If you get an "Invalid argument" error with xsane or another sane front-end, this could be caused by one of the following reasons:<br />
<br />
==== Missing firmware file ====<br />
<br />
No firmware file was provided for the used scanner (see [[#Firmware]] for details).<br />
<br />
==== Wrong firmware file permissions ====<br />
<br />
The permissions for the used firmware file are wrong. Correct them using<br />
<br />
# chown root:scanner /usr/share/sane/''SCANNER_MODEL''/''FIRMWARE_FILE''<br />
# chmod ug+r /usr/share/sane/''SCANNER_MODEL''/''FIRMWARE_FILE''<br />
<br />
==== Multiple backends claim scanner ====<br />
<br />
It may happen, that multiple backends support (or pretend to support) your scanner, and sane chooses one that does not do after all (the scanner will not be displayed by {{ic|scanimage -L}} then). This has happened with older Epson scanners and the {{ic|epson2}} resp. {{ic|epson}} backends. In this case, the solution is to comment out the unwanted backend in {{ic|/etc/sane.d/dll.conf}}. In the Epson case, that would be to change<br />
<br />
epson2<br />
#epson<br />
<br />
to <br />
<br />
#epson2<br />
epson<br />
<br />
It may also be possible that the independent {{Pkg|iscan}} {{ic|epkowa}} backend interferes with your {{ic|snapscan}} backend (epson scanners). You may get this error right after using the {{ic|scanimage -L}} command. Starting the scanner app (like {{Pkg|xsane}}) twice can also solve the problem. Otherwise check your {{ic|/etc/sane.d/epkowa.conf}} for wrong configurations or remove the {{Pkg|iscan}} package.<br />
<br />
==== Communication via xHCI not working (older scanner models) ====<br />
<br />
Some older scanner models do not work when connected via an USB3 port. If you experience this issue, try setting the {{ic|1=SANE_USB_WORKAROUND=1}} [[environment variable]] before starting your frontend.[https://lists.alioth.debian.org/pipermail/sane-announce/2017/000036.html][https://anonscm.debian.org/cgit/sane/sane-backends.git/commit/?id=1207ce5a40664c04b934bd0a6babbc1575361356]<br />
<br />
If that does not work, try one of the following workarounds:<br />
<br />
* Use an USB2 port instead of an USB3 port, if available.<br />
* Disable xHCI via BIOS/EFI. eHCI will consequently be used and communication with the scanner will work. On the downside, USB3 speed can not be reached on any port.<br />
* On (some) intel chipsets the {{ic|setpci}} command can be used to route specific usb ports to either the xHCI or the eHCI controller. See [https://forums.opensuse.org/showthread.php/507627-Suse-13-2-scanner-no-longer-working-on-64-bit-version?p=2714695#post2714695 here] and [https://superuser.com/questions/812022/force-a-single-usb-3-0-port-to-work-as-usb-2-0 here] (scroll down to where it says "setpci") for further information. With this it is possible to toggle single USB ports with a simple shell script.<br />
* Connect the scanner over the network instead if it is supported.<br />
<br />
=== Slow startup ===<br />
<br />
If you encounter slow startup issue (e.g. {{ic|xsane}} or {{ic|scanimage -L}} take a lot to find scanner) it may be that more than one driver supporting it is available. <br />
<br />
Have a look at {{ic|/etc/sane.d/dll.conf}} and try commenting out one (e.g. you may have {{ic|epson}}, {{ic|epson2}} and {{ic|epkowa}} enabled at the same time, try leaving only {{ic|epson}} or {{ic|epkowa}} uncommented).<br />
<br />
You can also try to comment out {{ic|net}} driver, if there are no network scanners.<br />
<br />
Your [[webcam]] might also be listed as scanning device and slow down detection at startup. To blacklist webcam, try commenting out all the lines in {{ic|/etc/sane.d/v4l.conf}}.<br />
<br />
=== Device busy ===<br />
<br />
{{Accuracy|The user should not need to be in the scanner group (see [[Users and groups#Pre-systemd groups]])}}<br />
<br />
If your USB device is listed with {{ic|scanimage -L}} but launching the test {{ic|1=scanimage pixma:04A9173E_11DAD1 --format=tiff > test.tiff}} always return the 'Device busy' error, you might try to add your username to the scanner group {{ic|usermod -a -G scanner yourusername}} then blacklist the {{ic|usblp}} kernel module by writing {{ic|blacklist usblp}} in {{ic|/etc/modprobe.d/no-usblp.conf}} (it prevents {{ic|usblp}} from loading to support scanning, not needed by either CUPS or xsane and related tools). Reboot to finish. [http://cromwell-intl.com/linux/canon-pixma-printer-scanner.html]<br />
<br />
=== Permission problem ===<br />
<br />
After systemd, the {{ic|scanner}} and {{ic|lp}} groups are deprecated. No need to add your user to those groups. See [[Users and groups#Pre-systemd groups]] for detail.<br />
<br />
You can also try to change permissions of usb device but this is not recommended, a better solution is to fix the [[Udev rules]] so that your scanner is recognized.<br />
<br />
First check connected usb devices with {{ic|lsusb}}:<br />
<br />
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 003 Device 003: ID 04d9:1603 Holtek Semiconductor, Inc.<br />
Bus 003 Device 002: ID 04fc:0538 Sunplus Technology Co., Ltd<br />
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 001 Device 006: ID 03f0:2504 Hewlett-Packard<br />
Bus 001 Device 002: ID 046d:0802 Logitech, Inc. Webcam C200<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
In our example we see the scanner: {{ic|Bus 001 Device 006: ID 03f0:2504 Hewlett-Packard}}. Here {{ic|03f0}} is the ''vendorID'' and {{ic|2504}} is the ''productID''.<br />
<br />
Now open {{ic|/usr/lib/udev/rules.d/49-sane.rules}} and see if there is there is a line with the ''vendorID'' and ''productID'' of your scanner. If there is not any, create the new file {{ic|/etc/udev/rules.d/49-sane-missing-scanner.rules}}, with the following contents:<br />
<br />
ATTRS{idVendor}=="'''vendorID'''", ATTRS{idProduct}=="'''productID'''", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"<br />
<br />
Save the file, plug out and back in your scanner and the file permissions should be now correct.<br />
<br />
{{Accuracy|The scanner needs to be added to the right backend file, {{ic|hp4200.conf}} will not work for any scanner.}}<br />
<br />
Another tip, is that you can add your device (scanner) in backend file:<br />
<br />
Add {{ic|usb 0x03f0 0x2504}} to {{ic|/etc/sane.d/hp4200.conf}} so it looks like this:<br />
<br />
#<br />
# Configuration file for the hp4200 backend<br />
#<br />
#<br />
# HP4200<br />
#usb 0x03f0 0x0105<br />
usb 0x03f0 0x2504<br />
<br />
==== Parallel port scanners ====<br />
<br />
All devices attached to a parallel port are assumed to be printers, and are given a {{ic|lp}} group. Either create a [[udev]] rule to mark the relevant parallel port as {{ic|libsane_matched}}, or add your user to the {{ic|lp}} [[group]]. CUPS also uses the {{ic|lp}} group for read-only access to configuration files, so there are potential security implications to adding users to the {{ic|lp}} group - see [[CUPS#Connection Interfaces]] for more information.</div>Jose1711https://wiki.archlinux.org/index.php?title=Talk:CUPS/Printer_sharing&diff=483441Talk:CUPS/Printer sharing2017-07-31T21:16:26Z<p>Jose1711: adding a tip for windows 8.1 users (configuring ipp client)</p>
<hr />
<div>==Tip for Windows 8.1 users==<br />
<br />
I was unable to share printer to a Windows 8.1 client (via ipp) until I renamed it to a short ascii-only queue name (the original had 23 characters, containing ascii letters, hyphen and underscores). Hope this helps someone.<br />
<br />
[[User:Jose1711|Jose1711]] ([[User talk:Jose1711|talk]]) 21:16, 31 July 2017 (UTC)</div>Jose1711https://wiki.archlinux.org/index.php?title=Puppet&diff=417723Puppet2016-01-28T19:00:20Z<p>Jose1711: corrected path to site.pp (came with puppet 4.0)</p>
<hr />
<div>[[Category:System administration]]<br />
[[ja:Puppet]]<br />
{{Stub}}<br />
{{Related articles start}}<br />
{{Related|Puppet Dashboard}}<br />
{{Related articles end}}<br />
From [https://puppetlabs.com/puppet/what-is-puppet/ Puppet web site]:<br />
:''Puppet is IT automation software that helps system administrators manage infrastructure throughout its lifecycle, from provisioning and configuration to patch management and compliance. Using Puppet, you can easily automate repetitive tasks, quickly deploy critical applications, and proactively manage change, scaling from 10s of servers to 1000s, on-premise or in the cloud.''<br />
<br />
== Installation ==<br />
<br />
{{pkg|puppet}} is available in the official repositories.<br />
<br />
If you want to install from Puppet's git repo, {{AUR|puppet-git}}{{Broken package link|{{aur-mirror|puppet-git}}}} is available through the [[AUR]].<br />
<br />
== Configuration ==<br />
<br />
Puppet's main configuration file is {{ic|puppet.conf}} which is located at {{ic|/etc/puppetlabs/puppet/puppet.conf}}.<br />
<br />
There are 3 sections to place settings depending if it is a master/agent: {{ic|[main]}}, {{ic|[agent]}} and {{ic|[master]}}.<br />
<br />
Bare minimum of settings are:<br />
* server: The hostname of the puppet server. Default: {{ic|puppet}}<br />
* report: Most users should set this to true.<br />
* pluginsync: Most users should set this to true.<br />
* certname: The certified name of the machine (unique identifier). Default: {{ic|fqdn}}<br />
<br />
Puppet will look for node configuration in {{ic|/etc/puppetlabs/code/environments/production/manifests/site.pp}}.<br />
<br />
After starting puppet by daemon/cron/standalone, it will generate<br />
certificates in {{ic|/etc/puppetlabs/puppet/ssl/}} directory.<br />
And you need to accept this certificaten the puppet master with:<br />
{{ic|sudo puppet cert sign <name>}}.<br />
<br />
== Facter ==<br />
<br />
Facter is a companion program of puppet that gathers facts about the system it runs on.<br><br />
commands: <br />
# puppet facts find facter<br />
# facter -p<br />
<br />
{{Note|Facter is installed by default as a dependency of {{pkg|puppet}}.}}<br />
<br />
== Puppet Resources ==<br />
===Packages===<br />
<br />
"Pacman" is supported by puppet. Installing packages works out of the box since puppet 3.1.0.<br />
<br />
===Services===<br />
<br />
Since puppet 3.2.1 systemd on archlinux is fully supported.<br><br />
The systemd provider in Puppet today only uses two commands for the service enable state:<br><br />
systemctl is-enabled <unit>, checking return code for the current enable state<br><br />
systemctl enable/disable <unit> to change it.<br />
<br />
Otherwise service running will use:<br />
# systemctl start/stop/restart <unit><br />
<br />
Using the full unit name unit.service is supported.<br />
<br />
==PuppetDB ==<br />
PuppetDB is the fast, scalable, and reliable data warehouse for Puppet.<br> <br />
It caches data generated by Puppet, and gives you advanced features at awesome speed with a powerful API.<br><br />
Puppetdb is in aur install {{AUR|puppetdb}} and {{AUR|puppetdb-terminus}} <br><br />
[More information: https://github.com/puppetlabs/puppetdb]</div>Jose1711https://wiki.archlinux.org/index.php?title=Puppet&diff=417710Puppet2016-01-28T18:08:22Z<p>Jose1711: corrected path to certs</p>
<hr />
<div>[[Category:System administration]]<br />
[[ja:Puppet]]<br />
{{Stub}}<br />
{{Related articles start}}<br />
{{Related|Puppet Dashboard}}<br />
{{Related articles end}}<br />
From [https://puppetlabs.com/puppet/what-is-puppet/ Puppet web site]:<br />
:''Puppet is IT automation software that helps system administrators manage infrastructure throughout its lifecycle, from provisioning and configuration to patch management and compliance. Using Puppet, you can easily automate repetitive tasks, quickly deploy critical applications, and proactively manage change, scaling from 10s of servers to 1000s, on-premise or in the cloud.''<br />
<br />
== Installation ==<br />
<br />
{{pkg|puppet}} is available in the official repositories.<br />
<br />
If you want to install from Puppet's git repo, {{AUR|puppet-git}}{{Broken package link|{{aur-mirror|puppet-git}}}} is available through the [[AUR]].<br />
<br />
== Configuration ==<br />
<br />
Puppet's main configuration file is {{ic|puppet.conf}} which is located at {{ic|/etc/puppetlabs/puppet/puppet.conf}}.<br />
<br />
There are 3 sections to place settings depending if it is a master/agent: {{ic|[main]}}, {{ic|[agent]}} and {{ic|[master]}}.<br />
<br />
Bare minimum of settings are:<br />
* server: The hostname of the puppet server. Default: {{ic|puppet}}<br />
* report: Most users should set this to true.<br />
* pluginsync: Most users should set this to true.<br />
* certname: The certified name of the machine (unique identifier). Default: {{ic|fqdn}}<br />
<br />
Puppet will look for node configuration in {{ic|/etc/puppet/manifests/site.pp}}.<br />
<br />
After starting puppet by daemon/cron/standalone, it will generate<br />
certificates in {{ic|/etc/puppetlabs/puppet/ssl/}} directory.<br />
And you need to accept this certificaten the puppet master with:<br />
{{ic|sudo puppet cert sign <name>}}.<br />
<br />
== Facter ==<br />
<br />
Facter is a companion program of puppet that gathers facts about the system it runs on.<br><br />
commands: <br />
# puppet facts find facter<br />
# facter -p<br />
<br />
{{Note|Facter is installed by default as a dependency of {{pkg|puppet}}.}}<br />
<br />
== Puppet Resources ==<br />
===Packages===<br />
<br />
"Pacman" is supported by puppet. Installing packages works out of the box since puppet 3.1.0.<br />
<br />
===Services===<br />
<br />
Since puppet 3.2.1 systemd on archlinux is fully supported.<br><br />
The systemd provider in Puppet today only uses two commands for the service enable state:<br><br />
systemctl is-enabled <unit>, checking return code for the current enable state<br><br />
systemctl enable/disable <unit> to change it.<br />
<br />
Otherwise service running will use:<br />
# systemctl start/stop/restart <unit><br />
<br />
Using the full unit name unit.service is supported.<br />
<br />
==PuppetDB ==<br />
PuppetDB is the fast, scalable, and reliable data warehouse for Puppet.<br> <br />
It caches data generated by Puppet, and gives you advanced features at awesome speed with a powerful API.<br><br />
Puppetdb is in aur install {{AUR|puppetdb}} and {{AUR|puppetdb-terminus}} <br><br />
[More information: https://github.com/puppetlabs/puppetdb]</div>Jose1711