Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-02-22 16:51:10

rayandrews
Member
From: Vancouver B.C. Canada
Registered: 2011-12-30
Posts: 179

Can we keep editors within bounds of a terminal?

All,

Ok, so gedit 'geometry=' does not work. Or does it? I've never gotten it to work, anyway. But 'display=' does work, that's nice of an offered feature to actually do something.  When I open gedit via a launcher it's quite polite, it opens windows on the same screen (I have two) from which the launcher was clicked. However, If I execute exactly the same command that is contained in the launcher, from the command line, the gedit window will pop up at the far right of the right hand screen regardless of the location of the terminal from which it was called.  This leaves the 'calling terminal' 'dead' (since it is 'active' with gedit) and overlays whatever was going on where gedit decided to open itself.  It is most bothersome.

What would be wonderful is some way to force programs that are opened in a terminal to open 'over' that same terminal AND size themselves to fit that terminal so that nothing else gets overlayed.  Can that be done? If not, is there some editor that will obey 'geometry=' ? Or some way to get gedit --geometry= ... to actually work?  It's this sort of little irritation that musses up my xfce pleasure.  Me personally, I don't care much for the latest-greatest feature, what I want is simple things to actually function.

Offline

#2 2014-02-22 20:41:03

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,007

Re: Can we keep editors within bounds of a terminal?

rayandrews wrote:

All,

Ok, so gedit 'geometry=' does not work. Or does it? I've never gotten it to work, anyway. But 'display=' does work, that's nice of an offered feature to actually do something.

I don't use gedit so I can't comment on that program. For programs that don't allow geometry settings on startup, you can use wmctrl or devilspie to force geometry (wmctrl is manual, though it can be scripted and devilspie is more automatic).

When I open gedit via a launcher it's quite polite, it opens windows on the same screen (I have two) from which the launcher was clicked. However, If I execute exactly the same command that is contained in the launcher, from the command line, the gedit window will pop up at the far right of the right hand screen regardless of the location of the terminal from which it was called.

This can be controlled, to some extent, via Settings Manager -> Window Manager Tweaks -> Placement tab.

This leaves the 'calling terminal' 'dead' (since it is 'active' with gedit) and overlays whatever was going on where gedit decided to open itself.  It is most bothersome.

You have a few options here:

1. Start gedit in the background and it will free up the terminal to continue to work. However, if you close the terminal (the parent) gedit (the child) will also close. You will still gedit messages in the terminal window though:

gedit &

2. You can remediate the closing issue in #1 by using the nohup command to tell the program to ignore the hangup signal:

nohup gedit &

3. You can also get rid of gedit messages in the terminal window by redirecting them to /dev/null:

nohup gedit > /dev/null 2>&1 &

4. You can try running gedit from the Application Finder (Alt+F2) - there is no requirement for a terminal window.

***Note: you can create an alias for any of those commands so that it if you run gedit in the terminal, it will actually run your alias:

alias gedit='nohup gedit > /dev/null 2>&1 &'

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2014-02-23 02:47:27

rayandrews
Member
From: Vancouver B.C. Canada
Registered: 2011-12-30
Posts: 179

Re: Can we keep editors within bounds of a terminal?

Thanks Toz, that was most informative. I've heard of 'devilspie', never played with it, I guess it's about time I did.

Offline

Board footer

Powered by FluxBB