https://wiki.archlinux.org/api.php?action=feedcontributions&user=Mhertz&feedformat=atomArchWiki - User contributions [en]2024-03-28T15:37:41ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Automatic_login_to_virtual_console&diff=259870Automatic login to virtual console2013-05-31T17:41:28Z<p>Mhertz: /* Removed unneeded section since drop-in feature is used instead */</p>
<hr />
<div>[[Category:Boot process]]<br />
[[Category:Security]]<br />
[[es:Automatic login to virtual console]]<br />
[[it:Automatic login to virtual console]]<br />
{{Article summary start}}<br />
{{Article summary text|Describes how to automatically log in to a virtual console.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Display Manager}}<br />
{{Article summary wiki|Silent boot}}<br />
{{Article summary wiki|Start X at Login}}<br />
{{Article summary end}}<br />
<br />
This article describes how to automatically log in to a ''virtual console'' at the end of the [[boot process]]. This article only covers console log-ins; methods for starting an [[Xorg|X server]] are described in [[Start X at Login]].<br />
<br />
== Installation ==<br />
=== Use drop-in feature of systemd for getty autologin ===<br />
First create a new directory named getty@tty1.service.d under /etc/systemd/system:<br />
<br />
# mkdir /etc/systemd/system/getty@tty1.service.d<br />
<br />
Then create a new file named autologin.conf and add it into the directory:<br />
<br />
{{hc|/etc/systemd/system/getty@tty1.service.d/autologin.conf|<br />
2=[Service]<br />
ExecStart=<br />
ExecStart=-/sbin/agetty --autologin <username> --noclear %I 38400 linux<br />
}}<br />
<br />
{{Tip|The option {{ic|1=Type=simple}} will delay the execution of agetty until all jobs (state change requests to units) are completed. On the other hand it may cause systemd boot-up messages to pollute the login prompt. This option is more useful when [[Start X at Login|starting X automatically]]. See {{ic|man systemd.service}} for more info.}}<br />
<br />
If wanting to use 'Type=simple', then your autologin.conf should look like this:<br />
<br />
{{hc|/etc/systemd/system/getty@tty1.service.d/autologin.conf|<br />
2=[Service]<br />
ExecStart=<br />
ExecStart=-/sbin/agetty --autologin <username> --noclear %I 38400 linux<br />
Type=<br />
Type=simple<br />
}}<br />
<br />
== Tips & Tricks ==<br />
<br />
=== Avoiding unnecessary dmesg errors ===<br />
To avoid errors related to {{ic|display-manager.service}} in dmesg, you should set the default target to multi-user instead of graphical:<br />
# systemctl enable multi-user.target<br />
<br />
==See also==<br />
* [[Systemd#Change_default_target_to_boot_into|Change default runlevel/target to boot into]].</div>Mhertzhttps://wiki.archlinux.org/index.php?title=Automatic_login_to_virtual_console&diff=259869Automatic login to virtual console2013-05-31T17:36:24Z<p>Mhertz: /* Use drop-in feature of systemd for getty autologin */</p>
<hr />
<div>[[Category:Boot process]]<br />
[[Category:Security]]<br />
[[es:Automatic login to virtual console]]<br />
[[it:Automatic login to virtual console]]<br />
{{Article summary start}}<br />
{{Article summary text|Describes how to automatically log in to a virtual console.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Display Manager}}<br />
{{Article summary wiki|Silent boot}}<br />
{{Article summary wiki|Start X at Login}}<br />
{{Article summary end}}<br />
<br />
This article describes how to automatically log in to a ''virtual console'' at the end of the [[boot process]]. This article only covers console log-ins; methods for starting an [[Xorg|X server]] are described in [[Start X at Login]].<br />
<br />
== Installation ==<br />
=== Use drop-in feature of systemd for getty autologin ===<br />
First create a new directory named getty@tty1.service.d under /etc/systemd/system:<br />
<br />
# mkdir /etc/systemd/system/getty@tty1.service.d<br />
<br />
Then create a new file named autologin.conf and add it into the directory:<br />
<br />
{{hc|/etc/systemd/system/getty@tty1.service.d/autologin.conf|<br />
2=[Service]<br />
ExecStart=<br />
ExecStart=-/sbin/agetty --autologin <username> --noclear %I 38400 linux<br />
}}<br />
<br />
{{Tip|The option {{ic|1=Type=simple}} will delay the execution of agetty until all jobs (state change requests to units) are completed. On the other hand it may cause systemd boot-up messages to pollute the login prompt. This option is more useful when [[Start X at Login|starting X automatically]]. See {{ic|man systemd.service}} for more info.}}<br />
<br />
If wanting to use 'Type=simple', then your autologin.conf should look like this:<br />
<br />
{{hc|/etc/systemd/system/getty@tty1.service.d/autologin.conf|<br />
2=[Service]<br />
ExecStart=<br />
ExecStart=-/sbin/agetty --autologin <username> --noclear %I 38400 linux<br />
Type=<br />
Type=simple<br />
}}<br />
<br />
=== Enabling the service ===<br />
Finally, you need to disable the old {{ic|getty@tty''X''.service}} for the specified tty and enable the new {{ic|autologin@tty''X''.service}}, e.g.:<br />
# systemctl daemon-reload<br />
# systemctl disable getty@''tty1''<br />
# systemctl enable autologin@''tty1''<br />
<br />
To test it out, use:<br />
# systemctl start autologin@''tty1''<br />
<br />
== Tips & Tricks ==<br />
<br />
=== Avoiding unnecessary dmesg errors ===<br />
To avoid errors related to {{ic|display-manager.service}} in dmesg, you should set the default target to multi-user instead of graphical:<br />
# systemctl enable multi-user.target<br />
<br />
==See also==<br />
* [[Systemd#Change_default_target_to_boot_into|Change default runlevel/target to boot into]].</div>Mhertzhttps://wiki.archlinux.org/index.php?title=User_talk:Mhertz&diff=255152User talk:Mhertz2013-04-25T22:01:14Z<p>Mhertz: /* Edit reason */</p>
<hr />
<div>==Edit reason==<br />
Hi, can I ask you the reason for this edit: [https://wiki.archlinux.org/index.php?title=Netctl&diff=255008&oldid=254814]? Please from now on remember to explain your edits using the "Summary" field just above the "Save page" button. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 09:16, 25 April 2013 (UTC)<br />
:Sorry for not adding a description... I removed that part because it was entirelly unrelated to the paragraph and wpa_actiond should not be recommended to be installed for making an encrypted password. wpa_actiond is an optdepends used for the netctl-auto profile... [[User:Mhertz|Mhertz]] ([[User talk:Mhertz|talk]]) 17:25, 25 April 2013 (UTC)</div>Mhertzhttps://wiki.archlinux.org/index.php?title=User_talk:Mhertz&diff=255151User talk:Mhertz2013-04-25T21:56:25Z<p>Mhertz: /* Answer */</p>
<hr />
<div>==Edit reason==<br />
Hi, can I ask you the reason for this edit: [https://wiki.archlinux.org/index.php?title=Netctl&diff=255008&oldid=254814]? Please from now on remember to explain your edits using the "Summary" field just above the "Save page" button. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 09:16, 25 April 2013 (UTC)<br />
<br />
Sorry for not adding a description... I removed that part because it was entirelly unrelated to the paragraph and wpa_actiond should not be recommended to be installed for making an encrypted password. wpa_actiond is an optdepends used for the netctl-auto profile... [[User:Mhertz|Mhertz]] ([[User talk:Mhertz|talk]]) 17:25, 25 April 2013 (UTC)</div>Mhertzhttps://wiki.archlinux.org/index.php?title=User_talk:Mhertz&diff=255140User talk:Mhertz2013-04-25T17:25:43Z<p>Mhertz: /* Answer */</p>
<hr />
<div>==Edit reason==<br />
Hi, can I ask you the reason for this edit: [https://wiki.archlinux.org/index.php?title=Netctl&diff=255008&oldid=254814]? Please from now on remember to explain your edits using the "Summary" field just above the "Save page" button. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 09:16, 25 April 2013 (UTC)<br />
<br />
==Answer==<br />
Sorry for not adding a description... I removed that part because it was entirelly unrelated to the paragraph and wpa_actiond should not be recommended to be installed for making an encrypted password. wpa_actiond is an optdepends used for the netctl-auto profile... [[User:Mhertz|Mhertz]] ([[User talk:Mhertz|talk]]) 17:25, 25 April 2013 (UTC)</div>Mhertzhttps://wiki.archlinux.org/index.php?title=User_talk:Mhertz&diff=255139User talk:Mhertz2013-04-25T17:24:55Z<p>Mhertz: /* Edit reason */</p>
<hr />
<div>==Edit reason==<br />
Hi, can I ask you the reason for this edit: [https://wiki.archlinux.org/index.php?title=Netctl&diff=255008&oldid=254814]? Please from now on remember to explain your edits using the "Summary" field just above the "Save page" button. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 09:16, 25 April 2013 (UTC)<br />
<br />
==Answer==<br />
Sorry for not adding a description... I removed that part because it was entirelly unrelated to the paragraph and wpa_actiond should not be recommended to be installed for making an encrypted password. wpa_actiond is an optdepends used for the netctl-auto profile...</div>Mhertzhttps://wiki.archlinux.org/index.php?title=User_talk:Mhertz&diff=255138User talk:Mhertz2013-04-25T17:24:29Z<p>Mhertz: </p>
<hr />
<div>==Edit reason==<br />
Hi, can I ask you the reason for this edit: [https://wiki.archlinux.org/index.php?title=Netctl&diff=255008&oldid=254814]? Please from now on remember to explain your edits using the "Summary" field just above the "Save page" button. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 09:16, 25 April 2013 (UTC)<br />
<br />
Sorry for not adding a description... I removed that part because it was entirelly unrelated to the paragraph and wpa_actiond should not be recommended to be installed for making an encrypted password. wpa_actiond is an optdepends used for the netctl-auto profile...</div>Mhertzhttps://wiki.archlinux.org/index.php?title=User_talk:Mhertz&diff=255137User talk:Mhertz2013-04-25T17:23:53Z<p>Mhertz: /* Edit reason */</p>
<hr />
<div>==Edit reason==<br />
Hi, can I ask you the reason for this edit: [https://wiki.archlinux.org/index.php?title=Netctl&diff=255008&oldid=254814]? Please from now on remember to explain your edits using the "Summary" field just above the "Save page" button. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 09:16, 25 April 2013 (UTC)</div>Mhertzhttps://wiki.archlinux.org/index.php?title=User_talk:Mhertz&diff=255136User talk:Mhertz2013-04-25T17:22:36Z<p>Mhertz: /* Edit reason */</p>
<hr />
<div>==Edit reason==<br />
Hi, can I ask you the reason for this edit: [https://wiki.archlinux.org/index.php?title=Netctl&diff=255008&oldid=254814]? Please from now on remember to explain your edits using the "Summary" field just above the "Save page" button. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 09:16, 25 April 2013 (UTC)<br />
<br />
<br />
Sorry for not adding a description... I removed that part because it was entirelly unrelated to the paragraph and wpa_actiond should not be recommended to be installed for making an encrypted password. wpa_actiond is an optdepends used for the netctl-auto profile...</div>Mhertzhttps://wiki.archlinux.org/index.php?title=User_talk:Mhertz&diff=255135User talk:Mhertz2013-04-25T17:22:04Z<p>Mhertz: /* Edit reason */</p>
<hr />
<div>==Edit reason==<br />
Hi, can I ask you the reason for this edit: [https://wiki.archlinux.org/index.php?title=Netctl&diff=255008&oldid=254814]? Please from now on remember to explain your edits using the "Summary" field just above the "Save page" button. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 09:16, 25 April 2013 (UTC)<br />
Sorry for not adding a description... I removed that part because it was entirelly unrelated to the paragraph and wpa_actiond should not be recommended to be installed for making an encrypted password. wpa_actiond is an optdepends used for the netctl-auto profile...</div>Mhertzhttps://wiki.archlinux.org/index.php?title=Netctl&diff=255008Netctl2013-04-23T16:47:32Z<p>Mhertz: /* Password encryption (256-bit PSK) */</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Networking]]<br />
[[fr:Netctl]]<br />
[[es:Netctl]]<br />
[[ja:Netctl]]<br />
[[zh-CN:Netctl]]<br />
[[ru:Netctl]]<br />
{{Article summary start}}<br />
{{Article summary text|A guide to configuring the network using netctl and network profile scripts.}}<br />
{{Article summary end}}<br />
Netctl is a new Arch project that replaces [[netcfg]]. Netctl is the future (and present) of CLI-based network management on Arch Linux.<br />
<br />
==Installation==<br />
The {{Pkg|netctl}} package is available in the [[Official Repositories]]. Installing netctl will replace {{pkg|netcfg}}.<br />
<br />
==Required reading==<br />
Considerable effort has gone into the construction of quality man pages. Users should read the following man pages prior to using netctl:<br />
*[https://github.com/joukewitteveen/netctl/blob/master/docs/netctl.1.txt netctl]<br />
*[https://github.com/joukewitteveen/netctl/blob/master/docs/netctl.profile.5.txt netctl.profile]<br />
*[https://github.com/joukewitteveen/netctl/blob/master/docs/netctl.special.7.txt netctl.special]<br />
<br />
{{Pkg|netctl}} and {{Pkg|netcfg}} are conflicting packages. You will be potentially connectionless after installing {{Pkg|netctl}} '''if''' your profiles are misconfigured.<br />
<br />
==Configuration==<br />
<br />
{{ic|netctl}} may be used to introspect and control the state of the systemd services for the network profile manager. Example configuration files are provided for the user to assist them in configuring their network connection. These example profiles are located in {{ic|/etc/netctl/examples/}}. The common configurations include:<br />
*ethernet-dhcp<br />
*ethernet-static<br />
*wireless-wpa<br />
*wireless-wpa-static<br />
<br />
To use an example profile, simply copy one of them from {{ic|/etc/netctl/examples/}} to {{ic|/etc/netctl/}} and configure it to your needs:<br />
# cp /etc/netctl/examples/wireless-wpa /etc/netctl/<br />
<br />
Once you have created your profile, make an attempt to establish a connection using the newly created profile by running:<br />
# netctl start <profile><br />
<br />
If issuing the above command results in a failure, then use {{ic|journalctl -xn}} and {{ic|netctl status <profile>}} in order to obtain a more in depth explanation of the failure. Make the needed corrections to the failed configuration and retest.<br />
<br />
===Automatic Operation===<br />
====Just One Profile====<br />
If you are using only one profile, once that profile is started successfully, it can be {{ic|enabled}} using <br />
# netctl enable <profile> <br />
This will create and enable a [[systemd]] service that will start when the computer boots.<br />
<br />
{{Note|The connection to a dhcp-server is only established, if the interface is connected and up at boot time (or when the service starts). In order to have an automatic connection established on cable connect, proceed to the [[Netctl#Multiple_Profiles|Multiple Profiles]] section.}}<br />
<br />
====Multiple Profiles====<br />
Whereas with {{ic|netcfg}} there was {{ic|net-auto-wireless.service}} and {{ic|net-auto-wired.service}}, {{ic|netctl}} uses {{ic|netctl-auto@<interface>.service}} for wireless profiles, and {{ic|netctl-ifplugd@<interface>.service}} for wired profiles. In order to make the {{ic|netctl-auto@<interface>.service}} work for wireless interfaces, the package {{pkg|wpa_actiond}} is required to be installed. In order to make the {{ic|netctl-ifplugd@<interface>.service}} work for wired interfaces, the package {{pkg|ifplugd}} is required to be installed. Configure {{ic|/etc/ifplugd/ifplugd.conf}} accordingly.<br />
<br />
Once your profiles are set and verified to be working, simply enable these services with <br />
# systemctl enable netctl-auto@<interface>.service <br />
# systemctl enable netctl-ifplugd@<interface>.service <br />
<br />
If you have previously enabled a profile through {{ic|netctl}}, run <br />
# netctl disable <profile> <br />
to prevent the profile from starting twice at boot, and possibly causing issues with wpa_supplicant.<br />
<br />
{{Note|If there is ever a need to alter a currently enabled profile, execute {{ic|netctl reenable <profile>}} to apply the changes.}}<br />
<br />
===Migrating from netcfg===<br />
{{Warning|{{ic|netctl}} conflicts with {{ic|netcfg}} so disable existing {{ic|netcfg@<profile>}} service before installing {{ic|netctl}}.}}<br />
<br />
{{ic|netctl}} uses {{ic|/etc/netctl}} to store its profiles, ''not'' {{ic|/etc/network.d}} ({{ic|netcfg}}'s profile storage location).<br />
<br />
In order to migrate from netcfg, at least the following is needed:<br />
*Move network profile files to the new directory.<br />
*Rename variables therein according to netctl.profile(5) (Most variable names have only UpperCamelCase i.e CONNECTION= becomes Connection=).<br />
*For static IP configuration make sure the Address= variables have a netmask after the IP (e.g. Address=('192.168.1.23<b>/24</b>' '192.168.1.87<b>/24</b>') in the example profile). <br />
*If you setup a wireless profile according in the {{ic|wireless-wpa-configsection}} example, note that this overrides {{ic|wpa_supplicant}} options defined above the brackets. For a connection to a hidden wireless network, add {{ic|scan_ssid<nowiki>=1</nowiki>}} to the options in the {{ic|wireless-wpa-configsection}}; {{ic|Hidden<nowiki>=</nowiki>yes}} does not work there. <br />
*Unquote interface variables and other variables that don't strictly need quoting (this is mainly a style thing).<br />
*Run {{ic|netctl enable <profile>}} for every profile in the old NETWORKS array. 'last' doesn't work this way, see netctl.special(7).<br />
*Use {{ic|netctl list}} / {{ic|netctl start <profile>}} instead of netcfg-menu. wifi-menu remains available.<br />
<br />
===Password encryption (256-bit PSK)===<br />
<br />
Users ''not'' wishing to have their passwords stored in ''plain text'' have the option of generating a 256-bit Encrypted PSK.<br />
<br />
Generate your 256-bit Encrypted PSK using [[WPA_supplicant#Configuration_file|wpa_passphrase]]:<br />
{{hc|Usage: wpa_passphrase [ssid] [passphrase]|<br />
2=$ wpa_passphrase archlinux freenode|<br />
network={<br />
ssid="archlinux"<br />
#psk="freenode"<br />
psk=64cf3ced850ecef39197bb7b7b301fc39437a6aa6c6a599d0534b16af578e04a<br />
}<br />
{{Note|This information will be used in your profile so do not close the terminal}}<br />
}}<br />
<br />
In a second terminal window copy the example file {{ic|wireless-wpa}} from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}.<br />
# cp /etc/netctl/examples/wireless-wpa /etc/netctl/wireless-wpa<br />
<br />
You will then need to edit {{ic|/etc/netctl/wireless-wpa}} using your favorite text editor and add the ''Encrypted Pre-shared Key'' that was generated earlier using wpa_passphrase, to the {{ic|'''Key'''}} variable of this profile.<br />
<br />
Once completed your network profile {{ic|wireless-wpa}} containing a 256-bit Encrypted PSK should resemble:<br />
{{hc|/etc/netctl/wireless-wpa|2=<br />
Description='A simple WPA encrypted wireless connection using 256-bit Encrypted PSK'<br />
Interface=wlp2s2<br />
Connection=wireless<br />
Security=wpa<br />
IP=dhcp<br />
ESSID=archlinux<br />
Key=\"64cf3ced850ecef39197bb7b7b301fc39437a6aa6c6a599d0534b16af578e04a<br />
}}<br />
{{Note|1=Make sure to use the '''special non-quoted rules''' for {{ic|1=Key=}} that are explained at the end of [https://github.com/joukewitteveen/netctl/blob/master/docs/netctl.profile.5.txt netctl.profile(5)].}}<br />
<br />
==Support==<br />
Official announcement thread: https://bbs.archlinux.org/viewtopic.php?id=157670<br />
<br />
==Tips and Tricks==<br />
As of April 2013 there is no netctl alternative to {{ic|netcfg current}}. If you relied on it for something, like a status bar for a tiling window manager, you can now use:<br />
# netctl list | sed -n 's/^\* //p'<br />
or, when {{ic|netctl-auto}} was used to connect:<br />
# wpa_cli -i <interface> status | sed -n 's/^id_str=//p'</div>Mhertzhttps://wiki.archlinux.org/index.php?title=Netctl&diff=255007Netctl2013-04-23T16:46:44Z<p>Mhertz: /* Password encryption (256-bit PSK) */</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Networking]]<br />
[[fr:Netctl]]<br />
[[es:Netctl]]<br />
[[ja:Netctl]]<br />
[[zh-CN:Netctl]]<br />
[[ru:Netctl]]<br />
{{Article summary start}}<br />
{{Article summary text|A guide to configuring the network using netctl and network profile scripts.}}<br />
{{Article summary end}}<br />
Netctl is a new Arch project that replaces [[netcfg]]. Netctl is the future (and present) of CLI-based network management on Arch Linux.<br />
<br />
==Installation==<br />
The {{Pkg|netctl}} package is available in the [[Official Repositories]]. Installing netctl will replace {{pkg|netcfg}}.<br />
<br />
==Required reading==<br />
Considerable effort has gone into the construction of quality man pages. Users should read the following man pages prior to using netctl:<br />
*[https://github.com/joukewitteveen/netctl/blob/master/docs/netctl.1.txt netctl]<br />
*[https://github.com/joukewitteveen/netctl/blob/master/docs/netctl.profile.5.txt netctl.profile]<br />
*[https://github.com/joukewitteveen/netctl/blob/master/docs/netctl.special.7.txt netctl.special]<br />
<br />
{{Pkg|netctl}} and {{Pkg|netcfg}} are conflicting packages. You will be potentially connectionless after installing {{Pkg|netctl}} '''if''' your profiles are misconfigured.<br />
<br />
==Configuration==<br />
<br />
{{ic|netctl}} may be used to introspect and control the state of the systemd services for the network profile manager. Example configuration files are provided for the user to assist them in configuring their network connection. These example profiles are located in {{ic|/etc/netctl/examples/}}. The common configurations include:<br />
*ethernet-dhcp<br />
*ethernet-static<br />
*wireless-wpa<br />
*wireless-wpa-static<br />
<br />
To use an example profile, simply copy one of them from {{ic|/etc/netctl/examples/}} to {{ic|/etc/netctl/}} and configure it to your needs:<br />
# cp /etc/netctl/examples/wireless-wpa /etc/netctl/<br />
<br />
Once you have created your profile, make an attempt to establish a connection using the newly created profile by running:<br />
# netctl start <profile><br />
<br />
If issuing the above command results in a failure, then use {{ic|journalctl -xn}} and {{ic|netctl status <profile>}} in order to obtain a more in depth explanation of the failure. Make the needed corrections to the failed configuration and retest.<br />
<br />
===Automatic Operation===<br />
====Just One Profile====<br />
If you are using only one profile, once that profile is started successfully, it can be {{ic|enabled}} using <br />
# netctl enable <profile> <br />
This will create and enable a [[systemd]] service that will start when the computer boots.<br />
<br />
{{Note|The connection to a dhcp-server is only established, if the interface is connected and up at boot time (or when the service starts). In order to have an automatic connection established on cable connect, proceed to the [[Netctl#Multiple_Profiles|Multiple Profiles]] section.}}<br />
<br />
====Multiple Profiles====<br />
Whereas with {{ic|netcfg}} there was {{ic|net-auto-wireless.service}} and {{ic|net-auto-wired.service}}, {{ic|netctl}} uses {{ic|netctl-auto@<interface>.service}} for wireless profiles, and {{ic|netctl-ifplugd@<interface>.service}} for wired profiles. In order to make the {{ic|netctl-auto@<interface>.service}} work for wireless interfaces, the package {{pkg|wpa_actiond}} is required to be installed. In order to make the {{ic|netctl-ifplugd@<interface>.service}} work for wired interfaces, the package {{pkg|ifplugd}} is required to be installed. Configure {{ic|/etc/ifplugd/ifplugd.conf}} accordingly.<br />
<br />
Once your profiles are set and verified to be working, simply enable these services with <br />
# systemctl enable netctl-auto@<interface>.service <br />
# systemctl enable netctl-ifplugd@<interface>.service <br />
<br />
If you have previously enabled a profile through {{ic|netctl}}, run <br />
# netctl disable <profile> <br />
to prevent the profile from starting twice at boot, and possibly causing issues with wpa_supplicant.<br />
<br />
{{Note|If there is ever a need to alter a currently enabled profile, execute {{ic|netctl reenable <profile>}} to apply the changes.}}<br />
<br />
===Migrating from netcfg===<br />
{{Warning|{{ic|netctl}} conflicts with {{ic|netcfg}} so disable existing {{ic|netcfg@<profile>}} service before installing {{ic|netctl}}.}}<br />
<br />
{{ic|netctl}} uses {{ic|/etc/netctl}} to store its profiles, ''not'' {{ic|/etc/network.d}} ({{ic|netcfg}}'s profile storage location).<br />
<br />
In order to migrate from netcfg, at least the following is needed:<br />
*Move network profile files to the new directory.<br />
*Rename variables therein according to netctl.profile(5) (Most variable names have only UpperCamelCase i.e CONNECTION= becomes Connection=).<br />
*For static IP configuration make sure the Address= variables have a netmask after the IP (e.g. Address=('192.168.1.23<b>/24</b>' '192.168.1.87<b>/24</b>') in the example profile). <br />
*If you setup a wireless profile according in the {{ic|wireless-wpa-configsection}} example, note that this overrides {{ic|wpa_supplicant}} options defined above the brackets. For a connection to a hidden wireless network, add {{ic|scan_ssid<nowiki>=1</nowiki>}} to the options in the {{ic|wireless-wpa-configsection}}; {{ic|Hidden<nowiki>=</nowiki>yes}} does not work there. <br />
*Unquote interface variables and other variables that don't strictly need quoting (this is mainly a style thing).<br />
*Run {{ic|netctl enable <profile>}} for every profile in the old NETWORKS array. 'last' doesn't work this way, see netctl.special(7).<br />
*Use {{ic|netctl list}} / {{ic|netctl start <profile>}} instead of netcfg-menu. wifi-menu remains available.<br />
<br />
===Password encryption (256-bit PSK)===<br />
<br />
Users ''not'' wishing to have their passwords stored in ''plain text'' have the option of generating a 256-bit Encrypted PSK.<br />
<br />
Next, generate your 256-bit Encrypted PSK using [[WPA_supplicant#Configuration_file|wpa_passphrase]]:<br />
{{hc|Usage: wpa_passphrase [ssid] [passphrase]|<br />
2=$ wpa_passphrase archlinux freenode|<br />
network={<br />
ssid="archlinux"<br />
#psk="freenode"<br />
psk=64cf3ced850ecef39197bb7b7b301fc39437a6aa6c6a599d0534b16af578e04a<br />
}<br />
{{Note|This information will be used in your profile so do not close the terminal}}<br />
}}<br />
<br />
In a second terminal window copy the example file {{ic|wireless-wpa}} from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}.<br />
# cp /etc/netctl/examples/wireless-wpa /etc/netctl/wireless-wpa<br />
<br />
You will then need to edit {{ic|/etc/netctl/wireless-wpa}} using your favorite text editor and add the ''Encrypted Pre-shared Key'' that was generated earlier using wpa_passphrase, to the {{ic|'''Key'''}} variable of this profile.<br />
<br />
Once completed your network profile {{ic|wireless-wpa}} containing a 256-bit Encrypted PSK should resemble:<br />
{{hc|/etc/netctl/wireless-wpa|2=<br />
Description='A simple WPA encrypted wireless connection using 256-bit Encrypted PSK'<br />
Interface=wlp2s2<br />
Connection=wireless<br />
Security=wpa<br />
IP=dhcp<br />
ESSID=archlinux<br />
Key=\"64cf3ced850ecef39197bb7b7b301fc39437a6aa6c6a599d0534b16af578e04a<br />
}}<br />
{{Note|1=Make sure to use the '''special non-quoted rules''' for {{ic|1=Key=}} that are explained at the end of [https://github.com/joukewitteveen/netctl/blob/master/docs/netctl.profile.5.txt netctl.profile(5)].}}<br />
<br />
==Support==<br />
Official announcement thread: https://bbs.archlinux.org/viewtopic.php?id=157670<br />
<br />
==Tips and Tricks==<br />
As of April 2013 there is no netctl alternative to {{ic|netcfg current}}. If you relied on it for something, like a status bar for a tiling window manager, you can now use:<br />
# netctl list | sed -n 's/^\* //p'<br />
or, when {{ic|netctl-auto}} was used to connect:<br />
# wpa_cli -i <interface> status | sed -n 's/^id_str=//p'</div>Mhertzhttps://wiki.archlinux.org/index.php?title=Monsterwm&diff=254046Monsterwm2013-04-14T14:53:21Z<p>Mhertz: /* Patches */</p>
<hr />
<div>[[Category:Dynamic WMs]]<br />
[https://github.com/c00kiemon5ter/monsterwm Monsterwm] is a minimal, lightweight, ''tiny but monstrous'' dynamic tiling window manager. It will try to stay as small as possible. Currently under 700 lines with the config file included. It provides a set of four different layout modes (vertical stack, bottom stack, grid and monocle/fullscreen) by default, and has floating mode support. Each virtual desktop has its own properties, unaffected by other desktops' settings. Finally monsterwm supports multiple monitors setups.<br />
<br />
Monsterwm is written with '''{{ic|Xlib}}''' but there is also an '''{{ic|XCB}}''' fork available.<br />
<br />
== Installation ==<br />
<br />
Download the {{AUR|monsterwm-git}} or {{AUR|monsterwm-xcb-git}} package from the [[AUR]].<br />
<br />
== Configuration ==<br />
Monsterwm uses its {{ic|config.h}} file for configuration. By default, some hotkeys are already set. {{Keypress|MOD1}} is the {{Keypress|Alt}} and {{Keypress|MOD4}} is the {{Keypress|Windows/Super}} key. <br />
<br />
* {{Keypress|MOD1 + h}} (decrease the size of a current window)<br />
* {{Keypress|MOD1 + l}} (increase the size of a current window)<br />
* {{Keypress|MOD1 + Shift + c}} (close current window)<br />
* {{Keypress|MOD1 + Tab}} (move to last desktop)<br />
* {{Keypress|MOD1 + k}} (change to previous window)<br />
* {{Keypress|MOD1 + j}} (change to next window)<br />
* {{Keypress|MOD1 + Shift + k}} (move current window up)<br />
* {{Keypress|MOD1 + Shift + j}} (move current window down)<br />
* {{Keypress|MOD1 + Enter}} (change master to current window)<br />
* {{Keypress|MOD1 + t}} (switch to tile mode)<br />
* {{Keypress|MOD1 + b}} (switch to bottomstack mode)<br />
* {{Keypress|MOD1 + g}} (switch to grid mode)<br />
* {{Keypress|MOD1 + m}} (switch to monocle mode)<br />
* {{Keypress|MOD4 + v}} (open dmenu - requires dmenu)<br />
* {{Keypress|MOD1 + Shift + Enter}} (open xterm)<br />
* {{Keypress|MOD1 + Left}} (previous desktop)<br />
* {{Keypress|MOD1 + Right}} (next desktop)<br />
* {{Keypress|MOD1 + F1-4}} (change to desktop #)<br />
* {{Keypress|MOD1 + Ctrl + q}} (quit monsterwm with exit value 1)<br />
* {{Keypress|MOD1 + Ctrl + r}} (quit monsterwm with exit value 0)<br />
<br />
<br />
You can find more information in the man page ({{ic|man monsterwm}}).<br />
<br />
==Floating Mode==<br />
<br />
In floating mode one can freely move and resize windows in the screen space. Changing desktops, adding or removing floating windows, does not affect the floating status of the windows. Windows will revert to their tiling mode position once the user selects a tiling mode. To enter the floating mode, either change the layout to {{ic|FLOAT}}, or enabled it by moving or resizing a window with the mouse, the window is then marked as being in floating mode.<br />
<br />
==Panel==<br />
<br />
The user can define an empty space on the bottom or top of the screen, to be used by a panel. <br />
The panel is toggleable, but will be visible if no windows are on the screen. <br />
Monsterwm does not provide a panel and/or statusbar itself. <br />
Instead it adheres to the UNIX philosophy <br />
and outputs information about the existing desktops <br />
suchs as the number of windows and the tiling mode/layout of each desktop, <br />
the current desktop and urgent hints whenever needed. <br />
The user can use whatever tool or panel suits him best <br />
({{ic|dzen2}}, {{ic|conky}}, {{ic|[https://github.com/moetunes/Some_sorta_bar some-sorta-bar]}}, {{ic|[https://github.com/lemonboy/bar bar]}}, {{ic|[https://github.com/moetunes/bipolarbar bipolarbar]}}, {{ic|[https://github.com/c00kiemon5ter/mopag mopag]}}, w/e), <br />
to process and display that information.<br />
<br />
To disable the panel completely set PANEL_HEIGHT to zero 0. The SHOW_PANELL setting controls whether the panel is visible on startup, it does not control whether there is a panel or not.<br />
<br />
You can find an example of how to achieve this [https://gist.github.com/1905427 here]. <br />
You can actually parse that information with any language you want, <br />
build anything you want, <br />
and display the information however you'd like. <br />
Do not be limited by that example.<br />
<br />
==Patches==<br />
<br />
Some extensions to the code are supported in the form of patches. See other branches for the patch and code. Easiest way to apply a patch, is to {{ic|git merge}} that branch.<br />
<br />
Currently:<br />
<br />
* '''centerwindow''' : center new floating windows on the screen and center any window with a shortcut<br />
* '''fibonacci''' : adds fibonacci layout mode<br />
* '''initlayouts''' : define initial layouts for every desktop<br />
* '''monocleborders''' : adds borders to the monocle layout<br />
* '''nmaster''' : adds nmaster layout - multiple master windows for BSTACK and TILE layouts<br />
* '''rectangle''' : draws only a rectangle when moving/resizing windows to keep resources low (ie through an ssh forwarded session)<br />
* '''showhide''' : adds a function to show and hide all windows on all desktops<br />
* '''uselessgaps''' : adds gaps around every window on screen<br />
* '''warpcursor''' : cursors follows and is placed in the center of the current window<br />
* '''windowtitles''' : along with the rest desktop info, output the title of the current window<br />
<br />
Another branch called [core], is an even more stripped and minimal version of monsterwm, on top of which the master branch is built and extended.<br />
<br />
There is also xinerama support for multiple monitors.<br />
<br />
* '''xinerama-core''' : the equivalent of core branch with xinerama support<br />
* '''xinerama-master''' : the equivalent of master branch with xinerama support<br />
* '''xinerama-init''' : configurable initial values for each desktop on each monitor<br />
<br />
To install monsterwm with a patch, simply change the {{ic|1=_gitbranch=}} line in the PKGBUILD to the name of the patch.<br />
<br />
----<br />
<br />
If you installed monsterwm with the [[#Compile from source]] method, you can change to the desired branch with:<br />
<br />
$ git checkout <branch><br />
<br />
and then continue normally. For example to build monsterwm with the ''fibonacci'' layout one would do:<br />
<br />
$ git checkout fibonacci<br />
$ make<br />
# make clean install<br />
<br />
That way you can also combine patches. <br />
To do that one would {{ic|merge}} another branch to the current one. <br />
For example to build monsterwm with ''uselessgaps'', ''warpcursor'' and ''showhide'', one would do:<br />
<br />
$ git config user.email <mailaddress><br />
$ git config user.name <name><br />
$ git checkout uselessgaps<br />
$ git checkout warpcursor<br />
$ git checkout showhide<br />
$ git checkout master<br />
$ git merge -m merge uselessgaps warpcursor showhide<br />
$ make<br />
# make install<br />
<br />
Note that you can skip the first two lines if you've previously defined them globally:<br />
<br />
$ git config --global user.email <mailaddress><br />
$ git config --global user.name <name><br />
<br />
== Customization ==<br />
<br />
=== Application Rules ===<br />
<br />
One can define rules for a specific application, which will be applied once the application spawns. <br />
A rule is composed of four parts.<br />
<br />
/* class desktop follow float */<br />
{ "MPlayer", 2, True, False },<br />
<br />
* the class or instance name of the application<br />
* the desktop in which the application should appear - index starts from {{keypress|0}}<br />
* whether that desktop should be focused when the application is started<br />
* whether the application should start in floating mode<br />
<br />
So the above rule, would place [[MPlayer]] to desktop {{keypress|3}} and change from the current desktop to that desktop, because {{ic|follow}} is {{ic|True}}. MPlayer will be tiled as every other window.<br />
<br />
To get the application class or instance name you can use {{ic|xprop | grep "WM_CLASS"}}.<br />
If the desktop is set to a 'negative' number then the window spawns in the current desktop.<br />
<br />
If we change the above rule to this one:<br />
<br />
/* class desktop follow float */<br />
{ "MPlayer", -1, True, True },<br />
<br />
then MPlayer will be spawned in the current desktop, floating.<br />
<br />
=== Add custom keybinds ===<br />
To add custom keybindings, you must edit {{ic|config.h}} and recompile monsterwm. <br />
That's why it is important to set them up on the initial installation to avoid having to do this again.<br />
Below is a scenario in which you would need to add a keybinding to open the [[thunar]] filemanager with {{keypress|MOD1+t}}.<br />
<br />
First, you must add a line such as the following, underneath the already-defined {{ic|const char*}}:<br />
{{hc|config.h|<nowiki><br />
/**<br />
* custom commands<br />
* must always end with ', NULL };'<br />
*/<br />
static const char *termcmd[] = { "xterm", NULL };<br />
const char* thunarcmd[] = {"thunar", NULL};<br />
...</nowiki><br />
}}<br />
{{Note| You can name it whatever you want. In this case, it is named {{ic|thunarcmd}}.}}<br />
<br />
{{ic|thunarcmd}} is just a title for the command you want to construct and run. Inside the curly brackets is where you define the command to be executed. Each command fragment that is separated by a space has its own value. For example the command sequence {{ic|ncmpcpp next}}, would be entered as {{ic|1={"ncmpcpp", "next", NULL}}}. <br />
The {{ic|NULL}} value '''must''' be included at the end of each hotkey.<br />
<br />
To actually register the hotkey with the window manager, you must look below that at the struct named {{ic|keys[]}}. <br />
This is where monsterwm stores all of its keybindings. <br />
An example entry for the {{ic|thunarcmd}} made above would be:<br />
<br />
{ MOD1, XK_t, spawn, {.com = thunarcmd}},<br />
<br />
* The first element specifies the first keypress which is either:<br />
** {{keypress|MOD1}} for the modkey only, <br />
** {{keypress|MOD1|SHIFT}} for the modkey and then the shift key,<br />
** {{keypress|MOD1|CONTROL}} for the modkey and then the control key,<br />
** {{keypress|0}} for no key at all. <br />
You can also use {{keypress|MOD4}} which is the {{keypress|super}} or {{keypress|windows}} key instead of {{keypress|MOD1}}. <br />
<br />
* The second element specifies the actual key that is pressed to differentiate it from other similar hotkeys. <br />
In this case, we set it to {{keypress|t}}, which has {{ic|XK_}} in front of it because that is how [[Xorg]] reads key presses. Just remember to include {{ic|XK_}} in front of it. Some examples of these include {{keypress|XK_a}} for the {{keypress|a}} key, {{keypress|XK_Space}} for the {{ic|space bar}} and {{keypress|XK_1}} for the {{Keypress|1}} key. <br />
<br />
Note that these are case-sensitive, so {{keypress|XK_a}} is not the same as {{keypress|XK_A}}. So for this example, the entire hotkey sequence that needs to be pressed is {{keypress|MOD1+t}}.<br />
<br />
* The third element just specifies the function {{ic|spawn}}, which has been written to be passed a command to execute. <br />
Whenever you need to start an application or do anything that is not related to the internals of monsterwm {{ic|spawn}} will be used. <br />
<br />
* The final element inside the brackets specifies which command that was previously defined will be run.<br />
In our case, it is {{ic|thunarcmd[]}}, so we would do {{ic|<nowiki>{.com = thunarcmd}</nowiki>}}. The {{ic|.com}} stands for command.<br />
<br />
You can do the same with the {{ic|buttons[]}} structure. <br />
The buttons structure, uses the mouse instead of the keyboard. <br />
<br />
* Button1 is the left button<br />
* Button2 is the middle click<br />
* Button3 is the right button<br />
<br />
----<br />
<br />
After this, recompile, hope for no errors, and install.<br />
<br />
==See also==<br />
* [https://bbs.archlinux.org/viewtopic.php?id=132122 monsterwm thread on the forums]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=141853 monsterwm screenshot thread]<br />
* [https://github.com/c00kiemon5ter/monsterwm monsterwm repository on github]<br />
* [https://github.com/Cloudef/monsterwm-xcb monsterwm-xcb repository on github]<br />
* [https://wiki.archlinux.org/index.php/Comparison_of_Tiling_Window_Managers Comparison of tiling window managers]</div>Mhertzhttps://wiki.archlinux.org/index.php?title=Monsterwm&diff=195821Monsterwm2012-04-22T13:40:24Z<p>Mhertz: An extra small fix to the git merge command.</p>
<hr />
<div>[[Category:Dynamic WMs (English)]]<br />
{{i18n|Monsterwm}}<br />
<br />
[https://github.com/c00kiemon5ter/monsterwm Monsterwm] is a minimal, lightweight, ''tiny but monsterous'' dynamic tiling window manager. It will try to stay as small as possible. Currently under 750 lines with the config file included. It provides a set of four different layout modes (vertical stack, bottom stack, grid and monocle/fullscreen), and has floating mode support. Each virtual desktop has its own properties, unaffected by other desktops' settings.<br />
<br />
Monsterwm is writen with '''{{ic|Xlib}}''' but there is also an '''{{ic|XCB}}''' fork available. You can find it in the [[#Resources|Resources]]<br />
<br />
== Installation ==<br />
=== Method 1 ===<br />
Using AUR<br />
<br />
Download the [https://aur.archlinux.org/packages.php?ID=55090 PKGBUILD from AUR]. Then, as a non-root user, run:<br />
<br />
$ makepkg -i<br />
<br />
while in the directory of the saved PKGBUILD. All the files will be retrieved, the package will be built and installed.<br />
<br />
=== Method 2 ===<br />
Using git (recommended by monsterwm's author).<br />
<br />
Clone the [https://github.com/c00kiemon5ter/monsterwm official github repository] from github. <br />
<br />
$ git clone git://github.com/c00kiemon5ter/monsterwm.git<br />
$ cd monsterwm<br />
<br />
To build monsterwm, run the following as a non-root user:<br />
<br />
$ make<br />
<br />
To install monsterwm, run the following as root:<br />
<br />
# make clean install<br />
<br />
Before you build monsterwm, you may want to skip to the [[#Configuration|Configuration]] section and [[#Customization|Customization]] to change the default configuration.<br />
<br />
== Configuration ==<br />
Monsterwm uses it's config.h file for configuration. By default, some hotkeys are already set.<br />
<br />
'''Note''': the default MOD1 key is the Alt key.<br />
<br />
<ul><br />
<li>MOD + h (decrease the size of a current window)</li><br />
<li>MOD + l (increase the size of a current window)</li><br />
<li>MOD + Shift + c (close current window)</li><br />
<li>MOD + Tab (move to last desktop)</li><br />
<li>MOD + k (change to previous window)</li><br />
<li>MOD + j (change to next window)</li><br />
<li>MOD + Shift + k (move current window up)</li><br />
<li>MOD + Shift + j (move current window down)</li><br />
<li>MOD + Enter (change master to current window)</li><br />
<li>MOD + t (switch to tile mode)</li><br />
<li>MOD + b (switch to bottomstack mode)</li><br />
<li>MOD + g (switch to grid mode)</li><br />
<li>MOD + m (switch to monocle mode)</li><br />
<li>MOD4 + v (open dmenu - requires dmenu)</li><br />
<li>MOD + Shift + Return (open xterm)</li><br />
<li>MOD + Left (previous desktop)</li><br />
<li>MOD + Right (next desktop)</li><br />
<li>MOD + F1-4 (change to desktop #)</li><br />
<li>MOD + Control + q (quit monsterwm with exit value 1)</li><br />
<li>MOD + Control + r (quit monsterwm with exit value 0)</li><br />
</ul><br />
<br />
you can find more information in the man page<br />
<br />
$ man monsterwm<br />
<br />
==Floating Mode==<br />
<br />
In floating mode one can freely move and resize windows in the screen space. <br />
Changing desktops, adding or removing floating windows, does not affect the floating status of the windows. <br />
Windows will revert to their tiling mode position once the user re-selects the current tiling mode. <br />
Note, that one cannot "select" the floating mode, <br />
but it will be enabled for any window if one tries to move or resize that window with the mouse. <br />
The window is then marked, as being in floating mode.<br />
<br />
==Panel==<br />
<br />
The user can define an empty space on the bottom or top of the screen, to be used by a panel. <br />
The panel is toggleable, but will be visible if no windows are on the screen. <br />
Monsterwm does not provide a panel and/or statusbar itself. <br />
Instead it adheres to the UNIX philosophy <br />
and outputs information about the existing desktops <br />
suchs as the number of windows and the tiling mode/layout of each desktop, <br />
the current desktop and urgent hints whenever needed. <br />
The user can use whatever tool or panel suits him best <br />
({{ic|dzen2}}, {{ic|conky}}, {{ic|[https://github.com/moetunes/Some_sorta_bar some-sorta-bar]}}, w/e), <br />
to process and display that information.<br />
<br />
You can find an example of how to achieve this [https://gist.github.com/1905427 here]. <br />
You can actually parse that information with any language you want, <br />
build anything you want, <br />
and display the information as you'd like. <br />
Do not be limited to that example.<br />
<br />
==Patches==<br />
<br />
There are several patches that extend monsterwm's functionality.<br />
<br />
* fib - adds fibonacci layout<br />
* monocleborders - adds borders to the monocle layout<br />
* showhide - adds a function to show and hide all windows on all desktops<br />
* uselessgaps - adds gaps around every window on screen<br />
* warpcursor - cursors follows and is placed in the center of the current window<br />
<br />
* bloat : bloat is merge of all patches with the current master, just for fun<br />
* core : core is is a very minimal subset of monsterwm, it's essentially its core, fully usuable at 610 loc<br />
<br />
To install monsterwm with a patch simply change the {{bc|1=_gitbranch=}} line on the PKGBUILD to the name of the patch.<br />
<br />
----<br />
<br />
If you installed monsterwm with [[#Method_2|method 2 - using git]], you can change to the desired branch with<br />
<br />
$ git checkout <branch><br />
<br />
and then continue normally. For example to build monsterwm with the fibonacci layout one would do:<br />
<br />
$ git checkout fib<br />
$ make<br />
# make clean install<br />
<br />
That way you can also combine patches. To do that one would {{ic|merge}} another branch to the current one. For example to build monsterwm with uselessgaps, warpcursor and showhide, one would do:<br />
<br />
$ git config user.email <mailaddress><br />
$ git config user.name <name><br />
$ git checkout uselessgaps<br />
$ git checkout warpcursor<br />
$ git checkout showhide<br />
$ git checkout master<br />
$ git merge -m merge uselessgaps warpcursor showhide<br />
$ make<br />
# make install<br />
<br />
== Customization ==<br />
<br />
=== Application Rules ===<br />
<br />
One can define rules for a specific application, which will be applied once the application spawns. <br />
A rule is composed of four parts.<br />
<br />
{ "MPlayer", 3, True, False },<br />
<br />
* the class or instance name of the application<br />
* the desktop in which the application should appear - index starts from zero/0<br />
* whether that desktop should be focused when the application is started<br />
* whether the application should start in floating mode<br />
<br />
So the above rule, would place [[mplayer|this]] to desktop {{keypress|3}} and chage from the current desktop to that desktop, because {{ic|follow}} is {{ic|True}}. mplayer will be tiled as every other window.<br />
<br />
To get the application class or instance name you can use {{ic|xprop | grep "WM_CLASS"}}.<br />
If the desktop is set to a 'negative' number then the window spawns in the current desktop.<br />
<br />
If we change the above rule to this one:<br />
<br />
{ "MPlayer", -1, True, True },<br />
<br />
then mplayer will be spawn in the current desktop, floating.<br />
<br />
=== Add Custom Keybinds ===<br />
To add custom keybindings, you must edit config.h and recompile monsterwm. <br />
That's why it is important to set them up on the initial installation to avoid having to do this again.<br />
I'll show you a scenario in which you would need to add a keybinding to open the thunar filemanager with {{keypress|MOD+t}}.<br />
<br />
First, you must add a line such as the following underneath the already-defined {{ic|const char*}}'s <br />
(Note: You can name it whatever you want. In this case, I named it {{ic|thunarcmd}}):<br />
<br />
const char* thunarcmd[] = {"thunar", NULL&#125;&#125;;<br />
<br />
{{ic|thunarcmd}} is just a title for the command you want to construct and run. <br />
Inside the curly brackets {{ic|{}} and {{ic|}}} is where you define the command to be executed. <br />
Each command fragment that is seperated by a space is it's own value. <br />
What I mean by that is that the command sequence {{ic|ncmpcpp next}}<br />
would be entered as {{ic|{"ncmpcpp", "next", NULL&#125;&#125;}. <br />
The ''{{ic|NULL}}'' value ''must'' be included at the end of each hotkey.<br />
<br />
To actually register the hotkey with the window manager, you must look below that at the struct named ''{{ic|keys[]''. <br />
This is where monsterwm stores all of it's keybindings. <br />
An example entry for the {{ic|thunarcmd}} we made above would be:<br />
<br />
{ MOD, XK_t, spawn, {.com &#61; thunarcmd&#125;&#125;,<br />
<br />
* The first element specifies the first sequence that is pressed <br />
** {{keypress|MOD}} for the modkey only, <br />
** {{keypress|MOD&#124;SHIFT}} for the modkey and then the shift key,<br />
** {{keypress|MOD&#124;CONTROL}} for the modkey and then the control key,<br />
** {{keypress|0}} for no key at all. <br />
You can also use {{keypress|WINKEY}} which is the {{keypress|super}} or ''windows'' key instead of MOD. <br />
<br />
* The second element specifies the actual key that is pressed to differenciate it from other similar hotkeys. <br />
In this case, we set it to {{keypress|t}}, <br />
which has {{ic|XK_}} in front of it because that's how Xorg reads key presses. <br />
Just remember to include {{ic|XK_}} in front of it and you'll be fine. <br />
Some examples of these include {{keypress|XK_a}} for the {{keypress|a key}}, <br />
{{keypress|XK_Space}} for the {{ic|space bar}}, <br />
and {{keypress|XK_1}} for the {{Keypress|1 key}}. <br />
Note that these are case-sensitive, so {{keypress|XK_a}} is not the same as {{keypress|XK_A}}.<br />
So for this example, the entire hotkey senquence that needs to be pressed is {{keypress|MOD+t}}.<br />
<br />
* The third element just specifies the function {{ic|spawn}}, which has been written to be passed a command to execute. <br />
Whenever you need to start an application or do anything that is not related to the internals of monsterwm {{ic|spawn}} will be used. <br />
<br />
* The final element inside the brackets specifies which command that was previously defined will be run.<br />
In our case, it is {{ic|thunarcmd[]}}, <br />
so we would do {{ic|{.com &#61; thunarcmd&#125;}}. <br />
The {{ic|.com}} stands for command.<br />
<br />
You can do the same with the {{ic|buttons[]}} struct. <br />
The buttons struct, uses the ''mouse'' instead of the keyboard. <br />
<br />
* Button1 is the left button<br />
* Button2 is the middle click<br />
* Button3 is the right button<br />
<br />
----<br />
<br />
After this, recompile, hope for no errors, and install.<br />
<br />
==See also==<br />
* [https://bbs.archlinux.org/viewtopic.php?id=132122 monsterwm thread on the forums]<br />
* [https://github.com/c00kiemon5ter/monsterwm monsterwm repository on github]<br />
* [https://github.com/Cloudef/monsterwm-xcb monsterwm-xcb repository on github]</div>Mhertzhttps://wiki.archlinux.org/index.php?title=Monsterwm&diff=195658Monsterwm2012-04-21T21:07:49Z<p>Mhertz: Fixed the commands needed for merging branches.</p>
<hr />
<div>[[Category:Dynamic WMs (English)]]<br />
{{i18n|Monsterwm}}<br />
<br />
[https://github.com/c00kiemon5ter/monsterwm Monsterwm] is a minimal, lightweight, ''tiny but monsterous'' dynamic tiling window manager. It will try to stay as small as possible. Currently under 750 lines with the config file included. It provides a set of four different layout modes (vertical stack, bottom stack, grid and monocle/fullscreen), and has floating mode support. Each virtual desktop has its own properties, unaffected by other desktops' settings.<br />
<br />
Monsterwm is writen with '''{{ic|Xlib}}''' but there is also an '''{{ic|XCB}}''' fork available. You can find it in the [[#Resources|Resources]]<br />
<br />
== Installation ==<br />
=== Method 1 ===<br />
Using AUR<br />
<br />
Download the [https://aur.archlinux.org/packages.php?ID=55090 PKGBUILD from AUR]. Then, as a non-root user, run:<br />
<br />
$ makepkg -i<br />
<br />
while in the directory of the saved PKGBUILD. All the files will be retrieved, the package will be built and installed.<br />
<br />
=== Method 2 ===<br />
Using git (recommended by monsterwm's author).<br />
<br />
Clone the [https://github.com/c00kiemon5ter/monsterwm official github repository] from github. <br />
<br />
$ git clone git://github.com/c00kiemon5ter/monsterwm.git<br />
$ cd monsterwm<br />
<br />
To build monsterwm, run the following as a non-root user:<br />
<br />
$ make<br />
<br />
To install monsterwm, run the following as root:<br />
<br />
# make clean install<br />
<br />
Before you build monsterwm, you may want to skip to the [[#Configuration|Configuration]] section and [[#Customization|Customization]] to change the default configuration.<br />
<br />
== Configuration ==<br />
Monsterwm uses it's config.h file for configuration. By default, some hotkeys are already set.<br />
<br />
'''Note''': the default MOD1 key is the Alt key.<br />
<br />
<ul><br />
<li>MOD + h (decrease the size of a current window)</li><br />
<li>MOD + l (increase the size of a current window)</li><br />
<li>MOD + Shift + c (close current window)</li><br />
<li>MOD + Tab (move to last desktop)</li><br />
<li>MOD + k (change to previous window)</li><br />
<li>MOD + j (change to next window)</li><br />
<li>MOD + Shift + k (move current window up)</li><br />
<li>MOD + Shift + j (move current window down)</li><br />
<li>MOD + Enter (change master to current window)</li><br />
<li>MOD + t (switch to tile mode)</li><br />
<li>MOD + b (switch to bottomstack mode)</li><br />
<li>MOD + g (switch to grid mode)</li><br />
<li>MOD + m (switch to monocle mode)</li><br />
<li>MOD4 + v (open dmenu - requires dmenu)</li><br />
<li>MOD + Shift + Return (open xterm)</li><br />
<li>MOD + Left (previous desktop)</li><br />
<li>MOD + Right (next desktop)</li><br />
<li>MOD + F1-4 (change to desktop #)</li><br />
<li>MOD + Control + q (quit monsterwm with exit value 1)</li><br />
<li>MOD + Control + r (quit monsterwm with exit value 0)</li><br />
</ul><br />
<br />
you can find more information in the man page<br />
<br />
$ man monsterwm<br />
<br />
==Floating Mode==<br />
<br />
In floating mode one can freely move and resize windows in the screen space. <br />
Changing desktops, adding or removing floating windows, does not affect the floating status of the windows. <br />
Windows will revert to their tiling mode position once the user re-selects the current tiling mode. <br />
Note, that one cannot "select" the floating mode, <br />
but it will be enabled for any window if one tries to move or resize that window with the mouse. <br />
The window is then marked, as being in floating mode.<br />
<br />
==Panel==<br />
<br />
The user can define an empty space on the bottom or top of the screen, to be used by a panel. <br />
The panel is toggleable, but will be visible if no windows are on the screen. <br />
Monsterwm does not provide a panel and/or statusbar itself. <br />
Instead it adheres to the UNIX philosophy <br />
and outputs information about the existing desktops <br />
suchs as the number of windows and the tiling mode/layout of each desktop, <br />
the current desktop and urgent hints whenever needed. <br />
The user can use whatever tool or panel suits him best <br />
({{ic|dzen2}}, {{ic|conky}}, {{ic|[https://github.com/moetunes/Some_sorta_bar some-sorta-bar]}}, w/e), <br />
to process and display that information.<br />
<br />
You can find an example of how to achieve this [https://gist.github.com/1905427 here]. <br />
You can actually parse that information with any language you want, <br />
build anything you want, <br />
and display the information as you'd like. <br />
Do not be limited to that example.<br />
<br />
==Patches==<br />
<br />
There are several patches that extend monsterwm's functionality.<br />
<br />
* fib - adds fibonacci layout<br />
* monocleborders - adds borders to the monocle layout<br />
* showhide - adds a function to show and hide all windows on all desktops<br />
* uselessgaps - adds gaps around every window on screen<br />
* warpcursor - cursors follows and is placed in the center of the current window<br />
<br />
* bloat : bloat is merge of all patches with the current master, just for fun<br />
* core : core is is a very minimal subset of monsterwm, it's essentially its core, fully usuable at 610 loc<br />
<br />
To install monsterwm with a patch simply change the {{bc|1=_gitbranch=}} line on the PKGBUILD to the name of the patch.<br />
<br />
----<br />
<br />
If you installed monsterwm with [[#Method_2|method 2 - using git]], you can change to the desired branch with<br />
<br />
$ git checkout <branch><br />
<br />
and then continue normally. For example to build monsterwm with the fibonacci layout one would do:<br />
<br />
$ git checkout fib<br />
$ make<br />
# make clean install<br />
<br />
That way you can also combine patches. To do that one would {{ic|merge}} another branch to the current one. For example to build monsterwm with uselessgaps, warpcursor and showhide, one would do:<br />
<br />
$ git config user.email <mailaddress><br />
$ git config user.name <name><br />
$ git checkout uselessgaps<br />
$ git checkout warpcursor<br />
$ git checkout showhide<br />
$ git checkout master<br />
$ git merge uselessgaps warpcursor showhide<br />
$ make<br />
# make install<br />
<br />
== Customization ==<br />
<br />
=== Application Rules ===<br />
<br />
One can define rules for a specific application, which will be applied once the application spawns. <br />
A rule is composed of four parts.<br />
<br />
{ "MPlayer", 3, True, False },<br />
<br />
* the class or instance name of the application<br />
* the desktop in which the application should appear - index starts from zero/0<br />
* whether that desktop should be focused when the application is started<br />
* whether the application should start in floating mode<br />
<br />
So the above rule, would place [[mplayer|this]] to desktop {{keypress|3}} and chage from the current desktop to that desktop, because {{ic|follow}} is {{ic|True}}. mplayer will be tiled as every other window.<br />
<br />
To get the application class or instance name you can use {{ic|xprop | grep "WM_CLASS"}}.<br />
If the desktop is set to a 'negative' number then the window spawns in the current desktop.<br />
<br />
If we change the above rule to this one:<br />
<br />
{ "MPlayer", -1, True, True },<br />
<br />
then mplayer will be spawn in the current desktop, floating.<br />
<br />
=== Add Custom Keybinds ===<br />
To add custom keybindings, you must edit config.h and recompile monsterwm. <br />
That's why it is important to set them up on the initial installation to avoid having to do this again.<br />
I'll show you a scenario in which you would need to add a keybinding to open the thunar filemanager with {{keypress|MOD+t}}.<br />
<br />
First, you must add a line such as the following underneath the already-defined {{ic|const char*}}'s <br />
(Note: You can name it whatever you want. In this case, I named it {{ic|thunarcmd}}):<br />
<br />
const char* thunarcmd[] = {"thunar", NULL&#125;&#125;;<br />
<br />
{{ic|thunarcmd}} is just a title for the command you want to construct and run. <br />
Inside the curly brackets {{ic|{}} and {{ic|}}} is where you define the command to be executed. <br />
Each command fragment that is seperated by a space is it's own value. <br />
What I mean by that is that the command sequence {{ic|ncmpcpp next}}<br />
would be entered as {{ic|{"ncmpcpp", "next", NULL&#125;&#125;}. <br />
The ''{{ic|NULL}}'' value ''must'' be included at the end of each hotkey.<br />
<br />
To actually register the hotkey with the window manager, you must look below that at the struct named ''{{ic|keys[]''. <br />
This is where monsterwm stores all of it's keybindings. <br />
An example entry for the {{ic|thunarcmd}} we made above would be:<br />
<br />
{ MOD, XK_t, spawn, {.com &#61; thunarcmd&#125;&#125;,<br />
<br />
* The first element specifies the first sequence that is pressed <br />
** {{keypress|MOD}} for the modkey only, <br />
** {{keypress|MOD&#124;SHIFT}} for the modkey and then the shift key,<br />
** {{keypress|MOD&#124;CONTROL}} for the modkey and then the control key,<br />
** {{keypress|0}} for no key at all. <br />
You can also use {{keypress|WINKEY}} which is the {{keypress|super}} or ''windows'' key instead of MOD. <br />
<br />
* The second element specifies the actual key that is pressed to differenciate it from other similar hotkeys. <br />
In this case, we set it to {{keypress|t}}, <br />
which has {{ic|XK_}} in front of it because that's how Xorg reads key presses. <br />
Just remember to include {{ic|XK_}} in front of it and you'll be fine. <br />
Some examples of these include {{keypress|XK_a}} for the {{keypress|a key}}, <br />
{{keypress|XK_Space}} for the {{ic|space bar}}, <br />
and {{keypress|XK_1}} for the {{Keypress|1 key}}. <br />
Note that these are case-sensitive, so {{keypress|XK_a}} is not the same as {{keypress|XK_A}}.<br />
So for this example, the entire hotkey senquence that needs to be pressed is {{keypress|MOD+t}}.<br />
<br />
* The third element just specifies the function {{ic|spawn}}, which has been written to be passed a command to execute. <br />
Whenever you need to start an application or do anything that is not related to the internals of monsterwm {{ic|spawn}} will be used. <br />
<br />
* The final element inside the brackets specifies which command that was previously defined will be run.<br />
In our case, it is {{ic|thunarcmd[]}}, <br />
so we would do {{ic|{.com &#61; thunarcmd&#125;}}. <br />
The {{ic|.com}} stands for command.<br />
<br />
You can do the same with the {{ic|buttons[]}} struct. <br />
The buttons struct, uses the ''mouse'' instead of the keyboard. <br />
<br />
* Button1 is the left button<br />
* Button2 is the middle click<br />
* Button3 is the right button<br />
<br />
----<br />
<br />
After this, recompile, hope for no errors, and install.<br />
<br />
==See also==<br />
* [https://bbs.archlinux.org/viewtopic.php?id=132122 monsterwm thread on the forums]<br />
* [https://github.com/c00kiemon5ter/monsterwm monsterwm repository on github]<br />
* [https://github.com/Cloudef/monsterwm-xcb monsterwm-xcb repository on github]</div>Mhertz