Jump to content


Photo

Using the terminal


  • Please log in to reply
9 replies to this topic

#1 Koba

Koba

    newbie

  • Members
  • 45 posts

Posted 22 June 2004 - 03:16 PM

Hi

I don't have much experience using the command line, I was born too late for that. I've briefly used DOS prompt and Cygwin. I stumbled my way round the Terminal in my first few days using Red Hat.

Since then I have looked up tutorials and understand the operation of scripts and how to use them as well as many commands that can be used in the shell.

What is most important for me is accessing files fast. I can do this using the cd, dir and ls commands. The problem is I don't know how to open a non-ASCII file from the terminal. Is there any way to make the Terminal open a file with its default viewer/editor? I know you could do this in XP but the point is I don't want to use XP anymore. smile

Any other terminal tips (other than use of the middle-mouse button) would be appreciated. I also would like to know how the change the focus policy (mentioned here:http://linuxcommand....s0010.php#xterm in GNOME.

Thanks

Koba


#2 Dapper Dan

Dapper Dan

    Pooh-Bah

  • Moderators
  • 1703 posts

Posted 22 June 2004 - 03:59 PM

Koba, I think this is a very good page to help with commands. I never did commands in a terminal until I started using Linux 2 years ago. It takes time but eventually it becomes second nature.

If you need to open, read or edit files from the command line, try vi. for instance, as root go..

vi /etc/fstab [enter]

to close vi go press escape, then go:

: x [enter]

without a space between : and x.

Be careful not to save a file if you accidently edit it wrongly.
[Edited by Dapper Dan on 2004-06-22 09:34:56]


#3 Koba

Koba

    newbie

  • Members
  • 45 posts

Posted 22 June 2004 - 04:12 PM

Hi

Thanks for the reply. I've already seen that site with all those commands. Vi is a text editor those so will only open ASCII files.

In DOS prompt under XP, I could type "dir <ENTER>" find x.jpg, simply type x.jpg in the terminal and press enter. x.jpg would then open in XP with the program associated to that file type.

For example, can I open x.jpg with the default viewer directly from the terminal without giving the path to x.jpg as an argument to some command?

Koba.



#4 Dapper Dan

Dapper Dan

    Pooh-Bah

  • Moderators
  • 1703 posts

Posted 22 June 2004 - 04:39 PM

OK, I see. To open .jpg's or other picture files you can use the gimp. Just go..

gimp x.jpg [enter]

and it will open it. There are other viewers as well. When I was using Mandrake, I especially liked electric eyes for quick viewing of picture files. I don't think we have that. Gnome viewer is pretty good too..

#5 Koba

Koba

    newbie

  • Members
  • 45 posts

Posted 22 June 2004 - 07:39 PM

Hi

We still aren't on the same wavelength I am afraid. But I think the answer to my question is "no".

If I just type x.jpg in the Terminal nothing will happen unless I specify the program I want to open it with (eg type gimp beforehand). Thats fine (other than the fact I would prefer not to type gimp every single time, especially if I want to open many picture files). So how about this?

I am using a program called Blender http://www.blender3d.com. I have downloaded a linux version which I cannot call from the terminal unless I am in the directory where Blender is installed and I type "./blender". This means if I have a .blend file in any other directory, I can't open it from the Terminal.

Nautilus on the other hand allows me to double click any .blend file in any folder to open it in Blender as I have associated ".blend" files with "Blender". I was wondering if you could use this association between ".blend" and "Blender" in the Terminal so if I type "x.blend" in the terminal and press enter, the file opens.

In nautilus you simply double click a file to open it with a default application. In the Terminal you have to specify the program to open it with. Is this correct?

If this is true, from what I have read, I need to set the path to the blender executable so it becomes a recognisable command. Can you help me do this? Maybe a shell script could be made to recognise the file type and send the appropriate command to the terminal?

I realise I may not have stated my question clearly enough :x

Koba

#6 Dapper Dan

Dapper Dan

    Pooh-Bah

  • Moderators
  • 1703 posts

Posted 24 June 2004 - 06:03 AM

Koba, I've been playing around with blender. I don't really understand what it is, but it looks like a neat program!

If you want to run a file with blender, you can symbolically link it to you /usr/bin directory, and that should work.

I untarred it, and placed blender-2.33a-linux-glibc2.2.5-i386 into /usr/share.

I then sybolically linked it by doing as root:

ln -s /usr/share/blender-2.33a-linux-glibc2.2.5-i386/blender /usr/bin/blender [enter]

I now can call it by just doing:

blender [enter]

from a console, and it opens. You should now be able to open your files by just preceding it with blender like:

blender x.jpg [enter]

I hope this helps...




#7 Koba

Koba

    newbie

  • Members
  • 45 posts

Posted 24 June 2004 - 09:15 AM

Hi

Blender is a neat program laugh .

It is a modelling, texturing, animating and rendering application.

I think as far as GNU software goes, Blender has the biggest challenge as it is trying to compete with extremely expensive software (3ds max: $3,495.00, Mayaź Unlimited 6:$6,999.00 and houdini is quite a bit over the $10,000 mark). It does so extremely well though. It is the only one which has a game engine, for example.

If you are interested check out the gallery http://www.blender3d...ages.151.0.html. For current work by the community (check out the amazing tank thread) go to http://www.elysiun.c...ewforum.php?f=4.

CG is a hobby for me which I can persue because of Blender. Anyway, I'm sure you probably don't have the time to learn Blender but at least look into it as it is the best piece of free software ever. smile

Anyway, thanks for the help. Now I can use Blender from the Terminal!

Koba

#8 Dapper Dan

Dapper Dan

    Pooh-Bah

  • Moderators
  • 1703 posts

Posted 24 June 2004 - 08:18 PM

Can blender be made to import and export 3ds files?

#9 Koba

Koba

    newbie

  • Members
  • 45 posts

Posted 24 June 2004 - 09:38 PM

Yup.

Blender does everything (though sometimes in a round about way). You will need python installed though: http://bane.servebee...ng/blender/#3DS

Nice to see you are interested. smile

Koba

P.S> Did you see this yet?: http://www.elysiun.c...pic.php?t=26673 :x

Actually there is so much good work being done with Blender it may be unfair to single this one out. Problem is it is so damn good.

#10 Dapper Dan

Dapper Dan

    Pooh-Bah

  • Moderators
  • 1703 posts

Posted 24 June 2004 - 10:22 PM

Koba, see PM...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

IPB Skin By Virteq