You are not logged in.
Hi,
I have a serious problem with running any kind of software having GUI as root, which is indispensable for editing system files. For example I want to edit /etc/pacman.conf file with KWrite, and here's what I get
[zbyszek@barca ~]$ xhost +
access control disabled, clients can connect from any host
[root@barca zbyszek]# kwrite /etc/pacman.conf
kwrite(11282): Session bus not foundKCrash: Application 'kwrite' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/root/.kde4/socket-barca/kdeinit4__0
Warning: connect() failed: : Nie ma takiego pliku ani katalogu
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi directly
drkonqi(11284): Session bus not found
Can anyone help me with this? Can anyone tell me how to login as root?
Thank you in advance.
Last edited by Zibi1981 (2010-10-05 19:30:20)
"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."
MSI Raider GE78HX 13VI-032PL
Offline
What's wrong with nano, pico, vim?
Don't tell me you really need a GUI to edit a few system files, being an Arch user...
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Well, I'd prefer KWrite, it's far more convenient. Linux is all about choosing the software you prefer, doesn't it? I used to use Vim, but now it seems more complicated. For example when I open a file and press i or INSERT vim does not go to "edit mode". Strange, but whatever, as I have always preferred KWrite, which is my favourite application for editing system files.
So how to run KWrite as root and how to login as root? Can someone explain that to me?
"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."
MSI Raider GE78HX 13VI-032PL
Offline
Try running 'xhost +' as root.
https://bbs.archlinux.org/viewtopic.php?pid=817674
Maybe vim is in edit mode when you press 'i' but it doesn't show '-- INSERT --' at the bottom of the screen.
Last edited by karol (2010-09-25 10:02:29)
Offline
Maybe vim is in edit mode when you press 'i' but it doesn't show '-- INSERT --' at the bottom of the screen.
That's how classical vi works and not how vim works. I can only guess Zibi1981's vim stuff is corrupt.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
karol wrote:Maybe vim is in edit mode when you press 'i' but it doesn't show '-- INSERT --' at the bottom of the screen.
That's how classical vi works and not how vim works. I can only guess Zibi1981's vim stuff is corrupt.
Put 'set noshowmode' in your .vimrc and try it yourself.
Offline
I stand corrected.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
O.K., but how to run KWrite as root on my account??? That was my main question
Try running 'xhost +' as root.
https://bbs.archlinux.org/viewtopic.php?pid=817674Maybe vim is in edit mode when you press 'i' but it doesn't show '-- INSERT --' at the bottom of the screen.
Here you are
[root@barca zbyszek]# xhost +
access control disabled, clients can connect from any host
[root@barca zbyszek]# kwrite /etc/pacman.conf
kwrite(12941): Session bus not found
KCrash: Application 'kwrite' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/root/.kde4/socket-barca/kdeinit4__0
Warning: connect() failed: : Nie ma takiego pliku ani katalogu
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi directly
drkonqi(12942): Session bus not found
Last edited by Zibi1981 (2010-09-25 10:19:50)
"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."
MSI Raider GE78HX 13VI-032PL
Offline
O.K., but how to run KWrite as root on my account??? That was my main question
You run either as root or as a user. You can sudo to get more privileges as a user, if that's what you're asking.
Offline
What I want is:
1. login as a normal user to my account, as I am right now in fact
2. open terminal
3. change to root account in the terminal
4. and finally run KWrite from there
The command xhost + used to do the job before, but now it doesn't work any more.
"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."
MSI Raider GE78HX 13VI-032PL
Offline
The command xhost + used to do the job before, but now it doesn't work any more.
Offline
When using KDE logging in as root is possible if you make a change in kdmrc.
The file to change is in..... /usr/share/config/kdm/kdmrc...
Scroll down to ...Allow login as root=
Enter : Allow log-in as root=true....
This will provide a log-in as root with a root password.
Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit! X-ray confirms Iam spineless!
Offline
i suppose you are running kde, you can open gui programs with sudo when using "kdesu" command instead of the "sudo" command.
Last edited by ichbinesderelch (2010-09-25 16:47:43)
Offline
How do you become root in the terminal, by "su -" or "su"?
If you used "su -" you changed the environment to the root user's one. This may cause the problems you encounter (at least it does so here). I haven't used "xhost +" since years so I cannot tell whether its behaviour has changed lately. But I usually become root by the "su" only command in case I have to run a command as root from the terminal in my current user's environment.
I cannot test this with kwrite currently as I do not have kde installed. But similar actions worked earlier all the years before.
Last edited by bernarcher (2010-09-25 16:52:46)
To know or not to know ...
... the questions remain forever.
Offline
Often GUI apps won't run as root in KDE unless you prefix it with dbus-launch.
Try running:
root@barca zbyszek]# dbus-launch kwrite /etc/pacman.conf
Last edited by SteveK (2010-09-25 16:55:18)
Offline
I still cannot run KWrite as root in terminal, when being logged as a normal user
[zbyszek@barca ~]$ xhost +
bash: xhost: nie znaleziono polecenia
[zbyszek@barca ~]$ su
Hasło:
[root@barca zbyszek]# dbus-launch kwrite /etc/pacman.conf
No protocol specified
No protocol specified
kwrite: cannot connect to X server :0.0
"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."
MSI Raider GE78HX 13VI-032PL
Offline
I still cannot run KWrite as root in terminal, when being logged as a normal user
[zbyszek@barca ~]$ xhost + bash: xhost: nie znaleziono polecenia [zbyszek@barca ~]$ su Hasło: [root@barca zbyszek]# dbus-launch kwrite /etc/pacman.conf No protocol specified No protocol specified kwrite: cannot connect to X server :0.0
Don't use root.
Did you read the link karol gave you? That should have solved your sudo X errors...
EDIT: By the way, that statement is self-contradicting. Unless you meant from a normal user's X session.
Last edited by cesura (2010-10-04 20:09:03)
Offline
kdesu kwrite /etc/pacman.conf
Last edited by skunktrader (2010-10-04 20:10:18)
Offline
Yes, I have read it, but it doesn't help me at all, as I don't have /etc/sudoers in my system.
kdesu kwrite /etc/pacman.conf
Finally! Briefly and to the point. Thank you very much skunktrader
Last edited by Zibi1981 (2010-10-04 20:15:39)
"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."
MSI Raider GE78HX 13VI-032PL
Offline
Yes, I have read it, but it doesn't help me at all, as I don't have /etc/sudoers in my system.
Wha?
I thought you have sudo installed?
Offline
Finally! Briefly and to the point. Thank you very much skunktrader
i suppose you are running kde, you can open gui programs with sudo when using "kdesu" command instead of the "sudo" command.
Offline
Yea, sorry, must have missed that...
Problem solved.
"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."
MSI Raider GE78HX 13VI-032PL
Offline
... running any kind of software having GUI as root...
<Shudder>Yikes</Shudder>
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Yea, sorry, must have missed that...
Problem solved.
Nah, it's fine.
Hope I didn't come off as an ass or something.
Offline
Save yourself much grief... never login as root, use sudo. I say this from personal experience early in my Linux 'life'.
Offline