LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-17-2008, 02:57 AM   #1
ktek
Member
 
Registered: Sep 2008
Posts: 48

Rep: Reputation: 15
how to launch xterm maximized ?


Hey. I'd like to launch xterm maximized from a menu entry/other terminal.
Seems like there should be a way to do it, xterm -max or whatever.

What is it?

Edit: In case anyone is wondering why, it's not because of any functional reason. I just want to make shell script that will launch xterm full screen, clear it, and lock it with xtrlock.

Last edited by ktek; 11-17-2008 at 03:01 AM.
 
Old 11-17-2008, 03:43 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
Hi,

Maybe not what you are hoping for, but the following will open a xterm at at certain location with a certain size:

xterm -geometry 100x50+0+0

The above command opens an xterm at location +0+0 (top left of the screen) with a size of 100 (horizontal) x 50 (vertical).

If you do not know the size of your screen, use the xwininfo command to find out what it is (last line of output is the -geometry option, which can be copied and pasted).

Hope this helps.
 
Old 11-19-2008, 06:18 PM   #3
ktek
Member
 
Registered: Sep 2008
Posts: 48

Original Poster
Rep: Reputation: 15
Thanks, exactly the kind of thing I was looking for.

Last edited by ktek; 11-19-2008 at 06:20 PM.
 
Old 12-14-2012, 06:01 AM   #4
Chazz422
LQ Newbie
 
Registered: Mar 2004
Location: Philadelphia, PA
Distribution: Suse 12 (KDE)
Posts: 3

Rep: Reputation: 0
here's a short 1-liner to get the answer

w=6 ; h=12

g=$( xdpyinfo | perl -n -e 'print "".($1/'$w')."x".($2/'$h')."+0+0" if /dimensions:\s*(\d+)x(\d+)/' )
xterm -fs ${w}x${h} -geometry ${g}

Last edited by Chazz422; 12-14-2012 at 06:31 AM. Reason: Forgot to mention font size calculation
 
Old 12-14-2012, 03:19 PM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,661

Rep: Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256
Actually, from the manpage on xterm you use "xterm -maximized".

Note, this requires the window manager to provide the correct geometry. some don't.

For instance, xfwm4 doesn't accept the equivalent +maximized option (it is documented as equivalent, but xfwm4 doesn't respond except with the default size for the window). xfwm4 DOES respond properly for the -maximized option.
 
  


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
xterm - howto lauch an xterm into a specific directory jobano Linux - Software 8 02-26-2008 03:18 PM
Xterm does not launch Java GUI hurry6 Linux - General 6 12-04-2007 04:25 PM
When I tries to execute the xterm i got this message: xterm: no available ptys johnsanty Other *NIX 4 09-20-2006 12:29 PM
how is black xterm background in IceWM when issue a xterm command? BRAHmS Linux - Software 1 02-14-2005 03:51 AM
Maximized windows stay maximized forever dreamtheater Linux - Software 0 01-23-2005 02:38 PM


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