Skip to content

Instantly share code, notes, and snippets.

@okv
Last active October 13, 2015 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okv/4266845 to your computer and use it in GitHub Desktop.
Save okv/4266845 to your computer and use it in GitHub Desktop.
Tips and tricks for ubuntu 12.04 like single line bash scripts for allowing hibernate, adding useful ppa's, etc.

Enable hibernate in the menu at Ubuntu 12.04 (details at https://help.ubuntu.com/12.04/ubuntu-help/power-hibernate.html)

echo -e "[Re-enable hibernate by default]\nIdentity=unix-user:*\nAction=org.freedesktop.upower.hibernate\nResultActive=yes\n" | sudo tee /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla > /dev/null && echo "All done, now you can hibernate from the menu"

Allow run sudo pm-hibernate without password at Ubuntu 12.04 for selected USER_OR_GROUP

USER_OR_GROUP="plugdev"; echo "%$USER_OR_GROUP ALL=(ALL) NOPASSWD: `which pm-hibernate`" | sudo tee /etc/sudoers.d/hibernate > /dev/null && echo "All done, now you can run 'sudo pm-hibernate' from '$USER_OR_GROUP' without password"

DeaDBeeF - Ultimate Music Player For GNU/Linux

sudo apt-add-repository ppa:alexey-smirnov/deadbeef

How do I fix a “Can't access Dropbox folder” error?

if you put these in /etc/sysctl.conf:

fs.inotify.max_user_watches = 1048576 fs.inotify.max_user_instances = 256

it will fix. eg.

sudo sysctl fs.inotify.max_user_instances=256

details

Samba with ui

apt-get install system-config-samba

GIMP

sudo apt-add-repository ppa:otto-kesselgulasch/gimp

show only username and host at start of command line

add to ~/.bashrc

#show only username and host at start of command line
export PS1='\u@\h$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment