Compatible Support Forums: Using the terminal

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Using the terminal

#1 User is offline   Koba 

  • newbie
  • Group: Members
  • Posts: 45
  • Joined: 11-June 04

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

Thanks

Koba

0

#2 User is offline   Dapper Dan 

  • Pooh-Bah
  • Group: Moderators
  • Posts: 1703
  • Joined: 27-September 03

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]

0

#3 User is offline   Koba 

  • newbie
  • Group: Members
  • Posts: 45
  • Joined: 11-June 04

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.


0

#4 User is offline   Dapper Dan 

  • Pooh-Bah
  • Group: Moderators
  • Posts: 1703
  • Joined: 27-September 03

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

#5 User is offline   Koba 

  • newbie
  • Group: Members
  • Posts: 45
  • Joined: 11-June 04

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
0

#6 User is offline   Dapper Dan 

  • Pooh-Bah
  • Group: Moderators
  • Posts: 1703
  • Joined: 27-September 03

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



0

#7 User is offline   Koba 

  • newbie
  • Group: Members
  • Posts: 45
  • Joined: 11-June 04

Posted 24 June 2004 - 09:15 AM


0

#8 User is offline   Dapper Dan 

  • Pooh-Bah
  • Group: Moderators
  • Posts: 1703
  • Joined: 27-September 03

Posted 24 June 2004 - 08:18 PM

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

#9 User is offline   Koba 

  • newbie
  • Group: Members
  • Posts: 45
  • Joined: 11-June 04

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

#10 User is offline   Dapper Dan 

  • Pooh-Bah
  • Group: Moderators
  • Posts: 1703
  • Joined: 27-September 03

Posted 24 June 2004 - 10:22 PM

Koba, see PM...
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users