LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to hide window using linux command (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-hide-window-using-linux-command-796290/)

sumeet inani 03-18-2010 09:27 AM

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.

Tinkster 03-18-2010 11:59 AM

That would largely depend on your window manager/desktop environment?

t1nm@n 03-18-2010 12:13 PM

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.

sumeet inani 03-19-2010 06:26 AM

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.

i92guboj 03-19-2010 06:36 AM

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.

Sayan Acharjee 03-19-2010 06:37 AM

Quote:

Originally Posted by sumeet inani (Post 3904364)
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. :D

i92guboj 03-19-2010 06:47 AM

Quote:

Originally Posted by sayan_acharjee (Post 3904374)
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).

Sayan Acharjee 03-19-2010 06:57 AM

thanks for spotting that.
ok, ignore my last post.

evo2 03-19-2010 07:06 AM

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.

t1nm@n 03-20-2010 02:40 AM

cool. i didnot know that, thamx for the knowledge sumeet.

t1nm@n.

sumeet inani 03-22-2010 01:48 AM

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 ?


All times are GMT -5. The time now is 12:24 AM.