1

I'm using rainmeter to make a custom dashboard for windows and ran into a problem making a custom start button for git bash needing it to open to my root directory.

The odd part is I have gitbash added to my windows taskbar and the target is..

"C:\Program Files (x86)\Git\bin\sh.exe" --login -i

That opens to my user root.. MyName@MYNAME

But if I create a link in rainmeter using that same link it takes me to.. MyName@MYNAME /usr/bin

That makes zero sense to me. How can I make it open to my root?

user300979
  • 199
  • 1
  • 2
  • 7

1 Answers1

0

Try running this command. It adds a line to the .bashrc file and that should cd you to root.

echo cd / >> ~/.bashrc

It should open your gitbash to root everytime you open the shell.

dagrha
  • 255
  • 3
  • 9
  • I get a sh.exe": alias: /: not found. When I start gitbash – user300979 Oct 17 '14 at 23:10
  • There might be something useful at this stack overflow thread: [link](http://stackoverflow.com/questions/7017143/git-bash-how-to-default-to-other-directory-instead-of-home-directory) – dagrha Oct 17 '14 at 23:16
  • Also some solutions here: [stackoverflow.com](http://stackoverflow.com/questions/7671461/how-do-i-change-the-default-location-for-git-bash-in-windows) – dagrha Oct 17 '14 at 23:18