{"id":2247,"date":"2013-06-04T15:01:10","date_gmt":"2013-06-04T21:01:10","guid":{"rendered":"http:\/\/www.gratuitousscience.com\/?p=2247"},"modified":"2013-06-04T15:02:12","modified_gmt":"2013-06-04T21:02:12","slug":"terminal-fun","status":"publish","type":"post","link":"http:\/\/www.gratuitousscience.com\/?p=2247","title":{"rendered":"Terminal fun"},"content":{"rendered":"<p>W00T!\u00a0 Okay, not actually fun, and not terminal as in deathly.<\/p>\n<p>I&#8217;m talking about the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Terminal_emulator\" target=\"_blank\">Terminal Emulator<\/a> that comes with every Linux distribution.\u00a0 It&#8217;s similar to the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Command_Prompt\" target=\"_blank\">Command Prompt<\/a>, for all those Windows users who have seen that.\u00a0 As much as I prefer to never use it, sometimes I do.\u00a0 It appears every time I use <a href=\"http:\/\/www.softpedia.com\/get\/Multimedia\/Video\/Encoders-Converter-DIVX-Related\/WinFF.shtml\" target=\"_blank\">WinFF<\/a> to extract the audio from video files, for example.\u00a0 And I also need to use the terminal to convert\u00a0 .toc files to .iso files using toc2cue and bchunk.<\/p>\n<p>And since I&#8217;m using a replica Commodore 64&#8230;<\/p>\n<p><a href=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/C64x_side.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2248\" alt=\"C64x_side\" src=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/C64x_side-300x170.png\" width=\"300\" height=\"170\" srcset=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/C64x_side-300x170.png 300w, http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/C64x_side-1024x583.png 1024w, http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/C64x_side.png 1027w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I had already customized the terminal&#8217;s colours to match the old-school Commodore 64 home screen:<\/p>\n<p><a href=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/BUv00bk.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2249\" alt=\"BUv00bk\" src=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/BUv00bk-300x192.png\" width=\"300\" height=\"192\" srcset=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/BUv00bk-300x192.png 300w, http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/BUv00bk-1024x658.png 1024w, http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/BUv00bk.png 1536w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>My terminal started out looking like this:<\/p>\n<p><a href=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/yvgKoqC.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2250\" alt=\"yvgKoqC\" src=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/yvgKoqC-300x98.png\" width=\"300\" height=\"98\" srcset=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/yvgKoqC-300x98.png 300w, http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/yvgKoqC-1024x334.png 1024w, http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/yvgKoqC.png 1306w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I was aware that the text inside the window could be customized, but I had no idea how to accomplish this.\u00a0 So I went to Reddit and posted a question in \/r\/asklinux.\u00a0 And about an hour later, I was able to get my terminal looking like this:<\/p>\n<p><a href=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/C64-Terminal.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2251\" alt=\"C64 Terminal\" src=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/C64-Terminal-300x98.png\" width=\"300\" height=\"98\" srcset=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/C64-Terminal-300x98.png 300w, http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/C64-Terminal-1024x335.png 1024w, http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/C64-Terminal.png 1307w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This was done simply by adding this code to the .bashrc file in my home folder:<\/p>\n<pre style=\"padding-left: 30px;\">PS1=\"READY.\\n\"\r\n\r\nFREEMEM=$(free | grep buffers |tail -1| tr -s '[:space:]' | cut -d \" \" -f 4)\r\nTOTALMEM=$(free | grep Mem | tr -s '[:space:]' | cut -d \" \" -f 2)\r\necho \\ \r\necho \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\*\\*\\*\\* COMMODORE 64 BASH V4.2.25 \\*\\*\\*\\*\r\necho \\ \r\necho \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\\u00a0 \\ ${TOTALMEM}K RAM SYSTEM ${FREEMEM}K FREE\r\necho \\<\/pre>\n<p>Since that file controls whatever terminal uses <a href=\"https:\/\/en.wikipedia.org\/wiki\/Bash_%28Unix_shell%29\" target=\"_blank\">Bash<\/a>, the same text and info appears when I use XTerm, though the Commodore 64 font and colours are absent.<\/p>\n<p>And I also went one step further and decided to customize the root terminal profile.\u00a0 I made it look like an AmigaDOS window:<\/p>\n<p><a href=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/AmigaDOS-Terminal.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2252\" alt=\"AmigaDOS Terminal\" src=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/AmigaDOS-Terminal-300x192.png\" width=\"300\" height=\"192\" srcset=\"http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/AmigaDOS-Terminal-300x192.png 300w, http:\/\/www.gratuitousscience.com\/wp-content\/uploads\/2013\/06\/AmigaDOS-Terminal.png 667w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Neat?\u00a0 Sure.\u00a0 Useful?\u00a0 Not particularly.\u00a0 But it sure makes the terminals match the rest of my Commodore and Amiga themes, skins, icons and cursors that I have happening on this computer.<\/p>\n<p>It makes me think of the &#8220;<a href=\"http:\/\/linux.softpedia.com\/get\/System\/Operating-Systems\/Linux-Distributions\/Commodore-OS-Vision-76223.shtml\" target=\"_blank\">Commodore OS Vision<\/a>&#8221; distro that Commodore USA released along with these replica Commodore 64s.\u00a0 They didn&#8217;t do anything like this to the terminal in that OS, when it turns out to be so easy.\u00a0 That distro is also quite an eyesore and a hot mess.\u00a0 There are a few reasons why I didn&#8217;t keep it installed on my C64 when I got it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>W00T!\u00a0 Okay, not actually fun, and not terminal as in deathly. I&#8217;m talking about the Terminal Emulator that comes with every Linux distribution.\u00a0 It&#8217;s similar to the Command Prompt, for all those Windows users who have seen that.\u00a0 As much as I prefer to never use it, sometimes I do.\u00a0 It appears every time I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4,398],"tags":[153,154,81,469],"class_list":["post-2247","post","type-post","status-publish","format-standard","hentry","category-computers","category-linux","category-xfce","tag-amiga","tag-commodore","tag-commodore-64","tag-terminal"],"_links":{"self":[{"href":"http:\/\/www.gratuitousscience.com\/index.php?rest_route=\/wp\/v2\/posts\/2247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gratuitousscience.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gratuitousscience.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gratuitousscience.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gratuitousscience.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2247"}],"version-history":[{"count":3,"href":"http:\/\/www.gratuitousscience.com\/index.php?rest_route=\/wp\/v2\/posts\/2247\/revisions"}],"predecessor-version":[{"id":2255,"href":"http:\/\/www.gratuitousscience.com\/index.php?rest_route=\/wp\/v2\/posts\/2247\/revisions\/2255"}],"wp:attachment":[{"href":"http:\/\/www.gratuitousscience.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gratuitousscience.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2247"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gratuitousscience.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}