OK I now we have "sudo", which is fine for doing one command at a time, but sometimes I need to do lots of stuff (especially when playing around with networking), so I find it handier to switch to root by doing:
Code:
virchanza:~$ su
Password:
root:/home/virchanza#
But here's the problem. Look what happens if I try to open Kate after having switched to root:
Code:
root:/home/virchanza# kate &
[1] 5924
root:/home/virchanza# exit
virchanza:~$ The program 'kate' is currently not installed. You can install it by typing:
apt-get install kate
bash: kate: command not found
First of all, it couldn't find Kate.
Secondly, it mysteriously typed "exit" and switched me back to my normal user.
So I tried it again:
Code:
virchanza:~$ su
Password:
root:/home/virchanza# kate &
[1] 6017
root:/home/virchanza# The program 'kate' is currently not installed. You can install it by typing:
apt-get install kate
bash: kate: command not found
[1]+ Exit 127 kate
root:/home/virchanza#
This time it didn't kick me back to my normal user, but still it failed to open Kate.
So let's see what happens if I give it the full path to Kate:
Code:
root:/home/virchanza# /opt/kde3/bin/kate &
[1] 6163
root:/home/virchanza# No protocol specified
kate: cannot connect to X server :0.0
[1]+ Exit 1 /opt/kde3/bin/kate
root:/home/virchanza#
Also let me try Kcalc:
Code:
root:/home/virchanza# /opt/kde3/bin/kcalc &
[1] 6195
root:/home/virchanza# No protocol specified
kcalc: cannot connect to X server :0.0
[1]+ Exit 1 /opt/kde3/bin/kcalc
root:/home/virchanza#
It looks like there's two problems:
1) Firstly it can't find programs like Kate and Kcalc, which I presume has something to do with the path environment variable
2) It can't connect to the Xserver
Anyone?