Skip to content

Commit bbc9cbc

Browse files
committed
Adding the new documentation for real this time.
1 parent 132a0bb commit bbc9cbc

1 file changed

Lines changed: 81 additions & 0 deletions

File tree

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Rotating Your Screen in Ubuntu 25.10 via the Terminal
2+
3+
_Written by [**Kaan Akşit**](https://kaanaksit.com), 10 January 2026_
4+
5+
**Disclamer:** This article is only tested under Ubuntu 24.10.
6+
7+
This tutorial guides you through rotating your screen using the terminal in Ubuntu 25.10. Modern Ubuntu systems have moved away from the traditional X Window System, making simple xrandr commands unreliable. This solution leverages `gnome-randr.py` to achieve the desired result.
8+
9+
## Understanding the Challenge:
10+
Older methods for screen rotation using xrandr often don't work reliably in Ubuntu 25.10 due to the transition away from the X Window System. This tutorial provides a workaround for terminal-based rotation.
11+
12+
## Step 1: Installing Required Components
13+
First, you need to install the necessary dependencies. Open a terminal (Ctrl+Alt+T) and execute the following commands:
14+
```
15+
sudo apt update # Update package lists
16+
sudo apt install dbus # Install the D-Bus library
17+
wget https://raw.githubusercontent.com/fraz0815/gnome-randr/refs/heads/master/gnome-randr.py
18+
````
19+
### Download the gnome-randr.py script
20+
```
21+
sudo mv gnome-randr.py /usr/bin/gnome-randr # Move the script to a standard executable directory
22+
sudo chmod +x /usr/bin/gnome-randr # Make the script executable
23+
````
24+
25+
## Step 2: Creating an Installation Script (Optional, for Scalability)
26+
27+
For ease of deployment to multiple machines, you can create a script to automate the installation process.
28+
29+
Open a terminal (Ctrl+Alt+T) and use your preferred text editor. We'll use vim in this example:
30+
31+
vim install_gnome_randr.sh
32+
33+
Paste the following lines into the install_gnome_randr.sh file:
34+
35+
```
36+
sudo apt install dbus
37+
wget https://raw.githubusercontent.com/fraz0815/gnome-randr/refs/heads/master/gnome-randr.py
38+
sudo mv gnome-randr.py /usr/bin/gnome-randr
39+
sudo chmod +x /usr/bin/gnome-randr
40+
````
41+
42+
Save the file and exit the editor. Make the script executable and run it with root privileges:
43+
44+
```
45+
chmod +x install_gnome_randr.sh
46+
./install_gnome_randr.sh
47+
```
48+
49+
## Step 3: Identifying Your Display Output
50+
Once gnome-randr.py is installed, run the following command in your terminal:
51+
```
52+
gnome-randr
53+
```
54+
55+
This will list the connected displays and their names (e.g., DP-0, HDMI-0, DP-2). Note the name of the display you want to rotate. This is crucial for the next step.
56+
57+
## Step 4: Rotating the Screen
58+
Now that you know your display name, rotate the screen using the following command:
59+
```
60+
gnome-randr --output <DISPLAY_NAME> --rotate <ROTATION>
61+
```
62+
Replace <DISPLAY_NAME> with the name of your display (e.g., DP-0, HDMI-0) and <ROTATION> with one of the following values:
63+
64+
normal: Returns to the normal orientation (0 degrees).
65+
left: Rotates 90 degrees clockwise.
66+
right: Rotates 90 degrees counter-clockwise.
67+
inverted: Rotates 180 degrees.
68+
69+
### Example:
70+
71+
To rotate display DP-0 90 degrees to the left:
72+
```
73+
gnome-randr --output DP-0 --rotate left
74+
```
75+
76+
## Alternative:
77+
78+
If you prefer a graphical approach, simply point and click within the GNOME Settings application to configure your display settings.
79+
80+
**Importante Note:** This recipe is particularly useful when you need to perform this configuration on a large number of computers. You can deploy the installation script via SSH or other means to standardize the setup.
81+

0 commit comments

Comments
 (0)