Re: sudo / su with GUI apps - ?

2022-01-18 Thread Roberto Ragusa

On 1/12/22 9:38 PM, lejeczek via users wrote:

On 11/01/2022 19:54, C Linus Hicks wrote:

Making some assumptions about your requirements:

1. Make sure xauth is installed
2. Your DISPLAY environment variable is likely: ":0" - just verify it is set
3. Run the command: "xauth list"
4. Copy the line that has "/unix:", all three parts
5. Use su - or sudo to get an interactive session for alternate user
6. Run xauth command with no arguments
7. Type "list" at the prompt
8. Assuming this user currently doesn't have permission (no entry for 
host/display):
9. Type "add" and then paste the line you copied from step 4
10. Type "exit" command from xauth
11. Firefox should now be able to use the display, and your addition is 
persistent




oughh.. It turns out that

export XAUTHORITY=...

is redundant and I had it in .bash_profile of my 'regular', sudo/su from_user. 
Nor it's needed for sudo/su to_user.
Leave it vanilla default and 'firefox-wayland' works beautifully in F35, at 
least with 'su'


My approach to let user bbb open X11 windows on the desktop of user aaa is:

aaa@localhost$ xhost si:localuser:bbb

Then you just have to su to bbb and

bbb@localhost$ export DISPLAY=:0

--
   Roberto Ragusamail at robertoragusa.it
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: sudo / su with GUI apps - ?

2022-01-14 Thread Samuel Sieb

On 1/11/22 11:54, C Linus Hicks wrote:

Making some assumptions about your requirements:

1. Make sure xauth is installed
2. Your DISPLAY environment variable is likely: ":0" - just verify it is set
3. Run the command: "xauth list"
4. Copy the line that has "/unix:", all three parts
5. Use su - or sudo to get an interactive session for alternate user
6. Run xauth command with no arguments
7. Type "list" at the prompt
8. Assuming this user currently doesn't have permission (no entry for 
host/display):
9. Type "add" and then paste the line you copied from step 4
10. Type "exit" command from xauth
11. Firefox should now be able to use the display, and your addition is 
persistent


These instructions are only for X, but he was using wayland as indicated 
by running "firefox-wayland".

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: sudo / su with GUI apps - ?

2022-01-12 Thread lejeczek via users



On 11/01/2022 19:54, C Linus Hicks wrote:

Making some assumptions about your requirements:

1. Make sure xauth is installed
2. Your DISPLAY environment variable is likely: ":0" - just verify it is set
3. Run the command: "xauth list"
4. Copy the line that has "/unix:", all three parts
5. Use su - or sudo to get an interactive session for alternate user
6. Run xauth command with no arguments
7. Type "list" at the prompt
8. Assuming this user currently doesn't have permission (no entry for 
host/display):
9. Type "add" and then paste the line you copied from step 4
10. Type "exit" command from xauth
11. Firefox should now be able to use the display, and your addition is 
persistent




oughh.. It turns out that

export XAUTHORITY=...

is redundant and I had it in .bash_profile of my 'regular', 
sudo/su from_user. Nor it's needed for sudo/su to_user.
Leave it vanilla default and 'firefox-wayland' works 
beautifully in F35, at least with 'su'


many thanks everybody, L.
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: sudo / su with GUI apps - ?

2022-01-12 Thread Tim via users
Hi L,

> How do you get your Firefox to run/work with different user?
> I'm thinking obvious - sudo, su - kind of 'runas' with 
> windows OS.

Seeing as no-one has said this, yet:

*** Running things as root is ill-advised. ***

While running a file manager as root to deal with some user file
permission/ownership problems is one of those be very careful what
you're doing exercises that we *sometimes* do instead of using the
command line, as it's very easy to accidentally stuff up your system.

Do not EVER run a web browser as root.  It's not just your own mistakes
you have to be wary of, it's outsider's deliberate attempts to cause
you grief that you're exposing yourself to.  You didn't write their
website, you don't know what they're going to try to do.  We do know
that the world is full of people who want to steal your money, trash
your computer, and commit crimes on your computer that make it look
like you did them.

Running things as another user is a better idea, and can be done,
sometimes with more ease than others.

I can open a command line, "su - testuser" and login as them, then run
things as them (including firefox).  Though various programs may want
to you re-authenticate as that user, because normally authentication
was handled during the graphical desktop login.  e.g. I might have to
supply that user's password(s) when I run their email program.

But depending on what desktop and server you use (Gnome, Mate, KDE,
Wayland, X, etc), you may find some things don't work (e.g. no sound),
or you get a plethora of error messages (some of which can be ignored,
because it went through trying a series of things that didn't work
before it got to one that did).

If you don't want to run two users concurrently on the same screen
(e.g. like if you were collaborating some files between two users), you
can fire up a second graphical session and log in as them separately
(e.g. such as if you wanted to check someone else's mail, then go back
to your own work).  On X, you can lock the screen with the screen
saver, then click the "switch user" button.  I dunno if Wayland
supports that.

-- 
 
uname -rsvp
Linux 3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 30 15:51:32 UTC 2021 x86_64
 
Boilerplate:  All unexpected mail to my mailbox is automatically deleted.
I will only get to see the messages that are posted to the mailing list.
 
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: sudo / su with GUI apps - ?

2022-01-11 Thread linux guy
For root run GUI apps in KDE, I use kdesu.
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: sudo / su with GUI apps - ?

2022-01-11 Thread C Linus Hicks
Making some assumptions about your requirements:

1. Make sure xauth is installed
2. Your DISPLAY environment variable is likely: ":0" - just verify it is set
3. Run the command: "xauth list"
4. Copy the line that has "/unix:", all three parts
5. Use su - or sudo to get an interactive session for alternate user
6. Run xauth command with no arguments
7. Type "list" at the prompt
8. Assuming this user currently doesn't have permission (no entry for 
host/display):
9. Type "add" and then paste the line you copied from step 4
10. Type "exit" command from xauth
11. Firefox should now be able to use the display, and your addition is 
persistent


On Tue, 2022-01-11 at 17:23 +, lejeczek via users wrote:
> Hi guys.
> 
> How do you get your Firefox to run/work with different user?
> I'm thinking obvious - sudo, su - kind of 'runas' with 
> windows OS.
> 
> many thanks, L
> ___
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
> Do not reply to spam on the list, report it: 
> https://pagure.io/fedora-infrastructure
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: sudo / su with GUI apps - ?

2022-01-11 Thread Joe Zeff

On 1/11/22 10:32 AM, Robert Moskowitz wrote:
Kludge I have used for some apps, notably my file browser to run as root 
is to:


in Terminal su -

run app from prompt with & to release it from Terminal.

Kind of works.


I use Xfce and have this one liner to run Thunar as root:

beesu - thunar

This runs the Xfce program that acts as a GUI sudo which then runs my 
file manager.  Replace that with whatever program your DE provides.

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: sudo / su with GUI apps - ?

2022-01-11 Thread lejeczek via users



On 11/01/2022 17:32, Robert Moskowitz wrote:



On 1/11/22 12:23, lejeczek via users wrote:

Hi guys.

How do you get your Firefox to run/work with different user?
I'm thinking obvious - sudo, su - kind of 'runas' with 
windows OS.


Kludge I have used for some apps, notably my file browser 
to run as root is to:


in Terminal su -

run app from prompt with & to release it from Terminal.

Kind of works.


So far I fail with both su & sudo, as non-root to another 
non-root, I get:


[chrome@fedora ~]$ firefox-wayland
Authorization required, but no authorization protocol specified
Error: cannot open display: :0
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: sudo / su with GUI apps - ?

2022-01-11 Thread Robert Moskowitz



On 1/11/22 12:23, lejeczek via users wrote:

Hi guys.

How do you get your Firefox to run/work with different user?
I'm thinking obvious - sudo, su - kind of 'runas' with windows OS.


Kludge I have used for some apps, notably my file browser to run as root 
is to:


in Terminal su -

run app from prompt with & to release it from Terminal.

Kind of works.

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure