Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kdesu dolphin as root not possible [SOLVED-again]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9307

PostPosted: Sat Oct 21, 2017 7:51 am    Post subject: Reply with quote

A USE-conditional non-upstreamable patch - not likely to happen.
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Sat Oct 21, 2017 2:05 pm    Post subject: Reply with quote

asturm wrote:
A USE-conditional non-upstreamable patch - not likely to happen.

Do you have any suggestion for a long-term solution?
How would it be to have a "package" which merely puts the patches into the epath_user directory? Then enabling the USE for kwrite/kate/dolphin would pull this package into the dependency tree and consequently apply it. It could be also manage different patches, if the patch needs to change in a future version at all. Just a wild suggestion.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9307

PostPosted: Sat Oct 21, 2017 3:11 pm    Post subject: Reply with quote

Holysword wrote:
Do you have any suggestion for a long-term solution?

Yes:
asturm wrote:
Meanwhile upstream is working on a real solution around kio/kauth support which we hopefully are going to see in kf-5.40/kde-apps-17.12.


Holysword wrote:
How would it be to have a "package" which merely puts the patches into the epath_user directory?

No, that's an awful idea tbh. ;) The minority that relies on GUI tools for root operations can find and use those patches easily; you couldn't do the same on a binary distro.
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Sat Oct 21, 2017 3:56 pm    Post subject: Reply with quote

asturm wrote:
Meanwhile upstream is working on a real solution around kio/kauth support which we hopefully are going to see in kf-5.40/kde-apps-17.12.

What scares me is the "hopefully" part of your sentence, specially considering the apparent disdain for the "minority that relies on GUI tools for root operations" that is so common around.

We will see though.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1696

PostPosted: Tue Nov 07, 2017 4:43 pm    Post subject: Re: Reverse patches Reply with quote

Nsane457 wrote:
For anyone who needs patches to reenable execution as root for kate, kwrite, and dolphin, here you go:

kwrite-17.04.0-allow-root.patch
kate-17.04.0-allow-root.patch
dolphin-17.04.0-allow-root.patch



I just discovered this, thank you so much!
This is why I love Gentoo

Code:
 * Applying dolphin-17.04.3-allow-root.patch ...                                                                       [ ok ]
 * User patches applied.


Perhaps this should be made stickey or even better a add a kde use flag for it.
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Tue Dec 05, 2017 5:47 am    Post subject: Reply with quote

I just switched to the new profile and am going through the emerge -e world part. It seems the patches are failing. Here is one of the errors.

Code:
root@fireball / # cat /var/log/portage/kde-apps\:dolphin-17.08.3\:20171205-052812.log
 * Package:    kde-apps/dolphin-17.08.3
 * Repository: gentoo
 * Maintainer: kde@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc handbook kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking dolphin-17.08.3.tar.xz to /var/tmp/portage/kde-apps/dolphin-17.08.3/work
>>> Source unpacked in /var/tmp/portage/kde-apps/dolphin-17.08.3/work
>>> Preparing source in /var/tmp/portage/kde-apps/dolphin-17.08.3/work/dolphin-17.08.3 ...
 * Applying allow-root.patch ...
/var/tmp/portage/kde-apps/dolphin-17.08.3/temp/environment: line 1427: /etc/portage/patches/kde-apps/dolphin/allow-root.patch: Permission denied
 [ !! ]
 * ERROR: kde-apps/dolphin-17.08.3::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/kde-apps/dolphin/allow-root.patch
 *
 * Call stack:
 *               ebuild.sh, line  124:  Called src_prepare
 *             environment, line 4000:  Called kde5_src_prepare
 *             environment, line 2905:  Called cmake-utils_src_prepare
 *             environment, line 1272:  Called default_src_prepare
 *      phase-functions.sh, line  918:  Called __eapi6_src_prepare
 *             environment, line  343:  Called eapply_user
 *             environment, line 1522:  Called eapply '/etc/portage/patches/kde-apps/dolphin/allow-root.patch'
 *             environment, line 1492:  Called _eapply_patch '/etc/portage/patches/kde-apps/dolphin/allow-root.patch'
 *             environment, line 1430:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/kde-apps/dolphin/allow-root.patch'
 *   isolated-functions.sh, line  117:  Called die
 * The specific snippet of code:
 *              die "$@"
 *
 * If you need support, post the output of `emerge --info '=kde-apps/dolphin-17.08.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=kde-apps/dolphin-17.08.3::gentoo'`.
 * The complete build log is located at '/var/log/portage/kde-apps:dolphin-17.08.3:20171205-052812.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/kde-apps/dolphin-17.08.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/kde-apps/dolphin-17.08.3/temp/environment'.
 * Working directory: '/var/tmp/portage/kde-apps/dolphin-17.08.3/work/dolphin-17.08.3'
 * S: '/var/tmp/portage/kde-apps/dolphin-17.08.3/work/dolphin-17.08.3'
root@fireball / #


Is anyone else running into this yet? I was planning to wait on this upgrade but it seems some other things was going to make waiting harder than just biting the bullet and doing the upgrade.

:) :)
_________________
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31284
Location: here

PostPosted: Tue Dec 05, 2017 7:11 am    Post subject: Reply with quote

Code:
/var/tmp/portage/kde-apps/dolphin-17.08.3/temp/environment: line 1427: /etc/portage/patches/kde-apps/dolphin/allow-root.patch: Permission denied

It isn't patch problem.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Tue Dec 05, 2017 10:36 am    Post subject: Reply with quote

fedeliallalinea wrote:
Code:
/var/tmp/portage/kde-apps/dolphin-17.08.3/temp/environment: line 1427: /etc/portage/patches/kde-apps/dolphin/allow-root.patch: Permission denied

It isn't patch problem.


Good catch fedeliallalinea. I did a bit of digging and found out the problem. If userpriv is set in FEATURES then the directory and files must be portage:portage and not root:root. Like this:

Code:
root@fireball / # ls -al /etc/portage/patches/kde-apps/
total 16
drwxr-xr-x 4 portage portage 4096 May  4  2017 .
drwxr-xr-x 4 portage portage 4096 Oct 11 21:28 ..
drwxr-xr-x 2 portage portage 4096 May  4  2017 dolphin
drwxr-xr-x 2 portage portage 4096 May  4  2017 kwrite
root@fireball / #


I've only tested kwrite so far but suspect the others will work now. I think I had to change that setting recently for some reason so it may be that others will have to do the same.

Hope this helps someone else if they run into this.

:D :D
_________________
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2377
Location: Netherlands

PostPosted: Tue Dec 05, 2017 2:21 pm    Post subject: Reply with quote

I just recompiled dolphin-17.08.3.
In the emerge log it says user patches applied but I can't use it as root.
Should the patch be modified?
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31284
Location: here

PostPosted: Tue Dec 05, 2017 3:08 pm    Post subject: Reply with quote

gerard27 wrote:
Should the patch be modified?

Teorically not, this is patch ported for 17.08 but it seems the sama
Code:
diff -Naru dolphin-17.08.3.orig/src/main.cpp dolphin-17.08.3/src/main.cpp
--- dolphin-17.08.3.orig/src/main.cpp   2017-12-05 08:07:34.891004473 +0100
+++ dolphin-17.08.3/src/main.cpp        2017-12-05 08:08:07.911004852 +0100
@@ -35,21 +35,8 @@
 #include <KLocalizedString>
 #include <Kdelibs4ConfigMigrator>
 
-#ifndef Q_OS_WIN
-#include <unistd.h>
-#endif
-#include <iostream>
-
 extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
 {
-#ifndef Q_OS_WIN
-    // Check whether we are running as root
-    if (getuid() == 0) {
-        std::cout << "Executing Dolphin as root is not possible." << std::endl;
-        return EXIT_FAILURE;
-    }
-#endif
-
     QApplication app(argc, argv);
     app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
     app.setWindowIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"), app.windowIcon()));

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Tue Dec 05, 2017 3:18 pm    Post subject: Reply with quote

gerard27 wrote:
I just recompiled dolphin-17.08.3.
In the emerge log it says user patches applied but I can't use it as root.
Should the patch be modified?
Gerard.


I upgraded and have been using mine so it works here. Could it be something else? Maybe you need to logout and back in or something??
_________________
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2377
Location: Netherlands

PostPosted: Tue Dec 05, 2017 3:35 pm    Post subject: Reply with quote

Thanks fedeliallalinea!
I recompiled dolphin with your patch and now it works!
Gerard.

Edit:I hadn't yet applied the patches for kate and kwrite.
These don't have a version number in them and worked w/o a hitch.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3456
Location: Gainesville, Florida

PostPosted: Sun Feb 04, 2018 6:51 pm    Post subject: Reply with quote

Problems again. :roll:
After todays dev/qt-5.9.4 updates kdesu dolphin no longer works. A Dolphin window opens, but is not populated, and a message in red is on the top of the page saying "The process for the file protocol died unexpectedly."

Tried getting around it with this command but it didn't work. "export $(dbus-launch) && kdesu dolphin." (or using kdesu5, as both kdesu and kdesu5 exist in /usr/bin)
Tried rebuilding dolphin and kdesu5, but no luck.

Revep-rebuild says system is consistent.

Depclean wants to remove:
app-crypt/gentoo-keys
app-portage/gemato
media-libs/jasper ( I assume because have sys-apps/portage -rsync-verify set in /etc/portage because it takes 4-5 minutes to verify on each my three Gentoo systems every time I sync.

Not sure if it's the kdesu epatch need updating, and/or a full kde rebuild is needed after the big qt update, or something else I'm missing. Maybe only a few more kde packages need rebuilds?

Anyone have a fix or thoughts on the subject?.

After looking on several other sites suggesting deleting /var/tmp/ and/or /home kde cache directories I found this: At https://bugs.launchpad.net/ubuntu/+source/kde4libs/+bug/506361 where I found a suggestion:
Quote:
eugenez (eugene-zvyagintsev) wrote on 2017-01-28: #18

"kdesudo dbus-launch dolphin" works fine (work-around from https://bugs.kde.org/show_bug.cgi?id=165268#c19).
You can define an alias in ~/.bashrc: alias kdesudo='kdesudo dbus-launch' and (after re-login) just use "kdesudo blablabla"
(Kubuntu 16.10 with Plasma 5.8.5)

I found I needed to change my .bashrc alias kdol="kdesu dolphin" to "kdesu dbus-launch dolphin", and it now works again. Not sure why the qt update would cause that to happen?
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.40-r5, gcc-14
kernel-6.11.3 USE=experimental python3_12.7-final-0
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Tue Jul 17, 2018 6:02 am    Post subject: Reply with quote

Since this thread is the most relevant, thought I'd post here. A recent upgrade seems to have broken the patches as they fail to merge and I'm unable to use Dolphin as root again. Current broke versions.

kwrite-18.04.3
dolphin-18.04.3

Anyone else having problems? I was hoping that the patches wouldn't be needed anymore.
_________________
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3456
Location: Gainesville, Florida

PostPosted: Tue Jul 17, 2018 12:40 pm    Post subject: Reply with quote

Yes- same here.
Dolphin, Kwrite, and Kate failed to even emerge, so I renamed /etc/portage/patches/kde-apps to /etc/portage/patches/kde-apps.old to avoid the attempt to apply the "root" epatches, and they then installed.

I can get a Dolphin root now from a konsole terminal su'd to root and then just typing dolphin, but at least on my systems it's missing icons in the window (just little text labels).

However, even with no icons the directories or files still open, and function. Still haven't figured out how to get icons in a root dolphin back, but will work on that later. Anyone have the fix for getting icons in the root dolphin?

I guess Nsane457's patches would need some re-working, assuming it's even still possible with the updated kde code, or even if they are needed at this point as kde DID revert to make root possible again. I'm assuming we can get icons back in a root dolphin window somehow, and that would amount to the same thing as the patches provided.

Does kdesu still exist?
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.40-r5, gcc-14
kernel-6.11.3 USE=experimental python3_12.7-final-0
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Tue Jul 17, 2018 2:08 pm    Post subject: Reply with quote

Well, at least it isn't just me. I just removed the .patch on the end so that it wouldn't try to apply them. It was the easiest way I thought of. I have this pair of kdesus listed.

root@fireball / # kdesu
kdesu kdesu5
root@fireball / # kdesu

I have a little icon down at the bottom in the kicker thingy. I have it set to run dolphin and in the advanced part, it is set to run as root. When it broke for me, I changed to make it open a console so that I can see what it is doing. When I click it, I get this.

Code:
Password:
QStandardPaths: wrong ownership on runtime directory /var/run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /var/run/user/1000, 1000 instead of 0
"Session bus not found\nTo circumvent this problem try the following command (with Linux and bash)\nexport $(dbus-launch)"


I'm not quite sure on that myself. I also can't figure out how you are getting yours to work either. :? Maybe the patch can be fixed or something. I would miss doing a lot of things as root with the GUI.
_________________
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3456
Location: Gainesville, Florida

PostPosted: Tue Jul 17, 2018 11:59 pm    Post subject: Reply with quote

Hmm. I'm not using kdesu or kdesu5. All I did was after disabling the epatches I could then finish up the @world updates which included Kate, Dolphin, and kwrite which had failed before i disabled the patches.

Then I just opened konsole, typed su - and got into root. (note the space and "-" added after su). That might get rid of the QStandardPaths: wrong ownership on runtime directory /var/run/user/1000, 1000 instead of 0 problems

Then I just typed dolphin and it opened with the warning at the top of the window, although in my case I have no icons. But, it still works without the icons.

As I recall, when I first used the patches, I only needed to rebuild dolphin and the other 2. I assume when you disable the patches, a rebuild of dolphin would be needed, as I did do in the updating of my big last @world updating which did get the three packages to build with no patches enabled.

BTW, I'm running ~amd64 systems.
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.40-r5, gcc-14
kernel-6.11.3 USE=experimental python3_12.7-final-0
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Wed Jul 18, 2018 12:48 am    Post subject: Reply with quote

I figured out what you were doing and get the same thing here. It does look different. I figure it is reading a default config other than the normal one. May be looking in a different place.

Basically, I had a menu item for mine here. I just click it, it asks for my root password and it opens and runs as root.
_________________
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3456
Location: Gainesville, Florida

PostPosted: Fri Jul 20, 2018 6:30 pm    Post subject: Reply with quote

I was searching for a solution to this no icons problem, and ran across this at: https://github.com/NixOS/nixpkgs/issues/11556 (towards bottom of thread page)

They said this solves the problem:
Code:
export XDG_CURRENT_DESKTOP=kde && dolphin

I tried it in a terminal su'd to root, and it works perfectly- a nice dolphin instance pops up with normal icons back.

For convenience, I put this in my /.bashrc file:
Quote:
alias kdol="export XDG_CURRENT_DESKTOP=kde && dolphin"

Works fine, but I'd still like to know where to properly add the line XDG_CURRENT_DESKTOP=kde in which gentoo file? Tried /etc/env.d/90xdg-data-base and 30xdg-data-local, but it didn't work Also, on that webpage, they mentioned it shouldn't be set globally. (I'm not sure on that one)
Somewhere in the /etc/xdg/ files?

Output from my alias:
Code:
gentoo-audio ~ # kdol
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.accessibility.core: Cannot create accessible child interface for object:  PlacesView(0x2a01ed0)  index:  12
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
gentoo-audio ~ #


[Moderator edit: added [code] tags to preserve output layout. -Hu]
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.40-r5, gcc-14
kernel-6.11.3 USE=experimental python3_12.7-final-0
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22730

PostPosted: Sat Jul 21, 2018 5:12 pm    Post subject: Reply with quote

You could more simply get the same result with a slightly different alias:
Code:
alias dolphin="XDG_CURRENT_DESKTOP=kde dolphin"
You do not need the value exported in your current shell. You only need it present in the environment of the created dolphin process.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3456
Location: Gainesville, Florida

PostPosted: Sat Jul 21, 2018 8:35 pm    Post subject: Reply with quote

Hu,
Thanks for the tip. :)
I suppose that's likely why on that web page it was mentioned "XDG_CURRENT_DESKTOP=kde" shouldn't be set globally. Correct?

From that 2016 post, ttuegel commented:
Quote:
It's really not supposed to be set globally. It should be set by your desktop environment or window manager, as required by the XDG standard. I suspect that even setting XDG_CURRENT_DESKTOP to something else would work.

And then kirk87 asked:
Quote:
what if we don't wanna use kde5 as wm but still wanna use dolphin in either gnome or xfce. Then how can we solve the issue?

_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.40-r5, gcc-14
kernel-6.11.3 USE=experimental python3_12.7-final-0
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22730

PostPosted: Sat Jul 21, 2018 9:58 pm    Post subject: Reply with quote

I don't know why they want it not to be set globally. Unless you run some other program that actively reacts badly to that being set, I don't see the harm in having it exported generally.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3456
Location: Gainesville, Florida

PostPosted: Sun Jul 22, 2018 9:05 pm    Post subject: Reply with quote

Hu,
Leaving out the "export" in front of XDG_CURRENT_DESKTOP=kde && dolphin doesn't work on my systems.

A root Dolphin opens, but the icons are again missing.
Code:
alias kdol="export XDG_CURRENT_DESKTOP=kde && dolphin"
works as before. with normal kde icons.

Where would I put the XDG_CURRENT_DESKTOP=kde line in Gentoo, or do I need to create a new dedicated file in /etc/env.d/?

Or maybe just /etc/environment?
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.40-r5, gcc-14
kernel-6.11.3 USE=experimental python3_12.7-final-0
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22730

PostPosted: Sun Jul 22, 2018 9:32 pm    Post subject: Reply with quote

If you leave out the export, you must also leave out &&, as I showed above.
  1. A=B command : runs command, with A=B in its environment. No change to shell environment.
  2. A=B && command : puts A=B in shell environment, does not export it, then runs command. The command will not see the result of the assignment.
  3. export A=B && command : put A=B in shell environment, export it for all future commands, then run command.
You were using #3. I told you to use #1. You used #2.

I don't know the proper place to put that export. I don't use Dolphin as root.
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Mon Jul 23, 2018 6:57 am    Post subject: Reply with quote

Before the patches broke with the latest update, I had a menu entry that I used to start dolphin as root. The command was a simple "dolphin %u" with it set to run as root in the advanced section. Even using the alias mentioned in the past few posts, the menu entry fails. I set it to open a konsole so that I can see what error it is failing with. This is the error, the entire output.


Code:
QStandardPaths: wrong ownership on runtime directory /var/run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /var/run/user/1000, 1000 instead of 0
"Session bus not found\nTo circumvent this problem try the following command (with Linux and bash)\nexport $(dbus-launch)"



I tried it with both the export on the command in the menu entry and with the alias in my .bashrc files. Neither work. I do have dbus running. Output of ps aux to follow:


Code:
root@fireball / # ps aux | grep dbus
sddm     23190  0.0  0.0  33328  2288 ?        S    01:31   0:00 dbus-launch --autolaunch 50b4e73d2ca1950adbd983640000001a --binary-syntax --close-stderr
sddm     23191  0.0  0.0  19620   220 ?        Ss   01:31   0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
dale     23202  0.0  0.0  18152  1140 ?        S    01:31   0:00 /usr/bin/ck-launch-session /usr/bin/dbus-launch --exit-with-session /usr/bin/startkde
dale     23219  0.0  0.0  33332  2288 ?        S    01:31   0:00 /usr/bin/dbus-launch --exit-with-session /usr/bin/startkde
dale     23220  0.0  0.0  20292  2888 ?        Ss   01:31   0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 15 --session
dale     23319  0.0  0.1 372144 19344 ?        Sl   01:31   0:00 /usr/bin/gmenudbusmenuproxy
root     23882  0.0  0.0  33332  2164 ?        S    01:33   0:00 dbus-launch --autolaunch 50b4e73d2ca1950adbd983640000001a --binary-syntax --close-stderr
root     23883  0.0  0.0  19748  1968 ?        Ss   01:33   0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
message+ 25324  0.0  0.0  20468  3152 ?        Ss   Jul16   0:04 /usr/bin/dbus-daemon --system
root@fireball / #



While I can understand people wanting to maybe not enable root as a default in other distros, one can not update Gentoo without being root and editing files that only root can access. For Gentoo at least, there needs to be a easy way to disable such silliness.

Does anyone know what is causing those errors? I'm trying to do my weekly update and need to change some config files.
_________________
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 2 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum