Jump to content

Xfce4: Difference between revisions

From postmarketOS Wiki
Jakko (talk | contribs)
Several new additions
Jakko (talk | contribs)
Minor corrections
Line 20: Line 20:
* Disable <code>Compositor</code> from <code>Window Manager Tweaks</code> in settings to get faster experience.
* Disable <code>Compositor</code> from <code>Window Manager Tweaks</code> in settings to get faster experience.
* In <code>FileManager</code> settings, shortcut pane icon size to 48 px and enable <code>Single Click</code> in Behavior section.
* In <code>FileManager</code> settings, shortcut pane icon size to 48 px and enable <code>Single Click</code> in Behavior section.
* If you can't grap something by touchscreen, use the keyboard (tab to go through the elements, arrow keys to choose).
* If you can't grap something by touchscreen, use the keyboard (tab key to go through the elements, arrow keys to choose).
* If you want to simulate right mouse clicks, see [[Input_methods#Simulate_secondary_click]], but actually this is not needed.
* If you want to simulate right mouse clicks, see [[Input_methods#Simulate_secondary_click]], but actually this is not needed.


Line 28: Line 28:
* Reduce the workspace switcher space by Settings -> Panel -> Items -> Workspace Switcher -> Edit -> Appearance: Buttons -> thereafter click the Workspace Settings below and rename the Workspace names to something shorter, e.g. 1, 2, 3, 4.
* Reduce the workspace switcher space by Settings -> Panel -> Items -> Workspace Switcher -> Edit -> Appearance: Buttons -> thereafter click the Workspace Settings below and rename the Workspace names to something shorter, e.g. 1, 2, 3, 4.
* For shutdown and reboot, the Action Buttons plugin can be added to the panel. In their settings, Appearance can be set to Action Buttons and the list below allows to choose which ones shall be shown.  
* For shutdown and reboot, the Action Buttons plugin can be added to the panel. In their settings, Appearance can be set to Action Buttons and the list below allows to choose which ones shall be shown.  
* As menu plugin, Whisker Menu is set up by default. The plugin Application Menu can be used as an alternative, depending on your taste.
* As menu plugin, Whisker Menu is set by default. The plugin Application Menu can be used as alternatively, depending on your taste.


=== Horizontal mode ===
=== Horizontal mode ===
Xfce4 is changable to landscape orientation. Depending on the device, this can increase usability.
Depending on the device, changing Xfce4 to landscape orientation can increase usability.
* Rotate the display and touch to horizontal using [https://wiki.postmarketos.org/wiki/Display Display] guide.
* Rotate the display and touch to horizontal using [[Display]] guide.
* In panel setting, change the mode to <code>Deskbar</code> and remove other plugins.
* In panel setting, change the mode to <code>Deskbar</code> and remove other plugins.
* Use [https://wiki.postmarketos.org/wiki/CoreApps CoreApps] as they work best on horizontal screens.
* Use [[CoreApps]] as they work best on horizontal screens.


=== Toggle wifi ===
=== Toggle wifi ===


A toggle wifi button can be created from an ampty launcher in the panel with command: <code>/bin/sh -c 'if [ "$(nmcli r wifi)" = "enabled" ]; then nmcli r wifi off; else nmcli r wifi on; fi'</code>.
A toggle wifi button can be created from an ampty launcher in the panel with command:
 
<code>/bin/sh -c 'if [ "$(nmcli r wifi)" = "enabled" ]; then nmcli r wifi off; else nmcli r wifi on; fi'</code>.


However, it's more comfortable to have a feedback whether you really hit the button or missed it. This can be achieved by e.g.:
However, it's more comfortable to have a feedback whether you really hit the button or missed it. This can be achieved by e.g.:
Line 77: Line 79:


== Shut down & Restart buttons ==
== Shut down & Restart buttons ==
In stable releses up to v21.06, the Shut down & Restart buttons in the Log out menu are not available. Package <code>polkit-elogind</code> needs to be installed ([https://wiki.alpinelinux.org/wiki/Xfce_Setup#Allowing_shut_down_and_reboot link]). On edge and later stable releses, this package is installed by default.
In stable releses up to v21.06, the Shut down & Restart buttons in the Log out menu are not available. Package <code>polkit-elogind</code> needs to be installed ([https://wiki.alpinelinux.org/wiki/Xfce_Setup#Allowing_shut_down_and_reboot wiki]). On edge and later stable releses, this package is installed by default.


== Lock screen ==
== Lock screen ==
Enabling a keyboard for the lockscreen is described at [[Screen_locker#xfce4-screensaver]].
How to enable a keyboard for the lockscreen is described at [[Screen_locker#xfce4-screensaver]].


To ease the locking, it can be assigned to e.g. the power button. Go to Settings -> Keyboard -> Application Shortcuts, select command xflock4 and hit the power button.
To ease the locking, it can be assigned to e.g. the power button. Go to Settings -> Keyboard -> Application Shortcuts, select command xflock4 and hit the power button.
Line 90: Line 92:


== Setting the timezone ==
== Setting the timezone ==
The timezone configuration in the panel clock settings don't work for some reason. Setting or changing the timezone can be done by e.g. <code>sudo setup-timezone -z Europe/Amsterdam</code>. Available timezones can be looked up at <code>ls /usr/share/zoneinfo</code>.
The timezone configuration in the panel clock settings doesn't work for some reason. Setting or changing the timezone can be done by e.g. <code>sudo setup-timezone -z Europe/Amsterdam</code>. Available timezones can be looked up at <code>ls /usr/share/zoneinfo</code>.


== Phone applications ==
== Phone applications ==

Revision as of 17:09, 13 August 2021

Nexus 5x running Xfce4
Nexus 5x running Xfce4
In postmarketOS
Package postmarketos-ui-xfce4
Status Available

Xfce4 is a GTK-based desktop environment aiming to be fast and lightweight. It works on most devices with a working display, and runs fine without hardware acceleration. Uses latest Xfce version packages from Alpine repository.

Installation

  • pmbootstrap init
  • User interface: xfce4
  • Extra packages: xf86-video-vesa mesa-egl

Note: As the on-screen keyboard is not displayed on demand automatically, it's best to add it to autostart.

Better (touch) usability

  • To hide the cursor, edit /etc/lightdm/lightdm.conf: uncomment xserver-command=X and add -nocursor.
  • Change the scaling settings to 2x in Applications/Settings/Appearance/Settings/Window Scaling setting.
  • In Window Manager settings, choose font size of about 16.
  • Disable Compositor from Window Manager Tweaks in settings to get faster experience.
  • In FileManager settings, shortcut pane icon size to 48 px and enable Single Click in Behavior section.
  • If you can't grap something by touchscreen, use the keyboard (tab key to go through the elements, arrow keys to choose).
  • If you want to simulate right mouse clicks, see Input_methods#Simulate_secondary_click, but actually this is not needed.

Panel

  • In Panel settings, increasing panel height and setting panels to hide Intelligently will make them easier to interact with, without losing effective screen real estate.
  • To save space on the panel, running programs can be represented as icons only: Settings -> Panel -> Items -> Windows Button -> Edit -> uncheck Show button labels.
  • Reduce the workspace switcher space by Settings -> Panel -> Items -> Workspace Switcher -> Edit -> Appearance: Buttons -> thereafter click the Workspace Settings below and rename the Workspace names to something shorter, e.g. 1, 2, 3, 4.
  • For shutdown and reboot, the Action Buttons plugin can be added to the panel. In their settings, Appearance can be set to Action Buttons and the list below allows to choose which ones shall be shown.
  • As menu plugin, Whisker Menu is set by default. The plugin Application Menu can be used as alternatively, depending on your taste.

Horizontal mode

Depending on the device, changing Xfce4 to landscape orientation can increase usability.

  • Rotate the display and touch to horizontal using Display guide.
  • In panel setting, change the mode to Deskbar and remove other plugins.
  • Use CoreApps as they work best on horizontal screens.

Toggle wifi

A toggle wifi button can be created from an ampty launcher in the panel with command:

/bin/sh -c 'if [ "$(nmcli r wifi)" = "enabled" ]; then nmcli r wifi off; else nmcli r wifi on; fi'.

However, it's more comfortable to have a feedback whether you really hit the button or missed it. This can be achieved by e.g.:

  • sudo apk add zenity
  • vi ~/toggle-wifi-zentiy.sh
#!/bin/sh

if [ "$(nmcli r wifi)" = "enabled" ]; then
  if zenity --question --title "" --text "Turn off wifi?" --no-wrap; then
    nmcli r wifi off
  fi
else
  if zenity --question --title "" --text "Turn on wifi?" --no-wrap; then
    nmcli r wifi on
  fi
fi
  • chmod +x ~/toggle-wifi-zenity.sh
  • Add an empty launcher to the panel and change it to e.g.:
    • Name: Toggle wifi
    • Comment: Turn on/off wifi
    • Command: /home/user/toggle-wifi-zentiy.sh
    • Icon: network-wireless

Firefox

  • To enable touch behaviour in Firefox, add a new file sudo vi /etc/profile.d/firefox-touch-scrolling.sh and write export MOZ_USE_XINPUT2=2.
  • In Firefox -> Menu -> More Tools -> Customize Toolbar, drag & drob doesn't work. However, with long click on items they can be added or removed.

Appearance

  • Panel transparency can be set in Settings -> Panel -> Appearance -> Style: Solid Color -> Color -> + -> choose a color, at the bottom the transparency level can be set (documentation).
    • If you want to clean up the set of custom colors, this can be done with gsettings. Get the selected color by gsettings get org.gtk.Settings.ColorChooser selected-color. To clean up the custom colors, paste the output as follows, e.g. gsettings set org.gtk.Settings.ColorChooser custom-colors "[(0.0, 0.0, 0.0, 0.69796610169491529)]". For the second command, when doing this via ssh, DISPLAY variable needs to be put at the beginning of the command, e.g. DISPLAY=:0.
  • The panel size can be changed in Settings -> Panel -> Row size (pixels).
  • Additional themes can be installed, e.g. package greybird-themes.
  • Also additional icons can be installed, e.g. arc-icon-theme, oxygen-icons, papirus-icon-theme, zafiro-icon-theme.

Shut down & Restart buttons

In stable releses up to v21.06, the Shut down & Restart buttons in the Log out menu are not available. Package polkit-elogind needs to be installed (wiki). On edge and later stable releses, this package is installed by default.

Lock screen

How to enable a keyboard for the lockscreen is described at Screen_locker#xfce4-screensaver.

To ease the locking, it can be assigned to e.g. the power button. Go to Settings -> Keyboard -> Application Shortcuts, select command xflock4 and hit the power button.

An example draft script to disable inputs while locked can be found at Screen_locker:Disable_inputs#Xfce4.

LightDM

Autologin is configured by default. If you want to use LightDM as a login screen, see Display_manager#LightDM how to set this up.

Setting the timezone

The timezone configuration in the panel clock settings doesn't work for some reason. Setting or changing the timezone can be done by e.g. sudo setup-timezone -z Europe/Amsterdam. Available timezones can be looked up at ls /usr/share/zoneinfo.

Phone applications

Packages calls, chatty and gnome-contacts, which are used in Phosh, work also on Xfce4.

The service modemmanager is not enabled by default. This is needed for modem handling. Start it by sudo rc-service modemmanager start and add it permanently by sudo rc-update add modemmanager default. The connections are managed by NetworkManager, a dialog to enter the PIN shows up after boot.

Additional software

  • gvfs and thunar-volman for mounting drives and drive management

Gallery