LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-10-2014, 11:05 AM   #1
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 173

Rep: Reputation: 1
extra characters coming with dialog command


Hi Team,

All of sudden , I see some unexpected characters with dialog command e.g.

If I run the below command

dialog --title "Example Dialog message box" --msgbox "\n This is my ubuntu laptop" 6 50

The output , I have attached as a screenshot .

I am seeing some extra character in the window .

Please help me to resolve this issue .

Note :- Same command was working earlier .

Regards
Krushna
Attached Thumbnails
Click image for larger version

Name:	error.png
Views:	218
Size:	2.7 KB
ID:	14924  

Last edited by call_krushna; 03-10-2014 at 10:04 PM. Reason: more info need to be added .
 
Old 03-10-2014, 12:44 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
what terminal emulator are you using?
 
Old 03-10-2014, 10:03 PM   #3
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 173

Original Poster
Rep: Reputation: 1
Hi Habitual,

echo $TERM
xterm


I think, it is xterm .

This is ubuntu 12.04 amazon ec2 instance and we are accessing it using putty .
 
Old 03-11-2014, 09:01 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I believe it's the character set (or encoding?) for xterm although I don't know how to "correct" it.
Mine does the same thing here, so it is not a remote host issue either.

This seems to correct the issue here locally:
Code:
LC_CTYPE=en_GB.UTF-8 xterm  -fn '-Misc-Fixed-Medium-R-SemiCondensed--13-120-75-75-C-60-ISO10646-1'
where the man pages says:
Code:
-fn font
               This option specifies the font to be used for displaying normal text.  The corresponding resource name is font.  The resource value default is fixed.
then I ran
Code:
dialog --title "Example Dialog message box" --msgbox "\n This is my ubuntu laptop" 6 50
and got as attached.


Hope that helps.

Last edited by Habitual; 06-26-2015 at 05:47 PM.
 
1 members found this post helpful.
Old 03-13-2014, 02:48 AM   #5
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 173

Original Poster
Rep: Reputation: 1
Hi Habitual,

Not working . xterm command not found . Below way I tried .


#LC_CTYPE=en_GB.UTF-8 xterm -fn '-Misc-Fixed-Medium-R-SemiCondensed--13-120-75-75-C-60-ISO10646-1'

bash: xterm: command not found

#which xterm

/usr/bin/which: no xterm in (/sbin:/bin:/usr/sbin:/usr/bin)

#echo $TERM
xterm

Let me know what I am missing here .
 
Old 03-13-2014, 10:31 AM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by call_krushna View Post
Let me know what I am missing here .
Code:
echo $TERM
my 12.04.4 LTS instance spits out "linux"
putty for Windows?
 
1 members found this post helpful.
Old 03-13-2014, 02:07 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
You must be clicking some icon in order to run your terminal emulator, yes? Can you right click on the icon and see what command is running? Or is there a help or about menu option at the top?

You could also run "ps -ef | grep $$", find the process that says bash (or whatever shell you're running), and in the third column will be the PID of the parent. Run "ps -ef | grep PID" (replacing PID with the one you found previously) and it should tell you what the command is. Eg:

Code:
$ ps -ef | grep $$
550       8836  2941  0 13:02 pts/254  00:00:00 bash
550       9012  8836  1 13:05 pts/254  00:00:00 ps -ef
550       9013  8836  0 13:05 pts/254  00:00:00 grep 8836
Three processes are associated with that PID. That PID (8836) is the parent to the ps and grep commands, naturally, and it's the child of PID 2941.
Code:
$ ps -ef | grep 2941
550       2941     1  0 Feb26 ?        01:00:19 gnome-terminal
550       2944  2941  0 Feb26 ?        00:00:00 gnome-pty-helper
550       2945  2941  0 Feb26 pts/0    00:00:00 bash
550       2967  2941  0 Feb26 pts/1    00:00:00 bash
550       2988  2941  0 Feb26 pts/2    00:00:00 bash
550       3009  2941  0 Feb26 pts/3    00:00:00 bash
550       3030  2941  0 Feb26 pts/4    00:00:00 bash
550       7470  2941  0 11:31 pts/233  00:00:00 bash
550       8836  2941  0 13:02 pts/254  00:00:00 bash
550       9021  8836  0 13:06 pts/254  00:00:00 grep --color=auto 2941
550      18008  2941  0 Mar11 pts/64   00:00:00 bash
550      18423  2941  0 Mar11 pts/67   00:00:00 bash
550      18503  2941  0 Mar11 pts/104  00:00:00 bash
2941 is parent to a lot of shells, and 2941 itself is "gnome-terminal", which is my terminal emulator.
 
1 members found this post helpful.
Old 03-13-2014, 07:43 PM   #8
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 173

Original Poster
Rep: Reputation: 1
Hi Habitual,

As root

#ps -ef | grep $$
root 18672 18671 0 00:33 pts/0 00:00:00 bash
root 20199 18672 0 00:38 pts/0 00:00:00 ps -ef
root 20200 18672 0 00:38 pts/0 00:00:00 grep 18672

# ps -ef | grep 18671
root 18671 18670 0 00:33 pts/0 00:00:00 su
root 18672 18671 0 00:33 pts/0 00:00:00 bash
root 20257 18672 0 00:38 pts/0 00:00:00 grep 18671

As user(ec2-user)

$ ps -ef | grep $$
ec2-user 18628 18624 0 00:33 pts/0 00:00:00 -bash
ec2-user 20479 18628 0 00:39 pts/0 00:00:00 ps -ef
ec2-user 20480 18628 0 00:39 pts/0 00:00:00 grep 18628

$ ps -aef |grep 18624
ec2-user 18624 18610 0 00:33 ? 00:00:00 sshd: ec2-user@pts/0
ec2-user 18628 18624 0 00:33 pts/0 00:00:00 -bash
ec2-user 20789 18628 0 00:40 pts/0 00:00:00 grep 18624

More info

OS :- CentOS 64bit

accessing the OS using Putty in windows .

Login user :- ec2-user

Cloud :- Amazon

Let me know the above info make sense to understand or any other info needed ?

Thanks for you continuous support for this .
 
Old 03-13-2014, 08:46 PM   #9
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Your "terminal emulator" is putty
 
1 members found this post helpful.
Old 03-14-2014, 10:03 AM   #10
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
PuTTY > Window -> Translation -> Remote Character Set

Disregard the vim reference.
 
1 members found this post helpful.
Old 03-16-2014, 11:05 PM   #11
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 173

Original Poster
Rep: Reputation: 1
Hi Habitual,

Thanks for input . For me ,If I set to "use font encoding " , it is working fine with out any extra character .

But each time I log in to any server , I have to set that . Is there any way to add use font encoding as default setting in putty .

I searched for this . but to set this, I have to save as session in putty with ip address .Difficult for me to save all 120 servers with this configuration . Let me know ,if you know how to set this as default putty configuration .
 
Old 03-17-2014, 08:15 AM   #12
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
That I do not know, sorry.
 
Old 03-17-2014, 08:17 AM   #13
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Do you HAVE to use putty? Cygwin would handle it just fine, you could set up an ssh config or alias like you would on a Linux machine.
 
Old 03-21-2014, 03:43 AM   #14
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 173

Original Poster
Rep: Reputation: 1
Thanks Habitual,

For your help in this thread .
 
Old 03-21-2014, 03:27 PM   #15
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by call_krushna View Post
Thanks Habitual,

For your help in this thread .
You are very welcome.

How did you resolve this issue?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sed "expression #1, char 2: extra characters after command" TheBigMing Linux - Newbie 9 03-26-2013 12:19 PM
[SOLVED] Sed giving "extra characters after command" error theonislair Programming 3 06-09-2012 03:42 AM
How do I stop from dialog coming up for a particular USB drive Robert S Linux - Hardware 0 06-24-2008 09:45 PM
sed error message:extra characters after the command wmh830621 Programming 4 08-14-2006 07:13 PM
sed error message: extra characters after the command. nano_mag Linux - General 3 05-15-2005 01:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration