LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-16-2016, 10:20 AM   #1
klusk66
LQ Newbie
 
Registered: Mar 2016
Posts: 3

Rep: Reputation: Disabled
No file menu calling xterm from a shell script


Hey Linux Gurus!

Sorry if this has already been posted. Trying to solve a problem. I have a shell script that calls 4 xterm windows. Each window calls a telnet session. When I run the script, the windows come up and the telnet sessions are active, but I do not have the file menu at the top of each spawned window, like you would when when you click on the terminal application. I am using Ubuntu 12 if that matters.

Looking at the man page for xterm I see the -tb option. When I specify this option, I get an error "bad command line option -tb".

Thanks for any help on this.

Last edited by klusk66; 03-16-2016 at 10:23 AM.
 
Old 03-16-2016, 10:39 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,064
Blog Entries: 14

Rep: Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248
The terminal you get in a console is usually specific to the windows manager you're using not usually xterm. The two most common are Gnome and KDE.

For Gnome on RHEL the terminal is gnome-terminal. When I pull do gnome-terminal from command line it shows the File option and others across the top of the screen.

For KDE the terminal is konsole. It also has the File and other options across top of screen.

Last edited by MensaWater; 03-16-2016 at 10:56 AM.
 
1 members found this post helpful.
Old 03-16-2016, 11:20 AM   #3
klusk66
LQ Newbie
 
Registered: Mar 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
The terminal you get in a console is usually specific to the windows manager you're using not usually xterm. The two most common are Gnome and KDE.

For Gnome on RHEL the terminal is gnome-terminal. When I pull do gnome-terminal from command line it shows the File option and others across the top of the screen.

For KDE the terminal is konsole. It also has the File and other options across top of screen.

Thanks MensaWater!

When I changed to calling gnome-terminal it all worked. Too bad. I thought the colors in xterm were cool. When I use black for background in gnome-terminal it's a WEAK black color. But I choose functionality over form. So gnome-terminal it is!!!
 
Old 03-16-2016, 11:23 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,556

Rep: Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116
edit: looks like you got it sorted

You're not limited to just gnome-terminal though, you can run any terminal emulator you like. My system has no less than four different options available: xfce-terminal, gnome-terminal, konsole, and xterm. konsole is my favorite, even though I don't run KDE.

Last edited by suicidaleggroll; 03-16-2016 at 11:24 AM.
 
Old 03-16-2016, 02:27 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,064
Blog Entries: 14

Rep: Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248Reputation: 1248
Quote:
Originally Posted by klusk66 View Post
I thought the colors in xterm were cool. When I use black for background in gnome-terminal it's a WEAK black color. But I choose functionality over form. So gnome-terminal it is!!!
When I installed konsole to test it ealier the default color came up black so you might try doing that. (On RHEL we use Gnome by default but RHEL does have a konsole available to install as well (i.e. you can continue to use Gnome on your console but call konsole as your X Windows terminal rather than gnome-terminal).

As Suicidaleggroll stated there are others you can try as well.

Also if you do "man X" it will give you information on setting colors with options like -bg for background. It lists what you need for primary colors (including black) but by using slightly different codes you might get "black" closer to the one you like.

You can see various codes as for example at this page:
https://en.wikipedia.org/wiki/X11_color_names

Last edited by MensaWater; 03-16-2016 at 02:28 PM.
 
Old 03-16-2016, 05:00 PM   #6
klusk66
LQ Newbie
 
Registered: Mar 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Ok, Gurus, here is a new twist...

The following calls for each of the terminal sessions works just fine:

gnome-terminal --geometry 140x25 --title "{some title1}" -e "telnet {destination1}" &
gnome-terminal --geometry 140x25 --title "{some title2}" -e "telnet {destination2}" &

Ok, now I want to tee each session to a log file, so the output will show up in each terminal session window and log each of those session to a file.

I tried adding the tee command...

gnome-terminal --geometry 140x25 --title "{some title1}" -e "telnet {destination1} | tee {filename1}" &

...but the window quickly pops up and goes away, probably a syntax error.

Thanks in advance!
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
calling a shell script present on another server using perl script. anandg111 Linux - Server 4 07-18-2012 01:23 AM
Calling DB user from separate file in Shell script sathish.tn Linux - Software 3 05-23-2011 01:56 PM
Shell script calling shell script - List of all nikunjbadjatya Programming 7 04-13-2011 07:27 PM
K Menu - calling html/webpage file from menu sKAApGIF Linux - Desktop 2 08-24-2006 08:15 AM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-12-2005 12:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration