LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > ChromeOS
User Name
Password
ChromeOS This forum is for the discussion of ChromeOS.

Notices


Reply
  Search this Thread
Old 04-04-2024, 04:44 AM   #1
Bepp65T
LQ Newbie
 
Registered: Apr 2024
Location: Italy
Posts: 3

Rep: Reputation: 0
Question Linux Program doesn't run automatically from a script at reboot in ChromeOs


Hello.
First, I am a beginner in Linux and my english is not good.

I have a ChromeOS system with Debian GNU/Linux 12 (bookworm).
I've installed some Linux App like GIMP, Thunderbird, Deja-dup (for Backup), Abiword.... They normally wok fine.

Now, I can try to run automatically at reboot (from Linux) Deja-DUp (to backup my disks).

I've edit crontab and insert a line that invoke a script at @reboot option.
I've put echo instruction with labels in Crontab and in the script and I've seen both in internal mail.

But the program Deja-dup doesn't start. I've made a lot of attempts without success. I think because is not yet active the Linux graphic. Instead, if I run the script from terminal, the program Deja-dup start and run correctly...

I put sleep instructions in the script and in crontab to delay execution, without success.
I've also seen that $Display was "" instead of :0 at reboot execution. I've forced this value, but it doesn't work .

Below first the script and after the email reporting after the boot:

----------SCRIPT---------------
#!/bin/sh
sleep 15s
echo "Hello Beppe Start Shell"
echo "PATH"
PATH=/usr/bin:/bin:/usr/libexec/deja-dup
echo $PATH
DISPLAY=:0
echo "DISPLAY"
echo $DISPLAY
/usr/bin/deja-dup &
#!
#!deja-dup --backup
#!/usr/libexec/deja-dup/deja-dup-monitor &
#! wait
#!disown
#!
echo "Hello Beppe End Shell"
-------------------------
---EMAIL REPORTING-------
-------------------------
Delivery-date: Thu, 04 Apr 2024 11:16:21 +0200
Received: from bepp652 by penguin with local (Exim 4.96)
(envelope-from <bepp652@penguin>)
id 1rsJCn-0000DY-15
for bepp652@penguin;
Thu, 04 Apr 2024 11:16:21 +0200
From: root@penguin (Cron Daemon)
To: bepp652@penguin
Subject: Cron <bepp652@penguin> sleep 6 && /home/bepp652/reboot_beppe.sh
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/bepp652>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=bepp652>
Message-Id: <E1rsJCn-0000DY-15@penguin>
Date: Thu, 04 Apr 2024 11:16:21 +0200

Hello Beppe Start Shell
PATH
/usr/bin:/bin:/usr/libexec/deja-dup
DISPLAY
:0
Hello Beppe End Shell
?

----------------

Sometimes I also have the error: (org.gnome.DejaDup:1129): Gtk-WARNING **: 12:52:27.166: cannot open display:

I've also try to create /etc/rc.local and run deja-dup from this file, but it doesnt' work.
Finally I've tried to create org.gnome.DejaDup.desktop in folder /home/bepp662/.config/autostart, but without success...

Both, rc.local and folder autostart, weren't present on my system and so I've created both, but probably my system doesn't work with these 2 options....

Ah... I've also tried to run Abiword at reboot... same results

Have you any ideas how to run deja-dup at reboot?

Thank you in advance.
Best regards.
Beppe
 
Old 04-09-2024, 06:08 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,863

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
Quite good progress, almost there.
crontab has no right to start GUI apps, therefore it could not succeed.
You have gnome, so probably this will be helpful: https://help.gnome.org/users/gnome-h...-start.html.en
 
Old 04-12-2024, 10:41 AM   #3
Bepp65T
LQ Newbie
 
Registered: Apr 2024
Location: Italy
Posts: 3

Original Poster
Rep: Reputation: 0
Hi.
thanks a lot for your help.
I've installed gnome-tweaks (it wasn't on my system), but run with some errors:
<..
WARNING : Error getting shell mode
CRITICAL: Error getting shell version
WARNING : Could not list shell extensions
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gtweak/tweaks/tweak_group_appearance.py", line 144, in __init__
extensions = self._shell.list_extensions()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gtweak/gshellwrapper.py", line 76, in list_extensions
return self._proxy.proxy_extensions.ListExtensions()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gi/overrides/Gio.py", line 349, in __call__
result = self.dbus_proxy.call_sync(self.method_name, arg_variant,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-dbus-error-quark: GDBus.Errorrg.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Shell was not provided by any .service files (2) ()

..>>

and I've used Autostart function, but it doesn't work at reboot.. Probably for errors...

I've attached also the process list active in Linux if you want to see... (I've run deja-dup from Chrome_OS, but it is the same situation if I run deja-dup from my script in terminal)

I think that it is impossible to run deja-dup or any aother graphic linux app at reboot with Linux ChromeOS due to graphic is not present at the time....

Thank you.
Attached Thumbnails
Click image for larger version

Name:	Linux Process in Chrome_OS.png
Views:	4
Size:	153.7 KB
ID:	42689  

Last edited by Bepp65T; 04-12-2024 at 10:45 AM.
 
Old 04-16-2024, 09:31 PM   #4
murugesandins
Member
 
Registered: Apr 2024
Location: Bangalore Karnataka India
Distribution: CYGWIN_NT
Posts: 46

Rep: Reputation: 0
I don't have Linux OS here.
Can you retest the same using:
Code:
#!/bin/sh
/usr/bin/sleep 15s
echo "Hello Beppe Start Shell"
echo "PATH"
export PATH=/usr/bin:/bin:/usr/libexec/deja-dup
echo $PATH
export DISPLAY=:0
echo "DISPLAY"
echo $DISPLAY
/usr/bin/deja-dup &
#!
#!deja-dup --backup
#!/usr/libexec/deja-dup/deja-dup-monitor &
#! wait
#!disown
#!
echo "Hello Beppe End Shell"
 
Old 04-16-2024, 10:05 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,714

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
deja-dup uses its deja-dup-monitor which should run automatically for scheduled backups so starting the GUI program is not necessary. If you look at the process list you posted it is running.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: You Can Now Run Windows Apps on Chromebooks with ChromeOS, Thanks to CrossOver LXer Syndicated Linux News 0 11-08-2017 05:09 AM
Shutdown doesn't fully shut down, reboot doesn't reboot Timothy Miller Arch 7 10-26-2016 09:57 AM
LXer: Run ChromeOS with a Hint of Lime: ChromiumOS Lime Builds (Finally) Available LXer Syndicated Linux News 0 12-07-2011 08:30 AM

LinuxQuestions.org > Forums > Other *NIX Forums > ChromeOS

All times are GMT -5. The time now is 06:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration