0
Robert LabTeam

Application autostart does not work

Recommended Posts

Hi guys,
I am trying to make autostart of my app, but the app is launched by bash script that automatically launch the app again when crashed:
(it finds the latest application version and then launch...then it is waiting for crash , rerun and wait again) - when I placed this script in /etc/profile.d, my system got stuck on my application view without loading desktop (and other needed services).

#!/bin/bash
sleep 30
while true
do
str=`ls /home/lufa/Shared/QT/xxxx* | sort -n -t _ -k 2 | tail -n1`
if [ ! `pgrep $str` ] ; then
$str
fi
sleep 30
done

Thus, I  added autostart.sh.desktop file in ~/.config/autostart/  like this:
 

[Desktop Entry]
Type=Application
Name=Autostart
Exec="/home/lufa/Shared/autostart.sh"
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true


Unfortunately my app was not automatically launched :( Any ideas?

I assume that the progblem is GUI app. I got from crontab  log -  "QXcbConnection: Could not connect to display" - despiting I put "sleep 30" in my bash screipt to wait for ready Desktop.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0