LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-18-2010, 09:27 AM   #1
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908
Blog Entries: 26

Rep: Reputation: 49
how to hide window using linux command


In my windows xp I used http://www.commandline.co.uk/cmdow/cmdow.zip to hide a window & bring it back.
In linux I came across XtUnrealizeWidget() & XtUnmanageChild().
How can I use them to hide window ?
If there is some another way , please suggest.
 
Old 03-18-2010, 11:59 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
That would largely depend on your window manager/desktop environment?
 
Old 03-18-2010, 12:13 PM   #3
t1nm@n
Member
 
Registered: Aug 2009
Location: Trivandrum, Kerala, India.
Distribution: Slackware 14.2 x86_64
Posts: 96
Blog Entries: 3

Rep: Reputation: 25
You just hav to put a dot infront of the filename. for exampl for the file named test.txt, it would become hodden if u change its anme to .test.txt

Now if u want to see them mostly Ctrl+H should do the trick or get other filemanagers like gentoo, midnight commander, or gnome commander which usually shows all the files of a directory.

from the commandline just type ls -alf to view all files in the present working directrory from the terminal.

goodluck.

tinman.
 
Old 03-19-2010, 06:26 AM   #4
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
to t1nm@n
I did not want to hide a file or folder but a window.
In xp every window has handle (let us say xyz)
In windows command prompt I do
c:\>cmdow.exe xyz /hid
The window becomes invisible though running in background
To bring it back I do
c:\>cmdow.exe xyz /vis
Window reappears.

to Tinkster
I am using ubuntu 8.04 with GNOME.
 
Old 03-19-2010, 06:36 AM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
In Linux, under X it's usually the window manager who control the window behavior. So, if your WM offers some kind of CLI interface you could use that. Most don't. So you will have to check 3rd party tools which might work or not depending on how close this tool and your WM of choice adhere to the standards.

A couple of these tools are devilspie and wmctrl. You could as well use some WM that can be controlled via the CLI, such as FVWM or Kwin to name a couple of them. The Gnome WM (metacity) doesn't have that capability as far as I am aware.
 
Old 03-19-2010, 06:37 AM   #6
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by sumeet inani View Post
to t1nm@n
I did not want to hide a file or folder but a window.
In xp every window has handle (let us say xyz)
In windows command prompt I do
c:\>cmdow.exe xyz /hid
The window becomes invisible though running in background
To bring it back I do
c:\>cmdow.exe xyz /vis
Window reappears.

to Tinkster
I am using ubuntu 8.04 with GNOME.
Use && after the command, it will make the window disappear, to bring it back in front type any command in the > prompt, e.g., ls

I know this is not the proper solution, but at least its working.
 
Old 03-19-2010, 06:47 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by sayan_acharjee View Post
Use && after the command, it will make the window disappear, to bring it back in front type any command in the > prompt, e.g., ls
I don't think you two are speaking the same language. '&&' is the logical 'AND' operator in most shells. It has nothing to do with windows or such kind of structures. All it does is to continue evaluating if the result of the left member of the sentence is evaluated to 'true' ('0' in shell speech). It's used commonly to concatenate commands in a way that the second one will only be run if the first one succeeds:

Code:
test -f /foo && echo "foo exists"
If you meant '&' (a single ampersand) then all it does is to run a command in the background. 'background' in shell language means that the command will not lock your shell, so while it's running you will still be able to use the shell interactively. That might be a good or a bad thing depending on the command you are running. But it has nothing at all to do with how the window will be presented to you at all. It definitely won't hide the window which is what the OP wants to do (and anyway, for what it seems, he wants to control already existing windows).
 
Old 03-19-2010, 06:57 AM   #8
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
thanks for spotting that.
ok, ignore my last post.
 
Old 03-19-2010, 07:06 AM   #9
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
It seems you are looking for something like wmctrl.
As you seem to be running ubuntu, look here:
http://packages.ubuntu.com/karmic/wmctrl

EDIT: Oops, just realized i92guboj already mentioned this. Anyway, wmctrl is very simple to use and will work with all ewmh compliant WMs so I think it's a good option. Having said that, have you considered simply using a full featured WM instead of the dumbed down rubbish that ships with gnome?


Cheers,

Evo2.

Last edited by evo2; 03-19-2010 at 07:11 AM.
 
Old 03-20-2010, 02:40 AM   #10
t1nm@n
Member
 
Registered: Aug 2009
Location: Trivandrum, Kerala, India.
Distribution: Slackware 14.2 x86_64
Posts: 96
Blog Entries: 3

Rep: Reputation: 25
cool. i didnot know that, thamx for the knowledge sumeet.

t1nm@n.
 
Old 03-22-2010, 01:48 AM   #11
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
I read the manpage of wmctrl then ran command
$wmctrl -r 'Title' -b toggle,hidden
where I got Title of window from 'wmctrl -l'.
So it seems metacity does not support hiding windows.
isn't it ?
 
  


Reply



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
Fedora Core 10 (updated) - Is there anyway to hide users on login window? timez Fedora 10 03-15-2009 02:45 PM
Hide window in taskbar k1piee Linux - Software 1 12-29-2008 06:05 PM
Hide Window - Torsmo reilly Debian 3 09-11-2005 01:27 PM
which function can hide a terminal window? gepo Programming 3 08-12-2005 05:15 AM
How to hide the gaim window in the taskbar ICO Linux - General 1 02-03-2004 06:25 PM

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

All times are GMT -5. The time now is 10:20 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
Open Source Consulting | Domain Registration