Botspot / vdesktop

Run a second instance of Raspbian inside Raspbian.
GNU General Public License v3.0
125 stars 21 forks source link

Problem with updating #6

Closed jayjupdhig closed 4 years ago

jayjupdhig commented 4 years ago

Hi!

There seems to be a problem with V12 update:

Version 12 is available. Would you like to download it? [Y/n]
y
OK. Downloading Vdesktop.
fatal: Konnte führende Verzeichnisse von '/root/TEMP/vdesktop.new' nicht erstellen.: Keine Berechtigung
chmod: Zugriff auf '/root/TEMP/vdesktop.new/vdesktop' nicht möglich: Datei oder Verzeichnis nicht gefunden
chgrp: Zugriff auf '/root/TEMP/vdesktop.new/shadow' nicht möglich: Datei oder Verzeichnis nicht gefunden
chown: Zugriff auf '/root/TEMP/vdesktop.new/shadow' nicht möglich: Datei oder Verzeichnis nicht gefunden

head: '/root/TEMP/vdesktop.new/version' kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden
/root/TEMP/vdesktop/vdesktop: Zeile 25: [: -gt: Einstelliger (unärer) Operator erwartet.
Download was not successful.

sudo does also not help, but i don't wonder about that because im root anyway:

sudo /root/TEMP/vdesktop/vdesktop /media/root/Volume/2020-05-11_stretch_inkl_phalcon.img
Version 12 is available. Would you like to download it? [Y/n]
y
OK. Downloading Vdesktop.
fatal: Konnte führende Verzeichnisse von '/root/TEMP/vdesktop.new' nicht erstellen.: Keine Berechtigung
chmod: Zugriff auf '/root/TEMP/vdesktop.new/vdesktop' nicht möglich: Datei oder Verzeichnis nicht gefunden
chgrp: Zugriff auf '/root/TEMP/vdesktop.new/shadow' nicht möglich: Datei oder Verzeichnis nicht gefunden
chown: Zugriff auf '/root/TEMP/vdesktop.new/shadow' nicht möglich: Datei oder Verzeichnis nicht gefunden

head: '/root/TEMP/vdesktop.new/version' kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden
/root/TEMP/vdesktop/vdesktop: Zeile 25: [: -gt: Einstelliger (unärer) Operator erwartet.
Download was not successful.

Best regards from Switzerland, Jan

Botspot commented 4 years ago

The problem is that you are trying to install this to a root folder. Vdesktop has to run some commands as an unprivileged user for them to work correctly. For example, line 19:

sudo -u pi git clone https://github.com/Botspot/vdesktop "${DIRECTORY}.new"

You can try to remove all the instances of sudo -u pi, or simply delete the folder and install again manually.

Botspot commented 4 years ago

You could also allow the Pi user to access your installation folder:

 chown pi:pi /root/TEMP
jayjupdhig commented 4 years ago

Does not seem to work, also not with chown -R pi:pi /root/TEMP and chmod -R 0777 /root/TEMP

Will try to reinstall it completely when i have some time. Thx.

Botspot commented 4 years ago

Did you try deleting all instances of sudo -u pi in the vdesktop script? If so, what were the new errors?

jayjupdhig commented 4 years ago

"You can try to remove all the instances of sudo -u pi ... "

Yes, that works, thank you very much!

The chown thing does not seem to work...

Will better install it on the pi user profile! ;-)

Botspot commented 4 years ago

I'm going to try to fix this. On your root system, do both of the below commands output "root"?

whoami
echo $USER
kosuodhmwa commented 4 years ago

("jmar83" is my personal account.)

I think so (what else?), but currently im not in the company. I'm logged in with SSH as root with permmitting root SSH login in config file on /etc/sshd

Will test it tomorrow, thanks.

Botspot commented 4 years ago

Any updates?

jayjupdhig commented 4 years ago

Oh, thank you for the message, i completely forgot it due to the stress (working and so on) in had in the last few days.

Both commands, whoami and echo $USER print the same output "root" - but that was expectable. ;-)

Botspot commented 4 years ago

OK, good. I'm going to update vdesktop to run as root user if the $USER variable is "root".

jayjupdhig commented 4 years ago

OK, why not, thank you very much!

Botspot commented 4 years ago

I finished implementing it. So if you run the manual install instructions one more time, it should work.

jayjupdhig commented 4 years ago

ok, thx. will try it asap.

jayjupdhig commented 4 years ago

thx, seems to work as root now...