{"id":383,"date":"2022-10-10T18:35:43","date_gmt":"2022-10-11T02:35:43","guid":{"rendered":"https:\/\/nramkumar.org\/tech\/?p=383"},"modified":"2023-06-20T19:29:22","modified_gmt":"2023-06-21T03:29:22","slug":"a-running-list-of-useful-linux-utilities","status":"publish","type":"post","link":"https:\/\/nramkumar.org\/tech\/blog\/2022\/10\/10\/a-running-list-of-useful-linux-utilities\/","title":{"rendered":"A Running List of useful Linux utilities"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This will be a place where I&#8217;ll track a running list of useful Linux utilities.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Convert Image Files from one format to another (in particular, convert annoying HEIC formats to JPG\/PNG etc) &#8211; Requires ImageMagick to be installed:<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><code>convert &lt;input_image&gt; &lt;output_image&gt;<\/code><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Concatenate a bunch of images to a single PDF file:<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><code>convert (&lt;input_image1> &lt;input_image2>|&lt;wildcard glob>) &lt;output_pdf> <\/code> <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Compress a PDF file &#8211; needed when uploading a scanned file or concatenated PDF output to online portals\/tools that limit file size. Requires GhostScript to be installed:<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><code>ps2pdf &lt;input_pdf&gt; &lt;output_pdf&gt;<\/code><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Set Mouse scroll speed. Requires <code>imwheel<\/code> to be installed. Put the following in <code>$HOME\/.imwheelrc<\/code> and run <code>imwheel -kill<\/code><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>\".*\"\nNone, Up, Button4, 5\nNone, Down, Button5, 5<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Converting a JSON array of strings into one element in each line without quotes &#8211; so for example, go from an input file of <code>[\"a\", \"b\", \"c\"]<\/code> to output file of <code>a\\nb\\nc<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><code>cat &lt;input_file&gt; | tr ',' '\\n' | tr -d '\\[\\\"\\] '<\/code><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Reboot to BIOS from the OS\n<ul class=\"wp-block-list\">\n<li>Linux: <code>systemctl reboot --firmware-setup<\/code><\/li>\n\n\n\n<li>Windows: <code>shutdown \/r \/fw \/f \/t 0<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Remotely access Linux Desktop\n<ul class=\"wp-block-list\">\n<li>Install xrdp, systemctl start xrdp, connect using krdc<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Run a GUI program as another user over xrdp or remote session\n<ul class=\"wp-block-list\">\n<li><code>export XAUTHORITY=~\/.Xauthority; su &lt;user> &lt;program><\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This will be a place where I&#8217;ll track a running list of useful Linux utilities. convert &lt;input_image&gt; &lt;output_image&gt; ps2pdf &lt;input_pdf&gt; &lt;output_pdf&gt; cat &lt;input_file&gt; | tr &#8216;,&#8217; &#8216;\\n&#8217; | tr -d &#8216;\\[\\&#8221;\\] &#8216;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-383","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/posts\/383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/comments?post=383"}],"version-history":[{"count":9,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/posts\/383\/revisions"}],"predecessor-version":[{"id":429,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/posts\/383\/revisions\/429"}],"wp:attachment":[{"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/media?parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/categories?post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/tags?post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}