{"id":348,"date":"2005-08-12T09:49:55","date_gmt":"2005-08-12T01:49:55","guid":{"rendered":"http:\/\/www.nargalzius.com\/blog2\/http:\/www.nargalzius.com\/blog2\/archives\/2005\/08\/2005_08_12_0949.php"},"modified":"2005-08-12T09:49:55","modified_gmt":"2005-08-12T01:49:55","slug":"more-tiger-stuff-for-reference","status":"publish","type":"post","link":"http:\/\/nargalzius.com\/blog\/archives\/2005\/08\/12\/more-tiger-stuff-for-reference","title":{"rendered":"More Tiger stuff for reference"},"content":{"rendered":"<p>No need to read this&#8230; this is just for my personal reference. But I <em>do<\/em> have a little bit of a &#8220;new software utility&#8221; mentioned down there, as well as a nifty power tip. So if you&#8217;re an OSX user, then you may find it useful too.<\/p>\n<!--more-->\n<p>Terminal stuff<\/p>\n<h2>Adding PATH variables<\/h2>\n<p>Some directories, such as <code>\/usr\/bin<\/code> are <strong>not<\/strong> included in the <code>PATH<\/code> variable anymore in Tiger (and Panther I believe). To set it back (and to put other directories in <code>PATH<\/code>), modify <code>\/etc\/profile<\/code>.<\/p>\n<h2>Modifying OSX Darwin boot message<\/h2>\n<p>The <code>Welcome to Darwin!<\/code> message is located in <code>\/etc\/motd<\/code><\/p>\n<h2>Adding\/chaning default stuff on terminal\/shell<\/h2>\n<p>There&#8217;s a bunch of files that are considered to affect the shell,#[3] but with a bit of trial and error, the file that seems to have the greatest effect is the <code>~\/.bash_profile<\/code> so I did most of my customations there to keep things tidy.<\/p>\n<h2>Manuals<\/h2>\n<p>Manual files (files searched when doing a <code>man<\/code> command) are found in <code>\/usr\/shares\/man\/<\/code>, which are further subdivided into directories.<\/p>\n<p>I mention all of these now, because I added a nice utility called <a href=\"http:\/\/www.clindberg.org\/projects\/ManOpen.html\" title=\"View site\">ManOpen<\/a> &#8211; which in turn had made me dump its files in different places&#8230; places which I don&#8217;t usually remember&#8230; hence this post for reference. And since I don&#8217;t want to touch <code>\/usr\/sbin<\/code> as much as possible (as it is reserved for system stuff), I thought I&#8217;d just use <code>usr\/bin<\/code> and even move <code>setfile<\/code> (which I added in my <a href=\"http:\/\/www.nargalzius.com\/blog\/archives\/2005\/05\/2005_05_17_1356.php\" title=\"View post\">Adobe CS tutorial<\/a>) to the new location and just added a new <code>PATH<\/code>.<\/p>\n<p>On a  different note, as I mentioned earlier, I did modifications on my default shell. Particularly the login line(s), the prompt,#[4] and I enabled color-coding (directories show in diff colors, etc.) I&#8217;m too lazy to put in a screenshot, so I&#8217;ll just repeat how it looks now on launch (minus the color coding):<\/p>\n<p>Last login: <WEEKDAY MONTH DAY HH:MM:SS> on ttyp1\nLogged into Darwin as <USERNAME><\/p>\n<p><HH:MM AM\/PM> DIR: <CURRENT WORKING DIRECTORY>\n$<\/p>\n<p>Obviously all enclosed in <code>&lt;&gt;<\/code> are dynamically populated. The reason I <em>had<\/em> to mention this is because <code>\/etc\/motd<\/code> is a simple textfile, so the original <code>Welcome to Darwin!<\/code> greeting is just echoed text. So to get the effect of having a <code>USERNAME<\/code> being echoed means that I kept the <code>motd<\/code> file <em>blank,<\/em> and implemented the login echo in <code>~\/.bash_profile<\/code><\/p>\n<p>So a normal session would now look like:<\/p>\n<p>Last login: Thu Aug 11 13:33:23 on ttyp1\nLogged into Darwin as nargalzius<\/p>\n<p>01:33 PM DIR: ~\n$ cd  Music\/iTunes<\/p>\n<p>01:33 PM DIR: ~\/Music\/iTunes\n$ ls\niTunes Library            iTunes Music          iTunes Music Library.xml<\/p>\n<p>01:33 PM DIR: ~\/Music\/iTunes\n$<\/p>\n<p>You get the idea. Though I don&#8217;t really care for the time, I opted to include it in every line <em>just in case<\/em> I needed it. Like when checking logs or something. You never know.<\/p>\n<p>Plus the whole putting the directory above the actual prompt is useful especially if you&#8217;ve dug down really deep into directories. If say you were in a directory that was in <code>\/Library\/Application Support\/Adobe\/AdobeHelpData\/Cache\/AdobeHelpCenter\/1.0\/en_US\/binary\/page<\/code> how would this look normally?<\/p>\n<p>The default Tiger terminal shell prompt is something like <code>&lt;computer name&gt;:&lt;working directory &lt;username&gt;$<\/code><\/p>\n<p>So me navigating to the in the earlier mentioned directory would look something like this:<\/p>\n<p>Last login: Fri Aug 12 09:41:27 on ttyp1\nWelcome to Darwin!<\/p>\n<p>powerbook:~ nargalzius$ cd \/Library\/Application\\ Support\/Adobe\/AdobeHelpData\/Cac\nhe\/AdobeHelpCenter\/1.0\/en_US\/binary\/page\npowerbook:\/Library\/Application Support\/Adobe\/AdobeHelpData\/Cache\/AdobeHelpCenter\n\/1.0\/en_US\/binary\/page nargalzius$<\/p>\n<p>Now wasn&#8217;t that messy? I simply broke the line where the word-wrap was to occur on a default window size.<\/p>\n<p>Now if I do the exact same session as above with my new prompt scheme, it would look like this:<\/p>\n<p>Last login: Fri Aug 12 09:43:56 on ttyp1\nLogged in to DARWIN as nargalzius<\/p>\n<p>09:46 AM DIR: ~\n$ cd \/Library\/Application\\ Support\/Adobe\/AdobeHelpData\/Cache\/AdobeHelpCenter\/1.0\/\nen_US\/binary\/page<\/p>\n<p>09:46 AM DIR: \/Library\/Application Support\/Adobe\/AdobeHelpData\/Cache\/AdobeHelpCen\nter\/1.0\/en_US\/binary\/page\n$<\/p>\n<p>It still wraps the words, but much more elegant, plus I put an intentional line break <em>before<\/em> the prompt so I get a nice clean space between everything to make things easier to see. Plus since the final prompt is <em>always<\/em> on the edge, then it makes finding the commands used much more easier to find and analyze.<\/p>\n<p>[3]: A type of user interface in computer software, often an operating system shell, such as a Unix shell command line interpreter in the Unix operating system or the DOS Shell in MS-DOS. (from wikipedia.org)\n[4]: Think C\\:> in MS-DOS terms<\/p>","protected":false},"excerpt":{"rendered":"<p>No need to read this&#8230; this is just for my personal reference. But I do have a little bit of a &#8220;new software utility&#8221; mentioned down there, as well as a nifty power tip. So if you&#8217;re an OSX user, then you may find it useful too.<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[13],"tags":[860,1163],"class_list":["post-348","post","type-post","status-publish","format-standard","hentry","category-technology","tag-os-x","tag-terminal"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/posts\/348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/comments?post=348"}],"version-history":[{"count":0,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/posts\/348\/revisions"}],"wp:attachment":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/media?parent=348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/categories?post=348"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/tags?post=348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}