Geany in Cygwin
2013.03.02 16:29
Geany in Cygwin
This is something I did last week! I figured it out on my own, but maybe there’s someone who wants to and isn’t as familiar with the command line and/or Google as I am.
WHY? Geany was recommended by a friend earlier this semester when I was looking for something to program C in that wasn’t Visual Studio. I use it in Arch Linux to program because it offers syntax highlighting and doesn’t require Gnome (I use Openbox) and doesn’t have a steep learning curve like vi/emacs/command line editor of choice. (Should I learn vi? Probably.)
But what if I want to program in Windows? I installed Cygwin on my Windows partition because I prefer the Linux command line and the number of times I’d typed ls or ping -c instead of dir or ping -s was getting absurd. And the Cygwin command prompt can compile C (at least, if you install devel packages). But programming in Notepad is tedious and difficult at best.
0. Make sure you have the X packages installed in Cygwin
To do this, run setup.exe again. Download setup.exe from http://cygwin.com/install.html if you’ve lost it.
As I understand it, X is the basis for any graphical interface in Linux. Since Geany has buttons and panels and stuff like that instead of existing solely in a command prompt, Geany needs X.
1. Download and untar the source code for Geany from http://www.geany.org/Download/Releases
I did this in Firefox in Windows. I then used 7zip to untar it. You could probably do this in other ways, like changing to the directory you saved it to and running “tar -xvf geany-0.21.tar.gz” in Cygwin, but that’s not what I did.
2. Open Cygwin. Change directory to the place you untarred the Geany code (for me that’s “cd /cygdrive/c/Users/Annie/Downloads/geany-0.21” but for you it is likely different) and run: “./configure” “make” “make install”
These steps are pretty standard. I watched the configure and make steps for errors, but none occurred. If I were in Linux, the last step would be “sudo make install” but in Cygwin sudo doesn’t exist. I have an administrator account on Windows, but I don’t know if that makes a difference.
3. In Cygwin, run: “startxwin”
This starts X in windowed mode, so you don’t need a window manager installed. An instance of xterm may pop up, and an X should appear in your system tray (that’s the thing on the very bottom right of your screen). Xterm is an ugly but useful terminal prompt that appears in a window created by and connected to X.
3b. If xterm doesn’t appear, right click on the X in your system tray. Go to Applications and click xterm. Now xterm will appear.
4. In xterm, run: “geany”
This should open geany! In the future, if you want to run geany, start from step 3.
Have fun programming!
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.

