Rename all files and folders (recursively) and replace all spaces with underscore _ character in Linux terminal.

So… Lets say You have folder Dupa in Your home folder and inside that folder – chaos… ;). Files with spaces in the file and folder names. You want to sanitize them and rename them so that they all contain _ instead of space? Do this:

Run:

cd ~/Dupa/

And then run:

find . -depth -name '* *'
| while IFS= read -r f ; do mv -i "$f" "$(dirname "$f")/$(basename "$f"|tr ' ' _)" ; done

This is a ONE command. Both lines.

Repeat until all the files and directories are renamed properly. I had to run this command several times before the chaos got whipped into a sensible shape.

AndrzejL_ArchLinux_Screenshot_2015.02.21_00.23.13

If You want to check if there are any files or folders with spaces in the name left run:

find . | grep ' '

Cheers.

Andrzej

Source? https://stackoverflow.com/questions/2709458/bash-script-to-replace-spaces-in-file-names

I know YOU won’t post this so don’t mind if I do buddy… Unix Benchmarks.

[19:10] MrRee | wget https://byte-unixbench.googlecode.com/files/UnixBench5.1.3.tgz
[19:10] MrRee | tar xzf UnixBench5.1.3.tgz
[19:10] MrRee | cd UnixBench
[19:10] MrRee | make
[19:10] MrRee | ./Run -c X
[19:10] MrRee | where X is number of cores on your board.

[andrzejl@wishmasus .makepkg]$ mkdir UnixBench

[andrzejl@wishmasus .makepkg]$ cd UnixBench

[andrzejl@wishmasus UnixBench]$ wget https://byte-unixbench.googlecode.com/files/UnixBench5.1.3.tgz
--2015-02-16 19:12:37-- https://byte-unixbench.googlecode.com/files/UnixBench5.1.3.tgz
Resolving byte-unixbench.googlecode.com (byte-unixbench.googlecode.com)... 74.125.24.82, 2a00:1450:400b:c02::52
Connecting to byte-unixbench.googlecode.com (byte-unixbench.googlecode.com)|74.125.24.82|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 143259 (140K) [application/x-gzip]
Saving to: ‘UnixBench5.1.3.tgz’
UnixBench5.1.3.tgz 100%[===================================================>] 139.90K 412KB/s in 0.3s
2015-02-16 19:12:38 (412 KB/s) - ‘UnixBench5.1.3.tgz’ saved [143259/143259]

[andrzejl@wishmasus UnixBench]$ tar xzf UnixBench5.1.3.tgz

[andrzejl@wishmasus UnixBench]$ cd UnixBench

[andrzejl@wishmasus UnixBench]$ make
Checking distribution of files
./pgms exists
./src exists
./testdir exists
./results exists
gcc -o ./pgms/arithoh -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Darithoh ./src/arith.c
gcc -o ./pgms/register -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum='register int' ./src/arith.c
gcc -o ./pgms/short -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=short ./src/arith.c
gcc -o ./pgms/int -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=int ./src/arith.c
gcc -o ./pgms/long -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=long ./src/arith.c
gcc -o ./pgms/float -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=float ./src/arith.c
gcc -o ./pgms/double -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=double ./src/arith.c
gcc -o ./pgms/hanoi -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/hanoi.c
gcc -o ./pgms/syscall -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/syscall.c
./src/syscall.c: In function ‘main’:
./src/syscall.c:93:21: warning: null argument where non-null required (argument 2) [-Wnonnull]
execl("/bin/true", (char *) 0);
^
gcc -o ./pgms/context1 -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/context1.c
gcc -o ./pgms/pipe -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/pipe.c
gcc -o ./pgms/spawn -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/spawn.c
gcc -o ./pgms/execl -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/execl.c
In file included from ./src/execl.c:34:0:
./src/big.c: In function ‘getwork’:
./src/big.c:452:11: warning: variable ‘c’ set but not used [-Wunused-but-set-variable]
char c;
^
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_1.c
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_2.c
gcc -o ./pgms/dhry2 -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/dhry_1.o ./src/dhry_2.o
cd ./src; rm -f dhry_1.o dhry_2.o
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DREG=register -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_1.c -o dhry_1_reg.o
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DREG=register -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_2.c -o dhry_2_reg.o
gcc -o ./pgms/dhry2reg -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/dhry_1_reg.o ./src/dhry_2_reg.o
cd ./src; rm -f dhry_1_reg.o dhry_2_reg.o
gcc -o ./pgms/looper -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/looper.c
gcc -o ./pgms/fstime -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/fstime.c
gcc -o ./pgms/whetstone-double -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -DDP -DUNIX -DUNIXBENCH ./src/whets.c -lm

[andrzejl@wishmasus UnixBench]$ ./Run -c 2
make all
make[1]: Entering directory './UnixBench'
Checking distribution of files
./pgms exists
./src exists
./testdir exists
./tmp exists
./results exists
make[1]: Leaving directory './UnixBench'
sh: 3dinfo: command not found
# # # # # # # ##### ###### # # #### # #
# # ## # # # # # # # ## # # # # #
# # # # # # ## ##### ##### # # # # ######
# # # # # # ## # # # # # # # # #
# # # ## # # # # # # # ## # # # #
#### # # # # # ##### ###### # # #### # #
Version 5.1.3 Based on the Byte Magazine Unix Benchmark
Multi-CPU version Version 5 revisions by Ian Smith,
Sunnyvale, CA, USA
January 13, 2011 johantheghost at yahoo period com
2 x Dhrystone 2 using register variables 1 2 3 4 5 6 7 8 9 10
2 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10
2 x Execl Throughput 1 2 3
2 x File Copy 1024 bufsize 2000 maxblocks 1 2 3
2 x File Copy 256 bufsize 500 maxblocks 1 2 3
2 x File Copy 4096 bufsize 8000 maxblocks 1 2 3
2 x Pipe Throughput 1 2 3 4 5 6 7 8 9 10
2 x Pipe-based Context Switching 1 2 3 4 5 6 7 8 9 10
2 x Process Creation 1 2 3
2 x System Call Overhead 1 2 3 4 5 6 7 8 9 10
2 x Shell Scripts (1 concurrent) 1 2 3
2 x Shell Scripts (8 concurrent) 1 2 3
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: wishmasus.loc: GNU/Linux
OS: GNU/Linux -- 3.18.6-1-ARCH -- #1 SMP PREEMPT Sat Feb 7 08:59:29 CET 2015
Machine: i686 (unknown)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz (4390.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, Intel virtualization
CPU 1: Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz (4390.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, Intel virtualization
20:01:27 up 8:33, 1 user, load average: 0.54, 0.74, 1.66; runlevel unknown
------------------------------------------------------------------------
Benchmark Run: Mon Feb 16 2015 20:01:27 - 20:29:29
2 CPUs in system; running 2 parallel copies of tests
Dhrystone 2 using register variables 25442141.5 lps (10.0 s, 7 samples)
Double-Precision Whetstone 4774.7 MWIPS (10.2 s, 7 samples)
Execl Throughput 6533.1 lps (29.7 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 717801.3 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 199443.1 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 1455525.9 KBps (30.0 s, 2 samples)
Pipe Throughput 1466634.9 lps (10.0 s, 7 samples)
Pipe-based Context Switching 323265.3 lps (10.0 s, 7 samples)
Process Creation 14522.5 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 4381.8 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 626.1 lpm (60.1 s, 2 samples)
System Call Overhead 2664327.8 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 25442141.5 2180.1
Double-Precision Whetstone 55.0 4774.7 868.1
Execl Throughput 43.0 6533.1 1519.3
File Copy 1024 bufsize 2000 maxblocks 3960.0 717801.3 1812.6
File Copy 256 bufsize 500 maxblocks 1655.0 199443.1 1205.1
File Copy 4096 bufsize 8000 maxblocks 5800.0 1455525.9 2509.5
Pipe Throughput 12440.0 1466634.9 1179.0
Pipe-based Context Switching 4000.0 323265.3 808.2
Process Creation 126.0 14522.5 1152.6
Shell Scripts (1 concurrent) 42.4 4381.8 1033.4
Shell Scripts (8 concurrent) 6.0 626.1 1043.5
System Call Overhead 15000.0 2664327.8 1776.2
========
System Benchmarks Index Score 1338.8
[andrzejl@wishmasus UnixBench]$

Asus V1s laptop:

[andrzejl@wishmasus UnixBench]$ lscpu
Architecture: i686
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 15
Model name: Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz
Stepping: 11
CPU MHz: 2194.443
BogoMIPS: 4390.75
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 4096K
[andrzejl@wishmasus UnixBench]$

System Benchmarks Index Score 1338.8

So… What’s Your score?

Cheers.

Andrzej

[SOLVED] XVKBD – no .desktop file.

Hi there.

XVKBD by default does not comes with .desktop file.

Open text editor, paste this into it:

[Desktop Entry]
Exec=xvkbd
Icon=/usr/share/icons/oxygen/64x64/devices/input-keyboard.png
Type=Application
Terminal=false
Name=XVKbd

Save it as:

~/.local/share/applications/xvkbd.desktop

You can now find it in the K-Menu.

XVKBD - no desktop file

Cheers.

Andrzej

[SOLVED] XVKBD virtual on-screen keyboard with a UK layout by default…

Hi there.

So I’ve installed xvkbd.

[andrzejl@wishmasus ~]$ su
Password:
[root@wishmasus andrzejl]# pacman -S xvkbd
resolving dependencies...
looking for conflicting packages...
Packages (4) libxp-1.0.2-1 printproto-1.0.5-3 xaw3d-1.6.2-2 xvkbd-3.5-1
Total Download Size: 0.32 MiB
Total Installed Size: 1.13 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages ...
xaw3d-1.6.2-2-i686 179.5 KiB 402K/s 00:00 [########################################] 100%
printproto-1.0.5-3-any 14.8 KiB 1139K/s 00:00 [########################################] 100%
libxp-1.0.2-1-i686 86.0 KiB 384K/s 00:00 [########################################] 100%
xvkbd-3.5-1-i686 45.0 KiB 672K/s 00:00 [########################################] 100%
(4/4) checking keys in keyring [########################################] 100%
(4/4) checking package integrity [########################################] 100%
(4/4) loading package files [########################################] 100%
(4/4) checking for file conflicts [########################################] 100%
(4/4) checking available disk space [########################################] 100%
(1/4) installing xaw3d [########################################] 100%
(2/4) installing printproto [########################################] 100%
(3/4) installing libxp [########################################] 100%
(4/4) installing xvkbd [########################################] 100%
[root@wishmasus andrzej]# exit
[andrzejl@wishmasus ~]$

and then I’ve ran it…

XVKBD virtual on-screen keyboard with a UK layout by default 001

By default xvkbd starts with the US layout. I’ve been searching for some sort of a command line switch so that I could edit the .desktop file but the only thing that I’ve found was a “clickable” layout change from the xvkbd gui after the keyboard has already started. That’s not good enough and so I’ve decided to find a way to change the layout to UK by default before keyboard before it starts. Its not pretty but it works.

1) Gain root:

su

2) Backup the US layout:

mv /usr/lib/X11/app-defaults/XVkbd /usr/lib/X11/app-defaults/XVkbd-usa

3) Copy the UK layout in its place (You can use whichever layout You want):

cp /usr/lib/X11/app-defaults/XVkbd-uk /usr/lib/X11/app-defaults/XVkbd

4) Drop root:

exit

Now when You will start xvkbd it will start with the layout that You’ve chosen…

XVKBD virtual on-screen keyboard with a UK layout by default 002

Cheers.

Andrzej

[SOLVED] Shorewall fails to start. ERROR:Shorewall start failed:Firewall state not changed.

After a reboot I like to run couple of commands just to find out if everything is fine. One of those commands is:

journalctl -b -l -x --no-pager -p 3

Most of the time everything is fine but sometimes…

[root@server andrzejl]# journalctl -b -l -x –no-pager -p 3
— Logs begin at Sat 2015-01-17 18:31:30 CET, end at Mon 2015-02-02 00:09:14 CET. —
Feb 01 23:51:42 server.loc kernel: microcode: no support for this CPU vendor
Feb 01 23:51:42 server.loc kernel: mce: Unable to init device /dev/mcelog (rc: -5)
Feb 01 23:51:44 server.loc kernel: longhaul: Option “enable” not set. Aborting.
Feb 01 23:51:51 server.loc logger[286]: ERROR:Shorewall start failed:Firewall state not changed
Feb 01 23:51:51 server.loc systemd[1]: Failed to start Shorewall IPv4 firewall.
— Subject: Unit shorewall.service has failed
— Defined-By: systemd
— Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

— Unit shorewall.service has failed.

— The result is failed.

The first few messages are fine. Its not a intel or amd cpu so microcode wont work and its not gonna enable the longhaul option. However the firewall not starting… Well thats something to be concerned about.

Why didn’t it start…?

systemctl status -l shorewall

● shorewall.service – Shorewall IPv4 firewall
Loaded: loaded (/usr/lib/systemd/system/shorewall.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since nie 2015-02-01 23:51:51 CET; 11min ago
Process: 178 ExecStart=/usr/bin/shorewall $OPTIONS start $STARTOPTIONS (code=exited, status=143)
Main PID: 178 (code=exited, status=143)

lut 01 23:51:51 server.loc shorewall[178]: Starting Shorewall….
lut 01 23:51:51 server.loc shorewall[178]: ERROR: Can’t determine the IP address of enp0s9: Firewall state not changed
lut 01 23:51:51 server.loc logger[286]: ERROR:Shorewall start failed:Firewall state not changed
lut 01 23:51:51 server.loc shorewall[178]: /usr/share/shorewall/lib.common: linia 113: 259 Zakończony $SHOREWALL_SHELL $script $options $@
lut 01 23:51:51 server.loc systemd[1]: shorewall.service: main process exited, code=exited, status=143/n/a
lut 01 23:51:51 server.loc systemd[1]: Failed to start Shorewall IPv4 firewall.
lut 01 23:51:52 server.loc systemd[1]: Unit shorewall.service entered failed state.
lut 01 23:51:52 server.loc systemd[1]: shorewall.service failed.

It didn’t start because it started to fast and the network was not connected at this point.

How to delay it?

Edit this file:

/usr/lib/systemd/system/shorewall.service

#
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall
#
# Copyright 2011 Jonathan Underwood <jonathan.underwood@gmail.com>
#
[Unit]
Description=Shorewall IPv4 firewall
After=network-online.target
Conflicts=iptables.service firewalld.service

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=-/etc/sysconfig/shorewall
StandardOutput=syslog
ExecStart=/usr/bin/shorewall $OPTIONS start $STARTOPTIONS
ExecStop=/usr/bin/shorewall $OPTIONS stop

[Install]
WantedBy=basic.target

So it looks like this:

#
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall
#
# Copyright 2011 Jonathan Underwood <jonathan.underwood@gmail.com>
#
[Unit]
Description=Shorewall IPv4 firewall
After=network-online.target local-fs.target network.target
Conflicts=iptables.service firewalld.service

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=-/etc/sysconfig/shorewall
StandardOutput=syslog
ExecStart=/usr/bin/shorewall $OPTIONS start $STARTOPTIONS
ExecStop=/usr/bin/shorewall $OPTIONS stop

[Install]
WantedBy=basic.target

See the difference?

After=network-online.target

after=network-online.target local-fs.target network.target

Then run:

systemctl daemon-reload

systemctl restart shorewall

After the next reboot all should be fine.

This needs to be repeated after each shorewall upgrade.

Cheers.

Andrzej

[SOLVED] OpenVPN: Add clients without rebuilding all keys?

I’ve followed this video:

and after a lot of reading and brain-storming / testing with a friend got myself a working openvpn setup.

Here is the server config:

cat /etc/openvpn/server.andrzejl.eu.conf

dev tun
port 40404
proto tcp
cipher AES-256-CBC
server 10.8.0.0 255.255.255.0
ca server.andrzejl.eu.crt
cert client.andrzejl.eu.crt
key client.andrzejl.eu.key
dh server.andrzejl.eu.dh8192.pem
push "redirect-gateway def1 bypass-dhcp"
client-to-client
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
#push "route 192.168.0.0 255.255.255.0"
push "route 192.168.1.0 255.255.255.0"
script-security 3 system
client-connect /etc/openvpn/Client_Connected.sh
keepalive 10 60
user nobody
group nobody

Here is the script that is sending me e-mail each time somebody connects:

cat /etc/openvpn/Client_Connected.sh

#!/bin/bash
#Send an email when a client connects with today's time and date
NOW="$(date +"%H:%M:%S - %d-%m-%Y")"
sendmail openvpn@andrzejl.eu <<EOF
FROM: openvpn@andrzejl.eu
TO: andrzejl@andrzejl.eu
SUBJECT: $NOW: Client connected to the AndrzejL.eu OpenVPN server: $common_name
At $NOW, $common_name connected to the AndrzejL.eu OpenVPN server.
Client's IP: $trusted_ip
Client's PORT: $trusted_port
Client's MTU: $tun_mtu
.
EOF
exit 0

Here is the example of the message that script would send:

Subject:

09:14:09 - 02-02-2015: Client connected to the AndrzejL.eu OpenVPN server: andrzejl

Body:

At 09:14:09 - 02-02-2015, andrzejl connected to the AndrzejL.eu OpenVPN server.
Client's IP: 86.44.168.4
Client's PORT: 59213
Client's MTU: 1500

Here is the list of the server files with permissions:

ls --full /etc/openvpn/

total 44
-r-------- 1 root root 13749 2014-08-24 10:45:55.412850235 +0100 client.andrzejl.eu.crt
-r-------- 1 root root 6388 2014-08-24 10:45:55.429517125 +0100 client.andrzejl.eu.key
-r-x------ 1 nobody nobody 448 2015-01-31 19:30:05.772365139 +0000 Client_Connected.sh
drw------- 3 root root 4096 2014-08-22 00:27:38.010289003 +0100 easy-rsa
-r-------- 1 root root 500 2015-01-31 19:07:28.741675880 +0000 server.andrzejl.eu.conf
-r-------- 1 root root 3857 2014-08-24 10:45:55.442850636 +0100 server.andrzejl.eu.crt
-r-------- 1 root root 1464 2014-08-24 10:45:55.449517392 +0100 server.andrzejl.eu.dh8192.pem

The server was enabled and started.

systemctl enable openvpn@server.andrzejl.eu

systemctl start openvpn@server.andrzejl.eu

And here a bit about client…

cat /etc/modules-load.d/openvpn.conf

tun

Here is the client config:

cat /etc/openvpn/andrzejl.eu.conf

client
dev tun
proto tcp
remote andrzejl.eu 40404
resolv-retry infinite
nobind
persist-key
persist-tun
ca server.andrzejl.eu.crt
cert client.andrzejl.eu.crt
key client.andrzejl.eu.key
remote-cert-tls server
cipher AES-256-CBC
verb 3

Here is the list of the client side files with permissions:

ls --full /etc/openvpn/

total 52
-r-------- 1 root root 214 2015-01-31 17:50:39.000000000 +0000 andrzejl.eu.conf
-r-------- 1 andrzejl andrzejl 13624 2014-08-24 17:37:11.000000000 +0100 client.andrzejl.eu.crt
-r-------- 1 andrzejl andrzejl 6392 2014-08-24 17:37:07.000000000 +0100 client.andrzejl.eu.key
-r-------- 1 root root 3857 2014-08-24 12:26:47.000000000 +0100 server.andrzejl.eu.crt

The client can be enabled at boot with:

systemctl enable openvpn@andrzejl.eu

or started manually with

systemctl start openvpn@andrzejl.eu

IF You do not use systemd based distro You can start the OpenVPN client with this set of commands:

su

modprobe tun

cd /etc/openvpn/

openvpn ./andrzejl.eu.conf

It will work fine too.

So I had the openvpn server up and running… However then I’ve ran into a little snag… I have rebooted the server and went about my business just to realize that I have no idea how to generate keys for clients. Turns out its not JUST enter the directory and run the ./build-key newclient command…

[easy-rsa]# ./build-key newclient
Please edit the vars script to reflect your configuration,
then source it with “source ./vars”.
Next, to start with a fresh PKI configuration and to delete any
previous certificates and keys, run “./clean-all”.
Finally, you can run this tool (pkitool) to build certificates/keys.
[easy-rsa]# ls keys/

cd /etc/openvpn/easy-rsa/
. ./vars
./build-key newclient

This however… Works ;).

Source: http://serverfault.com/questions/229116/openvpn-add-clients-without-rebuilding-all-keys

Cheers.

Andrzej

P.S. Replace the word newclient with the nickname / name of the person you’re generating the key for…

Rsanti Finally Got Himself A Blog!

Seriously…

After many years of tempting and failed reasoning attempts with Rafal finally I can say that I’ve managed to convince him to do a little housekeeping on his server and since last night I can proudly say Rsanti has a blog. Not a static image gallery. Not some lighttpd / sqlite weirdness… but a proper WordPress blog, powered by a proper LAMP server. I mean Apache, MySQL, PHP, SSL… You name it. It took me a long long long time but it was all worth it. We are ALMOST there. Why almost? Well we are still working with a no-ip domain so there is no chance for a proper SSL cert but in this case self signed SSL certificate is really enough.

Sooo… Where can You find it? Here. Its still a little “bare” at the moment. Sure… The Krakow was not built in one day… But I expect many good posts from Rafal.

Blog.Rsanti.noip.org.Wordpress

Beside the WordPress powered blog there is also the Piwigo powered image gallery and for those of a nostalgic nature – the archive of his static photo gallery.

Good luck buddy.

Andrzej

[SOLVED] Disable displaying php errors in Piwigo.

Hi there.

Piwigo overrides the displays_errors directive from the /etc/php/php.ini. If You want to disable it go to the include folder in Your Piwigo installation and edit (as root) file common.inc.php.

Find the line:

@ini_set('display_errors', true);

and edit it so that it reads

@ini_set('display_errors', false);

and restart Your httpd service.

Cheers.

Andrzej

How to make awesome (super thin) crepes pancakes AndrzejL style…

Recipe for 20 large crepes pancakes.

You’re going to need:

1) 500g (0.5kg) of a plain flour.

Crepes_Pancakes_001

2) Pinch of salt.

Crepes_Pancakes_002

3) 8 eggs.

Crepes_Pancakes_003

4) 500ml (0.5l) of milk.

Crepes_Pancakes_004

5) 500ml (0.5l) of sparkling water.

Crepes_Pancakes_005

6) More less 50g of butter.

Crepes_Pancakes_006

7) Oil.

Crepes_Pancakes_007

Candid group shot…

Crepes_Pancakes_008

You will also need a mixer… and a woman that will do all the work for You… /Me runs for the hills…

Crepes_Pancakes_009

A) So… Grab a bowl and add the flour and the pinch of salt.

Crepes_Pancakes_010

B) Measure 500ml of milk in a measuring jug.

Crepes_Pancakes_011

C) Add milk to the bowl.

Crepes_Pancakes_012

D) Add sparkling water to the bowl.

Crepes_Pancakes_013

E) Break the eggs.

Crepes_Pancakes_014

F) I like to break each egg into a cup and check for the egg shells before I will add the egg to the bowl.

Crepes_Pancakes_015

Crepes_Pancakes_016

G) Add eggs to the bowl.

Crepes_Pancakes_017

H) Melt the butter.

Crepes_Pancakes_018

Crepes_Pancakes_019

Crepes_Pancakes_020

I) Add butter to the bowl.

Crepes_Pancakes_021

J) Start mixing.

Crepes_Pancakes_022

Crepes_Pancakes_023

Crepes_Pancakes_024

K) Some of the mixers are badly designed and they are not reaching to the bottom of the bowl. Make sure that You have checked bottom of the bowl for flour snot.

Crepes_Pancakes_025

L) And keep mixing if necessary.

Crepes_Pancakes_026

Crepes_Pancakes_027

M) Mix until the entire batter has a even and smooth texture.

Crepes_Pancakes_028

Crepes_Pancakes_029

N) Pour a tiny itsy bitsy dot of oil on the pan.

Crepes_Pancakes_030

O) Take a paper kitchen towel and wipe it off while spreading the bit of oil evenly on the pan. DON’T throw the paper away. You will need it.

Crepes_Pancakes_031

Crepes_Pancakes_032

Crepes_Pancakes_033

P) Move part of the batter from the bowl into a measuring jug. Its easier to pour the batter onto a frying pan this way.

Crepes_Pancakes_034

Crepes_Pancakes_036

Q) Start pouring (very thin) layer of batter onto a hot frying pan.

Crepes_Pancakes_037

R) Move the pan around to spread the batter evenly.

Crepes_Pancakes_038

S) After a (very short) while start prying one side of the pancake with a spatula.

Crepes_Pancakes_039

T) If everything went as planed You should be able to pick the pancake up and flip it to the other side.

Crepes_Pancakes_040

Crepes_Pancakes_041

U) Take the ready pancake off and pour next batch of batter on the pan.

Crepes_Pancakes_042

V) Result? Very thin and equally very awesome crepes pancake AndrzejL style… +10 to the charisma in the kitchen +5 to self-respect.

Crepes_Pancakes_043

W) Every once in a while re-grease the pan with a oil / kitchen paper towel.

Crepes_Pancakes_044

Crepes_Pancakes_045

X) Keep going…

Crepes_Pancakes_046

Crepes_Pancakes_047

Y) Pheeeew… The last one…

Crepes_Pancakes_048

Final result? 19 1/2 awesome super thin crepes pancakes…

Crepes_Pancakes_049

Crepes_Pancakes_050

You can roll them with jam / chocolate / white cheese / tomato and basil sauce inside or use them as a next step of making croquets… I like to use them instead of tortillas to make chicken wraps. Makes no difference.

Enjoy.

Andrzej

P.S. Not a single woman was hurt (much) during making of this howto.