0

Background Info:

  • I'm trying to set up a remote display using a raspberry pi.
  • Currently I'm using fbi (frame buffer image viewer) to display the image.
  • The device is going to be controlled via ssh or web interface - not sure which, but definitely not from the actual device.

The Problem is I cant seem to find an easy way to "clean" quit the process remotely, clear the screen & generate no errors. The fbi program will exit if the q button is pressed but that seems to do no good over ssh. Ideally I'd prefer a less messy solution then having to look up the pid each time before killing it. I am open to the idea of using another program, however I can't run it in Xorg.

I've tried:

  • Grep-ing the pid and sending kill -sigterm but it either doesn't quit or doesnt clear the screen
  • echo "q" > /proc/[pid]/fd/0 - all the iterations i try I either get an access denied or nothing happens

Any Ideas?

2 Answers2

1

How to kill a process without a message?
In one terminal, I started a process:

# sleep 100

Now to kill the process, without a message and without knowing the pid:

# kill -13 (pgrep sleep)

How to remotely clear the screen of a terminal?
First, get the tty # of the terminal you want to clear:

# tty
/dev/pts/1

Now from a different terminal:

# printf '\033c' > /dev/pts/1
vesche
  • 1,842
  • 1
  • 13
  • 19
0

Without seeing your code, a solution could be to use fbi to just display an image on fb0 from another terminal:

fbi -T 1 -noverbose -d /dev/fb0 image.png

Then just clear the entire framebuffer (fb0):

dd if=/dev/zero of=/dev/fb0

Or better yet, just write a "blank" image to fb0 to "clear" it.

Jeff DeCola
  • 178
  • 1
  • 7