![]() |
How to give permission to a script file inside a deb?
I'm making a theme packaged on deb.
The theme require to modify some files inside /usr/share/themes/base/meegotouch. It modifies succesfully those file s when i add the script to the posinst file BUT now i want to modify that files by a desktop icon that run an SH script that run commands like /sbin/initctl restart xsession/mthome or symlink inside /usr/share/themes/base/meegotouch/libmeegotouchhome/style but these ones doesn't work. I don't have permission? I tried chmod +x script.sh on the postinst but no luck Maybe the script should be placed in other folder? (now is in /opt/theme) |
Re: How to give permission to a script file inside a deb?
I guess you need to be root user so try run commands with sudo.
|
Re: How to give permission to a script file inside a deb?
but if you run commands in sudo the user must enter the password?
and why this script is working when is inside the postinst but not in the script.sh? |
Re: How to give permission to a script file inside a deb?
You need to put a file "myApp.sudoers" into /etc/sudoers.d/
with a content like Quote:
Then you may call the script with sudo without requiring a password. --edit This guide is only valid for normal debian based systems. For Harmattans cripped aegisfs there needs to be obeyed a few things more ... |
Re: How to give permission to a script file inside a deb?
sorry for be insisten but why this script is working when is inside the postinst but not in the script.sh?
|
Re: How to give permission to a script file inside a deb?
postinst is executed as root.
Did you try to run the script with sudo or as root? |
Re: How to give permission to a script file inside a deb?
So.. if i execute this: ln -s /opt/mytheme /usr/share/themes
With sudo would be: Code:
sudo ln -s /opt/mytheme usr/share/themes |
Re: How to give permission to a script file inside a deb?
Quote:
I tried to add sudo in the desktop icon too but nothing..:confused: Code:
[Desktop Entry] |
Re: How to give permission to a script file inside a deb?
Instead of guessing around: what exactly is not working? Which errors?
What is the content of your script? Forgot the shebang? Does the script work when executed as root? ??? |
Re: How to give permission to a script file inside a deb?
Sorry i forgot to answer that..
Yes is working manually via terminal with root |
Re: How to give permission to a script file inside a deb?
the content of my script remove files from themes/base folders and it replace them with symlinks
|
Re: How to give permission to a script file inside a deb?
Then it should work with hints given above ...
|
Re: How to give permission to a script file inside a deb?
but how to execute the script now, what i need to put before ?
sudo script.sh? devel-su script.sh? su script.sh? #sudo script.sh? |
Re: How to give permission to a script file inside a deb?
OK, you can do it like this..
1. Before packaging you need your_package.aegis file that include this: Code:
<aegis> Code:
[Desktop Entry] |
Re: How to give permission to a script file inside a deb?
where is should be placed in the package? your_package.aegis
that would be "packagename.aegis"? |
Re: How to give permission to a script file inside a deb?
yes "packagename.aegis"
P.S. I don't know how you package your .deb file, but I use this method: http://talk.maemo.org/showthread.php?t=86291 By what I wrote before I removed password prompt from N9QT. |
Re: How to give permission to a script file inside a deb?
but where it should be placed? inside the DEBIAN folder?
|
Re: How to give permission to a script file inside a deb?
No, in: your_packagename/debian
full path: Code:
/scratchbox/users/your_name/home/your_name/package_name/debian |
Re: How to give permission to a script file inside a deb?
P.S. Also add to the "rules" file:
Code:
chmod 4755 debian/your_packagename/opt/mytheme/changer/script.sh |
Re: How to give permission to a script file inside a deb?
thank you schturman, but im kind confused because i dont understand so much of this
i only package the folder to deb and do you mean debian folder inside the package? and the rules file must be inside debian folder too? |
Re: How to give permission to a script file inside a deb?
do you have scrstchbox installed ?
|
Re: How to give permission to a script file inside a deb?
Quote:
|
Re: How to give permission to a script file inside a deb?
@flotron. how you packaging to geb? you can use aegis-deb-add to inject aegis manifest ot existing deb package.
|
Re: How to give permission to a script file inside a deb?
A big SORRY from my side.
As soon as I stepped out and Schturmann stepped in, it was obvious that this imeant for N9. And all my guides of course only work for N900. Must have overread that in your first post. |
Re: How to give permission to a script file inside a deb?
Quote:
|
Re: How to give permission to a script file inside a deb?
Quote:
|
Re: How to give permission to a script file inside a deb?
Quote:
/home/user/MyDocs/makedeb.sh /home/user/mypackagefolder (inside folder: DEBIAN,opt,usr.. with control,postint,etc...) Code:
#!/bin/sh |
Re: How to give permission to a script file inside a deb?
Ok, thanks, but I meant to Coderus :)
I also want to learn how inject aegis manifest ot existing deb package :) |
Re: How to give permission to a script file inside a deb?
I tried yours Schturman (adding the aegis an rules files and modifyng the desktop file) but when i press the icon nothing happens.
The script only works in the postint or preinst, etc.. Not executing from icon |
Re: How to give permission to a script file inside a deb?
Packaging on n9 it's not really the same like packaging on the Linux pc via scratchbox. I don't know how to do it, we need to wait for Coderus that can explain how inject aegis manifest ot existing deb package.
Or another way, install scratchbox on Linux pc and i will try to help you crate this package.. |
Re: How to give permission to a script file inside a deb?
Quote:
|
Re: How to give permission to a script file inside a deb?
It's easy on ubuntu :)
|
Re: How to give permission to a script file inside a deb?
Inside the "data" folder should go the "opt" folder? or the data folder is the opt folder?
|
All times are GMT. The time now is 13:56. |
vBulletin® Version 3.8.8