{"id":189,"date":"2020-08-04T12:05:30","date_gmt":"2020-08-04T12:05:30","guid":{"rendered":"https:\/\/petermc.net\/blog\/?p=189"},"modified":"2020-08-04T12:05:30","modified_gmt":"2020-08-04T12:05:30","slug":"running-a-bash-process-on-startup-in-ubuntu","status":"publish","type":"post","link":"https:\/\/petermc.net\/blog\/2020\/08\/04\/running-a-bash-process-on-startup-in-ubuntu\/","title":{"rendered":"Running a bash process on startup in ubuntu"},"content":{"rendered":"<p>Ubuntu has a place called &#8220;Startup Applications Preferences&#8221; which is one way to organise something that runs upon startup. It is found by typing its name in the searchy thingy I don&#8217;t know the name of, and is a bit GUIish.<\/p>\n<p>Because I use a Kinesis Advantage keyboard, I wanted to automatically swap the roles of the Tab and Delete keys upon startup. Here I record how to do this.<\/p>\n<p>In the aforementioned &#8220;Startup Applications Preferences&#8221;, I create a new process, with the command section filled in with<\/p>\n<p><code>bash .xmodstartup<\/code><\/p>\n<p>It remains to create a file called .xmodstartup in my home directory, which I populate with the following xmodmap commands<\/p>\n<p><code>xmodmap -e 'keycode 119 = Tab ISO_Left_Tab'<br \/>\nxmodmap -e 'keycode 23 = Delete NoSymbol'<br \/>\n<\/code><\/p>\n<p>And voila, upon startup, the Tab and Delete keys are switched.<\/p>\n<p>If I ever want to undo this, and return to the default keyboard layout, this can be accomplished with running the following in a terminal<\/p>\n<p><code>setxkbmap -layout us<br \/>\n<\/code><\/p>\n<p>This blog post exists to help my future self solve the same problem when I forget, and hopefully may help others who stumble upon it while searching the web to try and solve the same problem as me.<\/p>\n<p>Now, next thing to do is to understand how to make the Windows\/Super key behave exactly as I want it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu has a place called &#8220;Startup Applications Preferences&#8221; which is one way to organise something that runs upon startup. It is found by typing its name in the searchy thingy I don&#8217;t know the name of, and is a bit &hellip; <a href=\"https:\/\/petermc.net\/blog\/2020\/08\/04\/running-a-bash-process-on-startup-in-ubuntu\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","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":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[14],"tags":[],"class_list":["post-189","post","type-post","status-publish","format-standard","hentry","category-ubuntu"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7V6a7-33","_links":{"self":[{"href":"https:\/\/petermc.net\/blog\/wp-json\/wp\/v2\/posts\/189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/petermc.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/petermc.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/petermc.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/petermc.net\/blog\/wp-json\/wp\/v2\/comments?post=189"}],"version-history":[{"count":4,"href":"https:\/\/petermc.net\/blog\/wp-json\/wp\/v2\/posts\/189\/revisions"}],"predecessor-version":[{"id":193,"href":"https:\/\/petermc.net\/blog\/wp-json\/wp\/v2\/posts\/189\/revisions\/193"}],"wp:attachment":[{"href":"https:\/\/petermc.net\/blog\/wp-json\/wp\/v2\/media?parent=189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/petermc.net\/blog\/wp-json\/wp\/v2\/categories?post=189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/petermc.net\/blog\/wp-json\/wp\/v2\/tags?post=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}