This will be a place where I’ll track a running list of useful Linux utilities.
- Convert Image Files from one format to another (in particular, convert annoying HEIC formats to JPG/PNG etc) – Requires ImageMagick to be installed:
convert <input_image> <output_image>
- Concatenate a bunch of images to a single PDF file:
convert (<input_image1> <input_image2>|<wildcard glob>) <output_pdf>
- Compress a PDF file – needed when uploading a scanned file or concatenated PDF output to online portals/tools that limit file size. Requires GhostScript to be installed:
ps2pdf <input_pdf> <output_pdf>
- Set Mouse scroll speed. Requires
imwheel
to be installed. Put the following in$HOME/.imwheelrc
and runimwheel -kill
".*"
None, Up, Button4, 5
None, Down, Button5, 5
- Converting a JSON array of strings into one element in each line without quotes – so for example, go from an input file of
["a", "b", "c"]
to output file ofa\nb\nc
cat <input_file> | tr ',' '\n' | tr -d '\[\"\] '
- Reboot to BIOS from the OS
- Linux:
systemctl reboot --firmware-setup
- Windows:
shutdown /r /fw /f /t 0
- Linux:
- Remotely access Linux Desktop
- Install xrdp, systemctl start xrdp, connect using krdc
- Run a GUI program as another user over xrdp or remote session
export XAUTHORITY=~/.Xauthority; su <user> <program>