petres / gnome-shell-extension-services-systemd

Gnome Shell Extension that allows to start and stop systemd services
79 stars 18 forks source link

Autocomplete doest work on ubuntu 16.04 #14

Open RobbiNespu opened 7 years ago

RobbiNespu commented 7 years ago

Hai there, seem this extension are depend on new Gtk.EntryCompletion() for autocomplete systemd services list right? Sadly, apache2 and mysql does't included with bash-completion package. Should we just disable it? and let user type the service manually

petres commented 7 years ago

That's interesting, could you check if you can find these services via:

systemctl --system list-unit-files --type=service,timer
systemctl --system list-units --type=service,timer
RobbiNespu commented 7 years ago
$ systemctl --system list-unit-files --type=service,timer
UNIT FILE                                  STATE   
accounts-daemon.service                    enabled 
acpid.service                              disabled
alsa-restore.service                       static  
alsa-state.service                         static  
alsa-utils.service                         masked  
anacron-resume.service                     enabled 
anacron.service                            enabled 
apport-forward@.service                    static  
apt-daily.service                          static  
autovt@.service                            enabled 
avahi-daemon.service                       enabled 
binfmt-support.service                     enabled 
bluetooth.service                          enabled 
bootlogd.service                           masked  
bootlogs.service                           masked  
bootmisc.service                           masked  
brltty-udev.service                        static  
brltty.service                             enabled 
checkfs.service                            masked  
checkroot-bootclean.service                masked  
checkroot.service                          masked  
colord.service                             static  
console-getty.service                      disabled
console-setup.service                      static  
console-shell.service                      disabled
container-getty@.service                   static  
cron.service                               enabled 
cryptdisks-early.service                   masked  
cryptdisks.service                         masked  
cups-browsed.service                       enabled 
cups.service                               enabled 
dbus-org.bluez.service                     enabled 
dbus-org.freedesktop.Avahi.service         enabled 
dbus-org.freedesktop.hostname1.service     static  
dbus-org.freedesktop.locale1.service       static  
dbus-org.freedesktop.login1.service        static  
dbus-org.freedesktop.ModemManager1.service enabled 
dbus-org.freedesktop.network1.service      disabled
dbus-org.freedesktop.nm-dispatcher.service enabled 
dbus-org.freedesktop.resolve1.service      disabled
dbus-org.freedesktop.thermald.service      enabled 
dbus-org.freedesktop.timedate1.service     static  
dbus.service                               static  
debug-shell.service                        disabled
display-manager.service                    static  
emergency.service                          static  
failsafe-x.service                         static  
friendly-recovery.service                  enabled 
fuse.service                               masked  
fwupd-offline-update.service               static  
fwupd.service                              static  
fwupdate-cleanup.service                   static  
gdm.service                                static  
gdm3.service                               static  
geoclue.service                            static  
getty-static.service                       static  
getty@.service                             enabled 
gpu-manager.service                        enabled 
halt.service                               masked  
hostname.service                           masked  
hwclock.service                            masked  
ifup@.service                              static  
iio-sensor-proxy.service                   static  
initrd-cleanup.service                     static  
initrd-parse-etc.service                   static  
initrd-switch-root.service                 static  
initrd-udevadm-cleanup-db.service          static  
kerneloops.service                         disabled
keyboard-setup.service                     disabled
killprocs.service                          masked  
kmod-static-nodes.service                  static  
kmod.service                               static  
ModemManager.service                       enabled 
module-init-tools.service                  static  
motd.service                               masked  
mountall-bootclean.service                 masked  
mountall.service                           masked  
mountdevsubfs.service                      masked  
mountkernfs.service                        masked  
mountnfs-bootclean.service                 masked  
mountnfs.service                           masked  
network-manager.service                    enabled 
networking.service                         enabled 
NetworkManager-dispatcher.service          enabled 
NetworkManager-wait-online.service         enabled 
NetworkManager.service                     enabled 
php7.0-fpm.service                         disabled
plymouth-halt.service                      static  
plymouth-kexec.service                     static  
plymouth-log.service                       static  
plymouth-poweroff.service                  static  
plymouth-quit-wait.service                 static  
plymouth-quit.service                      static  
plymouth-read-write.service                static  
plymouth-reboot.service                    static  
plymouth-start.service                     static  
plymouth-switch-root.service               static  
plymouth.service                           static  
polkitd.service                            static  
pppd-dns.service                           enabled 
procps.service                             static  
quotaon.service                            static  
rc-local.service                           static  
rc.local.service                           static  
rc.service                                 masked  
rcS.service                                masked  
realmd.service                             static  
reboot.service                             masked  
rescue.service                             static  
resolvconf.service                         enabled 
rmnologin.service                          masked  
rsync.service                              disabled
rsyslog.service                            enabled 
rtkit-daemon.service                       disabled
saned.service                              masked  
saned@.service                             indirect
sendsigs.service                           masked  
serial-getty@.service                      disabled
setvtrgb.service                           static  
sigpwr-container-shutdown.service          static  
single.service                             masked  
snapd.boot-ok.service                      enabled 
snapd.firstboot.service                    enabled 
snapd.refresh.service                      static  
snapd.service                              enabled 
stop-bootlogd-single.service               masked  
stop-bootlogd.service                      masked  
syslog.service                             enabled 
systemd-ask-password-console.service       static  
systemd-ask-password-plymouth.service      static  
systemd-ask-password-wall.service          static  
systemd-backlight@.service                 static  
systemd-binfmt.service                     static  
systemd-bootchart.service                  disabled
systemd-bus-proxyd.service                 static  
systemd-exit.service                       static  
systemd-fsck-root.service                  static  
systemd-fsck@.service                      static  
systemd-fsckd.service                      static  
systemd-halt.service                       static  
systemd-hibernate-resume@.service          static  
systemd-hibernate.service                  static  
systemd-hostnamed.service                  static  
systemd-hwdb-update.service                static  
systemd-hybrid-sleep.service               static  
systemd-initctl.service                    static  
systemd-journal-flush.service              static  
systemd-journald.service                   static  
systemd-kexec.service                      static  
systemd-localed.service                    static  
systemd-logind.service                     static  
systemd-machine-id-commit.service          static  
systemd-modules-load.service               static  
systemd-networkd-resolvconf-update.service static  
systemd-networkd-wait-online.service       disabled
systemd-networkd.service                   disabled
systemd-poweroff.service                   static  
systemd-quotacheck.service                 static  
systemd-random-seed.service                static  
systemd-reboot.service                     static  
systemd-remount-fs.service                 static  
systemd-resolved.service                   disabled
systemd-rfkill.service                     static  
systemd-suspend.service                    static  
systemd-sysctl.service                     static  
systemd-timedated.service                  static  
systemd-timesyncd.service                  enabled 
systemd-tmpfiles-clean.service             static  
systemd-tmpfiles-setup-dev.service         static  
systemd-tmpfiles-setup.service             static  
systemd-udev-settle.service                static  
systemd-udev-trigger.service               static  
systemd-udevd.service                      static  
systemd-update-utmp-runlevel.service       static  
systemd-update-utmp.service                static  
systemd-user-sessions.service              static  
teamviewerd.service                        enabled 
thermald.service                           enabled 
udev-configure-printer@.service            static  
udev.service                               static  
udisks2.service                            disabled
ufw.service                                enabled 
umountfs.service                           masked  
umountnfs.service                          masked  
umountroot.service                         masked  
unattended-upgrades.service                enabled 
upower.service                             disabled
urandom.service                            static  
ureadahead-stop.service                    static  
ureadahead.service                         enabled 
usb_modeswitch@.service                    static  
usbmuxd.service                            static  
user@.service                              static  
uuidd.service                              indirect
wacom-inputattach@.service                 static  
whoopsie.service                           enabled 
wpa_supplicant.service                     disabled
x11-common.service                         masked  
apt-daily.timer                            enabled 
snapd.refresh.timer                        enabled 
systemd-tmpfiles-clean.timer               static  
ureadahead-stop.timer                      static  

202 unit files listed.
$ systemctl --system list-units --type=service,timer
UNIT                                                LOAD   ACTIVE SUB     DESCRIPTION
accounts-daemon.service                             loaded active running Accounts Service
acpid.service                                       loaded active running ACPI event daemon
alsa-restore.service                                loaded active exited  Save/Restore Sound Card State
apache2.service                                     loaded active running LSB: Apache2 web server
apparmor.service                                    loaded active exited  LSB: AppArmor initialization
apport.service                                      loaded active exited  LSB: automatic crash report generation
avahi-daemon.service                                loaded active running Avahi mDNS/DNS-SD Stack
binfmt-support.service                              loaded active exited  Enable support for additional executable binary formats
colord.service                                      loaded active running Manage, Install and Generate Color Profiles
console-setup.service                               loaded active exited  Set console font and keymap
cron.service                                        loaded active running Regular background program processing daemon
cups-browsed.service                                loaded active running Make remote CUPS printers available locally
dbus.service                                        loaded active running D-Bus System Message Bus
gdm.service                                         loaded active running GNOME Display Manager
geoclue.service                                     loaded active running Location Lookup Service
getty@tty1.service                                  loaded active running Getty on tty1
grub-common.service                                 loaded active exited  LSB: Record successful boot for GRUB
irqbalance.service                                  loaded active running LSB: daemon to balance interrupts for SMP systems
keyboard-setup.service                              loaded active exited  Set console keymap
kmod-static-nodes.service                           loaded active exited  Create list of required static device nodes for the current kernel
ModemManager.service                                loaded active running Modem Manager
mysql.service                                       loaded active running LSB: Start and stop the mysql database server daemon
networking.service                                  loaded active exited  Raise network interfaces
NetworkManager-wait-online.service                  loaded active exited  Network Manager Wait Online
NetworkManager.service                              loaded active running Network Manager
ondemand.service                                    loaded active exited  LSB: Set the CPU Frequency Scaling governor to "ondemand"
polkitd.service                                     loaded active running Authenticate and Authorize Users to Run Privileged Tasks
rc-local.service                                    loaded active exited  /etc/rc.local Compatibility
resolvconf.service                                  loaded active exited  Nameserver information manager
rsyslog.service                                     loaded active running System Logging Service
rtkit-daemon.service                                loaded active running RealtimeKit Scheduling Policy Service
setvtrgb.service                                    loaded active exited  Set console scheme
snapd.firstboot.service                             loaded active exited  Run snappy firstboot setup
snapd.service                                       loaded active running Snappy daemon
speech-dispatcher.service                           loaded active exited  LSB: Speech Dispatcher
systemd-backlight@backlight:intel_backlight.service loaded active exited  Load/Save Screen Backlight Brightness of backlight:intel_backlight
systemd-backlight@leds:dell::kbd_backlight.service  loaded active exited  Load/Save Screen Backlight Brightness of leds:dell::kbd_backlight
systemd-cryptsetup@cryptswap1.service               loaded active exited  Cryptography Setup for cryptswap1
systemd-journal-flush.service                       loaded active exited  Flush Journal to Persistent Storage
systemd-journald.service                            loaded active running Journal Service
systemd-logind.service                              loaded active running Login Service
systemd-modules-load.service                        loaded active exited  Load Kernel Modules
systemd-random-seed.service                         loaded active exited  Load/Save Random Seed
systemd-remount-fs.service                          loaded active exited  Remount Root and Kernel File Systems
systemd-sysctl.service                              loaded active exited  Apply Kernel Variables
systemd-timesyncd.service                           loaded active running Network Time Synchronization
systemd-tmpfiles-setup-dev.service                  loaded active exited  Create Static Device Nodes in /dev
systemd-tmpfiles-setup.service                      loaded active exited  Create Volatile Files and Directories
systemd-udev-trigger.service                        loaded active exited  udev Coldplug all Devices
systemd-udevd.service                               loaded active running udev Kernel Device Manager
systemd-update-utmp.service                         loaded active exited  Update UTMP about System Boot/Shutdown
systemd-user-sessions.service                       loaded active exited  Permit User Sessions
teamviewerd.service                                 loaded active running TeamViewer remote control daemon
thermald.service                                    loaded active running Thermal Daemon Service
udisks2.service                                     loaded active running Disk Manager
ufw.service                                         loaded active exited  Uncomplicated firewall
upower.service                                      loaded active running Daemon for power management
user@1000.service                                   loaded active running User Manager for UID 1000
user@121.service                                    loaded active running User Manager for UID 121
whoopsie.service                                    loaded active running crash report submission daemon
wpa_supplicant.service                              loaded active running WPA supplicant
apt-daily.timer                                     loaded active waiting Daily apt activities
snapd.refresh.timer                                 loaded active waiting Timer to automatically refresh installed snaps
systemd-tmpfiles-clean.timer                        loaded active waiting Daily Cleanup of Temporary Directories
ureadahead-stop.timer                               loaded active elapsed Stop ureadahead data collection 45s after completed startup

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

65 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
manuee commented 7 years ago

I took a look, and just wanted to let you know that the currently executed command on prefs.js, systemctl --system list-units --type=service | tail -n +2 | head -n -2 | awk '{print $1}' does list both mysql.service and apache2.service.

However, I entered global.log(this._getSystemdServicesList("system")); reloaded gnome shell and looked at my syslog, and apache2.service is not listed, so the problem seems to in the subsequent sorting and filtering that _getSystemdServicesList() does.