How can I run these two commands on start up in ubuntu. I tried to put them in /etc/rc.local but that doesn't work or may be they run even before my wifi network is up and conneceted? Thanks for any help.
So it is a bash script. [Desktop Entry] Type=Application Exec=bash -c "~/grive" Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name[en_US]=Grive X-GNOME-Autostart-Delay=0 Copy this to gedit. Name it grive.desktop. Place it in the ~/.config/autostart folder. And reboot. The X-GNOME-Autostart-Delay entry is for how long you want your system to wait, in seconds, before the script is to execute. The 0 (zero seconds) means to start immediately. Change to whatever value you wish. I personally place my scripts in a hidden folder (~/.scripts) and execute them from there. Later... Bob
I don't use grive but it would interesting to know if the delay suggested by Trespasser works for you. When I run apt-cache show grive, the "depends" don't indicate that it's a gtk application. Code: Depends: libboost-filesystem1.54.0, libboost-program-options1.54.0, libboost-system1.54.0, libc6 (>= 2.14), libcurl3-gnutls (>= 7.16.2), libexpat1 (>= 2.0.1), libgcc1 (>= 1:4.1.1), libgcrypt11 (>= 1.5.1), libjson-c2 (>= 0.10), libstdc++6 (>= 4.4.0) I'm curious to know whether "X-GNOME-Autostart-..." will work in this case. In case it doesn't, couldn't one could launch grive using a script with a suitable "sleep" period?
I have some scripts that I delay 30 to 45 seconds (weather alerts and update checks) before they are executed just to be sure that an internet connection is established. Thus, X-GNOME-Autostart-Delay=30 or X-GNOME-Autostart-Delay=45. Later... Bob
@aigle The issue is that rc.local is for root tasks, whereas this is a limited user task. Take a look at the gnome-session-properties app instead, that provides a simple way to add stuff to your session.
I don't know much. There is no script. It is just a command to synh Gdrive and it will not work if I don't cd to the directory first.
aigle, Sorry. The photo you showed from your original post is the rc.local file. I should have picked up on it before now. #!/bin/bash grive exit 0 If you paste the above code to gedit...save it to your home folder as whatever to wish to name it...example grive-1...make it executable (from terminal type chmod +x grive-1), then... [Desktop Entry] Type=Application Exec=bash -c "~/grive-1" Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name[en_US]=Grive # change below value to whatever you wish X-GNOME-Autostart-Delay=0 followed by the steps I outlined earlier...it should work. Later... Bob
Ok, I followed it except that I changed to #!/bin/bash cd ~/grive grive exit 0 And yes it works!! Thanks a lot.