Recent

Author Topic: Follow on question - running a program as root  (Read 3813 times)

xircon

  • New Member
  • *
  • Posts: 25
Follow on question - running a program as root
« on: March 14, 2010, 09:47:10 am »
OK......
Code: [Select]
S := fpsystem ('/usr/lib/kde4/libexec/kdesu konsole');
works, but
Code: [Select]
S := fpsystem ('/usr/lib/kde4/libexec/kdesu konsole -e /home/steve/update');
doesn't.  It runs from a run box fine.

update script contains:
Code: [Select]
#!/bin/bash
clear && urpmi.update -a && urpmi --auto-select -v

Nearly 30 years since I last programmed in Pascal, it is not exactly flooding back %).

But its coming along:
(http://i367.photobucket.com/albums/oo118/xircon/rootutils1.png)
« Last Edit: March 14, 2010, 06:42:17 pm by xircon »

xircon

  • New Member
  • *
  • Posts: 25
Re: Follow on question - running a program as root
« Reply #1 on: March 14, 2010, 04:19:06 pm »
After a few hours of trial and (mainly) error:

Code: [Select]
S := fpsystem ('/usr/lib/kde4/libexec/kdesu '+'"konsole -e /home/steve/update"');
Works!! Kdesu requests password, Konsole opens and it runs the script.

 

TinyPortal © 2005-2018