Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Messages - Benaal

Pages: [1]
General Help & Advice / Re: running own C file in crontab
« on: May 07, 2014, 07:44:06 pm »
I have found out that the executable is actually running as it opens up libreoffice. However, the 'libreoffice', 'sh', and 'oosplash' tasks are present in the task manager, but not doing anything.

This is quite frustrating. If I run the same command from terminal, it works fine. If I do it from Cron, it loads libreoffice, but not the GUI.

General Help & Advice / Re: running own C file in crontab
« on: May 06, 2014, 04:56:10 pm »
If I run the executable directly without exec command, I get blank line syndrome in the terminal (ie. the cursor drops down to the next line, but no prompt and no matter what you type, enter is just a carriage return. Nothing loads)

I will try to bash the command in the cron job tonight, and see if that works. What does the -c argument do exactly?



General Help & Advice / Re: running own C file in crontab
« on: May 06, 2014, 09:38:56 am »
I run as root:

exec /home/programs/runupdate

Looking a it in depth last night, I was wondering if it might actually be running the executable fine, but not able to run the system() command.

The command I am trying to run from within the executable is "/usr/lib/programs/libreoffice/soffice.bin --show /home/pres/Week3.odp"
The reason it's in an executable is, it needs to calculate the week number of the presentation to open before it sends the command.
The exec command runs the executable and loads the presentation fine, but even when I run that command as a shell script in cron, it doesn't work.

Is there a limit as to the functionality of cron, whereby I can't load libreoffice Impress as part of a cron job?

General Help & Advice / Re: running own C file in crontab
« on: May 06, 2014, 06:57:01 am »

yes, running the executable with exec command works fine.

The syslog shows the cron firing exactly when it should.

The system is Raspbian wheezy on ARM6 architecture (Raspberry Pi)

General Help & Advice / running own C file in crontab
« on: May 05, 2014, 09:35:31 pm »
Hi all,

again, top line apologies for noobish questions.

I have taken up programming C, in linux, and have written a C file that basically does some calculations then runs a system(); command to open a file through shellscript.

I have used GCC to compile update.c -o ./runupdate

I have also set up a cron job /10 * * * * bash -c "/home/programs/runupdate"

However, the cron job fires with no output from the executable. I think I might be missing something in the way cron is executing the file?

Advice would be much appreciated. Thanks.

Hi Mark,

Thanks for the quick response. As I said, i've only just started looking into Linux so apologies for my n00b-isms and misplaced terminology when it crops up.

I understand the basics about aptitude reaching out to a server to update the package list, and then update all of the packages installed on that machine (I think, anyway).
My high level hopes were that I could create a repository on my ubuntu server, containing a package for each work area. I would then apt-get install the relevant work area on each pi. My understanding was then that I would run a cron job to update the repository ever 24 hours or so and restart the presentation with the new slides.

I've never seen rsync before, so I will go RTFM on that and inotify, as that seems to be a sensible option (push rather than pull).

Again, thanks for the welcome!


Hi all,

Been working with Linux for about a month now - Got my Pi a couple of weeks back and have just about got the hang ofit. I'm now looking to expand the application of the Pi into the business world.

As a brief introduction, our plant has 24 work areas, working 24 hours a day, 365 days a year. Each work area has its' own budget and KPIs.

At present, I construct 24 PPT Presentations, containing KPI Graphs and information - Then save them down as JPG images. Then, because our contractor-managed network utilises symantec endpoint encryption to automatically encrypt anything being saved to USB, Ihave to virtualise Ubuntu, connect to a network share on the host, connect the USB device through Virtualbox, and save to USB stick - Then I have to go round each TV and plug the USB sticks back into the TVs and set the presentation running. It pretty much takes up my entire day.

What I would like to do is run a Pi on each TV, and on each Pi have a cron which initiates a shell script. This shell script, in my mind, would then stop any presentations ongoing, look to my own Ubuntu server on the same network, update it's own apt repository (download the latest slides), then run libreoffice --show /home/slide/slides.odp

Am I thinking along the right lines?

Pages: [1]

SimplePortal 2.3.3 © 2008-2010, SimplePortal