{"id":461,"date":"2011-04-26T23:04:24","date_gmt":"2011-04-26T21:04:24","guid":{"rendered":"http:\/\/www.oradba.ch\/?p=461"},"modified":"2011-04-29T09:53:10","modified_gmt":"2011-04-29T07:53:10","slug":"mac-os-x-terminal-compatibility-settings","status":"publish","type":"post","link":"https:\/\/www.oradba.ch\/wordpress\/2011\/04\/mac-os-x-terminal-compatibility-settings\/","title":{"rendered":"Mac OS X Terminal Compatibility Settings"},"content":{"rendered":"<p>I start using <a href=\"http:\/\/iterm.sourceforge.net\/\">iTerm<\/a> rather than Terminal to work on the command line. In my opinion it is much more powerful to setup some window groups. Several tabs and\/or windows can be stored and managed as bookmarks. The manipulation of window and tab title seams also a bit easier. But that is not the topic of this post \ud83d\ude42<\/p>\n<p>When working on the command line I also use TVDBasenv. Starting a new session always display the status of environment \/ databases.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">\r\nLast login: Tue Apr 26 22:17:55 on ttys014\r\n\r\nDown\/dummy   : rdbms1020 rdbms1020IC\r\n\r\nListener     : Down\r\n\r\nuser@host:~\/ [rdbms1020IC]\r\n<\/pre>\n<p>Unfortunately in iTerm this does not work in the same way as in Terminal.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">\r\nLast login: Tue Apr 26 21:52:17 on ttys010\r\nps: illegal option -- f\r\nusage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]\r\n[-u]\r\n[-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]\r\nps [-L]\r\n\r\nDown\/dummy   : rdbms1020 rdbms1020IC\r\n\r\nListener     : Down\r\n\r\nuser@host:~\/ [rdbms1020IC]\r\n<\/pre>\n<p>I first thought that the two Application are using a different PATH and therefore a different ps. But all the following test have shown the same output on both environments.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">\r\nuser@host:~\/ [rdbms1020IC] which ps\r\n\/bin\/ps\r\n\r\nuser@host:~\/ [rdbms1020IC] type -a ps\r\nps is \/bin\/ps\r\n<\/pre>\n<p>The comparison of the environment variables finally showed a few differences.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">\r\ndiff iterm.txt terminal.txt\r\n...\r\n&lt; COLORFGBG=0;15\r\n&lt; COMMAND_MODE=legacy\r\n---\r\n&gt; COMMAND_MODE=unix2003\r\n&lt; TERM_PROGRAM=iTerm.app\r\n---\r\n&gt; TERM_PROGRAM=Apple_Terminal\r\n&gt; TERM_PROGRAM_VERSION=273.1\r\n...\r\n<\/pre>\n<p>It seams that COMMAND_MODE does the trick. In iTerm it is set to <code class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">legacy<\/code>\u00a0while Terminal is using <em>unix2003<\/em>. So setting COMMAND_MODE to <em>legacy<\/em> cause utility programs like <em>ps<\/em> to behave as closely to Mac OS X 10.3&#8217;s utility programs, while setting it to <em>unix2003<\/em> causes utility programs to obey the Version 3 of the Single UNIX Specification (SUSv3).<\/p>\n<p>To fix my issue I simply have to add <code class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">COMMAND_MODE=unix2003<\/code> to my <code class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">.bash_profile<\/code>.<\/p>\n<p>More information on manipulating the compatibility settings can be found in<br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">man 5 compat<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When switching from Mac OS Terminal.app to iTerm I realized that the <\/p>\n<pre>ps<\/pre>\n<p> does not work as expected. A <\/p>\n<pre>ps -ef<\/pre>\n<p> throws an error even if <\/p>\n<pre>man ps<\/pre>\n<p> shows an option for -f. It seems that the compatibility can be set with a environment variable <em>COMMAND_MODE<\/em>.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"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","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[30,31],"tags":[18],"class_list":["post-461","post","type-post","status-publish","format-standard","hentry","category-mac-os-x","category-terminal","tag-trivadiscontent"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1aErb-7r","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2232,"url":"https:\/\/www.oradba.ch\/wordpress\/2017\/01\/using-touchid-for-sudo-on-macos-sierra\/","url_meta":{"origin":461,"position":0},"title":"Using TouchID for sudo on macOS Sierra","author":"Stefan","date":"10. January 2017","format":false,"excerpt":"A couple of days ago, I've received my new 15\" Mac Book Pro. So far I'm quite happy. Ok the the circumstance, that I have to carry around a bunch of adapters. I'm waiting for the first projector at customers with USB-C connection. But thats an other story. Initially I\u2026","rel":"","context":"In &quot;Mac OS X&quot;","block_context":{"text":"Mac OS X","link":"https:\/\/www.oradba.ch\/wordpress\/category\/mac-os-x\/"},"img":{"alt_text":"Build PAM Module","src":"https:\/\/i0.wp.com\/www.oradba.ch\/wordpress\/wp-content\/uploads\/Screen-Shot-2017-01-10-at-20.46.31-300x202.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":3087,"url":"https:\/\/www.oradba.ch\/wordpress\/2019\/06\/pdb_os_credential-with-external-table-pre-processor\/","url_meta":{"origin":461,"position":1},"title":"PDB_OS_CREDENTIAL with external table pre-processor","author":"Stefan","date":"17. June 2019","format":false,"excerpt":"As part of a customer project I am currently enhancing PDB security and isolation. Since OS interaction is necessary, I can not just use lockdown profile to block OS access. The idea is to isolate the PDB with lockdown profiles and allow dedicated OS access. The idea is to isolate\u2026","rel":"","context":"In &quot;12cR2&quot;","block_context":{"text":"12cR2","link":"https:\/\/www.oradba.ch\/wordpress\/category\/oracle-database\/12cr2\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1620,"url":"https:\/\/www.oradba.ch\/wordpress\/2014\/01\/get-rid-of-adobe-pdf-viewer-plugin-in-safari\/","url_meta":{"origin":461,"position":2},"title":"Get rid of Adobe PDF Viewer plugin in Safari","author":"Stefan","date":"15. January 2014","format":false,"excerpt":"Recently I've had to install the Adobe Acrobat Reader on my MacBook Pro. As usual, I was in a hurry and had no time to complete the installation. Since then Safari will always use Acrobat PDF Viewer plugin to display PDF. Because I prefer using Mac OS Preview to view\u2026","rel":"","context":"In &quot;Mac OS X&quot;","block_context":{"text":"Mac OS X","link":"https:\/\/www.oradba.ch\/wordpress\/category\/mac-os-x\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":864,"url":"https:\/\/www.oradba.ch\/wordpress\/2012\/05\/resize-swap-space-on-linux\/","url_meta":{"origin":461,"position":3},"title":"Resize swap space on linux","author":"Stefan","date":"30. May 2012","format":false,"excerpt":"A few times a year I create a new linux VM. I usually do this by using a kickstart server. The kickstart configuration file I normally use is creating a swap partition which is to small for an Oracle database server. Unfortunately, I forget regularly how to resize the swap\u2026","rel":"","context":"In \"linux\"","block_context":{"text":"linux","link":"https:\/\/www.oradba.ch\/wordpress\/tag\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1230,"url":"https:\/\/www.oradba.ch\/wordpress\/2013\/07\/error-installing-audit-vault-agent-12-1-1-on-aix\/","url_meta":{"origin":461,"position":4},"title":"Error installing Audit Vault Agent 12.1.1 on AIX","author":"Stefan","date":"10. July 2013","format":false,"excerpt":"The Problem During the setup of the current audit vault agent 12.1.1 on AIX, I've run into issues. Depending on the configuration of the AIX environment, the agent can not be installed at all. [cc lang=\"bash\"] avagent@host:\/u00\/app\/avagent\/ [avagent] java -jar agent.jar -d \/u00\/app\/avagent\/product\/avagent \/u00\/app\/avagent\/product\/avagent\/bin\/agentctl[56]: LOGNAME: is read only Error while\u2026","rel":"","context":"In &quot;Audit Vault&quot;","block_context":{"text":"Audit Vault","link":"https:\/\/www.oradba.ch\/wordpress\/category\/audit\/audit-vault\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2185,"url":"https:\/\/www.oradba.ch\/wordpress\/2016\/09\/losing-the-oracle-wallet-for-enterprise-user-security\/","url_meta":{"origin":461,"position":5},"title":"Losing the Oracle Wallet for Enterprise User Security","author":"Stefan","date":"14. September 2016","format":false,"excerpt":"Having a reliable backup solution for your Transparent Data Encryption (TDE) or Enterprise User Security (EUS) Wallets, is beyond discussion. Nevertheless it can happen that you lose or corrupt the Oracle Wallet. With Transparent Data Encryption (TDE), this is really bad luck, because you can not access your encrypted data.\u2026","rel":"","context":"In &quot;11gR2&quot;","block_context":{"text":"11gR2","link":"https:\/\/www.oradba.ch\/wordpress\/category\/oracle-database\/11gr2\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/posts\/461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/comments?post=461"}],"version-history":[{"count":12,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/posts\/461\/revisions"}],"predecessor-version":[{"id":481,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/posts\/461\/revisions\/481"}],"wp:attachment":[{"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/media?parent=461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/categories?post=461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/tags?post=461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}