Comments (5)
Hi @radim-ek , thanks for the feedback. I am not too familiar with bash scripting. I am thinking if there are any better ways to do it other than including apt-get install sudo into the installer script.
You got any recommended way for me to improve it?
from arozos.
Those lines are for the systemd service. You can create this yourself easily. Run the installscript and ignore the warnings. Now run create a new service file as root:
nano /etc/systemd/system/arozos.service
Put in these lines to run arozos:
[Unit]
Description=ArozOS Cloud Service
After=systemd-networkd-wait-online.service
Wants=systemd-networkd-wait-online.service
[Service]
Type=simple
ExecStartPre=/bin/sleep 10
WorkingDirectory=/home/${CURRENT_USER}/arozos/
ExecStart=/bin/bash /home/${CURRENT_USER}/arozos/start.sh
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
Now (still as root) start Arozos with:
systemctl enable --now arozos.service
You can check the status with:
systemctl status arozos.service
from arozos.
@tobychui A highly portable drop-in replacement for using sudo (if you really need root) is:
su - root -c "yourcommand"
Explanation:
su
- switch user, the most absolutely basic way to be a different user on a Unix based OS-
- Start a login shellroot
- The user we want to run our thing as-c
- Flag to run a command under the specific user in the login shell we opened
Note: it's still possible for this to not work if the system you're running on doesn't have root access at all, like some weird ARM stuff (which is I think the target for a lot of this project). But that's probably outside the scope of troubleshooting and if someone runs into that issue, they need to root their device.
Also, it's generally better practice to use sudo
than su
since you can't enforce granular permissions via sudoers
in su
the way you can via sudo
. Best practice, however, is to not require root.
from arozos.
@neonspectra Thanks for the tips.
In fact ArozOS can work without root, but if that is the case, it pretty much just serve as a web desktop interface like other front-end only projects. To run arozos without root, just download the web.tar.gz and the executable into any folder and run it with ./arozos
.
Root access is required for disk management (SMART / disk mounting), WiFi utilities and more to make ArozOS useful so to say. Though, making the installer sudo
optional is not a high priority task so I just leave this here for now. As usual, PRs are welcomed!
from arozos.
Closing issue as the fixes has been merged
from arozos.
Related Issues (20)
- [BUG] illegal operation HOT 2
- [BUG] error 404 Page not found.... HOT 4
- Ukrainian and Russian translations?
- adding .exe subprocess on windows host HOT 3
- SSL TLS issue HOT 7
- [BUG] Function redeclaration errors when compiling from source HOT 5
- [Optimization] Web URL + Folder Shortcuts in Mobile View Launcher Bar
- [BUG] WebDav causes system crash when uploading pictures(memory overflow) HOT 3
- [BUG]problem when accessing nextcloud(hetzner storage share) webdav HOT 4
- [BUG]launcher not working on raspberry pi zero HOT 1
- [Optimization]install.sh file needs edits to run on raspberry pi zero HOT 4
- The iPhone safari browser cannot upload images HOT 5
- The zip file cannot be installed/zip文件无法安装 HOT 4
- [BUG] Not able to login when included in other webservice, logs says login is accepted. HOT 9
- [Feature request] Open URL Shortcut in new tab HOT 1
- [BUG]在文件管理中排列文件顺序 HOT 2
- video如何更改默认的视频文件夹 HOT 2
- 可以实现,将video的视频分享出去吗 HOT 7
- web下载如何使用 HOT 7
- SMB远程访问 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arozos.