LinuxQuestions.org
Help answer threads with 0 replies.
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 03-17-2005, 10:39 AM   #1
xaos5
Member
 
Registered: Dec 2004
Distribution: debian and slackware
Posts: 217

Rep: Reputation: 31
su program problem


back again... proably a simple problem to fix but can't find a solution. when I want to launch a simple program lets say kwrite it will launch fine in konsole but If I do it as root by doing su it says it can't find it. This problem came up when I started using kdesu in kde.

su
password: *******

kwrite
bash: kwrite: command not found

launches fine when not superuser and using kdesu.

when backed out from kde into the shell and do su it works fine, its only in kde I have the problem.

slack 10.1 kde 3.3.2
 
Old 03-17-2005, 10:43 AM   #2
Linux~Powered
Member
 
Registered: Jan 2004
Location: /lost+found
Distribution: Slackware 14.2
Posts: 849

Rep: Reputation: 33
Sounds like it's not in root's path. Try...

Code:
whereis kwrite
And then as root, run...

Code:
echo $PATH
To see if it is in fact in root's path.
 
Old 03-17-2005, 10:49 AM   #3
xaos5
Member
 
Registered: Dec 2004
Distribution: debian and slackware
Posts: 217

Original Poster
Rep: Reputation: 31
root has nothing for /opt/kde/bin/kwrite
how would I go about adding /opt/kde/bin/ to root's path???

sorry but i've only been using linux for a month or two now.
 
Old 03-17-2005, 10:50 AM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
If you use "su", you don't inherit roots path, so you may have to type the absolute path e.g. /opt/kde/bin/kwrite. If you use "su -", then you inherit everything.
 
Old 03-17-2005, 10:57 AM   #5
xaos5
Member
 
Registered: Dec 2004
Distribution: debian and slackware
Posts: 217

Original Poster
Rep: Reputation: 31
su -
that command works as it sees kwrite and others, but now its saying cannot connect to X server.
 
Old 03-17-2005, 11:50 AM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Yeah that sometimes happens, because on some systems, you are not allowed to run GUI programs unless you are the user who started the X session. A work around would be to use "kdesu" or do the following as the user who is logged in
Code:
$xhost +localhost
$su -c "kwrite"
Substitute localhost for your own host name if you are using anything other than localhost as your host name.
 
Old 03-17-2005, 01:02 PM   #7
xaos5
Member
 
Registered: Dec 2004
Distribution: debian and slackware
Posts: 217

Original Poster
Rep: Reputation: 31
oops can't work on it to much more now because I messed up inittab file so it won't let the system boot, trying to get my knoppix cd working but its not liking me right now, if only older computers where easier to use.
 
  


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
How this program is working ? C - Problem indian Programming 2 10-07-2005 03:22 PM
program problem megadeth Linux - Software 1 05-24-2005 09:58 PM
Problem with C program exvor Programming 27 01-04-2005 11:51 AM
Program installing problem nutz Linux - Software 5 11-23-2003 07:23 PM
C program problem.. Winter Programming 5 05-08-2002 05:10 PM

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

All times are GMT -5. The time now is 09:05 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