How to start Viber on system boot?
I cannot make Viber to start on system boot. In the Viber settings I've checked: Start Viber on system startup. This seems to have added entry in the start up applications with command: viber. However such command does not exist. Tried to locate the installation with command whereis, but...
yasen@yasen-TECRA-Z50-A:~$ whereis viber
viber: /usr/share/viber
yasen@yasen-TECRA-Z50-A:/usr/share/viber$ ll
total 52
drwxr-xr-x 2 root root 4096 Nov 13 23:03 ./
drwxr-xr-x 327 root root 12288 Dec 6 19:00 ../
-rw-r--r-- 1 root root 3957 Oct 31 2013 128x128.png
-rw-r--r-- 1 root root 547 Oct 31 2013 16x16.png
-rw-r--r-- 1 root root 867 Oct 31 2013 24x24.png
-rw-r--r-- 1 root root 8001 Oct 31 2013 256x256.png
-rw-r--r-- 1 root root 1091 Oct 31 2013 32x32.png
-rw-r--r-- 1 root root 1573 Oct 31 2013 48x48.png
-rw-r--r-- 1 root root 2043 Oct 31 2013 64x64.png
-rw-r--r-- 1 root root 2961 Oct 31 2013 96x96.png
Go to startup applications -
Click on the Add button -
and fill out the fields in the following manner -
Name: Viber
Command: /opt/viber/Viber
Comment: Connect. Freely.
Alternatively, you can create a symbolic link between the .desktop
file created by the method suggested by αғsнιη and /etc/xdg/autostart/ -
sudo ln -s /path/to/Viber.desktop /etc/xdg/autostart/
GUI method:
You can achieve what you want by going to the Startup Application Preferences from dash and create a NEW startup item. Just click on the Add button, which brings up an input dialog. In that dialog, you specify a name to call it, an optional comment blurb, and the command to execute(will be /opt/viber/Viber
), which would be the path of Viber. When you're done, a new NAME.desktop
file will appear in ~/.config/autostart
.
CLI method:
or you can create that .desktop file by your hand. (Advanced users using this method)
Create a Viber.desktop
file in ~/.config/autostart/
and copy&paste the the following content in it and save.
[Desktop Entry]
Type=Application
Exec=/opt/viber/Viber
Hidden=false
Name=Viber
X-GNOME-Autostart-enabled=true
You can create/edit Viber.desktop
file by gedit ~/.config/autostart/Viber.desktop
in Terminal.
Done. Logoff and login back to see the changes.
As documentation Desktop Entry Specification, the Startup Applications are .desktop
files stored per-user in:
~/.config/autostart
And also globally, for all users, in:
/etc/xdg/autostart
(Note that in KDE it's stored in ~/.kde/Autostart
directory.)
The enable/disable feature is provided by this attribute in each .desktop
file:
X-GNOME-Autostart-enabled=true (or false)
If a user toggles enable/disable status of a given application (without deleting it) that was in the system folder, it is copied to the user directory and then the attribute X-GNOME-Autostart-enabled
is changed. If a user deletes a given application from the list, the .desktop is copied to user folder with the Hidden=true
attribute (or the file is simply deleted if it was present just in the user directory)