Archive for the 'ubuntu' Category

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.





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:

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/

Testing LTSP & Epoptes with VirtualBox

Wednesday, October 30th, 2013

Virtual Box
(Version 4.1.12)

virtueller LTSP Server:
Linux Mint 13
20GB Festplatte
128MB Grafikspeicher
4GB RAM, 4 Prozessoren
Netzwerk:
Adapter 1: NAT – Zugang zum Internet, dhcp-client, IP: 10.0.2.15
Adapter 2: Internes Netzwerk, ‘intnet’ – virtuelles LAN für die Terminals

virtuelle Terminals:
keine Festplatte
256MB RAM, 1 CPU
Bootreihenfolge: Netzwerk,
Netzwerk:
Adapter 1: Internes Netzwerk, ‘intnet’

(eins erzeugen, testen, dann klonen)

LTSP Server
apt-get install ltsp-server-standalone (5.3.7)
cp -R /usr/share/ltsp/plugins/ltsp-build-client/Ubuntu /usr/share/ltsp/plugins/ltsp-build-client/LinuxMint
ln -s /usr/share/debootstrap/scripts/gutsy /usr/share/debootstrap/scripts/maya
sed -i ‘s/DIST=${DIST:-“$(lsb_release -s -c)”}/DIST=${DIST:-“precise”}/’ “/usr/share/ltsp/plugins/ltsp-build-client/LinuxMint/000-basic-configuration”
ln -s /usr/share/ltsp/plugins/ltsp-build-client/Debian-functions /usr/share/ltsp/plugins/ltsp-build-client/LinuxMint-functions
ltsp-build-client –arch i386

/etc/ltsp/dhcpd.conf – unverändert

apt-get remove network-manager

/etc/network/interfaces:

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0

service networking restart
service isc-dhcp-server restart

/var/lib/tftpboot/ltsp/i386/lts.conf :

[Default]
LDM_GUESTLOGIN=True
#LDM_DIRECTX=True
LDM_PASSWORD=secret

#[ltsp20]

http://manpages.ubuntu.com/manpages/precise/man5/lts.conf.5.html

nützlich für LDM_AUTOLOGIN : ltsp-shutdown.desktop

LDM_GUESTLOGIN ähnlich ist wie LDM_AUTOLOGIN aber mit der zusätzlichen Möglichkeit sich mit seinem eingnem Namen anzumelden.
Default username ist der Name des Terminals (ltsp20,ltsp21, …)

/home/ltsp20 usw. werde nicht automatisch aufgeräumt.
Eine Lösung dafür:
[Ltsp-discuss] Guest sessions

Create /opt/ltsp/i386/usr/share/ldm/rc.d/S00-guest-sessions, with the
following contents:

case “$LDM_USERNAME” in
guest*)
ssh -S “$LDM_SOCKET” “$LDM_SERVER” ‘cd; rm -rf .* *; rsync -a /etc/skel/ .’
;;
esac

Save and run `sudo ltsp-update-image`, if you’re using NBD.

That’s it, now all user accounts where the username starts with
“guest*”, will have their documents and settings erased on login.

alkisg: Although that rm -rf should really be find . -delete

adduser ltsp20
adduser ltsp21
… (Passwort: secret)

epoptes
(Version 0.5.5)
www.epoptes.org

apt-get install epoptes
gpasswd -a lehrer epoptes

fix for Mate Desktop logout
cd /home/lehrer/Downloads/~epoptes/epoptes/trunk/epoptes-client/
cp endsession /usr/share/epoptes-client
cp endsession /opt/ltsp/i386/usr/share/epoptes-client

cp /etc/resolv.conf /opt/ltsp/i386/etc/
ltsp-chroot passwd
ltsp-chroot apt-get install openssh-server epoptes-client
ltsp-update-image -a i386
service nbd-server restart

PXELINUX Boot Menu

cd /var/lib/tftpboot/ltsp/i386/
cp /usr/lib/syslinux/menu.c32 .
cd pxelinux.cfg
vi default

#default ltsp
default menu.c32

MENU TITLE Titel
timeout 300

label ltsp
menu default
menu label Linux Terminal
kernel vmlinuz
append ro initrd=initrd.img root=/dev/nbd0 init=/sbin/init-ltsp quiet splash plymouth:force-splash vt.handoff=7 nbdroot=:ltsp_i386

label xp
menu label Windows XP (ohne Internet)
localboot 0

http://www.syslinux.org/wiki/index.php/Menu.c32

pcal

Tuesday, February 12th, 2013

Für meinen Kalender verwende ich immer noch Papier. Früher habe ich korganizer zum drucken der Kalenderblätter benutzt, weil ich KDE Nutzer war. Leider hatte ich diverse Probleme mit akonadi und kmail. So musste ich korganizer deinstallieren. Als schlanke Alternative habe ich das Kosolenprogramm pcal entdeckt.

pcal -P a4 -t Helvetica-Bold/24 -d Helvetica-Narrow/14 -b Sun -b Sat  -F 1  7 2013 6 

-t …Font der Überschrift
-d …Font der Datumsnummern
-b …Samstag & Sonntag auch in schwarz statt grau
-F 1 …Die Woche mit Montag beginnen, statt mit Sonntag
7 …mit Monat Juli beginnen
2013 .. das Jahr
6 … Anzahl der Monate

ethersex

Saturday, December 25th, 2010

Ein erfolgreicher Basteltag.

Erstes AVR-NET-IO repariert: Ethernet Controller ENC28J60 ausgetauscht. Das alleine hat’s noch nicht gebracht. Erst als ich die Firmware nochmal neu geflasht habe, funktionierten Ping und Telnet wieder.

Zweites AVR-NET-IO in knapp 2 Stunden zusammengebaut. funktioniert!

Freie ethersex firmware ‘runtergeladen (mit git), kompiliert (besondere Version von avr-gcc!) und installiert. funktioniert!

http://www.ethersex.de/index.php/Kategorie:StepByStep
http://www.ethersex.de/index.php/Download
http://www.ethersex.de/index.php/Voraussetzungen
http://www.ethersex.de/index.php/ECMD_Protocols
http://www.ethersex.de/index.php/ECMD_Reference

Ethersex Weboberfläche(bei Pollin AVR-NET-IO Hardware): http://192.168.0.90
Ethersex telnet-like Port: 2701

Lenovo G550L and kubuntu 10.10 RC

Friday, October 8th, 2010

Yesterday I installed kubuntu 10.10 RC on a Lenovo G550L. I was a bit disapointed that the Notebook has intel CPU,GPU and Chipset but WLAN is Broadcom 🙁 It also did not have a cardreader like some other 550 models have. But it has 3 x USB, that’s better than the G530 which has only one.

Kubuntu installation went fine. Broadcom wireless works. But after running for some minutes it becomes extremely slow. In gkrellm you can see proc going very high. shutdown takes more that 2 minutes. Assuming that the Xorg driver did not get worse since ubuntu 10.4 I guess it’s a KDE/kwin problem. In a few days I’ll upgrade to the final version. Until them I use ubuntu 10.04 with gnome, where I did not experience such problems.

ssh

Friday, March 12th, 2010

ssh weniger sicher aber etwas mehr bequem machen:

1.) HashKnownHosts no
in /etc/ssh/ssh_config oder in ~/.ssh/config

Danach werde ndie Einträge in ~/.ssh/known_hosts wieder “so wie früher” und man kann leicht einen Eintrag finden und entfernen, wenn sich ein host key geändert hat.

2.) StrictHostKeyChecking no
in /etc/ssh/ssh_config oder in ~/.ssh/config

Nachdem man seinen Schlüssel mit ssh-copy-id auf den Zielrechner übertragen hat, kann man ssh in scripten benutzen, auch wenn der Zielrechner nicht in known_hosts steht.

z.B. ein screenshot holen:
ssh >/tmp/screenshot.xwd -i id_dsa user@rechner xwd -silent -root -display 0:0