You are not logged in.

#1 2022-03-21 17:50:18

j.zelinka
Member
Registered: 2016-12-05
Posts: 9

[SOLVED] Program kdesu changes the ownership of file ~/.config/pulse

Hi,

the ownership of file ~/.config/pulse is changed to root if I use program kdesu from the package kde-cli-tools to run  lxterminal or mate-terminal. So the the sound doesn't work for me then.

Can it be a bug or is it a wrong way of the usage?

JZ

Last edited by j.zelinka (2022-03-23 06:39:28)

Offline

#2 2022-03-21 18:15:13

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,285

Re: [SOLVED] Program kdesu changes the ownership of file ~/.config/pulse

Why are you running the GUI of your terminal emulator as root in the first place? I can't think of a single use case where that makes any sense whatsoever. Do you have a script in your shell initalisation files that would try to play sound/switch around a pulse profile? it could also be that an error bell then connects to your pulse client as root or so.

If you need a root shell, start your terminal normally and then su to root from there.

FWIW kdesu does not inherently do anything and does not access that path, but all bets are off depending on what happens in the GUI code of your terminal emulator.

Last edited by V1del (2022-03-21 19:16:07)

Offline

#3 2022-03-22 20:22:06

j.zelinka
Member
Registered: 2016-12-05
Posts: 9

Re: [SOLVED] Program kdesu changes the ownership of file ~/.config/pulse

V1del wrote:

Do you have a script in your shell initalisation files that would try to play sound/switch around a pulse profile? it could also be that an error bell then connects to your pulse client as root or so.

I think that the reason of the problem is the second matter you write about as program xterm causes no problems.

V1del wrote:

If you need a root shell, start your terminal normally and then su to root from there.

I use root terminal if I need more system administration - installation, setup, etc. I often use shortcuts to run my applications so the usage of kdesu is quicker (shortcut + password) if no terminal is open.

JZ

Offline

#4 2022-03-22 20:38:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,285

Re: [SOLVED] Program kdesu changes the ownership of file ~/.config/pulse

All terminal emulators I know  of let you run commands when you invoke them, make them run a su, but still, running arbitrary GUI code as root can only go wrong in multiple ways, you really shouldn't do it habitually and definitely not for something where there's no benefit to running the entire process as root, like a terminal emulator you can start a root shell in.

Last edited by V1del (2022-03-22 20:39:23)

Offline

#5 2022-03-22 20:54:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: [SOLVED] Program kdesu changes the ownership of file ~/.config/pulse

https://man.archlinux.org/man/community … _terminals:
https://man.archlinux.org/man/community … en#OPTIONS

Running the TE as root to get to a root shell is like buying a cow to get some milk.

Offline

#6 2022-03-22 20:57:24

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Program kdesu changes the ownership of file ~/.config/pulse

j.zelinka wrote:

I often use shortcuts to run my applications so the usage of kdesu is quicker (shortcut + password) if no terminal is open.

An absolutely terrible idea for so many different reasons and most likely the cause of your problem.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2022-03-22 21:18:42

j.zelinka
Member
Registered: 2016-12-05
Posts: 9

Re: [SOLVED] Program kdesu changes the ownership of file ~/.config/pulse

Slithery wrote:
j.zelinka wrote:

I often use shortcuts to run my applications so the usage of kdesu is quicker (shortcut + password) if no terminal is open.

An absolutely terrible idea for so many different reasons and most likely the cause of your problem.

In terms of functionality, it seems to me the same to open a terminal and enter the command su (or sudo) in it, or open the terminal directly as root. But since I'm not an expert, please write me, where I can find out more about the matter.

Offline

#8 2022-03-22 21:23:18

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: [SOLVED] Program kdesu changes the ownership of file ~/.config/pulse

You're running the GUI code of the terminal which is abysmally more LOCs of often very questionable quality as root when you actually care about the root shell inside the TE.
Also, it functionally equivalently fucked permissions in your $HOME… so there's that.

Offline

#9 2022-03-22 22:16:15

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: [SOLVED] Program kdesu changes the ownership of file ~/.config/pulse

I think you could achieve the same quickness of opening a shell as root without running the GUI code of the terminal as root would just be to make the shortcut load the terminal with the flag `-e su`, e.g., `mate-terminal -e su` (or `mate-terminal -e sudo bash`) rather than `kdesu mate-terminal`.

Offline

#10 2022-03-23 06:34:57

j.zelinka
Member
Registered: 2016-12-05
Posts: 9

Re: [SOLVED] Program kdesu changes the ownership of file ~/.config/pulse

Thank you all for your explanations and advice.

JZ

Offline

Board footer

Powered by FluxBB