![]() Registered Member ![]()
|
Dear all,
I have written a small application "simpleAddOn" to install packages in Linux mainly for the newbie users.
multimedia.sh
If I run the GUI application from terminal in Kubuntu 9.04 ./simpleAddOn then it run the script and install packages without any problem. but if I open the GUI by clicking on simpleAddOn then it did not run the script. Any other idea of installing packages or hints ? Screenshots: http://picasaweb.google.com/lh/photo/hR ... directlink I have written similar app for Ubuntu 0.04 in GTK working fine for both cases.
|
![]() Administrator ![]()
|
Qt/KDE applications should use QProcess to execute external applications.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() KDE Developer ![]()
|
Check the environment.
An interactive shell in the terminal can have a different environment than the shell running the startkde script. Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
![]() Registered Member ![]()
|
Check this entry because could be useful for you:
currentpath-doesnt ... l#pid77360 As I can see you use relative path when you really don't know where you are. As I write in the other post is not a good idea.
Ignacio Serantes, proud to be a member of KDE forums since 2008-Nov.
|
![]() Registered Member ![]()
|
I have tried with QProcess::execute. I am already using QThread one for progress bar and another for installing.
also tried with QProcess::startDetached( QString ) Same problem it is okey from shell but if I click, GUI appears but unable to install packages. (I have also checked the file permission). Is there anyway to call dpkg -i deb/internet/*.deb ? What kpackagekit or other installer software use to install ? |
![]() Administrator ![]()
|
You should probably call KDESudo with the full path to the shell script, not one dependent on your current directory.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Yes I have checked that but still same problem.
Now I am trying to figure our how other KDE package manager install packages. |
![]() Registered Member ![]()
|
At last it worked with system() function with full path thanks to @bcooksley
//run_result = system("kdesudo -c 'dpkg -i /home/salahuddin/deb/internet/*.deb'");
But it did not worked for me
kpPty.h in Kpackage
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]