LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   Running Dolphin in SUSE 13.2 under user other than root or currently logged in user. (https://www.linuxquestions.org/questions/suse-opensuse-60/running-dolphin-in-suse-13-2-under-user-other-than-root-or-currently-logged-in-user-4175557111/)

xode 10-25-2015 08:25 AM

Running Dolphin in SUSE 13.2 under user other than root or currently logged in user.
 
If I am logged in to a KDE session as user "joe" and want to use Dolphin to access "john"'s files and startup other programs to edit "john"'s files, etc., a simple "kdesu dolphin" does not work. It gets errors like "Could not start process. Cannot talk to klauncher: The name org.kde.klauncher was not provided by any .service files."

If I use the KDE startup menu and go to "Switch User" to start a new parallel session under user "john" so that I have two active sessions under users "joe" and "john", then a simple "kdesu dolphin" will work. However, that is a very clumsy and awkward way of getting this to work.

Does anyone know of a more streamlined and automatic way to get this done?

John VV 10-25-2015 12:04 PM

you do it the same way as on any linux OS

to run firefox as "john" from " joe"
Code:

su -l john
---- /* type in the password for "john" when asked */-----
firefox


xode 10-25-2015 01:57 PM

1 Attachment(s)
Apparently, it isn't that simple any more with SUSE 13.2 or the original "kdesu dolphin" would have worked. Following your suggestion gives the output below in the terminal window and results in a dolphin window as shown by snapshot1.png (attached). Obviously, a bunch of processes and services need to be started for "john" before even a simple file manager window for "john" can be brought up. Starting up the parallel session does this but it is extremely awkward and clumsy. I am looking for a more streamlined and automatic procedure that does the same thing.

Code:

joe@linux-0000:~> su -l john
Password:
john@linux-0000:~> dolphin
Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
kdeinit4: Aborting. bind() failed: No such file or directory
Could not bind to socket '/run/user/501/ksocket-john/kdeinit4__0'
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QString)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QString)
Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
kdeinit4: Aborting. bind() failed: No such file or directory
Could not bind to socket '/run/user/501/ksocket-john/kdeinit4__0'
Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
kdeinit4: Aborting. bind() failed: No such file or directory
Could not bind to socket '/run/user/501/ksocket-john/kdeinit4__0'
dolphin(2987)/kdecore (K*TimeZone*): KSystemTimeZones: ktimezoned initialize() D-Bus call failed:  "The name org.kde.kded was not provided by any .service files"

Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
kdeinit4: Aborting. bind() failed: No such file or directory
Could not bind to socket '/run/user/501/ksocket-john/kdeinit4__0'
Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
kdeinit4: Aborting. bind() failed: No such file or directory
Could not bind to socket '/run/user/501/ksocket-john/kdeinit4__0'
kactivitymanagerd(3004): Couldn't start kglobalaccel from kglobalaccel.desktop:  "KLauncher could not be reached via D-Bus. Error when calling start_service_by_desktop_path:
The name org.kde.klauncher was not provided by any .service files
"

Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
dolphin(2987) KIO::SlavePrivate::SlavePrivate: Connection server not listening, could not connect
Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
kdeinit4: Aborting. bind() failed: No such file or directory
Could not bind to socket '/run/user/501/ksocket-john/kdeinit4__0'
Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
kdeinit4: Aborting. bind() failed: No such file or directory
Could not bind to socket '/run/user/501/ksocket-john/kdeinit4__0'
dolphin(2987): couldn't create slave: "Cannot talk to klauncher: The name org.kde.klauncher was not provided by any .service files"
trying to create local folder /run/user/501: Permission denied
dolphin(2987) KIO::SlavePrivate::SlavePrivate: Connection server not listening, could not connect
Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
kdeinit4: Aborting. bind() failed: No such file or directory
Could not bind to socket '/run/user/501/ksocket-john/kdeinit4__0'
Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
kdeinit4: Aborting. bind() failed: No such file or directory
Could not bind to socket '/run/user/501/ksocket-john/kdeinit4__0'
dolphin(2987): couldn't create slave: "Cannot talk to klauncher: The name org.kde.klauncher was not provided by any .service files"
trying to create local folder /run/user/501: Permission denied
dolphin(2987) KIO::SlavePrivate::SlavePrivate: Connection server not listening, could not connect
Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
kdeinit4: Aborting. bind() failed: No such file or directory
Could not bind to socket '/run/user/501/ksocket-john/kdeinit4__0'
Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
kdeinit4: Aborting. bind() failed: No such file or directory
Could not bind to socket '/run/user/501/ksocket-john/kdeinit4__0'
dolphin(2987): couldn't create slave: "Cannot talk to klauncher: The name org.kde.klauncher was not provided by any .service files"
trying to create local folder /run/user/501: Permission denied
dolphin(2987) KIO::SlavePrivate::SlavePrivate: Connection server not listening, could not connect
Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
kdeinit4: Aborting. bind() failed: No such file or directory
Could not bind to socket '/run/user/501/ksocket-john/kdeinit4__0'
Error: cannot create directory "/run/user/501": Permission denied
trying to create local folder /run/user/501: Permission denied
kdeinit4: Aborting. bind() failed: No such file or directory
Could not bind to socket '/run/user/501/ksocket-john/kdeinit4__0'
dolphin(2987): couldn't create slave: "Cannot talk to klauncher: The name org.kde.klauncher was not provided by any .service files"
john@linux-0000:~>


John VV 10-25-2015 11:33 PM

then make the folder 501 in /run/users

then you can launch dolphin

xode 10-26-2015 12:10 AM

Quote:

Originally Posted by John VV (Post 5440241)
then make the folder 501 in /run/users

then you can launch dolphin

I had tried that also and that gets me as far as dolphin coming up and being able to see the files but when I try to open anything or even do something as simple as "Tools, Open Terminal", dolphin hangs. In addition to creating that folder, starting a new parallel session creates its contents as well and likely sets up a bunch of other things elsewhere as well that I know nothing about, since I didn't write the code and there is no technical documentation on it that I have been able to find (I have only been able to find "how to use" documentation).

suicidaleggroll 11-04-2015 02:08 PM

How about instead of using su, you ssh to localhost as john
Code:

ssh -Y john@localhost
Then launch dolphin from there.

I've found su to be finicky sometimes with permissions when it comes to X applications due to the owner of the X server not having the same permissions as the user trying to run the X application. ssh's X forwarding usually gets around it.

xode 11-07-2015 01:24 AM

Quote:

Originally Posted by suicidaleggroll (Post 5444678)
How about instead of using su, you ssh to localhost as john
Code:

ssh -Y john@localhost
Then launch dolphin from there.

I've found su to be finicky sometimes with permissions when it comes to X applications due to the owner of the X server not having the same permissions as the user trying to run the X application. ssh's X forwarding usually gets around it.

Code:

ssh -Y john@localhost /usr/bin/dolphin
...gets dolphin up and running under user "john" with no problems whatsoever. In addition to getting around the permissions problems you referenced, ssh will also create the /run/user/<"john"'s numeric ID> directory as well as all of the necessary sockets and such in that directory that are needed for dolphin to function under user "john".

However, once dolphin under user "john" is closed, the ssh session remains open and has to be manually closed. So far, I haven't found a way to make it close automatically. Do you possibly know how to make it close automatically?

suicidaleggroll 11-09-2015 10:20 AM

Quote:

Originally Posted by xode (Post 5445889)
However, once dolphin under user "john" is closed, the ssh session remains open and has to be manually closed. So far, I haven't found a way to make it close automatically. Do you possibly know how to make it close automatically?

I run into that sometimes when launching X applications through ssh, I haven't been able to track down the cause yet. A quick Ctrl+C kills whatever orphaned process is still lingering and lets the ssh session close.

xode 10-30-2016 07:53 PM

Quote:

Originally Posted by suicidaleggroll (Post 5446962)
I run into that sometimes when launching X applications through ssh, I haven't been able to track down the cause yet. A quick Ctrl+C kills whatever orphaned process is still lingering and lets the ssh session close.

I have since found an alternative solution that you might find useful. Running in a root terminal at boot (I use /etc/init.d/boot.local):
Code:

/usr/bin/loginctl enable-linger john
...will setup and keep active all of the background infrastructure that john needs such that a simple "su -l john..." or a simple "kdesu john..." will now work as they should.

Both the ssh solution that you proposed here or the alternative that I just described above solved my original problem for this thread. However, another problem took its place as shown at http://www.linuxquestions.org/questi...on-4175584608/ Solving that 2nd problem took some doing but I just found a workaround solution you might find of interest.


All times are GMT -5. The time now is 09:50 PM.