Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

trojanlax04

macrumors newbie
Original poster
Jan 30, 2012
1
0
First off, I just want to say that I'm really new to computer programming... having a Mac is making this 10x more difficult because nobody here is familiar with Macs.

So like 5 days ago, I opened up Terminal and connected to our school's server and I managed to open up gedit and start writing a program. However, yesterday when I tried to open gedit again and any of my .cpp files, I got (and have continued to get) the follow error: "(gedit: #####): Gtk-WARNING ** cannot open display:" The ##### digits are different every time I try. I also tried using X11 and I got the same error.

Does anyone know how to fix this? Or what's even wrong? All of my classes' TAs are not familiar with Macs and my professor has yet to respond.

Thanks.

Also, emacs doesn't work either. I can get emacs to work on X11 but I don't like emacs slash I can't figure out how to save on it.
 
I assume you're using ssh to get to a remote unix or Linux machine. Just use Pico or nano or get a cheat sheet and learn vi (or emacs, I guess).

What language are you using? You can probably do it all on your Mac, then copy the file over and test again there before turning it in.

-Lee
 
I assume you already have the X11 app running? From that app, open a Terminal (X11 -> Applications -> Terminal). From that prompt use ssh with the -X parameter. Try something simple like running xclock on the remote system. If that doesn't work, log out and try with the -Y parameter on the ssh command. Again, try xclock and see if it works. If so, you've got X connectivity and you can try other X apps.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.