desmondttm123
Posts: 103
Joined: Tue May 07, 2013 6:13 am

open and view files via terminal

Fri Nov 29, 2013 3:21 pm

Hi guys! i wanted to create an exe command on desktop using chmod. i want to run the raspberry pi camera command raspistill -o image.jpg command and i want a command to open the file in full screen. I'm using a tft screen so i don't know how to enable preview for the image taken. is there a command to open files via terminal? thanks!

bubbl
Posts: 85
Joined: Sun Jul 14, 2013 9:15 pm
Location: United Kingdom
Contact: Website

Re: open and view files via terminal

Fri Nov 29, 2013 3:58 pm

We're not here because we are free. We're here because we are not free. There is no escaping reason. No denying purpose. Because we both know without purpose, we would not exist.
http://www.bartbania.com/

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26660
Joined: Sat Jul 30, 2011 7:41 pm

Re: open and view files via terminal

Fri Nov 29, 2013 4:05 pm

desmondttm123 wrote:Hi guys! i wanted to create an exe command on desktop using chmod. i want to run the raspberry pi camera command raspistill -o image.jpg command and i want a command to open the file in full screen. I'm using a tft screen so i don't know how to enable preview for the image taken. is there a command to open files via terminal? thanks!
I use fbi on the command line to display jpegs.

sudo apt-get install fbi

Not tried with the desktop, just from the terminal (no X running)
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

desmondttm123
Posts: 103
Joined: Tue May 07, 2013 6:13 am

Re: open and view files via terminal

Fri Nov 29, 2013 4:17 pm

thanks for the replies! but how do i use FBI as command in terminal?

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: open and view files via terminal

Fri Nov 29, 2013 4:18 pm

Is this local terminal or via ssh??

Richard S.

desmondttm123
Posts: 103
Joined: Tue May 07, 2013 6:13 am

Re: open and view files via terminal

Fri Nov 29, 2013 4:31 pm

hi! it is local =)

bubbl
Posts: 85
Joined: Sun Jul 14, 2013 9:15 pm
Location: United Kingdom
Contact: Website

Re: open and view files via terminal

Fri Nov 29, 2013 4:31 pm

desmondttm123 wrote:thanks for the replies! but how do i use FBI as command in terminal?
it's all there on the internet. http://manpages.ubuntu.com/manpages/gut ... fbi.1.html
We're not here because we are free. We're here because we are not free. There is no escaping reason. No denying purpose. Because we both know without purpose, we would not exist.
http://www.bartbania.com/

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26660
Joined: Sat Jul 30, 2011 7:41 pm

Re: open and view files via terminal

Fri Nov 29, 2013 4:45 pm

desmondttm123 wrote:thanks for the replies! but how do i use FBI as command in terminal?
fbi name.jpg

(I'm pretty sure you could have guessed that).
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

desmondttm123
Posts: 103
Joined: Tue May 07, 2013 6:13 am

Re: open and view files via terminal

Fri Nov 29, 2013 4:48 pm

hi thanks for the links!
i installed fbi, and wrote it on chmod but still did not work. if the directory is root > home > pi, do i have to include it? if so how?

my command inside the chmod is
/*
raspistill -o image.jpg
fbi -h image.jpg
*/

desmondttm123
Posts: 103
Joined: Tue May 07, 2013 6:13 am

Re: open and view files via terminal

Fri Nov 29, 2013 4:49 pm

fbi name.jpg

(I'm pretty sure you could have guessed that).
yes i did =)

bubbl
Posts: 85
Joined: Sun Jul 14, 2013 9:15 pm
Location: United Kingdom
Contact: Website

Re: open and view files via terminal

Fri Nov 29, 2013 6:03 pm

desmondttm123 wrote:hi thanks for the links!
i installed fbi, and wrote it on chmod but still did not work. if the directory is root > home > pi, do i have to include it? if so how?

my command inside the chmod is
/*
raspistill -o image.jpg
fbi -h image.jpg
*/
you need to learn bash programming for that. a little bit different coding

the simplest code should look something like this (I haven't tested it as I don't use raspicamera, but it should work):

Code: Select all

#!/bin/bash
while true
do
    echo "Enter a file name"
    read filename
    raspistill -o $filename
    sleep 10
    fbi -h $filename
done
save it as let's say raspidisplay.sh
chmod 775
and run ./raspidisplay.sh
We're not here because we are free. We're here because we are not free. There is no escaping reason. No denying purpose. Because we both know without purpose, we would not exist.
http://www.bartbania.com/

bubbl
Posts: 85
Joined: Sun Jul 14, 2013 9:15 pm
Location: United Kingdom
Contact: Website

Re: open and view files via terminal

Fri Nov 29, 2013 6:08 pm

a little bit about bash scripting: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
We're not here because we are free. We're here because we are not free. There is no escaping reason. No denying purpose. Because we both know without purpose, we would not exist.
http://www.bartbania.com/

Return to “General discussion”