Using the following commands in a non-root shell one can attempt
to start the program "pcmanfm" by a different system user (here "user2"):
$ xhost +
$ su user2
$ pcmanfm -n
$ exit
$ xhost -
On my system (stock Debian v11) it no longer starts a new instance of the
"pcmanfm" program.
But this for sure was working in older versions.
In thread "ps shows only 1 instance of pcmanfm", D.T. wrote on 12/11/23 09:45:
Long story short, you hacked your own solution to achieve something that is
provided by other software, and now it doesn't work anymore.
And you call it a bug that you "hope" somebody else will fix. Without even
providing a full explanation or the the code of your hacks (and no, I'm not
interested).
And furthermore, you tell the people trying to help you that they "first
better do a web research for starting a program under a different user name in
Linux."
FWIW, I installed xhost and disabled access control with it, and pcmanfm
starts normally with the command from my previous mail.
On Mon, 2023-12-11 at 01:30 +0100, U.Mutlu wrote:
It's been a long time ago when I coded this for my private use,
and its been much C++ code (b/c I needed also some other features
like auto-mounting/unmounting an encrypted filesystem image etc etc).
I just looked in the source code and one needs to do
these steps as user to grant desktop access to an other user/users:
xhost +SI:localuser:$UN
...
xhost -SI:localuser:$UN
See manpage of xhost for details.
And "xhost" as user to show the granted users.
But first better do a web research for starting a program under a different
user name in Linux. Maybe nowadays such a solution already exists out there.
Old Windows XP had "runas.exe", and that had inspired me to have same under
Linux.
There was none for Linux when I needed this feature many years ago,
so I hacked a Q&D one for my own use. It's a messy code, not ready
for any release nor support due to lack of time.
And: I'm running X11, not wayland.
D.T. wrote on 12/10/23 12:21:
But, as said, pcmanfm does not work anymore when started under a different
username but the desktop username. This is of course bad, even a bug, IMO. I
hope it gets fixed.
Nothing against hoping per se, but right now it's a bug only according to you.
If you want to fix your problem you should start some serious troubleshooting.
Maybe you will then find out there's a solution. If not you can still use your
troubleshooting insights
to properly file a bug.
If you walk us through the process of how you added the new user and how you
start pcmanfm
we can help with the troubleshooting.
I just tried with some unused user I have:
sudo -u unused_user DISPLAY=:0 pcmanfm Authorization required, but no
authorization protocol specified Cannot open display: |
Are you seeing the same?
Also tell us if you're running X11 or wayland.
_______________________________________________
Lxde-list mailing list
Lxde-list@lists.sourceforge.net <mailto:Lxde-list@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/lxde-list
_______________________________________________
Lxde-list mailing list
Lxde-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxde-list
_______________________________________________
Lxde-list mailing list
Lxde-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxde-list