screensaver openbox

1 – Install xscreensaver package

apt-get install xscreensaver

2 – Configure xscreensaver to run in openbox startup

vi .config/openbox/autostart

xscreensaver -no-splash &

3 – Configure keyboard sequence W-l to lock screen

vi .config/openbox/rc.xml
 <keybind key="W-l">
   <action name="Execute">
     <command>xscreensaver-command -lock</command>
   </action>
 </keybind>

*Restart Openbox to test

Advertisements

wake on lan linux

Wake-on-LAN is an Ethernet networking standard that allows a server to be turned on by a network message. You need to send ‘magic packets’ to wake-on-lan enabled ethernet adapters and motherboards. WoL must be active in both: ethernet adapter and BIOS motherboard.

1 – Enable Wake-on-Lan on BIOS

2 – Install one Wake-on-Lan client. In Debian: etherwake. In CentOS: wol

apt-get install etherwake

3 – Send a network message to turned on a machine

etherwake 77:e5:49:f7:b7:c3

How to view if wake-on-lan is enabled on network adapter ( g [on] d [off] )*

ethtool eth0 | grep -i wake

*If the above command shows that wake-on-lan is disabled then maybe it is necessary to activate the same every time the machine starts.

– In some cases wake-on-lan is not active when the machine is turned on. Enable it in cron

crontab -e
@reboot /sbin/ethtool -s eth0 wol g

– Create a list with all mac addess of your network

nmap -sP 192.168.0.0/24 && arp -a | sort -n -t . -k 4 | awk '{print "etherwake", $4, "#"$2}'

Some machines do not support Wake-on-LAN after a power failure. Use of an uninterruptible power supply (UPS) will give protection against a short period without power. A typical BIOS setting is AC back function which may be on, off, or memory. This last restores the machine to the state it was in when power was lost.

use etc hosts as dns server

Server configuration

Install dnsmasq

apt-get install dnsmasq

Add entries at end of the /etc/hosts

echo '192.168.0.7 abc abc.domain.com' >> /etc/hosts 

Start/Restart dnsmasq

/etc/init.d/dnsmasq restart

Client configuration

Put server’s IP in the /etc/resolv.conf

echo 'nameserver 192.168.0.1' > /etc/resolv.conf

Test the resolution names

nslookup abc

Usar Samba Client

Instale o samba client

apt-get install smbclient

Listar compartilhamentos de um host sem pedir senha

smbclient -L 192.168.0.7 -N

Listar compartilhamentos de um host utilizando login

smbclient -U userNameHere -L 192.168.0.7

Acessar um compartilhamento

smbclient //192.168.0.7/C -N

Listar o que está sendo compartilhado por um servidor samba

smbclient -L 127.0.0.1 -N