Error while running `sudo bruno` to resolve access issues
I have checked the following:
- [X] I use the newest version of bruno.
- [X] I've searched existing issues and found nothing related to my issue.
Describe the bug
ved@vedasole:~$ sudo bruno
Preferences file is located at: /root/snap/bruno/50/.config/bruno/preferences.json
[138730:0901/201704.332944:ERROR:ozone_platform_x11.cc(245)] Missing X server or $DISPLAY
[138730:0901/201704.333014:ERROR:env.cc(258)] The platform failed to initialize. Exiting.
Segmentation fault
.bru file to reproduce the bug
No response
Screenshots/Live demo link
I don't think you are supposed to run any GUI application that is accessing x server as root. Maybe if you set DISPLAY=:0
But why do you have access issues with bruno ?
https://askubuntu.com/questions/164819/how-can-i-run-an-application-with-a-gui-as-admin-from-a-non-admin-user-session
i don't think this issue is a bruno one
The problem is if I don't run bruno with sudo then I get the below error while creating the collections :
Command : Open bruno directly from Ubuntu app menu
Error :
caError: EACCES: permission denied, mkdir '/run/user/1000/doc/e1553bdf/pdf-assistant/Demo Collection'
at Object.mkdirSync (node:fs:1372:26)
at createDirectory (/snap/bruno/50/resources/app.asar/src/utils/filesystem.js:123:13)
at /snap/bruno/50/resources/app.asar/src/ipc/collection.js:121:15
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:83270)
at WebContents.emit (node:events:519:28) {
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/run/user/1000/doc/e1553bdf/pdf-assistant/Demo Collection'
}
Error occurred in handler for 'renderer:create-collection': Error: EACCES: permission denied, mkdir '/run/user/1000/doc/e1553bdf/pdf-assistant/Demo Collection'
at Object.mkdirSync (node:fs:1372:26)
at createDirectory (/snap/bruno/50/resources/app.asar/src/utils/filesystem.js:123:13)
at /snap/bruno/50/resources/app.asar/src/ipc/collection.js:121:15
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:83270)
at WebContents.emit (node:events:519:28) {
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/run/user/1000/doc/e1553bdf/pdf-assistant/Demo Collection'
}
It is not having access to mounted drives
can you please suggest on the above issue?
The problem is if I don't run bruno with sudo then I get the below error while creating the collections : Command : sudo ./run-cli.sh download gpt2-medium
The command you reference - run-cli.sh - where does it come from and what does it do? Does it create files?
no, that's the wrong command. Please ignore it. Updated my comment
Your user cannot write in directories - presumably owned by root if you created them with sudo, there's really nothing more to it. Fix the permissions on the OS level, and never launch bruno (or any gui app really) with sudo.