2F. Getting Things Done on Xlogin


Using commands

Even when using the NX graphical interface, you will need to learn how to use commands. To run commands, open a terminal window. Type each command after the prompt, ending the command with the enter key. You can backspace and correct your command before typing enter if you make a mistake.


How to do a few tasks when using the NX/Gnome interface

Opening a text editor

Click on the OpenSUSE button at the bottom-left corner of the Gnome desktop. Select Accessories/gedit.

Opening a terminal

Click on the OpenSUSE menu at the bottom-left corner of the Gnome desktop. Select System tools/Gnome terminal.

Compiling a C++ program using make

Each programming assignment comes with a file called Makefile. If you get that file, then you can compile and run your program using the make commands that are documented with the assignment. Open a terminal to run those commands.

If you try to use make and it does not work, be sure that you have downloaded the Makefile file for the assignment that you are working on, and that it is in the same directory (folder) as your C++ program. Make sure that your file is called Makefile, not Makefile.txt or Makefile.cpp. Command

  ls
shows the files that are in the current directory.


Compiling a C++ by making direct use of g++

If you want to use the g++ directly to compile file hailstone.cpp, you can use command
  g++ -Wall -W -o hailstone hailstone.cpp
If there are two or more .cpp files, list them all on the command line, as in
  g++ -Wall -W -o project project1.cpp project2.cpp project2.cpp

Running your program

If your compiled (executable) program is called hailstone, then command
  ./hailstone
runs that program. Do not try to run hailstone.cpp directly. You run a machine language program, not a C++ program. If you do command
  ls -F
you will see the names of your files in the current directory with executable programs followed by an asterisk. (Directory names are followed by a slash.)

Transfering files

You can transfer files between xlogin and your computer using tools including SSH and WinSCP.


Links