{"action":"created","issue":{"url":"https://api.github.com/repos/gnunn1/terminix/issues/285","repository_url":"https://api.github.com/repos/gnunn1/terminix","labels_url":"https://api.github.com/repos/gnunn1/terminix/issues/285/labels{/name}","comments_url":"https://api.github.com/repos/gnunn1/terminix/issues/285/comments","events_url":"https://api.github.com/repos/gnunn1/terminix/issues/285/events","html_url":"https://github.com/gnunn1/terminix/issues/285","id":152001031,"number":285,"title":"Unsure how startup works","user":{"login":"jaromero","id":794031,"avatar_url":"https://avatars.githubusercontent.com/u/794031?v=3","gravatar_id":"","url":"https://api.github.com/users/jaromero","html_url":"https://github.com/jaromero","followers_url":"https://api.github.com/users/jaromero/followers","following_url":"https://api.github.com/users/jaromero/following{/other_user}","gists_url":"https://api.github.com/users/jaromero/gists{/gist_id}","starred_url":"https://api.github.com/users/jaromero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaromero/subscriptions","organizations_url":"https://api.github.com/users/jaromero/orgs","repos_url":"https://api.github.com/users/jaromero/repos","events_url":"https://api.github.com/users/jaromero/events{/privacy}","received_events_url":"https://api.github.com/users/jaromero/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gnunn1/terminix/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/gnunn1/terminix/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2016-04-30T02:16:05Z","updated_at":"2016-05-15T18:54:22Z","closed_at":null,"body":"I can't seem to figure out exactly how the starting directory is determined when opening a new terminal. I'd like to be able to start in my home dir, as (xfce4|gnome|pantheon)-terminal do. Sometimes terminix starts in a directory I've used recently, but I have no idea what exactly makes it do so, instead of starting at home.\r\n\r\nI've tried these things to attempt to control the starting directory:\r\n\r\n* Enable/disable 'run command as a login shell' (so whether vte.sh loads or not doesn't seem to be an issue)\r\n* Use /usr/bin/byobu as a command, as login and non-login\r\n* `cd` or `cd ~` before `exit`\r\n* `cd` to home before closing terminix by using the close button\r\n* Open a split, `cd` to home in one of the splits, `exit` both splits in any order\r\n* Doing the same as above, but with tmux/byobu splits\r\n* Doing the same, but running random commands before or after `cd`, before exiting (e.g. `gulp`). This _sometimes_ works but I haven't figured out exactly what makes it work.\r\n\r\nIn addition, doing things like running this script, even outside of terminix, makes terminix start in ~/bin/sublime_text_3 on the next startup, but not if terminix was already open and a new session or split is open:\r\n\r\n~~~sh\r\n#!/bin/bash\r\n\r\nSUBLIME_DIR=$HOME/bin/sublime_text_3\r\n\r\n$SUBLIME_DIR/sublime_text \"$@\" & > /dev/null 2>&1\r\n~~~\r\n\r\nThe things I've found that consistently make terminix start in my home dir are either explicitely open my home directory with it from nautilus, or open any other terminal _first_ (which opens at ~) and then opening terminix."},"comment":{"url":"https://api.github.com/repos/gnunn1/terminix/issues/comments/219303576","html_url":"https://github.com/gnunn1/terminix/issues/285#issuecomment-219303576","issue_url":"https://api.github.com/repos/gnunn1/terminix/issues/285","id":219303576,"user":{"login":"jaromero","id":794031,"avatar_url":"https://avatars.githubusercontent.com/u/794031?v=3","gravatar_id":"","url":"https://api.github.com/users/jaromero","html_url":"https://github.com/jaromero","followers_url":"https://api.github.com/users/jaromero/followers","following_url":"https://api.github.com/users/jaromero/following{/other_user}","gists_url":"https://api.github.com/users/jaromero/gists{/gist_id}","starred_url":"https://api.github.com/users/jaromero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaromero/subscriptions","organizations_url":"https://api.github.com/users/jaromero/orgs","repos_url":"https://api.github.com/users/jaromero/repos","events_url":"https://api.github.com/users/jaromero/events{/privacy}","received_events_url":"https://api.github.com/users/jaromero/received_events","type":"User","site_admin":false},"created_at":"2016-05-15T18:54:22Z","updated_at":"2016-05-15T18:54:22Z","body":"That's correct, in both cases I'm starting a new instance without other instances running.\r\n\r\nTo clarify, this is what I did, straight from a clean boot. I'm just going to say \"open a new tab\"/\"close the tab\" but it seems to apply to both tabs and splits:\r\n\r\n1. Start Terminix. It starts in ~\r\n2. `cd` to, say, ~/Desktop\r\n3. `exit`\r\n4. Start terminix again. It should also start in ~\r\n5. `cd` to ~/Desktop again\r\n6. Open a new tab. This one opens in ~/Desktop, which is probably the feature from #246 \r\n7. `exit` in the new tab, then `exit` again in the initial tab (therefore exiting Terminix completely)\r\n8. Start Terminix again. This time, it starts in ~/Desktop, which is not what I'm expecting.\r\n9. Close and start Terminix again\r\n10. cd to a different directory (e.g. ~/Documents)\r\n11. Open a new tab (opens in ~/Documents)\r\n12. `exit` this new tab, then `exit` the initial tab\r\n13. Start Terminix again and see how it opens in ~/Documents\r\n\r\nIf you repeat steps 10-11, each time picking a different directory, and then closing all tabs, the next time Terminix starts it'll start in the last directory you picked. Or to be more precise, it'll start in the pwd of the terminal from where you last opened a tab (if you switch back to, say, the second tab, and open a new tab from there).\r\n\r\nAgh. I apologize, I didn't test so thoroughly, I'm finding that everything in my original comment still happens. All the way down to the \"opening another terminal emulator makes terminix start in ~ again\" bit.\r\n\r\nAnd once again, none of this happens if I run `/usr/bin/terminix` directly, or if I disable the DBus part in the .desktop file (except for the feature from #246, that one still works just fine)"}}