Let's make the world a better place using digital technologies!

Month: May 2019

Useful Docker Commands

  • docker pull image_name
  • docker create ….. (create container from image)
  • docker run …. (create container and run from image)
  • docker ps -a (list all container, including stopped)
  • docker images (list all images)
  • docker rm container_name (delete container)
  • docker start container_name (start/resume container)
  • docker stop¬†container_name¬† (stop container)
  • docker rmi image_name (delete image)
  • docker exec -it container_name bash (connect to running conatiner_name container and jump to a bash shell)
Continue Reading

Fixing Unwanted Linux System Suspend Caused by gdm / lightdm

After upgrading to a newer Ubuntu, I found myself facing automatic system suspend events (look at /var/log/syslog) every 20 or 30 minutes. Here is how to fix them:

sudo -H -u lightdm dbus-launch --exit-with-session dbus-launch gsettings set com.canonical.unity-greeter idle-timeout 0

sudo -H -u lightdm dbus-launch --exit-with-session dbus-launch gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action nothing

sudo -H -u lightdm dbus-launch --exit-with-session dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0

sudo -H -u lightdm dbus-launch --exit-with-session dbus-launch gsettings set org.gnome.settings-daemon.plugins.power time-low 0

 

You might want to look at the power settings first which can be shown by:

sudo -H -u lightdm dbus-launch --exit-with-session gsettings list-recursively org.gnome.settings-daemon.plugins.power

If needed, login to the lightdm user by:

su lightdm -s /bin/bash

 

Continue Reading