Jump to content
Compatible Support Forums
Sign in to follow this  
Koba

Using the terminal

Recommended Posts

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.org/lts0010.php#xterm in GNOME.

 

Thanks

 

Koba

 

Share this post


Link to post
Share on other sites

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]

 

Share this post


Link to post
Share on other sites

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.

 

 

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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...

 

 

 

Share this post


Link to post
Share on other sites

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.org/cms/Images.151.0.html. For current work by the community (check out the amazing tank thread) go to http://www.elysiun.com/forum/viewforum.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

Share this post


Link to post
Share on other sites

Yup.

 

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

 

Nice to see you are interested. smile

 

Koba

 

P.S> Did you see this yet?: http://www.elysiun.com/forum/viewtopic.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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×