LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-02-2004, 08:43 PM   #1
Crashlander42
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware 9
Posts: 9

Rep: Reputation: 0
Problem opening windows as root


This may seem like a stupid question. I've usually had sucess searching the forums to answer my questions, but I don't quite know how to phrase this one.

I've been running Slackware 9.1 on one of my computers for the last month, and it's been running beautifully. I recently decided to dump the fedora off my other pc (too bloated, but very friendly ) and install Slack.

One problem. If I'm in KDE as a normal user and have a konsole open under root it won't let me start programs out of that konsole. It lets me do this on my other computer.

It say's "(program name here): cannot connect to xserver"

So unless I want to use VI, I have to log out and log on as root. yeauck.

I also can't seem to get delete or backspace to work in vi. help!
 
Old 04-02-2004, 08:46 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Okay before going root, in the console type

xhost +

this disables access controls and allows root to launch x programs. Don't run like this all the time as you leave yourself vunrable. After your finished close the console or type

xhost -

When your back as a normal user.
 
Old 04-02-2004, 09:01 PM   #3
Crashlander42
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware 9
Posts: 9

Original Poster
Rep: Reputation: 0
didn't work. I opened a console window and typed "xhost +" and it gave me:

"access control disabled, clients can connect from any host"

which seemed good, and I got excited, but when I did su - root and tried to open a program

root@villa:~# kedit
kedit: cannot connect to X server
root@villa:~# kate
ERROR: KUniqueApplication: Can't determine DISPLAY. Aborting.
root@villa:~# ark
ERROR: KUniqueApplication: Can't determine DISPLAY. Aborting.
root@villa:~#

 
Old 04-02-2004, 09:08 PM   #4
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Don't do

su -

Just

su

Otherwise you alter paths and the xprograms can't start.
 
Old 04-02-2004, 09:15 PM   #5
Crashlander42
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware 9
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks! That worked! We have linux for dummies to blame for that one.
That's how it shows it in the book "su - root". Woo.
 
Old 04-02-2004, 09:21 PM   #6
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Well it does work, su - resets the path. So you get all the extra utils root can use, the stuff in sbin etc.

normally you don't need the - But when someone says a util and it doesn't seem to exist then you need the -
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
root, opening and console Niflheim Linux - Newbie 7 01-25-2005 12:59 PM
opening root in debian phoenix_wolf Linux - Newbie 6 01-06-2005 03:41 PM
Problem opening a jpg from windows el_pajaro! Linux - Software 2 11-26-2004 03:00 PM
Opening X progs as root. shaggz Linux - General 1 04-28-2004 11:00 PM
opening a file as root in KWrite Moebius Linux - Newbie 4 01-26-2004 06:24 AM


All times are GMT -5. The time now is 11:40 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration