Skip to content
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

Frontend.XF.GTK: different exitCode on root #257

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mersho
Copy link
Contributor

@Mersho Mersho commented Feb 26, 2024

No description provided.

@Mersho
Copy link
Contributor Author

Mersho commented Feb 26, 2024

The snap package generated from the GitHub artifact has been tested and it works well:

mkdir: cannot create directory ‘/run/user/0’: Permission denied
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory

Unhandled Exception:
System.Exception: Running as root user is not supported
  at GWallet.Frontend.XF.Gtk.Main.main (System.String[] argv) [0x00020] in <65dc7568944123fea74503836875dc65>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: Running as root user is not supported
  at GWallet.Frontend.XF.Gtk.Main.main (System.String[] argv) [0x00020] in <65dc7568944123fea74503836875dc65>:0 

@Mersho Mersho force-pushed the ThrowExceptionIfRoot branch 2 times, most recently from 274f445 to 156fa92 Compare February 27, 2024 09:08
@knocte
Copy link
Member

knocte commented Feb 27, 2024

This commit msg sucks because:

Frontend.XF.GTK: exit with one when user is root

With "one"? are you serious???? What is "one"??? Sigh. Please say exitCode different than zero, or something like that.
And also update PR title and description whenever you change commit msg!!

update.go:85: cannot change mount namespace according to change mount (/snap/gtk-common-
themes/1534/share/gtk2/Materia-compact /snap/geewallet/x1/data-dir/themes/Materia-compact none bind,ro 0 0): cannot
write to "/snap/gtk-common-themes/1534/share/gtk2/Materia-compact" because it would affect the host in "/snap"
update.go:85: cannot change mount namespace according to change mount (/snap/gtk-common-
themes/1534/share/gtk2/Materia-dark-compact /snap/geewallet/x1/data-dir/themes/Materia-dark-compact none bind,ro 0
0): cannot write to "/snap/gtk-common-themes/1534/share/gtk2/Materia-dark-compact" because it would affect the host
in "/snap"
update.go:85: cannot change mount namespace according to change mount (/snap/gtk-common-themes/1534/share/gtk2/Yaru-MATE-dark /snap/geewallet/x1/data-dir/themes/Yaru-MATE-dark none bind,ro 0 0): cannot use "/snap/gtk-common-themes/1534/share/gtk2/Yaru-MATE-dark" as bind-mount source: not a directory
update.go:85: cannot change mount namespace according to change mount (/snap/gtk-common-themes/1534/share/gtk2/Yaru-MATE-light /snap/geewallet/x1/data-dir/themes/Yaru-MATE-light none bind,ro 0 0): cannot use "/snap/gtk-common-themes/1534/share/gtk2/Yaru-MATE-light" as bind-mount source: not a directory
mkdir: cannot create directory ‘/run/user/0’: Permission denied
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
Authorization required, but no authorization protocol specified

(geewallet:5797): Gtk-WARNING **: 09:01:13.760: cannot open display: :0

I think the majority of this gibberish that you pasted above is ALSO being printed when the user is not root, so please TRIM the gibberish to only the important error that makes this shit crash.

An error occurs when geewallet is run with root permissions,
thus it’s necessary to restrict users from running it as root:

```
mkdir: cannot create directory ‘/run/user/0’: Permission denied
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
Authorization required, but no authorization protocol specified

(geewallet:5797): Gtk-WARNING **: 09:01:13.760: cannot open display: :0
```
@Mersho Mersho changed the title Frontend.XF.GTK: throw exception when user is root Frontend.XF.GTK: different exitCode on root Feb 28, 2024
@Mersho
Copy link
Contributor Author

Mersho commented Feb 29, 2024

If you rerun the CI, it will be green. ty 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants