Archive for the 'linux' Category

UDP Paket senden

Saturday, November 30th, 2019

mit netcat:

cat payload | nc -4u -q1 192.168.8.155 65506

mit >:

cat payload > /dev/udp/192.168.8.155/65506

verschlüsselte Ubuntu Partition mounten

Sunday, November 10th, 2019

… mit udisksctl (ubuntu 18.04)

sudo apt install libblockdev-crypto2
sudo systemctl restart udisks2.service
udisksctl
unlock -b /dev/sdb5
Passphrase:
Unlocked /dev/sdb5 as /dev/dm-3.
ls -la /dev/mapper
udisksctl mount -b /dev/mapper/kubuntu--vg-root



wieder aushängen:
udisksctl unmount -b /dev/mapper/kubuntu--vg-root

…mit cryptsetup:

sudo cryptsetup luksFormat -c aes-xts-plain64 -s 512 -h sha512 -y /dev/PARTITION
sudo cryptsetup luksOpen /dev/PATITION NAME
sudo mkfs.ext4 /dev/mapper/NAME

Quelle: https://wiki.ubuntuusers.de/LUKS/

Option für /etc/crypttab:
noauto
Entirely ignore the device at the boot process. It’s still possible
to map the device manually using cryptdisks_start.





Neues Notebook: Lenovo Thinkpad L570

Sunday, November 10th, 2019

Mein geliebtes T500 ist etwas in die Jahre gekommen. USB3 hatte ich über Express-Card nachgerüstet; Das Displa war immer schon etwas dunkel (kein IPS) und die SSD konnte nicht ihre volle Geschwindigkeit zeigen(hdparm: 270MB/s). Und ich fand es auch immer zu schwer in meinem Rucksack.

Die Entscheidung für einen Nachfolger war sehr schwer. Hab mir Business- und auch Consumer Modelle von HP, Dell und Lenovo angesehen. Die meisten waren nur sehr schwer zu öffnen und kaum zu erweitern. Das T570 kam in die engere Wahl. Es hat Nvidia Grafik, ist aber nicht so vielseitig wie das L570. Das T570 hat hinten keine Wartungsklappe – nam muss die ganze Bodenplatte ab-clipsen. Beim L570 kann ich 2 Stück NVMe-SSDs und eine 7,2mm SATA SSD oder HDD einbauen. Der Wechsel der Platten geht relativ einfach – ohne das komplette Gerät zu zerlegen wie es bei manchen anderen aktuellen Geräten der Fall ist.

Lenovo Thinkpad L570 Vorteile gegenüber T500

  • etwas weniger Gewicht als T500
  • 4 x USB 3
  • Wi-Fi 2×2 802.11ac
  • HDMI+VGA+DP+DVI und noch mehr USB3 an der Dockingstation
  • Full HD IPS Dispaly
  • Nummernblock
  • Blender 2.8. läuft
  • “Kaby Lake” CPU TDP: 15 Watt statt 25W
  • Webcam

Lenovo Thinkpad L570 Nachteile gegenüber T500

  • andere Tastatur als T500
  • kein ThinkLight
  • keine Status LEDs
  • bootet nicht schneller (25s)
  • Gehäuse weniger robust
  • 2cm breiter
  • ca €150 teurer als das T500 damals
  • 5% Weniger Display-Fläche
  • Sound nicht so gut, Lautsprecher an der Vorderkante
  • 90W Netzteil ist groß

Wie man an der Auflistung sieht: Gemischte Gefühle 😉 Vielleicht wird es Liebe auf den zweiten Blick…

Thinkpad volume buttons with openbox/lubuntu 18.04

Saturday, May 26th, 2018

Because I copied my old home partition from Linux Mint 17 to Lubuntu 18.04 I had to fix my ~/.config/openbox/lubuntu-rc.xml

<keybind key=”XF86AudioRaiseVolume”>
<action name=”Execute”>
<command>amixer -q sset Master 3%+</command>
</action>
</keybind>

<keybind key=”XF86AudioLowerVolume”>
<action name=”Execute”>
<command>amixer -q sset Master 3%-</command>
</action>
</keybind>

<keybind key=”XF86AudioMute”>
<action name=”Execute”>
<command>amixer -q sset Master 0%</command>
</action>
</keybind>

Thinkpad suspend button with lubuntu 18.04

Saturday, May 26th, 2018

I use Fn-F4 to put my Thinkpad T500 to sleep. So far that worked out of the box with all Linux Versions that I tried. But not this time with lubuntu 18.04. I fixed it like this:

2 new files :

/etc/acpi/events/lenovo-sleep

event=button/sleep SBTN 00000080 00000000 K
action=/etc/acpi/lenovo-sleep.sh

/etc/acpi/lenovo-sleep.sh

#!/bin/sh
pm-suspend

… and 3 commands:

sudo chmod 755 lenovo-sleep.sh
sudo /etc/init.d/acpid restart
sudo apt install pm-utils

Nextcloud Server auf ubuntu oder Linux Mint

Tuesday, May 8th, 2018
apt update
apt-get -y install apache2
apt-get -y install mariadb-server mariadb-client
mysql_secure_installation

(Mysql/MriaDB testen, datenbank und DB-Nutzer anlegen)
mysql -u root -p

...

apt-get -y install php7.0 libapache2-mod-php7.0
systemctl restart apache2
cd /var/www/html/
echo "< ?php phpinfo(); ?>" > info.php
apt-get -y install php7.0-mysql
systemctl restart apache2

mkdir /var/www/html/nextcloud/
cd /var/www/html/nextcloud/

(nextclound als zip herunterladen...)

unzip latest-13.zip 

(ceertbot für Let's encrypt SSL Zertigfikat   https://....  )
apt-get install software-properties-common
add-apt-repository ppa:certbot/certbot
apt-get update
apt install certbot
apt-get install python-certbot-apache   
certbot --apache
apt-get install php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring
apt-get install php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip
   
cd /var/www/html/nextcloud/
cat .htaccess
vi  /etc/apache2/apache2.conf 

siehe:

Nextcloud auf Debian 9 mit docker, ngnix und letsencrypt

Friday, April 20th, 2018

Ich bin dieser Anleitung gefolgt:

https://kopfkrieg.org/2017/06/15/nextcloud-docker-nginx/

Leider wurde meine bash-history nicht geschrieben, weil ich mich nicht ordentlich abgemeldet habe 🙁

Beim repo habe ich
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

statt “ubuntu” verwendet.


docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c79cf8de0944 nextcloud "/entrypoint.sh apac…" 2 hours ago Up 2 hours 127.0.0.1:32768->80/tcp nextcloud

docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
nextcloud latest 6cec9cff80aa 19 hours ago 593MB

Änderung in /etc/ngnix/sites-available/default gegenüber der o.g. Anleitung:

server {
listen 443 ssl http2; # IPv4, SSL/TLS, HTTP/2
listen [::]:443 ssl http2; # IPv6, SSL/TLS, HTTP/2
server_name cac1.lug-marl.de;
root /var/www/nextcloud;
index index.html;
# Let's Encrypt on port 443
# location ^~ /.well-known {
# root /var/www/letsencrypt;
# }
ssl on;
ssl_certificate /etc/letsencrypt/live/my.example.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/my.example.org/privkey.pem;

...

Hilft gegen Timeout:
/etc/ngnix/ngnix.conf

...
http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
proxy_connect_timeout 600;

...

soweit so gut. läuft fluffig.
To Do:

* automatische umleitung http -> https
* caldav testen
* carddav testen
* postgres statt sqlite

text to speech

Monday, April 9th, 2018

I have a notebook with a broken display. I removed the display and want to use TTS instead. So on boot the machine can say things like “conected to Wifi SSID ….” and “my IP adress is …”

When I know the IP then I can connect via ssh or vnc. That might also be useful for Raspberry Pi. Another option can be a LCD connected via usb-to serial cable.

I found 3 solutions ; one for bash and one for python:

bash 1:
apt-get install libttspico-utils


A=`echo "hello world"` ; pico2wave --wave /tmp/Test.wav "$A" ; play /tmp/Test.wav; rm /tmp/Test.wav

bash 2:
apt-get install festival festvox-don


(echo "my IP adress is " ; hostname -I ) |festival --tts

python:

pip install pyttsx3

import pyttsx3;
engine = pyttsx3.init();
engine.say("hello world");
engine.runAndWait() ;

Epoptes 0.5.10

Sunday, March 19th, 2017

Seit Version 0.5.9 hat epoptes “automatic client reconnecting”
Bei älteren Versionen konnte man Clients nicht steuern wenn der Client gestartet wurde, bevor der Server gestartet ist. Das Problem ist seit Version 0.5.9 behoben.

Auf einem Test-Server hatte ich ein Problem mit epoptes/ui/notifications.py , was sich aber durch auskommentieren einiger Zeilen bzw. Einfügen von “pass” Befehlen lösen konnte.

http://www.epoptes.org/

Firefox spielt diverse Videos nicht mehr

Saturday, December 24th, 2016

Das hat geholfen:


apt update
apt install firefox libav-tools libavcodec-extra libavcodec-extra-54