https://wiki.archlinux.org/api.php?action=feedcontributions&user=Blx32&feedformat=atomArchWiki - User contributions [en]2024-03-29T12:11:47ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Deepin_Desktop_Environment&diff=644383Deepin Desktop Environment2020-12-09T22:08:01Z<p>Blx32: Adicionado Link da tradução para Português</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[Category:Deepin]]<br />
[[de:Deepin]]<br />
[[fr:Deepin Desktop Environment]]<br />
[[ja:Deepin Desktop Environment]]<br />
[[pl:Deepin Desktop Environment]]<br />
[[ru:Deepin Desktop Environment]]<br />
[[zh-hans:Deepin Desktop Environment]]<br />
[[pt:Deepin Desktop Environment]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|GNOME}}<br />
{{Related|LightDM}}<br />
{{Related articles end}}<br />
The [https://www.deepin.org/en/dde/ Deepin Desktop Environment] (DDE) is the [[desktop environment]] of the [https://www.deepin.org/en/ deepin] Linux distribution. It is designed by the [https://www.deepin.org/en/aboutus/ Wuhan Deepin Technology Co.,Ltd]. deepin is a Linux distribution devoted to providing a beautiful, easy to use, safe and reliable system for global users. deepin is an open source GNU/Linux operating system, based on Linux kernel and mainly on desktop applications, supporting laptops, desktops, and all-in-ones. The DDE is comprised of the Desktop Environment, deepin Window Manager, Control Center, Launcher and Dock.<br />
<br />
== Installation ==<br />
<br />
To get a minimal desktop interface, you may start by [[install]]ing {{Grp|deepin}} group. This will pull all the basic components.<br />
<br />
The {{Grp|deepin-extra}} groups contains some extra applications for a more complete desktop environment.<br />
<br />
To be able to use the integrated network administration, the {{Pkg|networkmanager}} package is required, and the {{ic|NetworkManager.service}} must be [[systemd#Using units|started and enabled]].<br />
<br />
== Starting ==<br />
<br />
=== Via a display manager ===<br />
<br />
To use the default DDE's lightdm greeter you have to modify the configuration file under the {{ic|[Seat:*]}} section, to state:.<br />
<br />
{{hc|/etc/lightdm/lightdm.conf|2=<br />
[Seat:*]<br />
...<br />
greeter-session=lightdm-deepin-greeter<br />
}}<br />
<br />
Note that a valid home directory must exist for a user other than root for the greeter to work.<br />
<br />
=== Via xinit ===<br />
<br />
To use Deepin via [[xinit]], you'll need to add the following to your .xinitrc file.<br />
<br />
{{hc|~/.xinitrc|2=<br />
exec startdde <br />
}}<br />
<br />
== Known issues ==<br />
<br />
{{Accuracy|DDE developers did reply and it looks like at least some of the bugs have been fixed. Needs to be confirmed if any of these vulnerabilities remain|section=Security_issues}}<br />
<br />
{{Warning|There are known security vulnerabilites in DDE, reported by developers of the OpenSuse distribution to the DDE developers. The DDE developers did not respond to the reports [https://bugzilla.opensuse.org/show_bug.cgi?id&#61;1136026#c1].}}<br />
<br />
== Configuration ==<br />
=== Customize touchpad gesture behavior ===<br />
Deepin doesn't officially support customizing the gesture behaviors, but it is possible to manually change this by editing the configuration file.<br />
Configuration file directory:<br />
/usr/share/dde-daemon/gesture.json<br />
If you want to disable specific gesture activity. Set "Action" be "none". For example:<br />
{<br />
"Name": "tap",<br />
"Direction": "none",<br />
"Fingers": 3,<br />
"Action": {<br />
"Type": "built-in",<br />
"Action": "none"<br />
}<br />
}<br />
Reboot or re-login after you edit the file.<br />
<br />
=== Changing default deepin sounds ===<br />
While this is not officially supported, it is possible to change or even remove the default sounds that are used by Deepin (ex. login sound). Simply replace the sounds in the directory:<br />
/usr/share/sounds/deepin/stereo<br />
Note: If you simply want to disable the sound effects entirely, it can be done from Deepin's system settings (sound section).<br />
<br />
== Troubleshooting ==<br />
<br />
=== No background after resuming from standby ===<br />
<br />
Because of the way the NVIDIA driver stores its FBOs [https://devtalk.nvidia.com/default/topic/787748/linux/-nvidia340xx-archlinux64-gnome3-14-the-background-of-desktop-and-lockscreen-mess-after-resume-from-/post/4367179/#4367179], it happens that after resuming from standby the background suddenly disappears, leaving only a white screen with possibly some color noise on it. The bug appears to be fixed in GNOME upstream, but the Deepin desktop environment still has it.<br />
<br />
A possible workaround would be restarting the window manager every time the computer resumes from suspension. A way to do that would be creating the following systemd service<br />
<br />
{{hc|/etc/systemd/system/resume@.service|<nowiki><br />
[Unit]<br />
Description=User resume actions<br />
After=suspend.target<br />
<br />
[Service]<br />
User=%I<br />
Type=simple<br />
ExecStart=/usr/bin/deepin-wm-restart.sh<br />
<br />
[Install]<br />
WantedBy=suspend.target<br />
</nowiki>}}<br />
<br />
That executes the following script<br />
<br />
{{hc|/usr/bin/deepin-wm-restart.sh|<nowiki><br />
#!/bin/bash<br />
export DISPLAY=:0<br />
deepin-wm --replace<br />
</nowiki>}}<br />
<br />
Once those two files are created in the correct directories, in order to enable the script it's sufficient to run these commands:<br />
<br />
{{bc|<br />
# chmod +x /usr/bin/deepin-wm-restart.sh<br />
# systemctl enable resume@''user''<br />
# systemctl start resume@''user'' <br />
}}<br />
<br />
The first command makes the script you created executable, the second makes sure that the service always start at boot and the last one starts the service immediately so you can test the workaround without having to reboot the system.<br />
<br />
=== Wireless network does not connect ===<br />
<br />
NetworkManager sets the MAC address generated randomly. This was already enabled by default, to disable it add the following lines to the NetworkManager configuration file.<br />
<br />
{{hc|/etc/NetworkManager/NetworkManager.conf|<nowiki><br />
[device]<br />
wifi.scan-rand-mac-address=no<br />
</nowiki>}}<br />
<br />
=== Bluetooth Menu does not show up / work ===<br />
<br />
Enable the {{ic|bluetooth.service}}. This service is not enabled by default.<br />
<br />
{{bc|<br />
# systemctl enable bluetooth.service<br />
# systemctl start bluetooth.service<br />
}}<br />
<br />
== Bug reporting ==<br />
<br />
Any bugs related to Arch packaging should be reported in the [https://bugs.archlinux.org/ bug tracker].<br />
<br />
Any upstream related bugs should be reported [https://github.com/linuxdeepin/developer-center/issues here].<br />
All the Deepin developers will see the bug reports and solve them as soon as possible.<br />
<br />
== See also ==<br />
<br />
* [https://wiki.deepin.org/wiki/Deepin_Desktop_Environment Official Wiki page]<br />
* [[Wikipedia:Deepin|Wikipedia article]]<br />
* [https://github.com/linuxdeepin deepin Github]</div>Blx32https://wiki.archlinux.org/index.php?title=Category:Deepin_(Portugu%C3%AAs)&diff=644382Category:Deepin (Português)2020-12-09T22:03:36Z<p>Blx32: Categoria Deepin (Português)</p>
<hr />
<div>[[Category:Software projects (Português)]]<br />
See also [[w:Deepin]].</div>Blx32https://wiki.archlinux.org/index.php?title=Deepin_Desktop_Environment_(Portugu%C3%AAs)&diff=644381Deepin Desktop Environment (Português)2020-12-09T21:56:06Z<p>Blx32: Tradução do Deepin Desktop Environment em Inglês para Português.</p>
<hr />
<div>[[Category:Desktop environments (Português)]]<br />
[[Category:Deepin (Português)]]<br />
[[de:Deepin]]<br />
[[fr:Deepin Desktop Environment]]<br />
[[ja:Deepin Desktop Environment]]<br />
[[pl:Deepin Desktop Environment]]<br />
[[ru:Deepin Desktop Environment]]<br />
[[zh-hans:Deepin Desktop Environment]]<br />
[[en:Deepin Desktop Environment]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment (Português)}}<br />
{{Related|GNOME (Português)}}<br />
{{Related|LightDM}}<br />
{{Related articles end}}<br />
{{StatusTradução|Deepin Desktop Environment|2020-12-09|637876}}<br />
<br />
O [https://www.deepin.org/en/dde/ Deepin Desktop Environment] (DDE) é o [[Desktop_environment_(Português)]] do [https://www.deepin.org/en/ deepin] Distribuição Linux. É desenhado por [https://www.deepin.org/en/aboutus/ Wuhan Deepin Technology Co.,Ltd]. deepin é uma distribuição Linux dedicada a fornecer um sistema bonito, fácil de usar, seguro e confiável para usuários globais. deepin é um sistema operacional GNU / Linux de código aberto, baseado no kernel Linux e principalmente em aplicativos de desktop, com suporte para laptops, desktops e all-in-one. O DDE é composto de Ambiente de Trabalho, Gerenciador de Janelas profundo, Centro de Controle, Iniciador e Dock.<br />
<br />
== Instalação ==<br />
<br />
Para obter uma interface de área de trabalho mínima, você pode começar pelo grupo [[instale]] {{Grp|deepin}}. Isso puxará todos os componentes básicos.<br />
<br />
O grupo {{Grp|deepin-extra}} contém alguns aplicativos extras para um ambiente de área de trabalho mais completo.<br />
<br />
Para poder usar a administração de rede integrada, o pacote {{Pkg|networkmanager}} é necessário, e o {{ic|NetworkManager.service}} deve ser [[Systemd_(Português)#Usando_units|iniciado e habilitado]].<br />
<br />
== Iniciando ==<br />
<br />
=== Por meio do gerenciador de exibição ===<br />
<br />
Para usar o saudador lightdm padrão do DDE, você deve modificar o arquivo de configuração no {{ic|[Seat:*]}} seção, para indicar :.<br />
<br />
{{hc|/etc/lightdm/lightdm.conf|2=<br />
[Seat:*]<br />
...<br />
greeter-session=lightdm-deepin-greeter<br />
}}<br />
<br />
Observe que um diretório home válido deve existir para um usuário diferente de root para que o saudador funcione.<br />
<br />
=== Por meio do xinit ===<br />
<br />
Para usar Deepin via [[Xinit_(Português)]], você precisará adicionar o seguinte ao seu arquivo .xinitrc.<br />
<br />
{{hc|~/.xinitrc|2=<br />
exec startdde <br />
}}<br />
<br />
== Problemas conhecidos ==<br />
<br />
{{Accuracy|Os desenvolvedores DDE responderam e parece que pelo menos alguns dos bugs foram corrigidos. Precisa ser confirmado se alguma dessas vulnerabilidades permanecer|section=Security_issues}}<br />
<br />
{{Atenção|Existem vulnerabilidades de segurança conhecidas no DDE, relatadas por desenvolvedores da distribuição OpenSuse aos desenvolvedores DDE. Os desenvolvedores DDE não responderam aos relatórios [https://bugzilla.opensuse.org/show_bug.cgi?id&#61;1136026#c1].}}<br />
<br />
== Configuração ==<br />
===Personalize o comportamento de gestos do touchpad ===<br />
Deepin não suporta oficialmente a personalização dos comportamentos de gestos, mas é possível alterar manualmente editando o arquivo de configuração.<br />
Diretório do arquivo de configuração:<br />
/usr/share/dde-daemon/gesture.json<br />
Se você deseja desativar a atividade de gesto específica. Defina "Action" como "none". Por exemplo:<br />
{<br />
"Name": "tap",<br />
"Direction": "none",<br />
"Fingers": 3,<br />
"Action": {<br />
"Type": "built-in",<br />
"Action": "none"<br />
}<br />
}<br />
Reinicie ou faça login novamente após editar o arquivo.<br />
<br />
=== Alterar sons de profundidade padrão ===<br />
Embora isso não seja oficialmente suportado, é possível alterar ou até mesmo remover os sons padrão que são usados pelo Deepin (ex. Som de login). Basta substituir os sons no diretório:<br />
/usr/share/sounds/deepin/stereo<br />
Nota: Se você simplesmente deseja desabilitar totalmente os efeitos sonoros, isso pode ser feito nas configurações de sistema do Deepin (seção de som).<br />
<br />
== Solução de problemas ==<br />
<br />
=== Sem fundo após sair do modo de espera ===<br />
<br />
Devido à forma como o driver NVIDIA armazena seus FBOs [https://devtalk.nvidia.com/default/topic/787748/linux/-nvidia340xx-archlinux64-gnome3-14-the-background-of-desktop-and-lockscreen-mess-after-resume-from-/post/4367179/#4367179], acontece que, depois de sair do modo de espera, o fundo desaparece repentinamente, deixando apenas uma tela branca com possivelmente algum ruído de cor. O bug parece ter sido corrigido no upstream do GNOME, mas o ambiente de desktop Deepin ainda o tem.<br />
<br />
Uma possível solução alternativa seria reiniciar o gerenciador de janelas sempre que o computador sair da suspensão. Uma maneira de fazer isso seria criando o seguinte serviço systemd<br />
<br />
{{hc|/etc/systemd/system/resume@.service|<nowiki><br />
[Unit]<br />
Description=User resume actions<br />
After=suspend.target<br />
<br />
[Service]<br />
User=%I<br />
Type=simple<br />
ExecStart=/usr/bin/deepin-wm-restart.sh<br />
<br />
[Install]<br />
WantedBy=suspend.target<br />
</nowiki>}}<br />
<br />
Isso executa o seguinte script<br />
<br />
{{hc|/usr/bin/deepin-wm-restart.sh|<nowiki><br />
#!/bin/bash<br />
export DISPLAY=:0<br />
deepin-wm --replace<br />
</nowiki>}}<br />
<br />
Uma vez que esses dois arquivos são criados nos diretórios corretos, para habilitar o script, é suficiente executar estes comandos:<br />
<br />
{{bc|<br />
# chmod +x /usr/bin/deepin-wm-restart.sh<br />
# systemctl enable resume@''user''<br />
# systemctl start resume@''user'' <br />
}}<br />
<br />
O primeiro comando torna o script que você criou executável, o segundo garante que o serviço sempre inicie na inicialização e o último inicia o serviço imediatamente para que você possa testar a solução alternativa sem precisar reiniciar o sistema.<br />
<br />
=== Rede sem fio não conecta ===<br />
<br />
O NetworkManager define o endereço MAC gerado aleatoriamente. Isso já estava ativado por padrão, para desativá-lo, adicione as seguintes linhas ao arquivo de configuração do NetworkManager.<br />
<br />
{{hc|/etc/NetworkManager/NetworkManager.conf|<nowiki><br />
[device]<br />
wifi.scan-rand-mac-address=no<br />
</nowiki>}}<br />
<br />
=== O menu Bluetooth não aparece/funciona ===<br />
<br />
Habilite o {{ic|bluetooth.service}}. Este serviço não é habilitado por padrão.<br />
<br />
{{bc|<br />
# systemctl enable bluetooth.service<br />
# systemctl start bluetooth.service<br />
}}<br />
<br />
== Relatório de bug ==<br />
<br />
Quaisquer bugs relacionados ao empacotamento do Arch devem ser relatados no [https://bugs.archlinux.org/ rastreador de bug].<br />
<br />
Qualquer bug relacionado ao upstream deve ser relatado [https://github.com/linuxdeepin/developer-center/issues aqui].<br />
Todos os desenvolvedores do Deepin verão os relatórios de bug e os resolverão o mais rápido possível.<br />
== Veja também ==<br />
<br />
* [https://wiki.deepin.org/wiki/Deepin_Desktop_Environment Página oficial do Wiki]<br />
* [[Wikipedia:Deepin|Wikipedia artigo]]<br />
* [https://github.com/linuxdeepin deepin Github]</div>Blx32https://wiki.archlinux.org/index.php?title=User:Blx32&diff=644351User:Blx322020-12-09T17:25:48Z<p>Blx32: /* Gabriel Moura */</p>
<hr />
<div>= Gabriel Moura =<br />
Olá, sou brasileiro do Rio de Janeiro entusiasta em linux, segurança e desenvolvimento web.<br />
Iniciante e dedicado.<br />
<br />
birthday= November 12<br />
<br />
birthplace= BR<br />
<br />
HOME= Rio de Janeiro, BR<br />
<br />
IRC= Blx32<br />
<br />
irc-channels= #arch,#archlinux-br <br />
<br />
== Contato ==<br />
<br />
* '''Email''': g [@] srmoura [.] com [.]br <br />
* '''Email2''': Gabriel.all [@] yandex [.] com<br />
* '''Telegram''': [https://t.me/Blx32 Blx32]<br />
* [https://github.com/gabrielmoura Github]<br />
* [http://srmoura.com.br/ Website]</div>Blx32https://wiki.archlinux.org/index.php?title=USBGuard&diff=644350USBGuard2020-12-09T17:23:29Z<p>Blx32: Adicionado Link da tradução para Português</p>
<hr />
<div>[[Category:Hardware detection and troubleshooting]]<br />
[[Category:Security]]<br />
[[ja:Usbguard]]<br />
[[pt:Usbguard]]<br />
[https://github.com/dkopecek/usbguard USBGuard] offers a white/black-listing mechanism for USB-devices. Inspiration for this is drawn from exploits like BadUSB.<br />
It makes use of a device blocking infrastructure included in the Linux kernel and consists of a daemon and some front-ends.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|usbguard}} package, or {{Aur|usbguard-git}} for the development version.<br />
Qt applet was removed in USBGuard 0.7.5 and it is going to be maintained in a simplified form as a separate project later. [https://github.com/USBGuard/usbguard/releases/tag/usbguard-0.7.5]<br />
<br />
== Configuration ==<br />
<br />
The main configuration file is found in {{ic|/etc/usbguard/usbguard-daemon.conf}}. To edit it, you need root privileges.<br />
<br />
If you want to control the daemon via IPC, be sure to add your username to {{ic|IPCAllowedUsers}} or your group to {{ic|IPCAllowedGroups}} to make rules persistent. In most cases, you want this.<br />
<br />
By default, USBGuard blocks all newly connected devices, and devices connected before daemon startup are left as is. This can be changed with the {{ic|PresentDevicePolicy}} option. Setting this key to {{ic|apply-policy}} is the most secure setting, which ensures security even when the daemon hits a restart.<br />
<br />
With the key {{ic|ImplicitPolicyTarget}} you can configure the default treatment of devices, if no rules match. The most secure option here is {{ic|block}}.<br />
<br />
For an in-depth documentation of configuration see the very well commented configuration file.<br />
<br />
== Usage ==<br />
<br />
USBGuard has a core daemon, a CLI, a DBUS interface and an API via libusbguard.<br />
<br />
{{Warning|Make sure to actually configure the daemon before starting/enabling it or all USB devices will immediately be blocked!}}<br />
<br />
If you want to use the Qt GUI or another program communicating via DBUS, [[enable]] and [[start]] {{ic|usbguard-dbus.service}}.<br />
<br />
If you only want to communicate via API (with the CLI tool or another software using libusbguard) [[enable]] and [[start]] {{ic|usbguard.service}}.<br />
<br />
The CLI is available via {{ic|usbguard}}.<br />
<br />
See the according man pages for more info.<br />
<br />
=== Rules ===<br />
<br />
To configure USBGuard to your needs, you can edit {{ic|/etc/usbguard/rules.conf}}. However manual editing of the rules is normally not necessary. You can generate a ruleset based on your currently attached USB devices by executing {{ic|usbguard generate-policy > /etc/usbguard/rules.conf}} as root.<br />
<br />
The rules syntax is formally explained [https://github.com/USBGuard/usbguard/blob/master/doc/man/usbguard-rules.conf.5.adoc here].<br />
An example for a hp printer connected via USB can look like this:<br />
<br />
allow id 03f0:0c17 serial "00CNFD234631" name "hp LaserJet 2020" hash "a0ef07fceb6fb77698f79a44a450121m" parent-hash "69d19c1a5733a31e7e6d9530e6k434a6" with-interface { 07:01:03 07:01:02 07:01:01 }<br />
<br />
A rule begins with a policy. {{ic|allow}} whitelists a device, {{ic|block}} stops the device from being processed now and {{ic|reject}} removes the device from the system.<br />
Then follows a set of attributes with their options, as detailed below.<br />
<br />
{| class="wikitable"<br />
! Attribute || Description<br />
|-<br />
| id usb-device-id || Match a USB device ID. <br />
|-<br />
| id [operator] { usb-device-id ... } || Match a set of USB device IDs.<br />
|-<br />
| hash "value" || Match a hash computed from the device attribute values and the USB descriptor data. The hash is computed for every device by USBGuard.<br />
|-<br />
| hash [operator] { "value" ... } || Match a set of device hashes.<br />
|-<br />
| parent-hash "value" || Match a hash of the parent device.<br />
|-<br />
| parent-hash [operator] { "value" ... } || Match a set of parent device hashes.<br />
|-<br />
| name "device-name" || Match the USB device name attribute.<br />
|-<br />
| name [operator] { "device-name" ... } || Match a set of USB device names.<br />
|-<br />
| serial "serial-number" || Match the USB iSerial device attribute.<br />
|-<br />
| serial [operator] { "serial-number" ... } || Match a set of USB iSerial device attributes.<br />
|-<br />
| via-port "port-id" || Match the USB port through which the device is connected. Note that some systems have unstable port numbering which change after the system reboots or certain kernel modules are reloaded (and maybe in other cases). Use the parent-hash attribute if you want to ensure that a device is connected via a specific parent device. <br />
|-<br />
| via-port [operator] { "port-id" ... } || Match a set of USB ports.<br />
|-<br />
| with-interface interface-type || Match an interface type that the USB device provides.<br />
|-<br />
| with-interface [operator] { interface-type interface-type ... } || Match a set of interface types against the set of interfaces that the USB device provides.<br />
<br />
|}<br />
<br />
== See also ==<br />
<br />
* [https://github.com/dkopecek/usbguard/ USBGuard Website]<br />
* [https://raw.githubusercontent.com/USBGuard/usbguard/8b76c935f019facd362e2f12a4db5e24f6e58e62/doc/usbguard-component-diagram.png USBGuard component diagram]<br />
* [https://srlabs.de/bites/usb-peripherals-turn/ BadUSB background info]<br />
* [https://www.kernel.org/doc/html/latest/usb/authorization.html Kernel interface for USB device control]</div>Blx32https://wiki.archlinux.org/index.php?title=Usbguard_(Portugu%C3%AAs)&diff=644349Usbguard (Português)2020-12-09T17:18:52Z<p>Blx32: Tradução do Usbguard em Inglês para Português.</p>
<hr />
<div>[[Category:Hardware detection and troubleshooting (Português)]]<br />
[[Category:Security (Português)]]<br />
[[ja:Usbguard]]<br />
[[en:Usbguard]]<br />
{{StatusTradução|USBGuard|2020-11-09|607532}}<br />
<br />
[https://github.com/dkopecek/usbguard USBGuard] oferece um mecanismo de lista branca/negra para dispositivos USB. A inspiração para isso vem de exploits como BadUSB. Ele faz uso de uma infraestrutura de bloqueio de dispositivo incluída no kernel do Linux e consiste em um daemon e alguns front-ends.<br />
<br />
== Instalação ==<br />
<br />
[[Instale]] o {{Pkg|usbguard}} pacote, ou {{Aur|usbguard-git}} para a versão de desenvolvimento.<br />
O miniaplicativo Qt foi removido do USBGuard 0.7.5 e será mantido em uma forma simplificada como um projeto separado posteriormente. [https://github.com/USBGuard/usbguard/releases/tag/usbguard-0.7.5]<br />
<br />
== Configuração ==<br />
<br />
O arquivo de configuração principal é encontrado em {{ic|/etc/usbguard/usbguard-daemon.conf}}. Para editá-lo, você precisa de privilégios de root.<br />
<br />
Se você deseja controlar o daemon via IPC, certifique-se de adicionar seu nome de usuário ao {{ic|IPCAllowedUsers}} ou seu grupo para {{ic|IPCAllowedGroups}} para tornar as regras persistentes. Na maioria dos casos, você desejará isso.<br />
<br />
Por padrão, o USBGuard bloqueia todos os dispositivos recém-conectados e os dispositivos conectados antes da inicialização do daemon são deixados como estão. Isso pode ser alterado com a opção {{ic|PresentDevicePolicy}}. Definindo esta chave para {{ic|apply-policy}} é a configuração mais segura, que garante a segurança mesmo quando o daemon é reiniciado.<br />
<br />
Com a chave {{ic|ImplicitPolicyTarget}} você pode configurar o tratamento padrão dos dispositivos, se nenhuma regra corresponder. A opção mais segura aqui é {{ic|block}}.<br />
<br />
Para obter uma documentação detalhada da configuração, consulte o arquivo de configuração muito bem comentado.<br />
<br />
== Uso ==<br />
<br />
USBGuard tem um daemon principal, um CLI, uma interface DBUS e uma API via libusbguard.<br />
<br />
{{Atenção|Certifique-se de realmente configurar o daemon antes de iniciá-lo / ativá-lo ou todos os dispositivos USB serão bloqueados imediatamente!}}<br />
<br />
Se você quiser usar o Qt GUI ou outro programa de comunicação via DBUS, [[enable]] e [[start]] {{ic|usbguard-dbus.service}}.<br />
<br />
Se você deseja se comunicar apenas via API (com a ferramenta CLI ou outro software usando libusbguard) [[enable]] e [[start]] {{ic|usbguard.service}}.<br />
<br />
O CLI está disponível via {{ic|usbguard}}.<br />
<br />
Veja as man pages de acordo para mais informações.<br />
<br />
=== Regras ===<br />
<br />
Para configurar o USBGuard de acordo com suas necessidades, você pode editar {{ic|/etc/usbguard/rules.conf}}. No entanto, a edição manual das regras normalmente não é necessária. Você pode gerar um conjunto de regras com base em seus dispositivos USB conectados no momento executando {{ic|usbguard generate-policy > /etc/usbguard/rules.conf}} como root.<br />
<br />
A sintaxe das regras é explicada formalmente [https://github.com/USBGuard/usbguard/blob/master/doc/man/usbguard-rules.conf.5.adoc aqui].<br />
Um exemplo de impressora hp conectada via USB pode ser assim:<br />
<br />
allow id 03f0:0c17 serial "00CNFD234631" name "hp LaserJet 2020" hash "a0ef07fceb6fb77698f79a44a450121m" parent-hash "69d19c1a5733a31e7e6d9530e6k434a6" with-interface { 07:01:03 07:01:02 07:01:01 }<br />
<br />
Uma regra começa com uma política. {{ic|allow}} coloca um dispositivo na lista de permissões, {{ic|block}} impede que o dispositivo seja processado agora e {{ic|reject}} remove o dispositivo do sistema.<br />
Em seguida, segue um conjunto de atributos com suas opções, conforme detalhado a seguir.<br />
<br />
{| class="wikitable"<br />
! Atributo || Descrição<br />
|-<br />
| id id-do-dispositivo-usb || Corresponde a um ID de dispositivo USB. <br />
|-<br />
| id [operador] { id-do-dispositivo-usb ... } || Corresponde a um conjunto de IDs de dispositivos USB.<br />
|-<br />
| hash "valor" || Corresponde a um hash calculado a partir dos valores de atributo do dispositivo e dos dados do descritor USB. O hash é calculado para cada dispositivo pelo USBGuard.<br />
|-<br />
| hash [operador] { "valor" ... } || Corresponde a um conjunto de hashes de dispositivo.<br />
|-<br />
| parent-hash "valor" || Corresponde a um hash do dispositivo pai.<br />
|-<br />
| parent-hash [operador] { "valor" ... } || Corresponde a um conjunto de hashes de dispositivo pai.<br />
|-<br />
| name "nome-do-dispositivo" || Corresponda ao atributo do nome do dispositivo USB.<br />
|-<br />
| name [operador] { "nome-do-dispositivo" ... } || Combine um conjunto de nomes de dispositivos USB.<br />
|-<br />
| serial "número-de-série" || Corresponde ao atributo de dispositivo USB iSerial.<br />
|-<br />
| serial [operador] { "número-de-série" ... } || Corresponde a um conjunto de atributos de dispositivo USB iSerial.<br />
|-<br />
| via-port "id-da-porta" || Corresponda a porta USB através da qual o dispositivo está conectado. Observe que alguns sistemas têm uma numeração de porta instável que muda após a reinicialização do sistema ou certos módulos do kernel são recarregados (e talvez em outros casos). Use o atributo parent-hash se quiser garantir que um dispositivo seja conectado por meio de um dispositivo pai específico.<br />
|-<br />
| via-port [operador] { "id-da-porta" ... } || Combine um conjunto de portas USB.<br />
|-<br />
| with-interface tipo-de-interface || Corresponde a um tipo de interface fornecido pelo dispositivo USB.<br />
|-<br />
| with-interface [operador] { tipo-de-interface tipo-de-interface ... } || Compare um conjunto de tipos de interface com o conjunto de interfaces que o dispositivo USB fornece.<br />
<br />
|}<br />
<br />
== Veja também ==<br />
<br />
* [https://github.com/dkopecek/usbguard/ USBGuard Website]<br />
* [https://raw.githubusercontent.com/USBGuard/usbguard/8b76c935f019facd362e2f12a4db5e24f6e58e62/doc/usbguard-component-diagram.png Diagrama de componente USBGuard]<br />
* [https://srlabs.de/bites/usb-peripherals-turn/ BadUSB background info]<br />
* [https://www.kernel.org/doc/html/latest/usb/authorization.html Interface de kernel para controle de dispositivo USB]</div>Blx32https://wiki.archlinux.org/index.php?title=User:Blx32&diff=477989User:Blx322017-05-22T03:35:29Z<p>Blx32: </p>
<hr />
<div>= Gabriel Moura =<br />
Olá, sou brasileiro do Rio de Janeiro entusiasta em linux, segurança e desenvolvimento web.<br />
Iniciante, porém dedicado.<br />
<br />
birthday= November 12, 1996<br />
<br />
birthplace= BR<br />
<br />
HOME= Rio de Janeiro, BR<br />
<br />
IRC= Blx32<br />
<br />
irc-channels= #arch,#archlinux-br <br />
<br />
== Contato ==<br />
<br />
* '''Email''': g [@] srmoura [.] com [.]br <br />
* '''Email2''': Gabriel.all [@] yandex [.] com<br />
* '''Telegram''': [https://t.me/Blx32 Blx32]<br />
* [https://github.com/gabrielmoura Github]<br />
* [http://srmoura.com.br/ Website]</div>Blx32https://wiki.archlinux.org/index.php?title=User:Blx32&diff=477988User:Blx322017-05-22T03:34:20Z<p>Blx32: </p>
<hr />
<div>REAL-NAME=Gabriel Moura<br />
<br />
birthday=November 12, 1996<br />
<br />
birthplace=BR<br />
<br />
HOME=Rio de Janeiro, BR<br />
<br />
IRC=Blx32<br />
<br />
irc-channels= #arch,#archlinux-br <br />
<br />
= Gabriel Moura =<br />
Olá, sou brasileiro do Rio de Janeiro entusiasta em linux, segurança e desenvolvimento web.<br />
Iniciante, porém dedicado.<br />
<br />
<br />
== Contato ==<br />
<br />
* '''Email''': g [@] srmoura [.] com [.]br <br />
* '''Email2''': Gabriel.all [@] yandex [.] com<br />
* '''Telegram''': [https://t.me/Blx32 Blx32]<br />
* [https://github.com/gabrielmoura Github]<br />
* [http://srmoura.com.br/ Website]</div>Blx32https://wiki.archlinux.org/index.php?title=User:Blx32&diff=477987User:Blx322017-05-22T03:28:32Z<p>Blx32: Created page with "User:Blx32/Infobox2 |REAL-NAME=Gabriel Moura |birthday=November 12, 1996 |birthplace=BR |HOME=Rio de Janeiro, BR |IRC=Blx32 |irc-channels=#arch,#archlinux-br = Gabriel..."</p>
<hr />
<div>User:Blx32/Infobox2<br />
|REAL-NAME=Gabriel Moura<br />
<br />
|birthday=November 12, 1996<br />
<br />
|birthplace=BR<br />
<br />
|HOME=Rio de Janeiro, BR<br />
<br />
|IRC=Blx32<br />
<br />
|irc-channels=#arch,#archlinux-br <br />
<br />
<br />
= Gabriel Moura =<br />
Olá, sou brasileiro do Rio de Janeiro entusiasta em linux, segurança e desenvolvimento web.<br />
Iniciante, porém dedicado.<br />
<br />
* '''Email''': g [@] srmoura [.] com [.]br <br />
* '''Email2''': Gabriel.all [@] yandex [.] com<br />
<br />
<br />
== Contas ==<br />
<br />
* [https://github.com/gabrielmoura Minha conta Github]<br />
* [http://srmoura.com.br/ Meu Website]</div>Blx32