LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-18-2010, 06:26 PM   #1
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Rep: Reputation: Disabled
Xfce + kdesu konsole + tab completion ends up with high CPU usage by dbus


Hi,

With Slackware 13.1 I decided to switch to Xfce, but as I like Konsole I'm using it under Xfce. I like to have Konsole being fired up with root privileges, so I added Launcher to Xfce panel with command as follows:
Code:
kdesu -c "konsole -e /bin/bash -l"
Now, when I open the Konsole with this Launcher everything is fine, I can run commands as the root user. But if I try to use tab completion in bash, the CPU usage suddenly goes very high. I found that the process causing this problem is:
Code:
dbus-daemon --fork --print-pid 5 --print-address 7 --session
and it is owned by root. When I kill this process the CPU usage gets normal, but I'm not able to run Konsole with the Launcher any more. The only way to get it back is to kill all the kdesu (owned by me) and dbus processes (owned by root).

I also noticed that normal user (that is me using Xfce) has also exactly the same dbus process running, that is
Code:
dbus-daemon --fork --print-pid 5 --print-address 7 --session
BTW, this doesn't happen when I run xterm or Termianl.
Also, using
Code:
kdesu dbus-launch konsole
gives the same odd effect.

So I'd like to ask how can I solve this problem?

I'm running Slackware 13.1 with Xfce 4.6.2 built with Robby Workman's SlackBuild (ftp://ftp.slackware.org.uk/people/rl....1/xfce-4.6.2/) with the source code modified so it runs KDE4 services (kdeinit4 and krunner) instead of KDE3 services (kdeinit and dcop).
I have also my own custom kernel, but I think it's not relevant in any way.

--
Best regards,
Andrzej Telszewski
 
Old 06-20-2010, 04:17 AM   #2
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
I also use Konsole outside the KDE DE, in Openbox WM.
I had also problems with kdesu to open a root konsole.
So now I use a profile to get root privileges in konsole.
You can manage that in the Settings menu of a konsole window.
After that you can open directly the root profile, launching Konsole with :
konsole --profile <profile_name>

That way uses the su command, not kdesu which didn't work well on my computer.
 
Old 06-20-2010, 04:42 AM   #3
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Original Poster
Rep: Reputation: Disabled
Hi,

berbae, I will try it, but the problem still remains unsolved I don't know yet how does kdesu behave with other applications, that is if it does/doesn't have this odd effect. It seems that there are a lot of changes in KDE since 3.5...

Also I will try the ktsuss, but I liked kdesu as it was able to remember password for a while.

Also, in KDE 3.5 when I used kdesu + konsole, I was able to run X applications (kate, konqueror, etc.) from it with root privileges, but now it complains that it cannot contact the X server.
 
Old 06-20-2010, 08:46 AM   #4
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
When I used KDE4, I found a workaround to launch KDE applis with root privileges :

xhost +;kdesu dbus-launch <application_name>

and after getting out of the appli :
xhost -

The 'xhost +' command allows everyone to connect to the X server.

<application_name> can be dolphin, kate, konqueror, ...
I could then use them with root privileges without any error messages.

It was some time ago though. Things may have change since then.

Sorry I cannot find any other suggestions to give you in your particular configuration.
 
Old 06-21-2010, 07:51 AM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I think it's better to run "su -" in the Konsole instead of running is as root.
 
Old 06-21-2010, 10:15 AM   #6
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Original Poster
Rep: Reputation: Disabled
Hi,
Quote:
I think it's better to run "su -" in the Konsole instead of running is as root.
It depends. With KDE 3.5 when I had Konsole opened with kdesu, I was able to start other X apps from it with root privileges. With "su -", when you open new tab in Konsole, bash is opened with as normal user, so you have to type "su -" and password again if you want to have two tabs with root. Also, as I mentioned before, kdesu remembered password for some time, so I didn't have to type it again if I accidentally closed the Konsole window.

It's a question of taste and I really want to use Konsole with kdesu as I did it with KDE 3.5. So still, any suggestions are welcome.

--
Best regards,
Andrzej Telszewski
 
Old 06-25-2010, 03:40 PM   #7
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Original Poster
Rep: Reputation: Disabled
Hi,

Running
Code:
xhost +local:root
before kdesu solved the problem. It seems that everything was about KNotify, which (among other situations) is run when you press tab key in Konsole for the first time. As Konsole was run as root, the KNotify was run also as root and so it couldn't connect to X server run as normal user.

Thanks for help.

--
Best regards,
Andrzej Telszewski
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
High CPU Usage and 12 zombies??? kopper27 Linux - Newbie 3 04-05-2010 03:54 PM
CPU usage too high! rock.k Linux - Newbie 4 03-01-2008 04:48 AM
High CPU usage ?! Why? skate Linux - Software 1 04-11-2007 05:55 AM
High Cpu usage untak Debian 21 01-23-2007 06:21 AM
cpu usage high corbintechboy VectorLinux 2 07-27-2005 08:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration