{"id":84,"date":"2009-09-13T12:55:36","date_gmt":"2009-09-13T11:55:36","guid":{"rendered":"\/Blog\/?p=84"},"modified":"2011-03-15T13:55:58","modified_gmt":"2011-03-15T12:55:58","slug":"unix-console-tips-configs","status":"publish","type":"post","link":"https:\/\/seegras.discordia.ch\/Blog\/unix-console-tips-configs\/","title":{"rendered":"Unix Console &#038; X11 Tips &#038; Configs"},"content":{"rendered":"<p>Initially, I started with the premise to change my Console\/Terminals to UTF-8. However, as it turned out, they behave rather weird, some things don&#8217;t work right, characters are sometimes not visible, they tend to make a mess in displaying special chars (as used in mc), some control-commands don&#8217;t work anymore and so on. My light-weight-terminal aterm does not support UTF8 (but JIS and whatnot, what the heck?) So I postponed this to some later date, when there&#8217;s at least a fixed mlterm available. <\/p>\n<p>However, there are some interesting things to mention, in regard to the console: <\/p>\n<p><strong>mc clogs up the history<\/strong><br \/>\nIf Midnight Commander writes funny things like <code>cd \"`printf \"%b\" '\\0057'`\"<\/code> into the shell-history, then HISTIGNORE is not set, or does not contain a space.<\/p>\n<p><code>export HISTIGNORE=\"&:[ ]*:exit\"<\/code><\/p>\n<p><strong>Umlauts appear as ? when doing an ls<\/strong><br \/>\nThis is due to the really relevant variable regarding the charset: LC_CTYPE. Set it to something other than &#8220;C&#8221;:<\/p>\n<p><code>export LC_CTYPE=en_GB.ISO-8859-1<\/code><\/p>\n<p><strong>English system in Switzerland<\/strong><br \/>\nIf you want the system in english (and not necessarily the data), but are otherwise not english speaking, and sure as hell do not want screwed-up data formats or medieval measurement units, you want to set up your locales like this: <\/p>\n<p><code>export CHARSET=ISO-8859-1<br \/>\nexport LANG=en_GB.ISO-8859-1<br \/>\nexport LC_CTYPE=en_GB.ISO-8859-1<br \/>\nexport LC_MESSAGE=en_GB.ISO-8859-1<br \/>\nexport LC_MESSAGES=en_GB.ISO-8859-1<br \/>\nexport LC_NUMERIC=de_CH.ISO-8859-1<br \/>\nexport LC_TIME=de_CH.ISO-8859-1<br \/>\nexport LC_COLLATE=de_CH.ISO-8859-1<br \/>\nexport LC_MONETARY=de_CH.ISO-8859-1<br \/>\nexport LC_NAME=de_CH.ISO-8859-1<br \/>\nexport LC_ADDRESS=de_CH.ISO-8859-1<br \/>\nexport LC_TELEPHONE=de_CH.ISO-8859-1<br \/>\nexport LC_MEASUREMENT=de_CH.ISO-8859-1<br \/>\nexport LC_IDENTIFICATION=de_CH.ISO-8859-1<br \/>\nexport LANGUAGE=en_GB<\/code><\/p>\n<p>Setting LC_PAPER can lead to problems with things you do not send to a printer (pdf-generation for instance), and setting LC_ALL makes it impossible to use different locales for different uses. <\/p>\n<p>Of course, you can replace ISO-8859-15 with UTF-8 if you like. <\/p>\n<p><strong>make mlterm look decent<\/strong><br \/>\nThese are the contents of <code>.mlterm\/main<\/code>: <\/p>\n<p><code>only_use_unicode_font=yes<br \/>\nscrollbar_mode = right<br \/>\nscrollbar_view_name = next<br \/>\nfontsize = 16<br \/>\nENCODING = UTF-8<br \/>\nfg_color = white<br \/>\nbg_color = black<br \/>\nuse_transbg = true<br \/>\nbrightness = 60<br \/>\nfade_ratio = 75<br \/>\ngeometry = 80x25<br \/>\nuse_anti_alias = true<br \/>\nlogsize = 4096<br \/>\nword_separators = \" ,;=:\"<\/code><\/p>\n<p>Well, yes, it now looks quite NeXTy ;). <\/p>\n<p><strong>A better cursor<\/strong><br \/>\nNot really console-related, but anyway: Get an Icon-theme like <a href=\"http:\/\/www.gnome-look.org\/content\/show.php\/Shere+Khan+X?content=57588\">Shere Khan X<\/a> (why, it looks like the one from NeXT of course), and put the unpacked directory into ~\/.icons\/ Now change your .Xresources to read: <\/p>\n<p><code>Xcursor.theme: Shere_Khan_X<\/code><\/p>\n<p><strong>Screenlock with DPMS<\/strong><br \/>\nFor some machines, xlock is seemingly unable to do DPMS. Don&#8217;t fret: <\/p>\n<p><code>xset dpms force off && xlock -mode blank -resetsaver<\/code><\/p>\n<p><strong>See Also<\/strong><br \/>\nAn earlier post in Blog: <a href=\"\/Blog\/useful-shell-oneliners\/\">Useful Shell Oneliners<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Initially, I started with the premise to change my Console\/Terminals to UTF-8. However, as it turned out, they behave rather weird, some things don&#8217;t work right, characters are sometimes not visible, they tend to make a mess in displaying special chars (as used in mc), some control-commands don&#8217;t work anymore and so on. My light-weight-terminal [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,93],"tags":[16,23,26,100,24,25,14,13],"class_list":["post-84","post","type-post","status-publish","format-standard","hentry","category-computers","category-terminal","tag-bash","tag-console","tag-cursor","tag-history","tag-locale","tag-mlterm","tag-shell","tag-unix"],"_links":{"self":[{"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/posts\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":22,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"predecessor-version":[{"id":363,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/posts\/84\/revisions\/363"}],"wp:attachment":[{"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/tags?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}