Installing Linux

EvilManagedCare

Senior member
Nov 6, 2004
324
0
0
Hi,

I'm a complete neophyte when it comes to Unix OSs. My university uses Solaris servers on which our programming assignments are tested. I don't feel like going to the lab to complete these, I would rather do them at home. If I installed Ubuntu, for example, on my home machine, will the C++ programs run on a Solaris machine?
 

degibson

Golden Member
Mar 21, 2008
1,389
0
0
Originally posted by: EvilManagedCare
Hi,

I'm a complete neophyte when it comes to Unix OSs. My university uses Solaris servers on which our programming assignments are tested. I don't feel like going to the lab to complete these, I would rather do them at home. If I installed Ubuntu, for example, on my home machine, will the C++ programs run on a Solaris machine?

Not necessarily. There are some library services provided by Solaris and not by Linux, and vice versa as well.

Consider the following options:
* SSH into your lab from your home (check out PuTTY (google search))
* Install /Solaris/ on your local machine. Its free (www.sun.com). It'll be way uglier to install and use than Ubuntu.
* Write code whereever you want, but stick to posix routines only (compiler version might still be an issue). That is, if the man page says it is a posix function, use it. Otherwise, don't.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
If I installed Ubuntu, for example, on my home machine, will the C++ programs run on a Solaris machine?

Maybe, if your school is using gcc on Solaris and you stick to things that aren't Solaris or Linux-specific then you should be fine.
 

EvilManagedCare

Senior member
Nov 6, 2004
324
0
0
Originally posted by: degibson
* SSH into your lab from your home (check out PuTTY (google search))

This I have done and connected successfully. When the login is complete and I get a terminal, is this actually the school's server, or are further steps needed inside the shell to complete connection? I ask only because if you go to the lab and log in, you are given the Common Desktop Environment initially, not a terminal. I had run a help command in this terminal mode, but could find nothing.

 

degibson

Golden Member
Mar 21, 2008
1,389
0
0
Originally posted by: EvilManagedCare
Originally posted by: degibson
* SSH into your lab from your home (check out PuTTY (google search))

This I have done and connected successfully. When the login is complete and I get a terminal, is this actually the school's server, or are further steps needed inside the shell to complete connection? I ask only because if you go to the lab and log in, you are given the Common Desktop Environment initially, not a terminal. I had run a help command in this terminal mode, but could find nothing.

CDE is just a front-end. It might not be the same machine, however, if the host name doesn't match. Try this:

* Log on to the machine, at school. Fire up a terminal and type 'hostname'. Write down the output.
* Log on to the machine, from home. Fire up a terminal and type 'hostname'. Write down the output.
* If the first equals the second, you're on the right machine.

FWIW, it also sounds like you might be a bit of a shell-newbie. Google is amazing for some things... FYI.

EDIT: I should be clear. PuTTY doesn't forward 'X-connections', aka windowing environments. So you won't be able to use applications that have windows directly over PuTTY (e.g. xemacs). It /is/ possible to forward X-connections with, say, VNC, but it is more of a pain to set up than PuTTY.
 

Colt45

Lifer
Apr 18, 2001
19,720
1
0
You can forward X with putty, but you need a x server on the local machine... which xming is great for.
http://en.wikipedia.org/wiki/Xming

keep in mind forwarding x is going to eat a few levels of magnitude more bandwidth vs. a shell, but the university should have a fat pipe anyways.
 

slugg

Diamond Member
Feb 17, 2002
4,723
80
91
Originally posted by: Colt45
You can forward X with putty, but you need a x server on the local machine... which xming is great for.
http://en.wikipedia.org/wiki/Xming

keep in mind forwarding x is going to eat a few levels of magnitude more bandwidth vs. a shell, but the university should have a fat pipe anyways.

^^ That's exactly what I do, and that's what I recommend.

Otherwise, as long as your programs are POSIX compliant, your they should be able to compile and run just fine on Solaris. One thing to point out, however, is that certain POSIX implementations differ SLIGHTLY from platform to platform, especially when it comes to thread scheduling. If you're not doing anything crazy and just dealing with a linear program (not multi-threaded), then you should be fine.

You may consider installing Cygwin. Cygwin will set you up with am emulated, POSIX compliant Unix environment, including development tools (mingw, which is the windows version of the GNU tools gcc, g++, and libraries), and even an X server so you can remotely use a GUI (optional). Keep in mind, Cygwin is useful, but not perfect. If it works on Cygwin, there's a high probability that it'll compile and run on Unix, but there isn't a guarantee.

As for transferring files to/from the server, I suggest you try WinSCP.