-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My saga installing Krita #466
Comments
I'm on Debian Testing, I use BASH |
I've thested this also with AM instead of AppMan, using the option --debug
I only had the output of "wget" and a error about "mv" that have not found the .desktop file in one of the places the script searches for... but the installation is correct as well |
the download of krita during the installation is pretty slow... I think there is something on their website that made it slow, I've seen this also with inkscape until yesterday |
It wasn't slow on my end. It downloaded in like 30 seconds. |
I've installed it 3-4 times with both am and appman and sometime the download was 8 MB/s .... sometime 500 KB/s Always starts slow, then it decides to run fast or slow. This is the disadvantage of downloading from the upstream developer's site sometime... I'm italian, and the slower ones come from China and Japan. |
@MauricioLucas keep me updated if something is changed. |
"I've always updated using 'am -u,' and after reading your response, I also used 'am -s,' and this was the output that appeared in the terminal. lucas@Duvale:~$ am -s
-----------------------------------------------------------------------
Check for any changes between the installation scripts
in the repository and those used previously...
/opt/am/.cache/0ad-latest: Permission denied
cat: /opt/am/.cache/0ad-latest: File or directory not found
The installer of 0ad-latest has been changed!
See https://github.com/ivan-hc/AM-Application-Manager/blob/main/programs/x86_64/0ad-latest
/opt/am/.cache/bforartists: Permission denied
cat: /opt/am/.cache/bforartists: File or directory not found
The installer of bforartists has been changed!
See https://github.com/ivan-hc/AM-Application-Manager/blob/main/programs/x86_64/bforartists
... (similar messages for other applications) ...
-----------------------------------------------------------------------
SYNCHRONIZING "AM" VERSION 5.3-3...
mv: cannot get status of '/opt/am/.cache/APP-MANAGER': File or directory not found
THE "AM" SCRIPT IS NOW UPDATED TO VERSION 5.3-3!
That's when I realized that at some point, the AM stopped updating because it's already at version 6.6.2. It was an oversight on my part not to have checked that before reporting the error. |
Yes, I've been using Krita for a long time, and I have 'libfuse2' because many programs use this library. It's a standard part of Linux Mint. lucas@Duvale:~$ sudo apt install libfuse2
libfuse2 is already the newest version (2.9.9-5ubuntu3).
0 upgraded, 0 newly installed, 0 to remove." |
This was an error in the message editing, when you copy text from the terminal using Ctrl+C it does that. Don't worry, I used the command line correctly. For some reason that I haven't identified, using the installation command doesn't overwrite the files from the previous installation. |
I don't really understand why you have messages like this:
you should have privileges as normal user in /opt/am (no have you installed it using the root shell or something? All these problems are definitelly related to the fact that you have no permissions in /opt/am, and this is strange. |
in the INSTALL script there is a command
this allows "currentuser" (i.e. you) to have privileges in that directory. I can only explain this as an attempt to install it without " Have you got the same issue using AppMan? https://github.com/ivan-hc/AppMan |
After many attempts, I discovered the cause of the problem. I have two other users with sudo permission, and I updated and installed other programs through them. After consolidating everything into just one user:group, I still didn't succeed using the commands, and AM remained outdated. So, I manually removed AM, and 'almost' everything went well, but some errors persist. I'll take a break, and after resolving them, I'll come back to generate a report. |
...enable RW permissions for all users (multi-account) See #466
I've done tests on a VM by adding two accounts and worked, all I had to do is to remove "currentuser" reverences in the INSTALL script an the install.am module. Since next release you and other users of the same machine will be able to update the AM and all apps, and (if "SUDO" users) also to install the apps. The installation process will give you and other users all needed permissions to /opt/am |
sorry, I've just noticed that not all permissions are allowed on this release. I was able to add files but not to remove them. I was betrayed by some menus on my UI. There is still some work to do. I'm really sorry. |
I'd like to add permissions to multiple users... but for security reasons, it seems to be more secure not to allow different users to use AM and suggest AppMan instead. I was working on a function to add to the CLI
|
@Samueru-sama @MauricioLucas what about adding a warning like this?
|
I'm not good in manage permission like this, in my attempt of yesterday evening I've tried with
but I was unable to run simple commands, also on installed apps. I really need help here. |
...this works for multi-accuont configurations. "AM" will be used only by the system administrator (or rather, the one who installed it the first time) and the "root" user. Non-privileged users will be advised to contact the owner of the /opt/am directory to change permissions, or at least use "AppMan" as an alternative. This should fix the problems found here: #466 starting with this minor release.
@MauricioLucas this is all I can do, sorry it wasn't exactly what I wanted to do with "AM", but I think for system security reasons it's the best choice to make. The use of AM and the administration of its installed apps will only be enabled for the user who installed "AM" the first time. Non-privileged users using the same system will be advised to ask the administrator to change ownership of /opt/am, or at least be advised to use "AppMan" as alternatives. The use of apps installed with "AM" will be open to everyone, but their updating or any modifications... but also the consultation of the lists... will be entirely at the discretion of the owner of /opt/am or the "root" user ". Is this a good choice for you? |
I want to add that I can't make the script for the pre-alpha version of krita because the website says that nightly builds are down. |
@Samueru-sama I'd like to have your opinion too about #477 |
its a mess, I cannot figure out how to solve |
I have to add a main administrator, I should reintroduce "$currentuser" |
its too much work to do here,when I fix a permission I have issues on another |
I think I'll left AM as an open client for all users, as I've said at #466 (comment) , but updates and permissions on applications will be allowed only for "sudo" users #466 (comment) |
All these changes are a total failure... also updating all modules, by resetting everything at the "working" comit above, with all screenshots, gave errors. Its enough. I've nothing to do bus disable the usage of AM by other users other than the main one. |
Believe me, I've tried in every way, and even the most seemingly feasible solution ended up not succeeding without a hitch. The only possible and logical solution is to allow a single system administrator to be able to manage "AM" in all ways. This is also because more system administrators would risk not to be able to have the necessary privileges, for example, to update the CLI to the latest version. You might as well prevent the use of the CLI by users other than the one who installed "AM". For everything else there is "AppMan", as I had predicted at the beginning. Best not to play too much with these admin privileges, folks. This definitive approach will certainly favor the use of "AM" in public facilities, such as schools. All users will be able to use the installed apps, but which ones to install and how to update them will be up to the administrator. I'm closing. |
|
The link is this: And I made this script: #!/bin/bash
# Define the base URL
base_url="https://cdn.kde.org/ci-builds/graphics/krita/master/linux/"
# Use wget to fetch the listing to stdout and grep to filter the file link
file_url=$(wget -q -O - -T 10 ${base_url} | grep -oP 'href="\Kkrita-.*?-prealpha-.*?-x86_64.appimage(?=")' | sort -V | tail -n 1)
# Check if file_url is not empty
if [[ ! -z "$file_url" ]]; then
# Complete the URL and download with wget, using -c to continue incomplete downloads and -T 10 to set a timeout
wget -c -T 10 "${base_url}${file_url}" -O "${file_url}"
else
echo "Failed to find the file."
fi |
I will leave this screenshot here so hopefully one day @ivan-hc decides to do the proper fix: Notice how AM-updater didn't ask for my sudo password even though I chown /opt/htop to root, this is because I have Not to mention that this approach fixes a possible issue that is that if the user tires to run (If you wonder why I'm using doas in some of the steps, that is because I have sudo configured to not ask for the password once it is entered once during the current terminal session). (Also I have no idea what that dbus-launch errors is, the app updated anyway).
Thanks for that, will look into adding it. |
I apologize for my delayed response, I was caught up with a significantly overdue task and couldn't devote the same level of attention you extended to me. I figured out how everything got so complicated. I had changed the automatic login from the user "lucas" to "mao," and even though I was logged in as lucas, when using SUDO in the terminal, the files were created with the user and group "mao." When using sudo, the files were created with the user I had set in /etc/lightdm/lightdm.conf. When I deleted and reinstalled AM, the new files were owned by user "mao" and group "mao." After understanding and restoring this, the installation worked correctly. |
Now:
Remembering that I kept the already installed packages, I deleted the Am folder and carried out the installation from the clone of the GitHub directory. It would be interesting to include the option "-T 10" in the connectivity check with github.com. Several times the script got stuck, and I had to terminate it with Ctrl+C; it just sits there, and the user doesn't know if it's working or stopped. In the download options, I would use "-c -T 10" as I did in the script I pasted earlier. |
Logging and Debugging the Installation: $ sudo ./INSTALL
[sudo] senha para lucas:
#!/bin/sh -vx
# CREATING THE MAIN FOLDER FOR "AM"
mkdir -p /opt/am/.cache /opt/am/modules
+ mkdir -p /opt/am/.cache /opt/am/modules
cd /opt/am
+ cd /opt/am
# CREATE THE SCRIPT NEEDED TO UNINSTALL "AM"
rm -R -f /opt/am/remove
+ rm -R -f /opt/am/remove
echo "#!/bin/sh
rm -R -f /usr/local/bin/am /opt/am /etc/bash_completion.d/am-completion.sh" >> /opt/am/remove
+ echo #!/bin/sh
rm -R -f /usr/local/bin/am /opt/am /etc/bash_completion.d/am-completion.sh
chmod a+x /opt/am/remove
+ chmod a+x /opt/am/remove
# DOWNLOAD THE MAIN SCRIPT
wget -c -T 10 -q https://github.com/ivan-hc/AM-application-manager/main/APP-MANAGER
+ wget -c -T 10 -q https://github.com/ivan-hc/AM-application-manager/main/APP-MANAGER
chmod a+x /opt/am/APP-MANAGER
+ chmod a+x /opt/am/APP-MANAGER
# LINK THE MAIN SCRIPT TO A KNOWN PATH
ln -sf /opt/am/APP-MANAGER /usr/local/bin/am
+ ln -sf /opt/am/APP-MANAGER /usr/local/bin/am
# DOWNLOAD THE LIST OF THE AVAILABLE PROGRAMS
arch=$(uname -m)
+ uname -m
+ arch=x86_64
wget ln -s -q "https://github.com/ivan-hc/AM-application-manager/main/programs/$arch-apps"
+ wget ln -s -q https://github.com/ivan-hc/AM-application-manager/main/programs/x86_64-apps
/usr/bin/wget: opção inválida -- “s”
Uso: wget [OPÇÃO]... [URL]...
Tente "wget --help" para mais opções.
# DOWNLOAD MODULES
MODULES=$(wget -c -T 10 -q https://api.github.com/repos/ivan-hc/AM/contents/modules -O - | grep download_url | cut -d '"' -f 4)
+ wget -c -T 10 -q https://api.github.com/repos/ivan-hc/AM/contents/modules -O -
+ grep download_url
+ cut -d " -f 4
+ MODULES=https://github.com/ivan-hc/AM/main/modules/clean.am
https://github.com/ivan-hc/AM/main/modules/database.am
https://github.com/ivan-hc/AM/main/modules/devtools.am
https://github.com/ivan-hc/AM/main/modules/download.am
https://github.com/ivan-hc/AM/main/modules/files.am
https://github.com/ivan-hc/AM/main/modules/help.am
https://github.com/ivan-hc/AM/main/modules/install.am
https://github.com/ivan-hc/AM/main/modules/launcher.am
https://github.com/ivan-hc/AM/main/modules/no-updates.am
https://github.com/ivan-hc/AM/main/modules/nolibfuse.am
https://github.com/ivan-hc/AM/main/modules/remove.am
https://github.com/ivan-hc/AM/main/modules/rollback.am
https://github.com/ivan-hc/AM/main/modules/sandboxes.am
https://github.com/ivan-hc/AM/main/modules/sync.am
https://github.com/ivan-hc/AM/main/modules/template.am
https://github.com/ivan-hc/AM/main/modules/update.am
for module in $MODULES; do
for v in $module; do
cd /opt/am/modules
mkdir tmp
cd tmp
wget -c -T 10 -q "$v"
cd ..
mv tmp/*.am ./
chmod a+x ./*.am
rmdir tmp
done
done
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/clean.am
+ cd ..
+ mv tmp/clean.am ./
+ chmod a+x ./clean.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/database.am
+ cd ..
+ mv tmp/*.am ./
mv: não foi possível obter estado de 'tmp/*.am': Arquivo ou diretório inexistente
+ chmod a+x ./clean.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/devtools.am
+ cd ..
+ mv tmp/devtools.am ./
+ chmod a+x ./clean.am ./devtools.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/download.am
+ cd ..
+ mv tmp/download.am ./
+ chmod a+x ./clean.am ./devtools.am ./download.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/files.am
+ cd ..
+ mv tmp/files.am ./
+ chmod a+x ./clean.am ./devtools.am ./download.am ./files.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/help.am
+ cd ..
+ mv tmp/help.am ./
+ chmod a+x ./clean.am ./devtools.am ./download.am ./files.am ./help.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/install.am
+ cd ..
+ mv tmp/install.am ./
+ chmod a+x ./clean.am ./devtools.am ./download.am ./files.am ./help.am ./install.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/launcher.am
+ cd ..
+ mv tmp/launcher.am ./
+ chmod a+x ./clean.am ./devtools.am ./download.am ./files.am ./help.am ./install.am ./launcher.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/no-updates.am
+ cd ..
+ mv tmp/no-updates.am ./
+ chmod a+x ./clean.am ./devtools.am ./download.am ./files.am ./help.am ./install.am ./launcher.am ./no-updates.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/nolibfuse.am
+ cd ..
+ mv tmp/nolibfuse.am ./
+ chmod a+x ./clean.am ./devtools.am ./download.am ./files.am ./help.am ./install.am ./launcher.am ./no-updates.am ./nolibfuse.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/remove.am
+ cd ..
+ mv tmp/remove.am ./
+ chmod a+x ./clean.am ./devtools.am ./download.am ./files.am ./help.am ./install.am ./launcher.am ./no-updates.am ./nolibfuse.am ./remove.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/rollback.am
+ cd ..
+ mv tmp/rollback.am ./
+ chmod a+x ./clean.am ./devtools.am ./download.am ./files.am ./help.am ./install.am ./launcher.am ./no-updates.am ./nolibfuse.am ./remove.am ./rollback.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/sandboxes.am
+ cd ..
+ mv tmp/sandboxes.am ./
+ chmod a+x ./clean.am ./devtools.am ./download.am ./files.am ./help.am ./install.am ./launcher.am ./no-updates.am ./nolibfuse.am ./remove.am ./rollback.am ./sandboxes.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/sync.am
+ cd ..
+ mv tmp/sync.am ./
+ chmod a+x ./clean.am ./devtools.am ./download.am ./files.am ./help.am ./install.am ./launcher.am ./no-updates.am ./nolibfuse.am ./remove.am ./rollback.am ./sandboxes.am ./sync.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/template.am
+ cd ..
+ mv tmp/template.am ./
+ chmod a+x ./clean.am ./devtools.am ./download.am ./files.am ./help.am ./install.am ./launcher.am ./no-updates.am ./nolibfuse.am ./remove.am ./rollback.am ./sandboxes.am ./sync.am ./template.am
+ rmdir tmp
+ cd /opt/am/modules
+ mkdir tmp
+ cd tmp
+ wget -c -T 10 -q https://github.com/ivan-hc/AM/main/modules/update.am
+ cd ..
+ mv tmp/*.am ./
mv: não foi possível obter estado de 'tmp/*.am': Arquivo ou diretório inexistente
+ chmod a+x ./clean.am ./devtools.am ./download.am ./files.am ./help.am ./install.am ./launcher.am ./no-updates.am ./nolibfuse.am ./remove.am ./rollback.am ./sandboxes.am ./sync.am ./template.am
+ rmdir tmp
# ENABLE NON-ROOT PERMISSIONS TO THE MAIN FOLDER FOR THE CURRENT USER
currentuser=$(who | awk '{print $1}')
+ who
+ awk {print $1}
+ currentuser=lucas
lucas
chown -R $currentuser /opt/am 2> /dev/null
+ chown -R lucas lucas /opt/am
# ADD THE BASH COMPLETION SCRIPT
echo '#!/usr/bin/env bash' >> /opt/am/am-completion.sh; echo 'complete -W "$(cat /opt/am/list 2>/dev/null)" am' >> /opt/am/am-completion.sh
+ echo #!/usr/bin/env bash
+ echo complete -W "$(cat /opt/am/list 2>/dev/null)" am
chmod a+x /opt/am/am-completion.sh
+ chmod a+x /opt/am/am-completion.sh
rm -R -f /opt/am/remove; echo '#!/bin/sh' >> /opt/am/remove
+ rm -R -f /opt/am/remove
+ echo #!/bin/sh
echo 'rm -R -f /usr/local/bin/am /opt/am /etc/bash_completion.d/am-completion.sh' >> /opt/am/remove
+ echo rm -R -f /usr/local/bin/am /opt/am /etc/bash_completion.d/am-completion.sh
chmod a+x /opt/am/remove; chown -R $currentuser /opt/am/remove 2>/dev/null
+ chmod a+x /opt/am/remove
+ chown -R lucas lucas /opt/am/remove
if test -f /etc/bash_completion.d; then
mv /opt/am/am-completion.sh /etc/bash_completion.d/
else
mkdir -p /etc/bash_completion.d; sudo mv /opt/am/am-completion.sh /etc/bash_completion.d/
fi
+ test -f /etc/bash_completion.d
+ mkdir -p /etc/bash_completion.d
+ sudo mv /opt/am/am-completion.sh /etc/bash_completion.d/
# SHOW THE MESSAGE
echo '
|
|
You are correct, the installation power should be centralized in just one user. These are the directives of Linux, and differently, it is advisable that the person uses Windows. :-) |
|
Please remove and reinstall AM, also remove the already downloaded "INSTALL" script:
but remove any other app installed before. If you can't with AM, use the command:
|
During the execution of INSTALL, the script hung, which is when I realized that INSTALL.5 was what had been saved and that the only one with execution permission was INSTALL from last September. I deleted it, and the installation worked. |
By ChatGPT 4 It appears you're encountering issues with executing a script that's part of a custom application manager, and the error messages indicate problems accessing necessary directories and files for its operation. The initial error suggests that the current working directory can't be accessed or does not exist, possibly caused by attempting to run the script in a directory that has been removed or moved. Let's address the correction in two parts: first, adjusting the main script Corrections in the script
|
WOW, did ChatGTP tell you all this? Great! I will follow the advice. Is it working now? |
... if it does not exist. See #466 (comment)
Given the complexity and the broad nature of the improvements suggested, implementing all of them directly into the script excerpts you've provided would be quite extensive and might not fit into a single response due to the limitations of this format. However, I can illustrate how to start applying some of these improvements to the Please note, due to the nature of this platform, the following is a conceptual demonstration meant to guide the application of the improvements rather than a complete, ready-to-deploy script. Example Modifications on
|
you have all my support, brother (I'm 38, btw) anyway thanks for these tips, they are really valuable (even the ones about marriage lol). I'm making some changes to APP-MANAGER to make it less complex and more oriented towards security and system administrator use (the latter in "AM" mode). |
With the help of GPT, I was already fighting with the shell, I hope it will be useful, this had suppressed several errors, but now I will start over doing this in the new installation: Forgive me if my communication with you is slow, I am doing this in the little free time I have left, and yesterday I went to sleep almost at 4 AM fighting with these errors. With the help of GPT I was already fighting with the shell: I already made some changes, I changed this:
that's why:
I added this:
I added this to the line 206
replace wget -p with
|
Analyzing the provided script, there are several areas where security and efficiency can be improved. Below are the suggested changes with explanations for each. The focus is on enhancing security measures, code readability, and maintainability. 1. Use More Secure Bash ShebangStarting with a more precise shebang to ensure the script runs with bash in a more predictable manner. #!/bin/bash 2. Quote Variables to Prevent Word Splitting and GlobbingQuote variables to handle spaces and special characters more reliably. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 3. Validate External InputIt's crucial to validate any external input to the script, including directories and URLs, to prevent command injection and other vulnerabilities. 4. Use HTTPS Where PossibleEnsure all URLs use HTTPS to secure the data in transit. export AMCATALOGUEMARKDOWNS="https://github.com/Portable-Linux-Apps/Portable-Linux-Apps.github.io/main/apps"
export AMCATALOGUEICONS="https://github.com/Portable-Linux-Apps/Portable-Linux-Apps.github.io/main/icons" 5. Avoid Using
|
I believe this has resolved @ivan-hc /opt/am/modules/sync.am
|
In February, I installed Krita with AM, but it didn't work on my "Linux Mint Cinnamon 21.2". I went straight, downloaded it from the website, and realized it was a developer bug. I tested version krita-5.3.0-prealpha and everything worked perfectly. Always having to search for the package among other downloads ended up annoying me, so I thought about testing Krita installation again through AM and received this message:
$ am -l grep: /opt/am/x86_64-apps: File or directory not found cat: /opt/am/x86_64-apps: File or directory not found YOU HAVE INSTALLED 30 APPLICATIONS OUT OF AVAILABLE LIST OF THE APPLICATIONS AVAILABLE IN THE 'AM' REPOSITORY: (END)
Anyway, this is just a report of the error and a suggestion to also include the pre-alpha version since the stable version may not work for some people. It would be useful to include a warning to try the pre-alpha version if the stable one doesn't work."
"Thank you for making our lives easier with the 'AM' Application Manager."
The text was updated successfully, but these errors were encountered: