9

I am using i3wm desktop environment on Ubuntu 16.04 LTS. Everything was fine on Ubuntu 14.04 LTS. Now when I use unity-control-center I see only the following settings:

  1. Personal > Language Support
  2. Hardware > Printers
  3. System > Software & Updates

Where are the rest of the controls? I tried using the gnome-control-center. Still nothing better.

But if I use the Unity desktop environment everything works. I suppose, I need to run something before calling unity-control-center. What am I missing?

Please explain why this is happening.

George Udosen
  • 36,677
Inspired_Blue
  • 601
  • 2
  • 9
  • 26

3 Answers3

10

For Gnome Ubuntu:

Set $XDG_CURRENT_DESKTOP to GNOME and you're good to go:

XDG_CURRENT_DESKTOP=GNOME gnome-control-center

For Unity Ubuntu:

Set $XDG_CURRENT_DESKTOP to Unity and you're good to go:

XDG_CURRENT_DESKTOP=Unity unity-control-center
Gabriel Ziegler
  • 1,486
  • 2
  • 16
  • 23
CSaratakij
  • 116
  • 1
  • 3
  • Thanks. Would you also know how to make unity-control-center work? I tried XDG_CURRENT_DESKTOP=Unity. Didn't work. – Inspired_Blue Nov 07 '16 at 20:54
  • Interesting, And XDG_CURRENT_DESKTOP=Unity makes the unity-control-center work. Sorry I was trying with $XDG_CURRENT_DESKTOP. – Inspired_Blue Nov 07 '16 at 21:01
  • On Ubuntu 23.04 I'm not being able to open the gnome-control-center unless I set this XDG_CURRENT_DESKTOP variable. Awesome this still helped me! – morhook Aug 06 '23 at 23:35
4

I'll complement the answers above with an explanation to why this happens when you're using i3wm.

When you install and use i3 as your windows manager, i3 automatically sets the current desktop variable to i3. You can check it by doing:

echo $XDG_CURRENT_DESKTOP

Which returns i3

Ubuntu native programs do not work well if this environmental variable is set to a different value than Unity or Gnome depending on your Ubuntu distro.

To fix it you can simply set XDG_CURRENT_DESKTOP to your desktop environment.

On Gnome:

XDG_CURRENT_DESKTOP=GNOME; gnome-control-center

On Unity:

XDG_CURRENT_DESKTOP=Unity; unity-control-center
Gabriel Ziegler
  • 1,486
  • 2
  • 16
  • 23
0

In addition to following CSaratakij's answer, I had to install some packages I accidentally uninstalled:

sudo apt-get install ubuntu-desktop

You could also do (installs less packages):

sudo apt-get install unity-control-center

Source: Missing System Settings after removing some packages

unity-control-center still doesn't work for me, but gnome-control-center works fine.