How to set dialog to run from a command line ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to set dialog to run from a command line ?
# 1  
Old 03-26-2009
How to set dialog to run from a command line ?

Hi,

finally successfully native compiled dialog.
To run I have to change directory to
/opt/dialog/bin
and run ./dialog

So I see I have to set up configuration file and global environment.
But how ?
I run make install.

And another issue is I run dialog connecting via putty terminal from
notebook MS Vista to a router and having copied some examples from the net, some characters in examples are replaced by "dot".
dialog -msgbox “Dialog Exit Example”

dialog .msgbox .Dialog Exit Example.

What terminal, keyboard emulation should I select in puty configuration ?

Thanks.

Jack
# 2  
Old 03-27-2009
Add the below entry at the end of you .profile (I'm assuming you are the only user who is interested in doing this):

Code:
PATH=$PATH:/opt/dialog/bin
export PATH

Logout/login and it should work fine.

I've posted a reply to your other question which you posted in another thread. Please do not spawn multiple threads for same question - its wastage of everyone's time.
# 3  
Old 03-27-2009
[quote=rikxik;302301439]Add the below entry at the end of you .profile (I'm assuming you are the only user who is interested in doing this):

Code:
PATH=$PATH:/opt/dialog/bin
export PATH

Logout/login and it should work fine.

Thanks my friend.
Exactly what I did yesterday, basing on Google search in Linux forums.
And didn't work for me.

On Linux embedded device I need to
flashfs save && flashfs commit && flashfs enable && rebootto get changes saved in flash.

The issue is I have 4 profile files on a system
/tmp/etc/profile
/tmp/mnt/disc3_0..../etc/profile
/opt/etc/profile
/usr/etc/profile

Exactly I am the only administrator of a router.

Jack

Hi,
I did as you advised me
run
flashfs save && flashfs commit && flashfs enable && reboot
router rebooted

and still the same problem, path is not updated.

Any idea ?

Jack

[admin@oo root]$ dialog
-sh: dialog: not found
[admin@oo root]$ ./dialog
-sh: ./dialog: not found
[admin@oo root]$ cd /
[admin@oo /]$ cd opt/dialog/bin
[admin@oo bin]$ ./dialog
cdialog (ComeOn Dialog!) version 1.1-20080819
Copyright 2000-2007,2008 Thomas E. Dickey
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

* Display dialog boxes from shell scripts *



path /opt/dialog/bin:
appended in
/opt/etc/profile

not appended in
/tmp/etc/profile

(just edited this file)

/usr/etc/profile is not editable

Last edited by jack2; 03-27-2009 at 12:50 PM..
# 4  
Old 03-27-2009
follow-up

Problem solved by my friend.
Now I can run dialog examples directly from a command line.

Darius
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need one line command to create and set password for new user...

Using useradd abc --password password (5 Replies)
Discussion started by: Jagruti Rml
5 Replies

2. Shell Programming and Scripting

How to add a line to the end of a set of files without using sed command?

I understand that the SED command reads all the lines in the file before adding a required line to the end of the file. Is there another command that adds a line to the end of files without reading the entire file.... SED is increasing the processing time as the number of lines in each of the... (1 Reply)
Discussion started by: Kanch
1 Replies

3. Shell Programming and Scripting

Unable to set end of line in mail command

Hi , Am trying to send mail using the mail command, but the mail command is working but its not sending automatically after pressing .(dot) in the command prompt it sends . How to achieve that. Also it showing the below line after pressing the dot . /home/abc1/dead.letter... Saved message in... (5 Replies)
Discussion started by: rogerben
5 Replies

4. UNIX for Dummies Questions & Answers

Running set options from the command line and bash command

I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing set you can also use them "on the command line when running a script..." and it lists this in a small table: set -o option Command Line... (5 Replies)
Discussion started by: Straitsfan
5 Replies

5. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

6. Shell Programming and Scripting

Is command line invocation of gnome-terminal to run more than one command possible?

Hello, I am trying to learn how to pass something more than a one-command startup for gnome-terminal. I will give an example of what I'm trying to do here: #! /bin/bash # #TODO write this for gnome and xterm USAGE=" ______________________________________________ ${0##*/} run... (0 Replies)
Discussion started by: Narnie
0 Replies

7. Shell Programming and Scripting

How to set mutliple words variable from command line

I'm writing a script (C shell) to search for a pattern in file. For example scriptname pattern file1 file2 filenN I use for loop to loop through arguments argv, and it does the job if all arguments are supplied. However if only one argument is supplied (in that case pattern ) it should ask to... (5 Replies)
Discussion started by: patryk44
5 Replies

8. Shell Programming and Scripting

Unix / Linux Dialog Utility - how to open 2+ more dialog windows ?

Hi, example of Unix / Linux dialog utility is below. I am going to use dialog as simple GUI for testing of a modem. So I need to combine some dialog boxes into one. I need to have input box, output box, info box, dialog box, radiobox as in any standard program with graphical user... (2 Replies)
Discussion started by: jack2
2 Replies

9. Shell Programming and Scripting

How do I get ssh to run a command in one line?

How would I combine something like: localserver# ssh remoteserver remoteserver# find blah blah blah into a one liner that would ssh to the remote server and run the find command, so I could put it in a script to automatically go out and run things on remote servers with out needed user... (2 Replies)
Discussion started by: LordJezo
2 Replies
Login or Register to Ask a Question