User avatar
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

bin/bash - vcgencmd get_camera - show xmessage very slow

Mon Aug 14, 2017 9:21 am


I'm running this script from my program, the 'xmessage' takes about 12/15 seconds to appear,
whether the camera is connected or not, the message is correct.
If I run from a terminal, I get this warning.

Code: Select all

[email protected]:~/scripts $ ./ 1
Warning: Missing charsets in String to FontSet conversion
How do I cure the missing charsets?
Maybe this is causing the delay.


Code: Select all



s=$(/opt/vc/bin/vcgencmd get_camera)
sb="supported=1 detected=1"
case $sb in
echo "Camera detected"
xmessage "Camera not detected !" -buttons ok
exit 1

cd /home/pi/RPi_Cam_Web_Interface

case $1 in
	[1]) ./;;
	[2]) ./;;
	*) echo -e "${RED}Error...${STD}" && sleep 2

Return to “General programming discussion”