Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Bash script won't run because hardware won't produce display Post 303036447 by yelirt5 on Wednesday 26th of June 2019 09:09:53 PM
Old 06-26-2019
Bash script won't run because hardware won't produce display

Can anyone offer any advice on how to modify the script below to work on a new system we have, that has no graphics capability? We admin the system through a serial RAS device. I've tried running the below script through the RAS and through an ssh -X session. It failed with something like "GTK unable to produce display". Python scripts however do produce menus and such on screen and I don't understand the difference. Any help/advice is greatly appreciated. Thank you.

This script is supposed to produce a text box on screen, that our installers enter a 4 digit code on. That code is checked for validity and if it is, the script completes. I have several other scripts just like this one, all with the same problem. Is is zenity????

Code:
#!/bin/bash

VER=`zenity --entry --text "Please enter the ACG pgm number:" --title "Version Entry"`

if [ -z "$VER" ]; then
	echo "ERROR: Version entry was not provided."
	exit 1
fi

IS_OK=`echo $VER | egrep "[0-9]{4}"`

if [ -z "$IS_OK" ]; then
	zenity --question --text "'$VER' does not appear to be a
valid version string.

Continue anyway?"
	if [ $? -ne 0 ]; then
		echo "ERROR: Invalid version entry."
		exit 1
	fi
fi

echo $VER > /etc/acg-oe-pgm

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Why won't my script run?

On the following script that I get an error when I try to execute as root: #./mv_log.sh bash: /root/util/mv_log.sh: Permission denied #!/usr/bin datetag=`date --date='1 day ago' +"%b%d%Y"` logname=`find /opt/bea/wlserver6.1/config/*/logs/ -iname 'access.log0*' -mtime -1 -print` mv... (4 Replies)
Discussion started by: darthur
4 Replies

2. UNIX for Dummies Questions & Answers

Cron won't run properly

I am new to unix, and this is my 1st post on this board. Looking for some advice about a cron job in my server. I am running a cron task that references a script which runs several other scripts and compiles them into a report and emails it to me. If I run the script manually, I will... (2 Replies)
Discussion started by: Steeler_fan
2 Replies

3. UNIX for Dummies Questions & Answers

Made command into a script but now won't run

Hello, After seeing in a Unix cheatsheet that I could add commands into a file and run that file as a command to save on typing, i tried it with this: #! /bin/csh # Backup website excluding directories that do not change rsync -e "ssh -p 2222" -axzvc --progress --stats --compress-level=9... (9 Replies)
Discussion started by: patwa
9 Replies

4. Solaris

smc won't run on a regular user

Hi All, I'm getting this all the time with a regular user (after I do su - and smc): It appears you are attempting to run the graphical Solaris Management Console from a terminal which does not have a suitable 'DISPLAY' environment. Please check your 'DISPLAY' settings and that the user... (5 Replies)
Discussion started by: itik
5 Replies

5. AIX

won't mount /usr...won't boot fully

Hello: NOOB here. I attempted to use smit mkcd. Failed on first attempt, not enough space. 2nd attempt tried to place iso on /usr, not enough space there. Cleanup ran for about 5 minutes after aborting. Now AIX won't boot. LCD display on 7029-6E3 says: 0517 MOUNT /USR. Attempted to boot from CD... (11 Replies)
Discussion started by: bbird
11 Replies

6. UNIX for Dummies Questions & Answers

tip: Simple script won't run in cygwin - vim editor involved

I ran into this issue and thanks to various postings in various forums, was able to figure out the solution but didn't see one posting that laid the whole issue out cleanly. So thought the following might help others ... ------------------------------------------------------------------------... (2 Replies)
Discussion started by: oxysep
2 Replies

7. Solaris

Solaris 10u7 won't boot after hardware change

Hi all, I've somehow gained the idea that I _need_ to run at least 1 box with Solaris, but things don't go as I had planned :-) I pulled this ancient IBM eserver xseries 305 out of the dust, and got myself a fresh copy of the required cd's for Solaris 10u7. FAIL, for some reason the box and the... (7 Replies)
Discussion started by: mr.aart
7 Replies

8. Shell Programming and Scripting

bash script won't execute (Mac)

I can't get any bash scripts to run in Terminal (Mac - Snow Leopard). I have the following super-simple script, and I can't get it to execute despite having the correct permissions (I think). #!/bin/bash echo "WORK... PLEASE?!" I named the file 'testScript.sh', and I added execution... (6 Replies)
Discussion started by: compulsiveguile
6 Replies

9. Shell Programming and Scripting

Nested double quotes won't work in my bash script?

In a bash script I have: LSCMD="find /project/media/ -mindepth 2 -maxdepth 2 -name \"files*pkg\"" ALL_PACKAGES=$( $LSCMD | sort 2>/dev/null) But I get nothing returned. It's just all blank. If I run the find command in a terminal, I get dozens of hits. I figure it's the way how I'm... (3 Replies)
Discussion started by: superbbrr
3 Replies

10. Shell Programming and Scripting

While read won't run keyboard function

I am using while read do/ done to retrieve menu item. Works as advertised, no problem. I am using this hack function "pause" to stop script execution and wait for keyboard "enter" key to continue. Sort of break point function. Also works fine with one exception - it does not work when used... (4 Replies)
Discussion started by: annacreek
4 Replies
MODE2(1)							   User Commands							  MODE2(1)

NAME
mode2, smode2, xmode2 - shows the pulse/space length of infrared signals SYNOPSIS
xmode2 [options] DESCRIPTION
The main purpose of these programs is to check operation of your home-brew LIRC receiver hardware and to see the IR waveform of the remote controller without an expensive oscilloscope. Very useful for debugging. Of course this program won't work with hardware that decodes the signals itself like e.g. TV cards or the Irman. xmode2 is based on smode2 by Sinkovics Zoltan. It is just a conversion from svga to X with some basic support for resizing. The only dif- ferences are that the --mode option enables an alternative display mode and that xmode2 can read and visualise mode2 output from stdin. -h --help display usage summary -v --version display version -d --device=device read from given device -H --driver=driver use given driver -g --geometry=geometry window geometry -t --timediv=value ms per unit -m --mode enable alternative display mode -r --raw access device directly SEE ALSO
mode2(1), smode2(1), xmode2(1) The documentation for lirc is maintained as html pages. They are located under html/ in the documentation directory. mode2 0.9.0-pre1 October 2010 MODE2(1)
All times are GMT -4. The time now is 09:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy