BreakingExpress

Configure a Linux workspace remotely from the command line

One of the issues I respect about Linux versus proprietary working methods is that nearly all the pieces may be managed and configured from the command line. That signifies that almost all the pieces may be configured domestically and even remotely by way of an SSH login connection. Sometimes it takes a little bit of time spent on Internet searches, however should you can consider a activity, it could actually most likely be completed from the command line.

The drawback

Sometimes it’s essential to make distant modifications to a desktop utilizing the command line. In this specific case, I wanted to cut back the variety of workspaces on the Xfce panel from 4 to 3 on the request of a distant consumer. This configuration solely required about 20 minutes of looking out on the Internet.

The default workspace depend and lots of different settings for xfwm4 may be discovered and adjusted within the /usr/share/xfwm4/defaults file. So setting workspace_count=four to workspace_count=2 modifications the default for all customers on the host. Also, the xfconf-query command may be run by non-root customers to question and set varied attributes for the xfwm4 window supervisor. It needs to be utilized by the consumer account that requires the change and never by root.

In the pattern beneath, I’ve first verified the present setting of 4 workspaces, then set the quantity to two, and eventually confirmed the brand new setting.

[consumer@test1 ~]# xfconf-query -c xfwm4 -p /common/workspace_count
four
[consumer@test1 ~]# xfconf-query -c xfwm4 -p /common/workspace_count -s 2
[consumer@test1 ~]# xfconf-query -c xfwm4 -p /common/workspace_count
2
[consumer@test1 ~]#

This change takes place instantly and is seen to the consumer and not using a reboot and even logging out and again in. I had a little bit of enjoyable with this on my workstation by watching the workspace switcher change as I entered instructions to set totally different numbers of workspaces. I get my amusements the place I can nowadays. 😉

More exploration

Now that I mounted the issue, I made a decision to discover the xfconf-query command in a bit extra element. Unfortunately, there are not any man or information pages for this instrument, neither is there any documentation in /usr/share. The regular fallback of utilizing the -h possibility resulted in little useful info.

$ xfconf-query -h
 Usage:
   xfconf-query [OPTION…] - Xfconf commandline utility
 Help Options:
   -h, --help            Show assist choices
 Application Options:
   -V, --version         Version info
   -c, --channel         The channel to question/modify
   -p, --property        The property to question/modify
   -s, --set             The new worth to set for the property
   -l, --list            List properties (or channels if -c will not be specified)
   -v, --verbose         Verbose output
   -n, --create          Create a brand new property if it doesn't exist already
   -t, --type            Specify the property worth kind
   -r, --reset           Reset property
   -R, --recursive       Recursive (use with -r)
   -a, --force-array     Force array even if just one ingredient
   -T, --toggle          Invert an current boolean property
   -m, --monitor         Monitor a channel for property modifications

This will not be numerous assist, however we are able to work out a superb bit from it anyway. First, channels are groupings of properties that may be modified. I made the change above to the common channel, and the property is workspace_count. Let’s have a look at the entire record of channels.

$ xfconf-query -l
Channels:
  xfwm4
  xfce4-keyboard-shortcuts
  xfce4-notifyd
  xsettings
  xfdashboard
  thunar
  parole
  xfce4-panel
  xfce4-appfinder
  xfce4-settings-editor
  xfce4-power-manager
  xfce4-session
  keyboards
  shows
  keyboard-layout
  ristretto
  xfcethemer
  xfce4-desktop
  pointers
  xfce4-settings-manager
  xfce4-mixer

The properties for a given channel can be seen utilizing the next syntax. I’ve used the much less pager as a result of the result’s an extended stream of knowledge. I’ve pruned the itemizing beneath however left sufficient to see the kind of entries you may look forward to finding.

$ xfconf-query -c xfwm4 -l | much less
/common/activate_action
/common/borderless_maximize
/common/box_move
/common/box_resize
/common/button_layout
/common/button_offset
<SNIP>
/common/workspace_count
/common/workspace_names
/common/wrap_cycle
/common/wrap_layout
/common/wrap_resistance
/common/wrap_windows
/common/wrap_workspaces
/common/zoom_desktop
(END)

You can discover all of the channels on this method. I found that the channels usually correspond to the assorted settings within the Settings Manager. The properties are those that you’d set in these dialogs. Note that not all of the icons you will see that within the Settings Manager dialog window are a part of the Xfce desktop, so there are not any corresponding channels for them. The Screensaver is one instance as a result of it’s a generic GNU screensaver and never distinctive to Xfce. The Settings Manager is only a good central place for Xfce to find many of those configuration instruments.

Documentation

As talked about beforehand, there don’t look like any man or information pages for the xconf-query command, and I discovered numerous incorrect and poorly documented info on the Internet. The finest documentation I discovered for Xfcefour is on the Xfce website, and a few particular info on xconf-query may be discovered right here.

Exit mobile version