How to open Window in Center of Screen on Ubuntu VPS
Window on Ubuntu can be centered to be particularly advantageous for design and video editing tasks.
This functionality minimizes the need for manual adjustments after opening a window, proving beneficial when managing numerous windows or working on displays with limited screen real estate.
There are two main ways to achieve this on Ubuntu VPS, depending on your desktop environment and preference for using the command line or a graphical interface.
- GUI: Install GNOME Tweaks (
sudo apt install gnome-tweaks
) and enable “Center New Windows”. - Command Line: Run
gsettings set org.gnome.mutter center-new-windows true
to center new windows.
Prerequisites to Adjust the Window Placement Settings on Ubuntu VPS
To open Window in Center of Screen on Ubuntu VPS, your machine needs to meet all the below specifications:
- A Server running Ubuntu VPS.
- A non-root user with
sudo
privileges.
Methods to Center New Window in Ubuntu VPS for Improved Workflow
The GNOME Tweaks method offers a visual interface for enabling centering, while the gsettings
command provides a quicker way to achieve the same result through the command line.
Let’s go through this guide to learn How to Center windows Ubuntu GUI, Center windows Ubuntu command line.
You will also get familiar with an alternative method to open Window in Center of Screen on Ubuntu VPS.
1. Open Window in Center of Screen on Ubuntu VPS Using GNOME Tweaks Tool
Open Window in Center of Screen on Ubuntu VPS Using GNOME Tweaks Tool:
- First, you need to install the GNOME Tweaks tool on our system.
- To do this, run the command below in your terminal to install the gnome-tweaks package:
$ sudo apt install gnome-tweaks
- Once the installation is complete, go to the Activities menu, search for Tweaks, and open it:
- Select Windows from the panel on the left, and to activate it, click the Center New Windows toggle:
- As a result, by opening the Nautilus window, you can see it is visible in the middle of our desktop.
2. Using gsettings Command to Open New Window in Center of Ubuntu VPS Screen
Although the gsettings
command is used to configure and display values in the dconf database, you can also use this command-line tool to center Windows with a Single Command and skip GUI.
- To Center New Window in Ubuntu VPS Using
gsettings
Command, just run:
$ gsettings set org.gnome.mutter center-new-windows true
- This sets the GNOME setting to center new windows automatically. Simple and efficient!
- To do so, let’s run the
gsettings
command Ubuntu in the terminal:
$ gsettings set org.gnome.mutter center-new-windows true
- Now, by opening any application, you see the newly opened window in the center of the screen.
3. Center New Windows in Ubuntu VPS Using dconf Editor
- In a GNOME desktop environment, you can directly edit the entries in the dconf configuration using the dconf Editor Ubuntu, a graphical tool.
- In this instance, a new window is opened in the center of the screen using the dconf Editor.
- To install dconf Editor on your Ubuntu VPS, open terminal and type:
$ sudo apt install dconf-editor
- Following a successful installation, launch the program by bringing up the Activities menu, typing dconf Editor, and clicking on it:
- Search for the center-new-windows toggle by going to the /org/gnome/mutter path:
- The center-new-windows toggle is then enabled, and to let the changes take effect, click Reload:
As a result, the preferred window that has been launched and with gsettings
enabled is visible in the center of the system screen and the placement setting is successful.
Does Ubuntu have a built-in option for centering windows?
Earlier versions of Ubuntu used Compiz for window management, which offered centering options.
Conclusion
Methods explained in this article included using the gsettings
command, the dconf Editor, and the GNOME Tweaks tool on a GNOME desktop.
The window placement is set using all of these ways to the center of the system screen. Now, you can choose any of them based on the desktop environment that is being used.
Centering windows is a matter of personal preference, but it can offer benefits for organization and workflow efficiency.