Recent Comments
- Spitzenpfeil on Sleep is vital
- robert on PT4115 LED-Square
- abies on PT4115 LED-Square
- robert on ERSA I-Con Nano — A pico review
- Ubi de Feo on ERSA I-Con Nano — A pico review
Archives
Tags
64-pixels adapter AVR bulb customs DSO failure by design fireworks firmware good old days hack happy new year hardware IKEA import lamp lecroy LED light lighting linux MBI5168 modding open source opensuse oscilloscope PCB power supply prototype PWM rant remote RGB RoHS Samtid Seeedstudio SMD soldering teardown trigger upgrade WaveAce 224 weller WS2812B youyueCategories
- Computer / Server (21)
- Dear Diary. (13)
- DIY. (12)
- Electronics. (192)
- Arduino. (44)
- Fix me. (13)
- Soldering & PCBs. (39)
- Software. (11)
- Something Completely Different (10)
- The Dump. (28)
Blogroll
KiCad
Links
My 2µF
Meta
Tag Archives: linux
Forcing kdesu / xdg-su to honour ‘sudoers’
1 |
kwriteconfig5 --file kdesurc --group super-user-command --key super-user-command sudo |
You can also just add this to $HOME/.config/kdesurc
1 2 |
[super-user-command] super-user-command=sudo |
Source from 2008 :-)
VirtualBox mischief – getting rid of too many pesky users
This requires VirtualBox guest additions to be installed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
#!/bin/bash VM_NAME="deb test" MAX_USERS=2 RUNNING_VMS=`VBoxManage list runningvms` OUR_VM_IS_RUNNING=`echo ${RUNNING_VMS} | grep "${VM_NAME}"` if [[ -z ${OUR_VM_IS_RUNNING} ]] then echo -e "VM \"${VM_NAME}\" not running...\nBye!" exit fi LOGGED_IN_USERS=`VBoxManage guestproperty enumerate "${VM_NAME}" | grep "/OS/LoggedInUsers, value" | awk '{split($4,a,","); print a[1]}'` if [[ ${LOGGED_IN_USERS} -gt ${MAX_USERS} ]] then echo "Checking VM: \"${VM_NAME}\"..." echo "${LOGGED_IN_USERS} logged in. Maximum allowed: ${MAX_USERS}" echo "Shutting down \"${VM_NAME}\" ..." VBoxManage controlvm "${VM_NAME}" savestate else echo "Checking VM: \"${VM_NAME}\"..." echo "${LOGGED_IN_USERS} logged in. Maximum allowed: ${MAX_USERS}" echo "Phew ..." fi |
Posted in Computer / Server
Tagged linux, mischief, scripting, VBoxManage, VirtualBox, virtualization
Comments Off on VirtualBox mischief – getting rid of too many pesky users
A bit of VirtualBox scripting – NAT & DHCP
Maybe someone will find it useful…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
#!/bin/bash ISO="${HOME}/VirtualBox VMs/__stuff__/ISOs/debian-9.5.0-amd64-netinst.iso" VBoxManage createvm --name "$1" --register --ostype "Linux_64" VBoxManage modifyvm "$1" --memory 1024 --acpi on --cpus 2 --audio none --usbxhci on --ioapic on --vram 16 VBoxManage storagectl "$1" --name "SATA" --add sata --hostiocache on --portcount 2 MEDIUM_UUID=`VBoxManage createmedium disk --filename "$HOME/VirtualBox VMs/$1/$1" --size 8000 --format VDI | awk '{print $4}'` VBoxManage storageattach "$1" --storagectl "SATA" --port 0 --type hdd --medium ${MEDIUM_UUID} --nonrotational on VBoxManage storageattach "$1" --storagectl "SATA" --port 1 --type dvddrive --medium "${ISO}" #VBoxManage storageattach "$1" --storagectl "SATA" --port 1 --type dvddrive --medium emptydrive if [[ -z `VBoxManage list hostonlyifs` ]] then VBoxManage hostonlyif create fi VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1 --netmask 255.255.255.0 VBoxManage dhcpserver add --ifname vboxnet0 --ip 192.168.56.3 --netmask 255.255.255.0 --lowerip 192.168.56.100 --upperip 192.168.56.200 --enable VBoxManage modifyvm "$1" --nic1 hostonly VBoxManage modifyvm "$1" --hostonlyadapter1 vboxnet0 VBoxManage natnetwork add --netname natnet1 --network "192.168.16.0/24" --enable VBoxManage natnetwork modify --netname natnet1 --port-forward-4 "ssh:tcp:[127.0.0.1]:6666:[192.168.16.137]:22" VBoxManage dhcpserver add --netname natnet1 --ip 192.168.16.3 --netmask 255.255.255.0 --lowerip 192.168.16.137 --upperip 192.168.16.200 --enable VBoxManage modifyvm "$1" --nic3 natnetwork VBoxManage modifyvm "$1" --nat-network3 natnet1 VBoxManage dhcpserver add --netname intnet0 --ip 192.168.42.3 --netmask 255.255.255.0 --lowerip 192.168.42.100 --upperip 192.168.42.200 --enable VBoxManage modifyvm "$1" --nic2 intnet VBoxManage modifyvm "$1" --intnet2 intnet0 VBoxManage list natnets VBoxManage list hostonlyifs VBoxManage list dhcpservers |
Please note, as of today (2018-11-03) there appears to be an annoying issue with the DHCP server (5.2.20) for “NAT Network” (not just “NAT”). If you change the settings for the built-in DHCP … Continue reading
Posted in Computer / Server
Tagged linux, scripting, VBoxManage, VirtualBox, virtualization
Comments Off on A bit of VirtualBox scripting – NAT & DHCP
SuSE museum — 7.3 to 9.1
SuSE Linux Professional 7.3
Posted in Computer / Server
Tagged good old days, historical, linux, museum, SuSE
Comments Off on SuSE museum — 7.3 to 9.1
“Easy” remote-admin — take 2
In my previous post I described a method for a boot-activated remote-admin option for my parents’ computer. On 2nd thought, it is not always a good idea to rely on changing system-wide configurations (such as sshd_config, firewall…) In this post … Continue reading
Posted in Computer / Server
Tagged admin, iptables, linux, port forwarding, remote, router, SSH, sshd, VNC
Comments Off on “Easy” remote-admin — take 2
“Easy” & quite safe remote-admin for parent’s linux machine
Yes, I know about KDE desktop sharing, FreeNX and relatives… and again yes, this is nothing new, but someone might still find it useful. I wanted and needed something simple, something that could be activated in the bootloader menu (grub … Continue reading
Posted in Computer / Server
Tagged admin, linux, remote, VNC
Comments Off on “Easy” & quite safe remote-admin for parent’s linux machine
Got a new Kindle and no WLAN support on your router?
What’s the motivation? You CAN transfer e-books to the Kindle via USB cable, BUT that leaves a lot to be desired. Browsing the Amazon Kindle store is a very nice feature that I wouldn’t want to miss anymore. There are … Continue reading
Posted in Computer / Server, Electronics., Software.
Tagged access point, amazon, bridged, hostapd, Kindle, linux, network, usb stick, WLAN
2 Comments
ATtiny4313 on linux
Some time ago I had acquired an ATtiny2313 breakout board and was running into memory limitations. I ordered 2 ATtiny4313 on ebay, but could compile any code for them. As it turns out after a longer odyssey, it seems that … Continue reading
Getting Mathematica fonts to work with pdfLaTeX
I’m busy with writing some stuff and sometimes using Mathematica is simpler and quicker than using GnuPlot + Inkscape. But getting the fonts to work with LaTex / pdfLaTeX … !!! WTF !!! Now after several hours, it’s dark now, … Continue reading
PulseAudio annoyance — headphones killing my ears
“Based on code originally contributed by Marc-André Lureau we now support Flat Volumes. The idea behind flat volumes has been inspired by how Windows Vista handles volume control: instead of maintaining one volume control per application stream plus one device … Continue reading
Posted in Software.
Tagged amarok, audio, headphones, linux, mp3, pulseaudio
Comments Off on PulseAudio annoyance — headphones killing my ears
Updating the Server — Welcome Debian, bye bye openSUSE
My provider has upgraded its VServer plans. Now offering 1GB of RAM, 20GB of disk and some more CPU power for the same price, but openSUSE was phased out. My old VServer only hat 256MB or RAM and was kinda … Continue reading
Blocking referer spam with mod_security2 using Apache2
I have some statistics plugins for WordPress that evaluate what sites refer to my blog. I use “WassUp”, “StatPress” and “CyStats”. Unfortunately some idiot thinks it’s funny to bombard my webserver with referer spam. Complaining to the local net-admin us … Continue reading
Posted in Computer / Server
Tagged apache2, linux, mod_evasive, mod_security2, referer spam
Comments Off on Blocking referer spam with mod_security2 using Apache2
Simple linux load monitor using the 8×8 RGB Matrix
Now that I’ve finished some of the scientific work that was monopolizing my time, here’s some geeky and nerdy gadget for Linux fans. BTW, why is it that trying to find out what “geeky and nerdy” actually means, is also … Continue reading