#StackBounty: #16.04 #startup-applications #boot-time Startup Synergy (or any application) BEFORE logging in. Ubuntu 16.04.2

Bounty: 150

Using Ubuntu 16.04.2 (Xenial) on Intel x64:{Both Processor and Ubuntu install}

This question has been answered a million times, but none of the solutions work. So I don’t want to duplicate a question, but it hasn’t been answered…

When I fire up a terminal and sudo -i, the following command works just as expected…

root@user-pc:~# /usr/bin/synergyc -f --no-tray --debug INFO --name user-pc 192.168.xxx.xxx:24800
[2017-05-23T09:20:44] NOTE: started client
[2017-05-23T09:21:01] NOTE: connecting to '192.168.5.100': 192.168.5.100:24800
[2017-05-23T09:21:01] NOTE: connected to server

I am then able to utilize the program for it’s purpose. However, I want this to be done automatically BEFORE login so that I can utilize it’s purpose FROM the login screen. (Synergy allows you to use one keyboard and mouse across multiple computers, almost like a virtual KVM but instead of hitting switches, you just roll your mouse right onto the next screen as if they were all attached to one graphics card)

The first thing I tried was rc.local:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exec /usr/bin/synergyc -f --no-tray --debug INFO --name user-pc 192.168.5.100:24800

exit 0

~~~ls /etc/rc.local -l:

-rwxr-xr-x 1 root root 390 May 22 20:56 /etc/rc.local

So it’s definitely executable, but upon rebooting the PC:

~~~ps aux | grep syner:

root 990 0.0 0.0 63656 5372 ? Ssl 09:33 0:00 /usr/bin/synergyc -f --no-tray --debug INFO --name user-pc 192.168.5.100:24800

However it isn’t doing what it is supposed to, even unity dialogs are being called saying something went wrong, which only happens when this executes, so I can safely assume it’s that.

My safest assumption is that the program is being run just fine, the problem is that rc.local is run prior to the x session starting so any hooks to the keyboard and mouse are never established, which is also likely only done at the beginning of execution of synergyc and not attempted again beyond that point.

The second thing I tried was “Startup Applications”, it works, but not until after login, which is not what we want going on here.

If my assumption is correct:

What is a way to call execution of a process after the x server is up, but before any user has to login.

If my assumption is not correct:

Help


Get this bounty!!!

#StackBounty: #boot #16.04 #nvidia Extremely long boot after installing Nvidia drivers

Bounty: 50

I’m using Ubuntu 16.04 and after some time (I guess this started to happen after I updated Nvidia drivers) my computers began to boot very slowly. I tried to deactivate some unneeded services but it didn’t help.
I ran dmesg and I noticed some really large gaps. Here is the full log:
https://pastebin.com/d4EVfi8r

I hope someone will help me with this.

EDIT:

systemd-analyze blame | head

2min 16.363s docker.service
23.442s rabbitmq-server.service
16.774s grub-common.service
15.149s postgresql@9.5-main.service
13.691s dev-sda1.device
11.113s NetworkManager-wait-online.service
9.852s ModemManager.service
9.278s accounts-daemon.service
8.372s iio-sensor-proxy.service
8.176s apparmor.service

lspci -k | grep -iEA3 '3D|VGA'

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
    Subsystem: Acer Incorporated [ALI] 3rd Gen Core processor Graphics Controller
    Kernel driver in use: i915
    Kernel modules: i915
--
01:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 740M] (rev a1)
    Subsystem: Acer Incorporated [ALI] GK208M [GeForce GT 740M]
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_375_drm, nvidia_375

EDIT2:

After disabling some services, this is what systemd-analyze blame | head returns:

 13.900s dev-sda1.device
 12.040s NetworkManager-wait-online.service
 10.572s ModemManager.service
  9.424s accounts-daemon.service
  8.030s apparmor.service
  7.827s grub-common.service
  7.356s systemd-logind.service
  6.810s rsyslog.service
  6.769s avahi-daemon.service
  6.766s bluetooth.service


Get this bounty!!!

#StackBounty: #16.04 #mount #gparted #gnome-disk-utility gnome-disk-utility not showing all partitions after Ubuntu 16.04 clean-install

Bounty: 50

After a clean-install of 16.04 alongside W7 my shared partitions did not auto-mount at boot. I opened “disk” in launcher and surprisingly the partitions are not like shown in gparted (and in reality) and as a result I cannot tell the gnome-disk-utility to automount them.

  • gnome-disk-utility 3.18.3.1
  • UDisks 2.1.7 (compilato su 2.1.6)

  • df -h | grep -e '^/':
    /dev/sda7        66G  7,0G     56G  12% /
    /dev/sda3       218G  202G     16G  93% /mnt/224C7A834C7A5191
    /dev/sda5       269G  249G     20G  93% /media/mat/HDDati
    

"disk" output

gparted output

Any ideas?

EDIT:

sudo LC_MESSAGES=POSIX fdisk -l /dev/sda

Disk /dev/sda: 596,2 GiB, 640135028736 bytes, 1250263728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: xxbxxx7ae0

Device     Boot      Start        End   Sectors   Size Id Type
/dev/sda1             2048   31459327  31457280    15G 27 Hidden NTFS WinRE
/dev/sda2  *      31459328   31664127    204800   100M  7 HPFS/NTFS/exFAT
/dev/sda3         31664128  487419903 455755776 217,3G  7 HPFS/NTFS/exFAT
/dev/sda4        487421950 1250263039 762841090 363,8G  5 Extended
/dev/sda5        627788133 1190512889 562724757 268,3G  7 HPFS/NTFS/exFAT
/dev/sda6       1190516736 1250263039  59746304  28,5G 82 Linux swap / Solaris
/dev/sda7        487421952  627787775 140365824    67G 83 Linux

Partition 4 does not start on physical sector boundary.
Partition 5 does not start on physical sector boundary.
Partition table entries are not in disk order.

I solved the problem in some way some time after posting the question. It works now, but I don’t remember how I did it. This partition 4 and 5 boundary problem came out only now, though.


Get this bounty!!!

#StackBounty: #16.04 #zfs Why does my server stop when using ZFS?

Bounty: 50

top - 15:54:32 up 9 days, 49 min,  1 user,  load average: 38.23, 30.61, 25.64
Tasks: 1777 total,   8 running, 1769 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.1 us, 75.2 sy,  0.0 ni, 22.7 id,  1.9 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem : 32648604 total,   870392 free,  2642164 used, 29136048 buff/cache
KiB Swap: 16760828 total, 16552632 free,   208196 used. 18500956 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 1713 root      20   0       0      0      0 R  79.5  0.0   1439:34 txg_quiesce
 1714 root      20   0       0      0      0 D  62.0  0.0   1310:11 txg_sync

My server gets stuck like this for minutes at a time and no processes can do I/O with the ZFS filesystem. The load average goes from under 1.0 when this starts to over 80.0 by the time that it completes and returns to normal.

What can I do to stop this?


Get this bounty!!!