Open Terminal and Snap to Right

Asked by Hrishikesh Kadam on 2021-04-26

I want to open a Terminal window and Snap it to the Right half.

In Ubuntu 20.10, I was using the following command in Startup Applications -

```
$ gnome-terminal --geometry=91x47+996+8
```

I found the right geometry numbers from this answer - https://askubuntu.com/a/1169268/934644

Unfortunately, after upgrading to Ubuntu 21.04 it doesn't seem to be working.

COLS 91 and ROWS 47 scaling correctly but X 996 and Y 8 not translating at all. My screen resolution is 1920 x 1080.

This is definitely linked to the Wayland as default graphics.

After selecting "Ubuntu on Xorg", the terminal window translates correctly.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu wayland Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Manfred Hampl (m-hampl) said : #1

Maybe caused by using wayland.

Try switching to xorg at login time and test whether it works there.

@Manfred Hampl (m-hampl) Yes this is happening due to Wayland.
After choosing "Ubuntu on Xorg", the terminal window transforming to the specified geometry correctly.

But as Ubuntu has decided to make Wayland as default graphics, this seems to be a bug right?

Manfred Hampl (m-hampl) said : #3

I think you have to distinguish between two issues:

In wayland the different windows are much more separated from each other that on xorg, probably causing that xdotool does not work any more. This is more or less a consequence of a design decision in wayland, see also https://superuser.com/questions/1032270/wayland-alternative-for-xorgs-xdotool for a discussion.

if "gnome-terminal --geometry=91x47+996+8" does not correctly work any more, then this is a fault that should be repaired. I do not know whether this is a bug in wayland or in gnome-terminal.

I think I'll report a bug.

I have edited the question for any correct resolution.

Thanks, @Manfred Hampl (m-hampl) for your help!

Manfred Hampl (m-hampl) said : #5

@Manfred Hampl (m-hampl) Not helpful.

Manfred Hampl (m-hampl) said : #7

Why not helpful?
The link shows that somebody else has got the same problem, and the answers given was:

"On Wayland there's no way a client (e.g. gnome-terminal) could request or in any way influence the position where it appears on the screen. This is by design."

This probably is not the kind of answer that you are looking for, but it is an explanation for the behavior that you experience.

Can you help with this problem?

Provide an answer of your own, or ask Hrishikesh Kadam for more information if necessary.

To post a message you must log in.