Posts

Showing posts from July, 2020

How to become root

sudo su

Mount HDD temporarily on Linux

sudo fdisk -l    mkdir /mnt/mount_name   sudo mount /dev/partition /mnt/mnt_name

Test speaker on Linux

speaker-test -t wav -c 6

Shortcut for app on PlayOnLinux

playonlinux --run appName

Force removal of broken package

sudo dpkg --remove --force-remove-reinstreq package_name

Enable double click to open item in KDE

System Settings, Workspace, Workspace Behavior, General Behavior, Click behavior

Delete all email from mail command

? delete * ? q

Stop Ubuntu from asking password

Run sudo visudo For certain command: username ALL = NOPASSWD: command 1 username ALL = NOPASSWD: command 1, command 2, command 3 Example hensem ALL = NOPASSWD: /bin/systemctl restart httpd.service, /bin/kill For everything: username ALL=(ALL) NOPASSWD:ALL For root: Find the line that says %admin ALL=(ALL) ALL and change it to %admin ALL=(ALL) NOPASSWD: ALL

Running GUI app in Cron

In ~/.profile add these 2 lines: xhost +local: xhost Add env DISPLAY=:0 before cron command 00 06 * * * env DISPLAY=:0 gui_appname To run cron as root or anacron, add this to ~/.bashrc xhost local:mpromber > /dev/null