Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-29-2011, 03:55 PM
|
#1
|
Member
Registered: Feb 2010
Posts: 181
Rep:
|
Hide XTERM console
Hello, I have this simple code written in python:
Code:
import os
os.system("xterm -e 'ls /usr/lib'")
Is there anyway I can hide the xterm window that is opening ?
|
|
|
03-29-2011, 05:16 PM
|
#2
|
LQ Guru
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,195
|
Hide xterm
From Python you should not require xterm to execute a shell command.
Have you considered NOT calling xterm?
|
|
1 members found this post helpful.
|
03-30-2011, 03:18 AM
|
#3
|
Member
Registered: Feb 2010
Posts: 181
Original Poster
Rep:
|
If I call xterm, i call it because I need it.
|
|
|
03-30-2011, 04:15 AM
|
#4
|
LQ Newbie
Registered: Sep 2007
Location: Greece
Distribution: Archlinux
Posts: 3
Rep:
|
Quote:
Originally Posted by vbx_wx
If I call xterm, i call it because I need it.
|
Please tell us what you're trying to do.
|
|
|
03-30-2011, 10:55 AM
|
#5
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
Have it displayed on an X virtual framebuffer (Xvfb).
Maybe set the geometry of the window to 1 X 1 pixel; it isn't hidden, bit its too small for many people to notice.
--- rod.
Last edited by theNbomr; 03-30-2011 at 10:59 AM.
|
|
|
03-31-2011, 03:58 AM
|
#6
|
Member
Registered: Feb 2010
Posts: 181
Original Poster
Rep:
|
@MadCatMk2: I am trying to print for example the contents of a directory but the output should be in a new console. Something similar to start cmd 'dir c:\\' .
|
|
|
03-31-2011, 04:18 AM
|
#7
|
Senior Member
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541
|
vbx_wx:
I think MadCatMk2 was attempting to ask specifically why do you need to perform the operation if no one is to see it? What is the point of using a terminal (xterm) if no one is to see it? Is the point to run "ls" or is it to run "xterm"? Are the results of "ls" important to your application?
Anyhow, often times, if not always, when someone poses the question "what are you trying to accomplish?", it is important to specify why something is required to be done, not how it is going to be done.
At any rate, have you tried specifying the xterm option "-iconic"??
|
|
1 members found this post helpful.
|
03-31-2011, 10:01 AM
|
#8
|
LQ Guru
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,195
|
xterm?
Do you see why it seems pointless to us that you jump through hoops to display something, that you then need to be hidden?
If the results are not to be seen, why display anything at all?
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 07:49 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|