Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 08-05-2008, 07:49 PM   #1
Registered: Apr 2005
Location: Timaru, New Zealand
Distribution: Manjaro
Posts: 105

Rep: Reputation: 15
CLI - UNIX command and/or switch to open a package

Please: Is there a way with the CLI to open a GUI package and minimise it??

Old 08-05-2008, 08:35 PM   #2
LQ Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
A GUI program needs to have X-Window running in order to work. So if you have your CLI running in a terminal which is running on top of your GUI (Gnome or KDE or whatever) then you can start a GUI program from the command line. If your CLI is running directly on top of the kernel with no X-Window present then the GUI program will fail because it can't find X-Window.

So if you are running a terminal on top of a GUI desktop then you can simply type in the name of the GUI program you want to run. For example if you want to run gedit then type in:


Steve Stites
Old 08-05-2008, 10:52 PM   #3
Registered: Apr 2005
Location: Timaru, New Zealand
Distribution: Manjaro
Posts: 105

Original Poster
Rep: Reputation: 15
CLI running packages

Many thanks. Yes, I realised that bit. I want to minimise as I open it as well - can this also be done from the CLI??? Phidor
Old 08-06-2008, 01:20 AM   #4
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,897

Rep: Reputation: 578Reputation: 578Reputation: 578Reputation: 578Reputation: 578Reputation: 578
That depends on whether the program supports such a command-line option and/or the window manager supports minimized windows. You might be able to do this by starting the program with a tool like Xautomation, xwit or wmctrl.
Old 08-06-2008, 05:41 AM   #5
Registered: Apr 2005
Location: Timaru, New Zealand
Distribution: Manjaro
Posts: 105

Original Poster
Rep: Reputation: 15
Thanks gnashley - wmctrl will apparently handle the package I want to use (Claws-mail) OK. I installed wmctrl OK, read over the 'man wmctrl' page and tried 'wmctrl -h' but totally unfamiliar with reading manuals/instructions I had a go at trial and error to get things to work. Hopeless. I've arbitrarily tried about 50 different choices, such as
'claws-mail wmctrl -r 1 -e 1 -b 1' and each time I get Claws-mail opening at last used window size but I want to minimise it.
How do I do it please? Any odd clue along the way on how ON EARTH the manual is read/understood would be helpful. Phidor.


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
GNOME Workspace Switch from CLI hal_baumgardner Linux - Software 3 09-21-2007 03:22 PM
LXer: CLI tricks: UNIX Pipes, Streams and Redirections LXer Syndicated Linux News 0 09-16-2007 03:10 PM
Package Installation in CLI kerroppa Linux - Newbie 1 04-19-2006 10:51 AM
cli: command & domtar Linux - General 1 02-27-2005 07:43 AM
Command and Conquer - CLI Nimoy Programming 6 11-05-2003 03:50 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:36 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration