Table des matières
How-tos (Linux tips)
Multimedias - Conversions
Convert Wav to Flac
Convert all wav files to flac files in a folder
for i in *.wav; do ffmpeg -i "$i" "$i".flac ; done
Convert Flac to Mp3 files
for f in *.flac; do flac -cd "$f" | lame -b 320 - "${f%.*}".mp3; done
Compress all mp4 videos in a folder
for i in *.mp4; do ffmpeg -i "$i" -vcodec libx265 -crf 28 "${i%.*}_compressed.mp4"; done
Compress all mov videos in a folder
for i in *.mov; do ffmpeg -i "$i" -vcodec libx265 -crf 28 "${i%.*}_compressed.mp4"; done
Convert HEIC images to jpg
sudo apt install libheif-examples for file in *.heic; do heif-convert "$file" "${file/%.heic/.jpg}"; done
Pick a random file with Totem
totem "$(ls -R | shuf -n1)"
If Totem can't read some mkv or mp4 vidéo
After upgrading to Ubuntu 22.04 I had some issue to read some video files (Totem crash at startup, display the error “The specified movie could not be found” or open the video with a strange format. I did install the Intel non-free drivers to solve this issue:
sudo apt install intel-media-va-driver-non-free ubuntu-restricted-extras
Network
Download test
curl -4 -o /dev/null http://bouygues.testdebit.info/100M.iso
Upload test
curl -o /tmp/temp.iso https://bouygues.testdebit.info/100M.iso curl -4 -o /dev/null -F "filecontent=@/tmp/temp.iso" http://bouygues.testdebit.info
Display public IP address
host myip.opendns.com resolver1.opendns.com
Fstab
Install cifs/nfs
sudo apt install nfs-common sudo apt install cifs-utils
Install DCP-7055W scan driver
brsaneconfig4 -a name=(name your device) model=(model name) ip=xx.xx.xx.xx
Fail2ban
Get SSH banned IP
fail2ban-client status sshd
AirPlay
Pulse Audio
Installation of Airplay in Ubuntu 22.04 with Pulse Audio
# Airplay ability sudo apt install pulseaudio build-essential paprefs git pulseaudio-module-raop intltool libjack0 pavucontrol pulseaudio-module-zeroconf #bug pulseaudio sudo ln -s /usr/lib/pulse-16.1+dfsg1/ /usr/lib/pulse-16.1 pactl load-module module-raop-discover
PipeWire
Discover Airplay in Ubuntu 22.10 with PipeWire
sudo vi /etc/pipewire/pipewire.conf
Add the following line to load module inside the context.modules = [ section
{ name = libpipewire-module-raop-discover }
HandBrake
sudo apt install libdvdnav4 libdvdread4 gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libdvd-pkg sudo dpkg-reconfigure libdvd-pkg sudo apt install ubuntu-restricted-extras
Pi-hole
Upgrade
pihole -up
Files
Remove files recursively
# remove lrc files find -type f -name "*.lrc" -delete # remove .DS_Store files find -type f -name ".DS_Store" -delete
Remove duplicate files
fdupes -rdN .
Search
Search .Mp3 files
find . -iname "*.mp3" -print
Gnome
Move the Dock 'Show Applications' button at top
gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true
Move the windows control button to the left
gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:'
Nice projects
- Raspberry Pi : https://www.raspberrypi.org/ - Tiny computer
- Pi-Hole : https://pi-hole.net - Ad blocking using DNS - With DNSCrypt-Proxy
- Firefox : https://www.mozilla.org/en-US/firefox/new/ - The Web Browser
- Bitwarden : https://bitwarden.com/open-source/ - Password manager
- MoodeAudio : http://www.moodeaudio.org/ - Audiophile-quality music playback
- HifiBerry : https://www.hifiberry.com/ - Audio additional boards for Rpi
- OpenHAB : https://www.openhab.org/ - Smart Home
- DD-WRT : https://dd-wrt.com/ - Free your router
- Ubuntu : https://ubuntu.com/ - Linux distribution
- Shelly : https://www.shelly.com/en-fr - Smart Home Automation
- Nicotine+ : https://nicotine-plus.org/ - Soulseek is not dead
- Kodi : https://kodi.tv/ - Media Centre
- NGINX : https://www.nginx.com/ - Web Server
- Amplify : https://amplify.nginx.com - Web Server Monitoring
- VideoLAN : https://www.videolan.org/ - Powerful media player
- Waze : https://www.waze.com/ - GPS