3D Desktop, and a programming question

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Mike_3915

3D Desktop, and a programming question

Post by Mike_3915 »

Hello. I recently installed Mint, around 4 days ago, and I am very impressed so far. Not only did it quickly and easily install a dual boot for me, but it sorted all the drivers out, most surprisingly my wireless. This is the first time I have installed a Linux OS that I intend to keep for a long time.

I just have 3 quick questions on it though.

Firstly is the 3D desktop, it is a very nice visual tool, the only point I see to it right now is to impress, not that I'm complaining. But when I move it around (Ctrl Alt + left button) it snaps back upon releasing the button. Is there a way to stop that? I mean it is nice eye candy, but holding the button down takes away a little from the effect.

On a more productive note I am impressed with the programming support from Mint. Java was a lot easier than in windows, and the terminal is excellent (So good in fact that I now consider Java programming in windows a bit of a chore). And python is looking good too. However my old favorite pascal is confusing me. I installed FPC from the software manager, made a file called new.pas and it seemed to just leave it as a text file (Where as cpp, java, and py files add a little icon) I also searched my menu for fpc but couldn't find it. I then thought it might have failed to install so tried again but it said it was installed already, so that is not the problem.

The final question again on programming is about cpp files. I wrote one and used g++ to compile it. The result was a file, a.out. I then typed (whilst in the same directory as the file) a.out, and got an error, however dragging the file to the console did run it. any ideas why? What is a .out file anyway? Is it the alternative to an exe?

Sorry thats more than 3 questions.

Thanks in advance to any help or direction to help.

Best regards

Mike
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
reaZon

Re: 3D Desktop, and a programming question

Post by reaZon »

i don't see any problem with the animation.but your talking Mike has reminded me of a long time question for me.i want to learn a programming language.Linux command line is impressive that it makes me regret the time i spent learning MS VBScript.my programs will mostly go in the network way.
so any recommendations about which language should i go for?
Mike_3915

Re: 3D Desktop, and a programming question

Post by Mike_3915 »

Hi, theres no problems with the animation, would just be nice to have it so that when you turn the cube it stays in the position and doesn't snap to the workspace. So you could look at two spaces at once (sort of).

As for the programming language, as I said I have had very little Linux experience so am probably not the best person to advise you. I have not done much in terms of network programming, I would guess Java or python might be good. I also read Perl was good for network programming.

Sorry I could not be more help.

Regards

Mike
User avatar
grimdestripador
Level 6
Level 6
Posts: 1051
Joined: Fri Feb 16, 2007 2:26 am

Re: 3D Desktop, and a programming question

Post by grimdestripador »

Mike_3915 wrote: The result was a file, a.out. I then typed (whilst in the same directory as the file) a.out, and got an error, however dragging the file to the console did run it. any ideas why? What is a .out file anyway? Is it the alternative to an exe?

Simple answer run from terminal as
./a.out



Complex answer:


Linux has an executable bit in its permission just like read/write/modify/delete. to set executable bit using

Code: Select all

sudo chmod +x theexecutable 
When you compiled in gcc, you might want to consider naming your output file (default is a.out), like

Code: Select all

gcc hello.c -o theexecutable 
. In windws this would be called theexecutable .exe and would be executable as soon as it was renamed to end with .exe. For security reason this doesn't happen, and in linux one does not need the extension.

Any way a few things must be had to run you executable in linux. First instead of running your program by typing its name, you should run it from its current location. ie

Code: Select all

cd /home/user/programingproject
./theexecutable 
or go the full out /home/user/programingprojects/theexecutable
Mike_3915

Re: 3D Desktop, and a programming question

Post by Mike_3915 »

Thanks for all the info grimdestripador.

Works good now.

What is the ./ part for?

Regards

Mike
User avatar
grimdestripador
Level 6
Level 6
Posts: 1051
Joined: Fri Feb 16, 2007 2:26 am

Re: 3D Desktop, and a programming question

Post by grimdestripador »

say for example my program i'm compiling is called fdisk, I cd into the source code folder then gcc fdisk.c -o fdisk
The execuitable full path is now called /home/user/project/fdisk

/bin/fdisk has the same name as my application, and even if i'm in the source code folder if i type fdisk then /bin/fdisk will be ran.

so I cd into /home/user/project and type fdisk, which one is to be used? the one in /bin.
to tell my comptuer to look here not /bin or /sbin i must type ./fdisk to run it from its location.

Still confused. consider

Code: Select all

cd ..
this changes directory to the parrent directory. what about

Code: Select all

cd ...
, grandparrent directory. thus a single . refers to

Code: Select all

<this location you are currently at>/a.out
were

Code: Select all

../a.out
would run a.out that is located in the parent folder as observed from you bash location (the last directory you cd into)
DrHu

Re: 3D Desktop, and a programming question

Post by DrHu »

Mike_3915 wrote:On a more productive note I am impressed with the programming support from Mint. Java was a lot easier than in windows, and the terminal is excellent (So good in fact that I now consider Java programming in windows a bit of a chore). And python is looking good too
Python is called a scripting language (dynamic), like Ruby or like bash is: bash shell is the closest to being only a scripting language
http://en.wikipedia.org/wiki/Scripting_language
http://en.wikipedia.org/wiki/Dynamic_pr ... g_language
http://bash.cyberciti.biz/networking/sh ... gurations/
  • What bash scripts can do..
Languages like python or ruby have their own IDE (Integrated Development Environment) or can use a a more general purpose, multi-language editor/IDE , like Komodo edit
http://www.activestate.com/komodo_edit/
  • Even a regular editor like gedit or Vim, with plugins can most likely match most of an IDEs' features..
Mike_3915 wrote:However my old favorite pascal is confusing me. I installed FPC from the software manager, made a file called new.pas and it seemed to just leave it as a text file (Where as cpp, java, and py files add a little icon)
You could try lazarus the delphi like pascal ide..
http://www.lazarus.freepascal.org/index ... pic=7831.0
Locked

Return to “Beginner Questions”