Open two terminals at login, the second below the first

Is there a way ?
Now it opens two terminals at the same position

Ubuntu Budgie 24.04

What is the purpose of opening two terminals after login, what are you trying to do?

How do you have it set up now, with a script?

Show us the script or whatever it is so we can make suggestions.

Thanks

The purpose is to have two terminals opened, one on top left and the second below that
I set them in “startup applications”

Since Budgie still uses X11 it’s possible to do this. Read the manual page for the terminal emulator you’re using, there’s probably an option like '-geometry' (xterm) or '--geometry' (xfce4-terminal) which takes a geometry description in the form ‘WxH+X+Y’ with X being the horizontal position, Y the vertical, W the width and H the height of the window; so ‘xfce4-terminal --geometry 80x25+0+0’ would give you a terminal at the top left of the desktop with 25 lines of 80 characters. If the terminal you’re using does not have an option like that, you can write a small script using ‘xdotool’.
One thing to be aware of: once Budgie makes the transition to Wayland, this will stop working. In Wayland only the compositor knows the window geometry and AFAIK there’s no way to move or resize windows programmatically.

There is devilspie. Not sure if it works with Wayland etc

It doesn’t. Quote from the author of devilspie2 regarding porting to Wayland:

It may work for anything which needs X, but beyond that – well, it’d need to be ported to wayland, for a start; and that’s not something which I’ve looked into.

Since it uses Extended WindowManager Hints - something that doesn’t exist on Wayland - to do it’s job, it would probably be more of a complete rewrite than a port …

2 Likes

You can kinda do this with the Tilix terminal:

  1. Install Tilix:

    sudo apt install tilix
    
  2. Open Tilix.

  3. Click Add terminal down to split the terminal: one screen in the upper half, one in the lower half.

  4. Click Main menu → Save as.

  5. Enter a file name that represents this terminal layout. For example, upper-lower.json. It must have the .json extension.

  6. Now, you can start Tilix with the saved layout, splitting it into two terminal screens:

    tilix --session=upper-lower.json
    

Alternatively, the Kitty terminal also supports layouts: Arrange windows - kitty

And there probably are other terminals that can do it.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.