View previous topic :: View next topic |
Author |
Message |
potuz Guru
Joined: 30 Jan 2010 Posts: 378
|
Posted: Tue Aug 16, 2016 5:26 pm Post subject: Can I run an application and take over the current window? |
|
|
Say I have a window open with a terminal emulator and a shell running (in this case is fvwm+urxvt+bash). Is it possible to launch an instance of a gui program (say gvim) from the shell and ask it to take over the current window? |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Wed Aug 17, 2016 2:08 am Post subject: |
|
|
Depends on what you mean by "take over the window". It is certainly possible to launch a GUI program from a terminal (like xterm or kterm) on a desktop.
If you mean a window that is full screen, yes.
If you mean a window that completely takes over the desktop (or rather submerges the desktop), that has to be done when the desktop is launched.
This example [url] http://dpaste.com/3PZ05YW[/url] shows a modified fluxbox startup script that launches fluxbox in the background instead of the foreground and then runs an alternate desktop called "doorsdesktop" which is a GUI program. Fluxbox still runs and decorates windows but only doorsdesktop is reachable by the user and the fluxbox session ends when doorsdesktop ends. The exact manner in which this would work varies with windowmmanager launched. |
|
Back to top |
|
|
potuz Guru
Joined: 30 Jan 2010 Posts: 378
|
Posted: Wed Aug 17, 2016 3:21 pm Post subject: |
|
|
No, I meant a usual terminal window. I often time find myself wanting to see some images from an e-mail or rss feed within mutt or canto-ng for example and instead of launching the viewer in a separate window I'd like the corresponding program (for example surf or feh) to take over the current window. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Wed Aug 17, 2016 3:41 pm Post subject: |
|
|
potuz wrote: | No, I meant a usual terminal window. I often time find myself wanting to see some images from an e-mail or rss feed within mutt or canto-ng for example and instead of launching the viewer in a separate window I'd like the corresponding program (for example surf or feh) to take over the current window. |
I think you mean "from the current terminal window". i.e. you have X running on VT7 and you press ALT-CTRL-F1 to work in another virtual terminal. No, you can't run a GUI application in that terminal without starting a new instance of X11. |
|
Back to top |
|
|
potuz Guru
Joined: 30 Jan 2010 Posts: 378
|
Posted: Wed Aug 17, 2016 4:18 pm Post subject: |
|
|
Tony0945 wrote: | potuz wrote: | No, I meant a usual terminal window. I often time find myself wanting to see some images from an e-mail or rss feed within mutt or canto-ng for example and instead of launching the viewer in a separate window I'd like the corresponding program (for example surf or feh) to take over the current window. |
I think you mean "from the current terminal window". i.e. you have X running on VT7 and you press ALT-CTRL-F1 to work in another virtual terminal. No, you can't run a GUI application in that terminal without starting a new instance of X11. |
No, as in my first post, the terminal is a terminal emulator, which is urxvt in this case.
To state the problem again: I have an empty desktop running an X server with fvwm as window manager. There is one window open with a terminal emulator urxvt running in that window. This is not the root window, it is a child of the root window and it is a top-level window, let's call this window 1. urxvt is running a bash session and if within this bash session I type
Then fvwm will open a new top-level window (let's call it 2) with an instance of surf running in it.
What I would like to do is to have a way of running that instance of surf in window 1 instead of opening a new one 2. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Aug 17, 2016 7:07 pm Post subject: |
|
|
You want a GUI program to render over the top of your terminal window contents. That's not really possible, unless you have a sufficiently clever WM that can be taught to group windows by TTY/PGID or something. |
|
Back to top |
|
|
1clue Advocate
Joined: 05 Feb 2006 Posts: 2569
|
Posted: Wed Aug 17, 2016 7:55 pm Post subject: |
|
|
I think the best you're going to do is to create a new window, exactly the same size and position, over the top of your existing one.
The only other thing is you might be able to chain from your mail app to your new app, but then when you quit the new app the old app no longer available. Not really sure how you'd do this if your original app doesn't support this. |
|
Back to top |
|
|
|