More CS137 setup… stuff


Because I am feeling accomplished, and because I also want to avoid my physics homework.

I think I’ve got a pretty good system working for CS137 (and the UW CS servers) now. I’ve got:

And since it took a fair bit of time to get stuff working, I’ll note the problems I had with things:

  • sshag

Most immediate thing – the readme says source ~/lib/sshag/sshag.sh; sshag &>/dev/null should get it working. But it doesn’t seem to. My guess is Bash doesn’t like the semi-colon at the end – it possibly wants a && instead.

Even so, after discovering that the alias sshag was available (the first part of the that command), but it wasn’t getting run (the second part), I put the second part on a new line, and it works as expected now. Considering that it was practically a drag-and-drop thing, sshag is pretty much an install by default thing now on any system I’ll use ssh-agent with. Haven’t got it working with msysgit though, I can’t find where it has its own .bashrc.

  • marmoset_submit

I have no idea where the script came from – it appears to be UWaterloo specific. And I had to trace the actual script through a bunch of directories (The wonders of sourcing one file which appended a bunch of directories to my PATH and itself sourced a fewmore files) before finding the actual script. I also had to brush up on my sed skills – that took the longest. But now I know (remember?) that I need to capture everything if I want to extract info from lines and move it around, otherwise it’ll just leave the stuff after the last capture on the output string.

  • bash, .bashrc, and .profile

I learnt that .bashrc isn’t automatically executed when logging in – only .profile was. And .profile didn’t source .bashrc. I first looked into this again because finding out that Debian/Ubuntu use Dash instead of bash by default threw me for a loop and I went poking at the login shells, and discovered the change shell command – chsh. And it discovered that it really was bash that was running, but with a very different prompt setting. So I poked around the dotfiles, and did a bit of Google searching, and found a post on the differences between .bashrc, bash_profile, .profile and /etc/profile. Fun times ensued with trying a bunch of different things, before I settled on just having a .bash_profile, which just sourced .bashrc.

Future things

Mainly looking at more bashrc customization things. Another post on the same site I got the bashrc/profile stuff from has a bunch of other nifty customizations that I’m planning at looking into. There’s a bit about history management that looks particularly interesting…

 

 

 

, ,

  1. No comments yet.
(will not be published)