LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 08-01-2008, 11:08 PM   #1
crasywolf
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Rep: Reputation: 0
How do I pass command to gnome-terminal as an argument?


I let my gnome-terminal automatically run at the start-up and now I want the window to be automatically maximized as well.

So I did some browsing online and found out about wmctrl.

It works fine when I type the following from the gnome-terminal:
Code:
wmctrl -r guest@localhost:~/Projects -b toggle,maximized_vert,maximized_horz
However, I am having a tough time on passing the above command to gnome-terminal as an argument.
Code:
gnome-terminal --working-directory=/home/guest/Projects --command wmctrl -r guest@localhost:~/Projects -b toggle,maximized_vert,maximized_horz &
I tried to wrap it with ' or " but did not work either.

Can anyone help me with this?
 
Old 08-02-2008, 12:05 AM   #2
allez
Member
 
Registered: Jul 2008
Location: Russia/Siberia/Krasnoyarsk
Distribution: SuSE, CentOS, FreeBSD
Posts: 77

Rep: Reputation: 21
Try to use -x (or --execute) instead of --command. But, AFAIR, when command passed to gnome-terminal as an argument exits, gnome-terminal closes itself.

Last edited by allez; 08-02-2008 at 12:17 AM.
 
Old 08-02-2008, 11:52 AM   #3
smoked kipper
Member
 
Registered: May 2008
Location: UK
Distribution: Slackware,Slamd64
Posts: 81

Rep: Reputation: 15
Surely the window manager has some way to maximize windows automatically?

Or just use the --geometry option.
 
Old 08-02-2008, 03:36 PM   #4
crasywolf
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Original Poster
Rep: Reputation: 0
smoked kipper: Can you tell me more about using window manager?
 
Old 08-02-2008, 03:46 PM   #5
smoked kipper
Member
 
Registered: May 2008
Location: UK
Distribution: Slackware,Slamd64
Posts: 81

Rep: Reputation: 15
I don't know what window manager you're using? I assume GNOME's (whatever it's called), so I'm afraid not, never used it, but presumably there must be some way to apply such options to a particular app.
 
Old 05-11-2010, 09:00 AM   #6
cyber-monk
LQ Newbie
 
Registered: Feb 2005
Location: Earth
Distribution: Ubuntu, Fedora
Posts: 4

Rep: Reputation: 0
Sizing the gnome-terminal on startup

To size the gnome terminal use the following argument
Code:
--geometry==GEOMETRY
The GEOMETRY argument is formated like this
Code:
GEOMETRY=ROWSxCOLS+X+Y
Here are some examples
Code:
# specify size only
gnome-terminal --geometry=116x30 

# specify size and position
gnome-terminal --geometry=116x30+200+200

# maximize the terminal
gnome-terminal --maximize

Last edited by cyber-monk; 05-11-2010 at 09:03 AM.
 
  


Reply

Tags
geometry, gnome, gnometerminal, size, terminal


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
How do I resize the terminal window from the command line in the gnome terminal QuIcKSpArK Linux - Newbie 5 04-21-2012 02:04 PM
Howto pass an argument to alias of a script? Goose1 Programming 1 02-17-2008 06:14 PM
Pass argument between php scripts gandalf_the_grey Linux - Newbie 1 02-03-2006 02:53 PM
How to pass an argument to DHCPCD ? shazam75 Linux - Networking 3 02-27-2005 10:34 AM
PHP pass argument to shell script monzter Programming 2 08-14-2004 06:16 AM


All times are GMT -5. The time now is 07:52 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration