Senin, 18 September 2017

Lubuntu 17.04 - File rc.local Tidak Ada (Autostart VM Virtualbox)


UNDER CONSTRUCTION

UNDER CONSTRUCTION

UNDER CONSTRUCTION

UNDER CONSTRUCTION

UNDER CONSTRUCTION

UNDER CONSTRUCTION

UNDER CONSTRUCTION

UNDER CONSTRUCTION








Buat (Create) File rc.local :



it817@it817-System-Product-Name:~$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="17.04 (Zesty Zapus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 17.04"
VERSION_ID="17.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=zesty
UBUNTU_CODENAME=zesty
dddddd


it817@it817-System-Product-Name:~$ sudo pico /etc/systemd/system/rc-local.service
it817@it817-System-Product-Name:~$ cat /etc/systemd/system/rc-local.service 
=================================== 
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target
===================================
 
it817@it817-System-Product-Name:~$ sudo touch /etc/rc.local
it817@it817-System-Product-Name:~$ sudo chmod +x /etc/rc.local
it817@it817-System-Product-Name:~$ sudo pico /etc/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.

exit 0
===================================
 
it817@it817-System-Product-Name:~$ sudo systemctl enable rc-local
Created symlink /etc/systemd/system/multi-user.target.wants/rc-local.service → /etc/systemd/system/rc-local.service.
it817@it817-System-Product-Name:~$ sudo systemctl start rc-local.service 
it817@it817-System-Product-Name:~$ sudo systemctl status rc-local.service 
● rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/etc/systemd/system/rc-local.service; enabled; vendor preset:
  Drop-In: /lib/systemd/system/rc-local.service.d
           └─debian.conf
   Active: active (exited) since Mon 2017-09-18 10:22:13 WIB; 9s ago
  Process: 4269 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)

Sep 18 10:22:13 it817-System-Product-Name systemd[1]: Starting /etc/rc.local Com
Sep 18 10:22:13 it817-System-Product-Name systemd[1]: Started /etc/rc.local Comp

ddddddddd
eeeeeee



it817@it817-System-Product-Name:~$ VBoxManage list vms
"Ubuntu-14.04-x64" {4e9f52b9-a023-4a50-b0e0-b885fb7e2528}
it817@it817-System-Product-Name:~$ sudo pico /etc/rc.local 
it817@it817-System-Product-Name:~$ cat /etc/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.

su it817 -c "VBoxHeadless -startvm 'Ubuntu-14.04-x64' &"

exit 0
=========================================================
 
it817@it817-System-Product-Name:~$ sudo systemctl status rc-local.service
● rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/etc/systemd/system/rc-local.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/rc-local.service.d
           └─debian.conf
   Active: active (exited) since Mon 2017-09-18 10:22:13 WIB; 36min ago
  Process: 4269 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)

Sep 18 10:22:13 it817-System-Product-Name systemd[1]: Starting /etc/rc.local Compatibility...
Sep 18 10:22:13 it817-System-Product-Name systemd[1]: Started /etc/rc.local Compatibility.


Tidak ada komentar:

Posting Komentar