LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-08-2009, 11:58 PM   #1
rjb356
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
gnome-terminal problem


I have added to my ubuntu 9.04 applications/system tools menu the following command:

gnome-terminal --command="pwgen -s"

This works fine in ubuntu 8.04, but in 9.04 the terminal windows flashes open and then closes instantly, without my being able to read the generated passwords and then close it myself.

Is this a bug in 9.04 or am I doing something wrong.

BTW if I type into a open terminal window in 9.04:

pwgen -s

Then passwords are generated, and I can choose one and then close the terminal.

Last edited by rjb356; 06-09-2009 at 12:00 AM. Reason: To add information
 
Old 06-09-2009, 07:07 AM   #2
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
When I attach a "shortcut" that requires gnome-terminal to my gnome panel, I need to check a box in the properties that says "run in terminal".

Perhaps you can try that?
 
Old 06-09-2009, 08:22 AM   #3
ozminh
Member
 
Registered: Aug 2007
Posts: 73

Rep: Reputation: 19
try 'read'.

'read -t 20' should keep the window in 20s.

there's more options in the man page.
 
Old 06-09-2009, 11:09 AM   #4
rjb356
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
gnome-terminal problem

Thanks for both responses so far.

Admiral Beotch:

I tried your suggestions, using the following in the command box:

gnome-terminal --command="pwgen -s"

and

pwgen -s

Both cause the same response of flashing open and closing the terminal window, not allowing me to read what is in the terminal window.

When the "application in terminal' is used, then the "pwgen -s" command is all that is necessary (nice to know).

ozminh:

I tried "man read" and I got the response "no manual entry for read".

When I googled it, I got what appears to be info about a script command (I'm relatively new to Ubuntu and don't know much about scripts, but it seems they are much like the old DOS batch files). I was attempting to do this by placing a command in the edit menus section - command box.

So at this point I'm still not understanding why, what works in ubuntu 8.04, seems to not work the same in version 9.04.

Any other suggestions.

Thanks,

RJB
 
Old 06-09-2009, 11:30 AM   #5
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
I tried two things and I like neither...

http://ubuntuforums.org/showthread.php?t=276502

or make a script with "pwgen -s ; read" and have your launcher call the script. (YUK!)
 
Old 06-10-2009, 11:02 AM   #6
rjb356
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
gnome-terminal problem

Admiral Beotch:

Thanks for your second response.

The link you suggested had a workable solution for me.

The answer was to not use gnome-terminal (which seems to have a bug in ubuntu 9.04) and use xterm. Creating a "shortcut" in the edit menus as follows worked:

xterm -hold -e pwgen -s

My only problem with this was the font size in xterm was too small for my poor eyesight, so I check out the man pages for xterm (there is over 4000 lines in the man pages - an amazing array of commandline options) and found, after some trial and error, that the following gave me a much larger and readable font that satisfied me:

xterm -hold -fa -fs -e pwgen -s

Again, thanks for your help. Though what I was attempting to create was a bit silly since I could have just opened a gnome-terminal window and type:

pwgen -s

and gotten the same result. But the truth is I was using this simple question to learn more about the commandline, terminal, linux etc. as I have been switching my computers to linux due to my unhappiness with both Windows and Microsoft Corporation.

I am liking linux, but there does seem to less polished software available, and I'm hoping in the future more gui frontends will be developed so that the more complex commandline usage could be avoided.

RJB
 
Old 06-10-2009, 12:05 PM   #7
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
Like they say, "Linux is easy after the first 500 hours."... You'll soon learn to appreciate and love the linux command line too. Stick with it!
 
Old 06-11-2009, 06:32 AM   #8
ozminh
Member
 
Registered: Aug 2007
Posts: 73

Rep: Reputation: 19
Quote:
#! /bin/bash

echo "`df -m`" > /tmp/tmp-minh-xterm-df

xterm -geometry "`wc -L /tmp/tmp-minh-xterm-df | head -c 2`"x"`wc -l /tmp/tmp-minh-xterm-df | head -c 1`" -e "cat /tmp/tmp-minh-xterm-df; rm /tmp/tmp-minh-xterm-df; read -t 20"

exit 0
this's fine.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gnome terminal problem rashid68 Red Hat 0 08-31-2007 07:41 AM
Gnome-terminal problem mirabile dictu Linux - Newbie 1 02-15-2006 01:23 AM
gnome-terminal problem!!!! divin Linux - Software 2 03-26-2005 03:19 PM
gnome terminal flicker problem rosslaird Debian 0 12-08-2004 01:30 PM
Gnome terminal problem in Fedora Defaultman Linux - Software 0 02-11-2004 01:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:16 AM.

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