How to start Viber on system boot?

Go to startup applications -

enter image description here

Click on the Add button -

enter image description here

and fill out the fields in the following manner -

enter image description here

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)

Tags:

Startup

Viber