Use sudo in linux command script in manjaro

use sudo in linux command script in mnajaro
i wrote a small script but was not able to open files from other harddrive partion
So wanted to change the script i tried sudo but i dont want to put pasword
I am using it for eagle program
#!/bin/bash
cd /home/swaraj/Downloads/eagle-9.6.2
echo “i am in eagle folder”

pwd
export LIBGL_ALWAYS_SOFTWARE=1
./eagle
sudo QT_XCB_GL_INTEGRATION=xcb_egl ./eagle

this is my program
feel free for tips and all
THANKS IN ADVANCE

First check if the sudo usage is really necessary.
Do not run graphical programs as root.

If you cannot open files from within that program - there probably is a permission issue.
Correct the permission issue and drop the sudo idea.

Hello raavan,
In the terminal, I was abe to change the environment variable without sudo.
[julius@Pinebook ~]$ QT_XCB_GL_INTEGRATION=xcb_egl
[julius@Pinebook ~]$

it seems to me that your file .eagle might not be executable.
try sudo chmod +x ~/Downloads/eagle-9.6.2/eagle in a terminal.
This will allow the user to execute the file.
Best Regards, Julius

I think we need to wait for your response on some of the things like above
But also to mention…

Aside from the sudo and things … this is also launching eagle twice … is there a reason for that?

just a debugging thing, I think

[quote=“julius-gu, post:3, topic:9360”]
sudo chmod +x ~/Downloads/eagle-9.6.2/eagle
[/quote] eagle is executable file when i run it gives me sandbox error
and the changes that u said didnt work

and i wanna ask whats wrong with manjaro forom i hate it

hello raavan,

could you please post the error that it gives you?

are you referring to the QT_XCB_GL_INTEGRATION=xcb_egl?

there was a problem with something like a botched update on their server and as a result the forum was in such a mess that they wanted to start from scratch. The forum team wanted to change a few things and as far as I know, the way the forum is at the moment is not final. I would recommend being patient.
note that you can still access the old stuff by putting archived. in from of the forum in the adress bar.

Best Regards, Julius

Sandboxing disabled by user.
inotify_add_watch("/home/swaraj/.local/share/Eagle/cloud-processing/3d-models-jobs-4DMSPZC3BY7B.json") failed: “No such file or directory”
[8666:8666:0100/000000.678937:ERROR:broker_posix.cc(41)] Invalid node channel message
Segmentation fault (core dumped)

this is the error that it through

hm, I don’t know how to fix this. :frowning:
Have you tried installing eagle from the AUR?

Dont know about ‘eagle’ itself … but that script is certainly broken.
(and you really dont want to be using sudo in your home)
And the complaint isnt about sandbox … thats just information.
The complaint is it cant find this file

So again … thats back to your script, how you installed/configured eagle, or eagle itself.