Linux mint поворот экрана

Linux Mint Forums

Rotate display back and forth with keyboard??

Forum rules
There are no such things as «stupid» questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

Rotate display back and forth with keyboard??

Post by vanisle » Fri Apr 16, 2010 2:34 am

I just installed Mint and am liking it so far, I also enjoy reading ebooks on my laptop and was wondering if there is a way to set up keyboard shortcuts so that I can rotate the display back and forth. I found the display settings and the rotate screen but it would be a pain to go through the menus all the time when I switch back and forth all the time. Is this something that would be easy to do?

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Pilosopong Tasyo Level 6
Posts: 1432 Joined: Mon Jun 22, 2009 3:26 am Location: Philippines

Re: Rotate display back and forth with keyboard??

Post by Pilosopong Tasyo » Fri Apr 16, 2010 8:35 am

hello vanisle and welcome to the forum

There is a terminal command that will do what you want, called xrandr:

usage: xrandr [options] where options are: -display or -d -help -o or —orientation -q or —query -s /x or —size /x -r or —rate or —refresh -v or —version -x (reflect in x) -y (reflect in y) —screen —verbose —dryrun —nograb —prop or —properties —fb x —fbmm x —dpi / —output —auto —mode —preferred —pos x —rate or —refresh —reflect normal,x,y,xy —rotate normal,inverted,left,right —left-of —right-of —above —below —same-as —set —scale x —transform ,,,,,,,, —off —crtc —panning x[++[/x++[////]]] —gamma :: —primary —noprimary —newmode [+HSync] [-HSync] [+VSync] [-VSync] —rmmode —addmode —delmode

The command switch you are looking for is -o

e.g. to make the screen go upside-down, you enter the following in the terminal:

I’m not too keen on making keyboard shortcuts (perhaps someone else can help on this), BUT, the next best thing you can do is create application launchers on your panel so you can switch orientation with a tap of the touchpad.

Читайте также:  Репозиторий пакетов astra linux

o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].

Re: Rotate display back and forth with keyboard??

Post by vanisle » Fri Apr 16, 2010 12:25 pm

Thanks I will give it a try! I just wanted to do it with the keyboard because the mouse is hard to use when the screen is flipped lol. I think I can make this work now though

Re: Rotate display back and forth with keyboard??

Post by dochogan » Fri Apr 16, 2010 4:58 pm

CTRL+ALT+ (L_ARROW or R_ARROW) works by default on the Gnome edition of Mint8. At least it did for me

Re: Rotate display back and forth with keyboard??

Post by vanisle » Fri Apr 16, 2010 8:35 pm

That just rotates my cube. I always used the ctr alr arrow combo with windows so that would be ideal for me. I’ll try turning my cube off when I get home and see if it works

Pilosopong Tasyo Level 6
Posts: 1432 Joined: Mon Jun 22, 2009 3:26 am Location: Philippines

Re: Rotate display back and forth with keyboard??

Post by Pilosopong Tasyo » Fri Apr 16, 2010 8:50 pm

dochogan wrote: CTRL+ALT+ (L_ARROW or R_ARROW) works by default on the Gnome edition of Mint8. At least it did for me

That keyboard combo will only rotate the workspace left or right. What the OP want is to change the orientation of the display from landscape to portrait (and vice-versa), the xrandr command will do that.

o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].

Pilosopong Tasyo Level 6
Posts: 1432 Joined: Mon Jun 22, 2009 3:26 am Location: Philippines

Re: Rotate display back and forth with keyboard??

Post by Pilosopong Tasyo » Fri Apr 16, 2010 8:56 pm

BTW vanisle, don’t be surprised if the panel icons get jumbled when you change the orientation of your display. I have several icons spread out on my top panel and they went haywire when I changed orientation. Changing the orientation back to normal didn’t put the icons back in the original places. (Considering I had pessulus configured to lock the panels.) It’s a PITA to re-arrange them.

o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].

Re: Rotate display back and forth with keyboard??

Post by vanisle » Fri Apr 16, 2010 9:37 pm

the xrandr command works great and I created a keyboard shortcut inside the compiz config setting manager. Now super + left arrow rotates my display and super + up arrow puts it back to normal.

Thanks for the help people it is most appreciated!!

Pilosopong Tasyo Level 6
Posts: 1432 Joined: Mon Jun 22, 2009 3:26 am Location: Philippines

Re: Rotate display back and forth with keyboard??

Post by Pilosopong Tasyo » Fri Apr 16, 2010 10:09 pm

Читайте также:  Adobe в системах linux

o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].

Re: Rotate display back and forth with keyboard??

Post by galactichitchhiker » Sat Apr 15, 2017 11:29 am

Worked great for me too, thanks! I mainly wanted it because I have a Lenovo Yoga 2 Pro and want to invert the screen (turn it upside down) when it’s in «tablet mode»

For those who want to program keyboard shortcuts directly instead of having to create application launchers, here’s how to do it in Cinnamon an MATE:

In Cinnamon (18.1) it’s as easy as:

[Preferences (or settings) > Keyboard > Shortcuts > Custom shortcuts > Add custom shortcut..

In my case, I created two (normal and inverted). The first one is named «Screen upside-down» (the name is irrelevant, call it whatever you want ) and the command is «xrandr -o inverted», and the second one is named «Screen normal», and the command is «xrandr -o normal». (Of course, you can do the same for «left» and «right»). Then select the first shortcut you created (Screen upside-down, or whatever you chose to name it) and on the bottom, under «Keyboard bindings», double click on the top «unassigned» item and you’ll be prompted to enter a key combination (in my case, Ctrl + Shift + Up arrow). If the shortcut you chose is already assigned to another function, the system will let you know and give you the option of assigning it anyway or choosing another combination. Repeat the process for the other shortcut(s).

In MATE, it’s pretty much the same:, except that instead of being included under the keyboard configuration, there’s a menu item of its own for «keyboard shortcuts» Preferences > Keyboard shortcuts > Add. The rest of the process is pretty much the same.

Источник

Полноценно повернуть экран Linux

Прошло пару месяцев, и снова появилось необходимость вкорячить Linux в очередную модель ноутбука. Дано: особо китайский нетбук под торговой маркой Digma, купленный за 7 тысяч в одном и без меня известном магазине. Новым, как ни странно.

Скриншот сайта магазина

К моему удивлению UEFI на данном устройстве полноценный, 64-х битный, если кто-то уже сталкивался с подобными устройствами, понимает, почему я удивлён. Обычно их производители не предполагают запуска чего-то кроме Win8 32bit и Android, и потому ставят 32-х битный EFI, не способный запустить загрузчик 64-х битных ОС.

Само собой, моему знакомому (попавшему под действие моей красноглазой пропаганды) хотелось видеть на нём что-нибудь с KDE, а не богомерзкую Win10, и казалось бы – бери флэшку и ставь, но было бы всё так просто в этой жизни…

Красиво, удобно, хорошо

Короче, этот недобук считает себя планшетом. В UEFI есть настройка поворота экрана, и по умолчанию она стоит как повернуть влево. Но на ОС она не распространяется, Windows скорее всего повёрнут силами драйвера. В общем, постановка задачи — исправить ориентацию экрана в Linux настолько, насколько это вообще возможно.

Выбор ОС, установка

Выбран был тестовый Debian (bookworm), и установлен почти без приключений, не считая необходимость повернуть голову на 90 градусов. Полагаю этот гайд подойдёт для любого относительно современного дистрибутива.

Первым же делом после установки ОС идём в настройки экрана и поворачиваем его в нормальный вид, благо большинство DE имеют такую настройку. Теперь можно будет по-человечески работать с терминалом.

Читайте также:  Wine linux usb devices

Поворачиваем виртуальную консоль

Идём в /etc/default/grub и добавляем в параметры ядра fbcon=rotate:3 . Последняя цифра определяет, какой поворот экрана нам нужен, возможно вам понадобится другое значение (от 1 до 3 включительно). Теперь виртуальные консоли (а значит и лог запуска) будут повёрнуты правильно.

А что с самим GRUB? Меню загрузки повернуть скорее всего не получится, потому разумнее всего сделать так, чтобы мы его просто лишний раз не видели. Так что приводим указанный выше файл к примерно такому виду:

GRUB_DEFAULT=0 GRUB_TIMEOUT=0 GRUB_TIMEOUT_STYLE="hidden" . GRUB_CMDLINE_LINUX_DEFAULT="quiet fbcon=rotate:3" 

Не забываем после любых правок этого файла сделать sudo update-grub , иначе не взлетит.

Экран входа

Рабочий стол в порядке, логи загрузки в порядке, с GRUB-ом смирились, но вот пользователя выбираем по-прежнему вертикально. Поправить это можно, просто повернув Xorg целиком.

Для начала выясним идентификатор встроенного в ноутбук монитора. Для этого выполним команду xrandr и посмотрим, как наш монитор определился.

$ xrandr Screen 0: minimum 320 x 200, current 1366 x 768, maximum 16384 x 16384 DSI-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 256mm x 144mm 1366x768 60.00*+ 48.00 . 

Видим, что наш монитор определён как DSI-1 .

Примечание: если ваш монитор идентифицируется как XWayland , значит вы вошли в графическом режиме Wayland. Выйдите из системы и войдите снова, выбрав графический сеанс на базе X11 (Xorg)

Запомнив это, создаём файл /etc/X11/xorg.conf.d/10-rotate.conf с следующим содержимым:

Section "Monitor" Identifier "DSI-1" Option "Rotate" "left" EndSection 

Собственно left — направление относительно текущего, в которое нужно повернуть монитор. Сохраняем, крестимся и идём в ребут. Если ваша удача больше нуля — экран входа будет повёрнут нормально.

Ссылки

Этот пост — обобщение следующей информации:

by melianmiko, 2023 | Работаем на TimeWeb Cloud

Источник

Настройка «горячих» клавиш для поворота экрана в Linux

Недавно обзавелся удобным креплением для монитора, которое позволяет теперь его вертеть на 360 градусов и возникло желание попробовать писать код в вертикальной ориентации экрана, чтобы больше кода захватывать в обзор. Каждый раз лезть в настройки экрана и менять ориентацию неудобно и решил подстроить «горячие» клавиши. Покажу как делал на примере Manjaro Linux с XFCE в качестве окружения рабочего стола.

Идем в настройки клавиатуры Настройки -> Оборудование -> Клавиатура:

настройки клавиатуры

Собственно, добавляем две команды, одну для поворота влево и вторую для нормальной ориентации экрана:

xrandr -o left xrandr -o normal

xrandr

Я настроил на комбинацию клавиш Ctrl+Shift+Влево и Ctrl+Shift+Вправо. Вот такой вот рабочий стол после разворота:

Похожие публикации по теме:

appimage установить ubuntu

Установка appimage приложений в linux

Как запустить Guake из Double Commander по F9

Как запустить Guake из Double Commander?

Сниффер Zigbee трафика в Linux

LAUNCHXL-CC26x2R1 подготовка рабочего окружения в Linux

Донец Антон

автор блога, разработчик электроники и программист

Рубрики

Популярное за месяц

  • Быстрый старт с RTL-SDR в Linux 405 просмотров
  • SPI (перевод из книги Mastering STM32) 366 просмотров
  • ADC (перевод из книги Mastering STM32) 359 просмотров
  • Шпаргалка по работе с Markdown в Gitlab 314 просмотров
  • I2C часть 2 (перевод из книги Mastering STM32) 280 просмотров
  • I2C часть 1 (перевод из книги Mastering STM32) 148 просмотров
  • Генерация перечней элементов в Kicad по ГОСТ 139 просмотров
  • Восстановление работоспособности китайского клона Saleae Logic 132 просмотра
  • Создаем свой первый проект в Keil 122 просмотра
  • Реализация протокола PELCO-D на Arduino 120 просмотров
  • Kicad в вопросах и ответах 119 просмотров
  • Power Management часть 2 (перевод из книги Mastering STM32) 117 просмотров

Источник

Оцените статью
Adblock
detector