mathz.nu Asterisk Blacklist Hobby webbhotell

2017/11/16

Tvinga en diskcheck vid nästa start av Linux

Filed under: Ubuntu — Mathz @ 19:47

touch /forcefsck

Detta är veriferat på Unbuntu 14.x och 16.x

2016/11/07

MAC adress mapping in Ubuntu

Filed under: Ubuntu — Mathz @ 00:08

/etc/udev/rules.d/70-persistent-net.rules

2016/02/23

Control screen from CLI (crontab)

Filed under: Ubuntu — Mathz @ 16:05


#!/bin/bash
export DISPLAY=:0.0

if [ $# -eq 0 ]; then
echo usage: $(basename $0) “on|off|status”
exit 1
fi

if [ $1 = “off” ]; then
echo -en “Turning monitor off…”
xset dpms force off
echo -en “done.\nCheck:”
xset -q|grep “Monitor is”
elif [ $1 = “on” ]; then
echo -en “Turning monitor on…”
xset dpms force on
echo -en “done.\nCheck:”
xset -q|grep “Monitor is”
elif [ $1 = “status” ]; then
xset -q|sed -ne ‘s/^[ ]*Monitor is //p’
else
echo usage: $(basename $0) “on|off|status”
fi

2015/07/11

Ubuntu autostart Glassfish

Filed under: Glassfish,Ubuntu — Mathz @ 15:09

You need to set JAVA_HOME and add JAVA_HOME/bin to PATH


asadmin create-service

2013/11/28

Autologin in Ubuntu

Filed under: Server,Ubuntu — Mathz @ 16:23

In file /etc/lightdm/lightdm.conf add following in section [SeatDefaults]:

autologin-user-timeout=0
autologin-user=

2013/11/20

Disable update-notifier in Ubuntu

Filed under: Ubuntu — Mathz @ 06:51

Prevent update-notifier from starting at login for all users

The above method works only on the user that is currently logged in. This is useful if you have a one-user workstation. But if you want to make a system-wide change, run:

sudo sed -i ‘s/X-GNOME-Autostart-Delay=60/X-GNOME-Autostart-enabled=false/’ /etc/xdg/autostart/update-notifier.desktop

Powered by WordPress