Skip to content

Instantly share code, notes, and snippets.

@sebassdc
Last active January 19, 2019 04:27
Show Gist options
  • Save sebassdc/b7183fc461db2818e400a8ae3c2e2684 to your computer and use it in GitHub Desktop.
Save sebassdc/b7183fc461db2818e400a8ae3c2e2684 to your computer and use it in GitHub Desktop.
A compendium of usefull linux stuff

Tricks linux

Convert flac to mp3

First install this packages

sudo apt-get install flac
sudo apt-get install lame

Then run this command on your songs folder

for f in *.flac; do flac -cd "$f" | lame -b 320 - "${f%.*}".mp3; done

Note: It's doesn't work on fishell

Convert wav to flac

for i in *.wav; do ffmpeg -i "$i" "$i".flac ; done

Add a system try indicator with custom values

You need to install indicator-sysmonitor from ppa:

sudo add-apt-repository ppa:fossfreedom/indicator-sysmonitor
sudo apt-get update
sudo apt-get install indicator-sysmonitor

Then run inicator-sysmonitor. By default it will appear the cpu and memory usage. But you can change it with preferences. Even add your own command with an interval of excecution. Whatever script on any language that print a single value will work.

ERROR -> sudo: no se encontraron fuentes sudoers válidas, saliendo.

The problem comes from: /etc/sudoers permissions.

First: Switch on your computer.

Second: Wait until the UEFI/BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.) Note: UEFI fast boot may be too fast to give time to press any key.

Third: With BIOS, quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.) With UEFI press (perhaps several times) the Escape key to get grub menu. Forth: Select the line which is Advanced options or something like that.

Fifth: Select the line ending with (recovery mode), probably the second line, something like: Ubuntu GNU/Linux, with Linux 3.8.0-26-generic (recovery mode).

sixth: choose option: root and a shell prompt will appear in the bottom of the screen.

seventh: in shell prompt type:

chmod 440 /etc/sudoers
chown root:root /etc/sudoers

eighth: press Control-D to close prompt, then, select resume option to continue restarting.

You will probably need to restart again your computer.

@sebassdc
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment