Projects/Plasma/FAQ (ru)

From KDE TechBase


Примечание: Информация, размещенная здесь относится к Plasma в KDE 4.1. Для более старых версий посетите страницу KDE 4.0

Введение

Plasma - одна из ключевых технологий в KDE 4 (также известных как "Столбы KDE"("Pillars of KDE")), и одна из самых "видимых" для пользователя. Так как Plasma представляет пользовательский интерфейс иначе, чем традиционные десктопы, то могут возникать различные вопросы, что такое Plasma, что она делает и как с её помощью решать повседневные задачи.

В этом документе мы попытаемся решить эти проблемы, ответив на основные вопросы.

Основные вопросы

Что делает Plasma?

Plasma - это компонент, который отвечает за интерфейс рабочего стола: сам рабочий стол, панель (чаще говорят "панель задач" (taskbar)), и прочие элементы. Тем не менее, Plasma это намного больше, чем просто основные части интерфейса. Понятие "Рабочий стол" не менялось практически с самого создания: обычно на нем располагаются ярлыки, панель и иконки запущенных приложений. Plasma стремится изменить это, внося семантику "приложения как элементы", улучшая взаимодействие с пользователем, делая его более привлекательным, в то же время сохраняя легкость работы.

А что не так с современным рабочим столом?

Он статичен. Обычно рабочий стол прикреплен к папке, в которой находятся иконки приложений или файлы, размещенные самим пользователем. Его развитие не пошло дальше, чем использование картинки в качестве фона, он не может "работать" на пользователя. Plasma имеет иное представление, создавая динамическое и настраиваемое окружение.

Не думаю, что это хорошая идея...

Вы можете настроить Plasma так, чтобы она (и сопровождающие элементы) вели себя как обычно. У вас может быть панель задач, фоновый рисунок, ярлыки и т.п. Кроме того, если захотите, вы можете использовать инструменты, предоставленные Plasma как дополнительные, оставив только то, что хотите.

Как работает Plasma?

Компоненты Plasma - это виджеты, которые называются "Плазмоиды"("Plasmoids"). Плазмоиды могут выполнять самые разнообразные функции, начиная с отображения рабочего стола и фонового рисунка, показа заряда батареи на ноутбуке, отображения подключенных устройств и заканчивая отображением панели задач, в основном это маленькие программы, живущие на рабочем столе. Плазмоиды могут быть сгруппированы в "контейнеры", называющиеся областью содержимого. На рабочем столе по умолчанию есть два основных элемента: панель и сам рабочий стол. Оба являются областью содержимого с точки зрения Plasma.

Звучит не ново... в других операционных системах это уже есть.

Ключевое отличие в том, что плазмоиды могут взаимодействовать друг с другом. Хотите лучше видеть заряд батареи, когда он кончается? Просто перетащите индикатор с панели на рабочий стол. По желанию апплеты могут быть изменены в размерах или повернуты, благодаря использованию технологии Scalable Vector Graphics (SVGs). Рабочий стол не только взаимодействует с вами, как с пользователем, но и с самим собой новыми и интересными способами. Теперь можно контролировать как будет вести себя рабочий стол и что он будет показывать в приятном глазу и дружественном для пользователя представлении. Так как Plasma это набор плазмоидов, каждый элемент, даже сам рабочий стол, это виджет. Это позволяет перемещать рабочий стол куда угодно с учетом окон (назад и вперед). Он больше не висит позади всего остального, а выступает как еще один элемент взаимодействия.

Kicker и Kdesktop хорошо работал в KDE 3! Почему вы их поменяли?

Особенно благодаря kicker'у, были серьезные проблемы с возможностью их поддержки. Код не менялся с времен KDE 2, и было сложно добавить новые возможности, не нарушив остальных. В итоге единственным способом продвинуться оказалось начать с чистого листа.

Я не могу найти мою любимую функцию <вставьте свою>!

Не забывайте, что Plasma все еще в разработке и что у KDE 3 была хорошо отполированная база кода, ему понадобилось 7 лет, чтобы прийти к этому, когда Plasma намного моложе. Со временем, разработчики Plasma планируют ввести пропущенные функции и устранить потери. По мере роста KDE в цикле KDE4, Plasma будет улучшаться вместе с ним.

Почему вы решили сменить функционал рабочего стола?

У идеи рабочего стола как папки изначально плохая концепция. Она предполагает, что все, к чему вы будете иметь доступ, находится в одной директории на диске. Может это и удобно, но в тоже время это сильно ограничивает возможности. Например, вы не можете использовать индивидуальное представление для разных рабочих столов, так как все читается из директории. К тому же, довольно часто рабочий стол превращается в свалку для папок и файлов, не выполняя никаких других функций.

Я слышал, что в KDE 4.1 нет больше иконок на рабочем столе...

Это не совсем верно. Вы можете сделать иконки и ярлыки, перетащив их из Dolphin или K-меню. Что изменилось, так это то, что рабочий стол больше не отображает содержимое его папки. Тем не менее, вы можете отображать произвольное количество папок (локальных и удаленных) на рабочем столе вместо того, чтобы отображать только папку Рабочий стол. Для этого был введен апплет "Просмотр папки" (Folder View).

Что это за апплет "Просмотр папки"?

Как и говорится в названии он используется для отображения содержимого (папки, файлы) из директории. Эта директория может быть не только локально расположенной на вашем компьютере, но и удаленнам FTP, SSH или SMB ресурсом. В будущем, он будет содержать даже результаты поиска из Nepomuk и метки (tagging).

Вы можете выбрать отображение всех папок или настроить фильтры, используя регулярные выражения (также обсуждается использование фильтров, основанных на типах файлов, в будущих версиях KDE).

Этот апплет также поддерживает базовые функции управления файлами, (например, перемещение, копирование, вырезание и вставка) и таких апплетов может быть сколько угодно на рабочем столе.

В KDE 4.2 вы также сможете использовать "Просмотр папки" в качестве рабочего, эмулируя классическую парадигму.

Что вы сделали с K меню? Оно большое и уродливое!

Во время разработки KDE 4.0 мы перепробовали разные представления K menu. Некоторые проекты, типа Raptor, были амбициозными, но не было способа завершить их во время. В это время один из разработчиков портировал меню из SUSE Linux (Kickoff) в новую архитектуру KDE. Оно было практически готово со всеми функциями (не считая тестирования юзабилити) и было выбрано для меню по умолчанию. Если оно вам не понравилось, то традиционное K-меню также доступно. Также, некоторые альтернативные системы меню анонсированы (Lancelot, Raptor), но они все еще в разработке на время написания статьи.

Что такое KRunner?

KRunner это универсальная мини командная строка, которую можно активировать нажатием "Alt-F2" или выбрав "Выполнить команду" в контекстном меню раочего стола. Апплет может искать приложения, закладки, отображать активность системы и даже совершать простые арифметические вычисления.

Функциональность KRunner's может быть расширена, используя плагины ("runners").

Что такое "кэшью"?

То, что чаще всего называют "кэшью" - это логотип Plasma, размещенные на рабочем столе по умолчанию, в правом верхнем углу и на панели справа. Кликнув по ним, вы можете получить доступ к некоторым конфигурационным опциям, таким как конфигурация панели и Масштабированию интерфейса пользователя (МИП). Некоторые из них, вроде cashew панели, появляются только если виджет не заблокирован (см. ниже).

Кэшью от англ. cashew - американское тропическое вечнозеленое дерево (прим. перев.)

Пожалуйста, сделайте возможность отключить кэшью в правом верхнем углу.

Хотя предоставление возможности отключения кэшью звучит разумно, с точки зрения программирования это внесет излишнюю сложность и испортит дизайн. Было предложено, так как сам рабочий стол (его содержимое) управляется плагинами, написать плагин, который будет отрисовывать рабочий стол без кешью. На данный момент некоторые наработки ("чистый рабочий стол" плагин) уже присутствуют в KDE SVN. С переключением типа области содержимого, ожидаемого в KDE 4.2, нет причин разрабатывать альтернативные типы рабочих столов.

What is the Zooming User Interface (ZUI)?

The Zooming User Interface, or ZUI, is another component of Plasma. It enables the user to group different groups of plasmoids together, and to quickly switch between one and another using a zoom-and-pan approach. Notice that at the time, although significant improvements have been made in KDE 4.1, this feature is still under heavy development and may be fully functional only with later KDE 4.x releases.

How does the ZUI work?

Suppose you have three groups of plasmoids (such as widgets, application launchers, etc.) which you want arranged in specific combinations depending on what you want to do. You first group them according to your tastes, then you can switch between them by zooming out (getting a preview of all the groups) and then back in on the specific group you want to use. Notice that it is different from traditional X11 virtual desktop switching, as there is a higher degree of flexibility by using this approach, as the groups can be totally different from each other.

A very good example of this behavior is shown by this image courtesy of Half-Left from #kde on freenode.

Configuration

Могу ли я поместить иконки на рабочий стол?

Конечно, вы можете. Перетаскивание иконки из Dolphin или Konqueror на рабочий стол работает. Заметьте, что перетаскивание иконки на рабочий стол в действительности не создает файл, а только ссылается на него.

Для отображения содержимого папки Desktop, или любой другой папки, используйте апплет Folder View.

I am using two screens, and I used to have kicker over the two displays. Can I do that with Plasma?

No. The reason is that having a panel over two displays adds a great deal of complexity, especially when the two displays have different resolution. As a result of this added complexity, this feature would not be guaranteed to work in all cases. As a result it was not implemented.

How can I add applets to the panel?

Method 1: Open the Add Widgets dialog in the Plasma cashew (upper right corner of the screen) then select the widget of your liking and drag it directly (don't double click or use the Add Widget button) to the panel.

Method 2: Drag an applet from the desktop to the panel. This is also shown briefly on a video on Lydia Pintscher's blog.

Can I move the applets on the panel?

Just before KDE 4.1 RC1, a change has been introduced in Plasma to allow movement of the applets on the panel. To do so, open up the panel controller (by clicking on the cashew or by right clicking on the panel and selecting "Panel Settings") and hover the mouse cursor over the applets. Its shape will turn into four arrows, and you'll be able to rearrange the applets as you wish.

Lydia Pintscher's blog has a video showing movement in action. Another one is available on Aikurn's blog. Aikurn has also made an annotated video.

How do I move, rotate or resize an applet on the desktop?

First of all, hover over the applet you want to resize. The applet handle will appear.

The applet handle takes care of resize, rotate and move.

  • To move an applet: Click on the handle, then drag the applet around.
  • To rotate an applet: Click on the curved arrow then drag to rotate
  • To resize an applet: Click on the square icon and then drag to resize the applet. You can constrain the resize operation to the applet's aspect ratio by holding down the Ctrl key.

How can I change the height and the size of the panel?

Click on the panel cashew (the small icon on the right side of the panel), then click and drag, adjusting panel size and position to your choosing. Click again on the cashew (or on the red X) to close the panel configuration interface.

This video shows how to configure and move a panel.

How can I remove a panel?

Click on the panel cashew and select "Remove this Panel". Alternatively you can right click on the panel itself and choose "Remove this Panel".

I heard that you can use OS X's widgets with Plasma. Is this true?

Yes, Plasma can use OS X's widgets, but only the HTML ones.

My widgets are hidden under the windows. How can I show them?

You can bring all the widgets to the front by pushing Ctrl-F12, which will bring the Plasma Dashboard to the front.

How can I lock the positions of the widgets?

Method 1: Right click on an empty area of the desktop and select "Lock Widgets" from the contextual menu. If you want to reverse that, right click again and select "Unlock Widgets". The same option is available if you right-click on the panel.

Method 2: Select "Lock Widgets" from the Plasma cashew on the upper right corner or from the panel controller.

How do I remove widgets?

If they're on the panel, right click on the widget and select "Remove this...". If the widgets are on the desktop, you have different options:

  • If you hover over them, clicking the red X on the applet handle will remove them;
  • If you use the Add Widget dialog, you can click on the minus symbol icon next to the widget name to remove it.

How do I switch between Kickoff and the old style menu?

Right click on the menu icon and select "Switch to Classic Menu Style" (if using Kickoff) or "Switch to Kickoff Menu Style" (if using the classic menu). Alternatively, you can add either type of menu using the Add Applets dialog.

Aikurn has a video showing how to switch between the different styles.

How can I add/remove an activity?

Adding an activity: Zoom out from your current desktop view by clicking on the desktop view cashew (the icon in the top right corner) and selecting Zoom out. Clicking again on the cashew will show a new button, "Add Activity". Click on it to create a new desktop view.

Note: The "Add Activity", "Zoom in", and "Zoom Out" buttons are a little buggy in 4.1.0 and may disappear in certain situations. restarting plasma will bring them back.

This video shows how to add activities and move between them.

Removing an activity: Zoom out from your current desktop view, make sure it's not the current activity (otherwise select another one), then right-click on the activity you want to remove and choose the appropriate option.

Note: You must Unlock Widgets (Ctrl+L) before you can remove any activities.

Are there any keyboard shortcuts for Plasma?

In addition to the mouse, there is a number of shortcuts available:

  • Add widgets: Ctrl-A
  • Lock widgets: Ctrl-L
  • Zoom out: Ctrl- -
  • Zoom in: Ctrl- = or Ctrl-+
  • Next applet: Ctrl-N
  • Previous applet: Ctrl-P
  • Add activity: Shift-Ctrl-A
  • Next activity: Shift-Ctrl-N
  • Previous activity: Shift-Ctrl-P
  • Applet settings: Ctrl-S
  • Containment settings: Shift-Ctrl-S
  • Remove applet: Ctrl-R

Unfortunately, changing these shortcuts is not possible in KDE 4.1, but it is planned for KDE 4.2.

Theming

I don't like the default look of the panel and other Plasma components. Can I change that?

Yes, the ability to change the look of Plasma was planned since the beginning. Plasma can use "themes", which are essentially a number of SVG images and files specifying the colors, to change its appearance. Some themes have already appeared on popular sites like kde-look.org.

Is there a GUI option available to change the theme?

Yes. Right click on your current desktop, select "Desktop Settings" and you will find an option to change the theme in the dialog that will appear. You can also download new themes directly from there.

Step by step instructions (including screenshots) are available on Aikurn's blog.

Troubleshooting

My panel is gone, how do I get it back?

kquitapp plasma; rm $KDEHOME/share/config/plasma-appletsrc; plasma

This deletes your plasma settings, so you'll get the default configuration back. The panel-vanishing-on-crash issue was fixed just after 4.0.0's release. If running all the 3 commands at once doesn't work, try typing them in manually and wait a few seconds before running the next command.

Some GTK+ applications show wrong system tray icon sizes.

That is unfortunately a problem in the Freedesktop.org system tray specification, which does not define the sizes for system tray icons properly.

I experience extreme slowness when using Plasma with the NVIDIA binary driver.

This is NVIDIA's fault entirely, due to their driver not supporting correctly the XRender X11 extension, and it also affects other parts of KDE such as Konsole. See this blog entry on how to report issues upstream to NVIDIA. This page contains a few suggestions on how to improve performance until an updated driver is released.

Folder View and other plasmoids look badly rendered with an ATI video card and the open source radeon driver.

To work around this issue, you have to change the 2D acceleration method from XAA (X Acceleration Architecture) to the newer EXA. As this involves editing your xorg.conf file, bear in mind that such a modification may damage your system. Do it at your own risk.

To make the switch, edit your xorg.conf file (make a backup just in case) and locate the Device section for your graphics card. Add the line

Option "AccelMethod" "EXA"

before the "EndSection" line. If there is already a line with AccelMethod, change it from XAA to EXA. Save the file and restart the X server.

Notice that EXA is still marked as unstable, and that some other applications such as some KDE3 programs may render incorrectly.

Glossary

  • Containment: A container for different plasmoids. The desktop and the panel are examples of containments.
  • Panel: The place where the K-menu, taskbar, system tray and other componenents reside. Often called taskbar.
  • Plasmoid: A component of Plasma. Often referred as widget, or applet.
  • Activity: An organized group of widgets and an associated desktop view. Users can have an arbitrary number of activities.

Thanks

  • Daniel Laidig & Simon St.James - thanks for the umeet IRC logs!
  • Marco Martin - thanks for the information on panels!
  • Sebas - thanks for letting me use information from your blog entries!
  • Half-Left - great example of ZUI usage!
  • Aikurn - Excellent videos!

Contributors