Results 1 to 4 of 4

Thread: Root and KDE

  1. #1
    Senior Member
    Join Date
    Nov 2003
    Posts
    1,323

    Root and KDE

    If you try to use X-apps as root you probably get:
    root@mrk-fujibox:~# kedit
    kedit: cannot connect to X server :0.0
    There are several fixes. I usually make a .profile in roots home dir with the following content:
    root@mrk-fujibox:~# cat .profile
    export DISPLAY=:0.0
    You can check the variable with:
    markus@mrk-fujibox:~$ echo $DISPLAY
    :0.0
    To create the file you need to use a console editor like mcedit:
    markus@mrk-fujibox:~$ su
    Password:
    root@mrk-fujibox:/home/markus# cd
    root@mrk-fujibox:~# mcedit .profile
    -use F2 to save and F10 to quit, tips are at the bottom of the screen.

    If you try to login to KDE as root it won't work. You should never login to KDE as root as it's a security risk.
    To do root stuff you can use:
    - sudo
    - su
    - sux
    - kdesu kedit (or some other app)
    If you really, really need to login to KDE as root you can search this forum for the answer, it's here but I'm not posting it in this thread for the simple reason that it shoudn't be used.

  2. #2
    Member registered user
    Join Date
    Jan 2005
    Posts
    71

    Re: Root and KDE

    Quote Originally Posted by Markus
    If you try to use X-apps as root you probably get:
    root@mrk-fujibox:~# kedit
    kedit: cannot connect to X server :0.0
    There are several fixes. I usually make a .profile in roots home dir with the following content:
    root@mrk-fujibox:~# cat .profile
    export DISPLAY=:0.0
    That's usually not enough - it won't work e.g. if you issue "su -" in a console to open a root shell. You'd have to also enter "xhost +localhost" before you do the "su -" to get permission to connect to the local X server; even better: open the root shell by "kdesu xterm" (or any other X console program); this will transfer the "magic X11 cookie" needed to connect to the X server (that is also the command that you execute, if you open a root shell from the Knoppix menu).

    Thomas

  3. #3
    Senior Member
    Join Date
    Nov 2003
    Posts
    1,323
    You're probably right, forgot the following file I have:
    markus@mrk-fujibox:~$ cat .kde/Autostart/kufbootstuff.sh
    #!/bin/sh
    xhost local:
    numlockx on

  4. #4
    Senior Member
    Join Date
    Nov 2003
    Posts
    1,323
    As someone pointed out the file permissions also play a role in this:
    root@mrk-fujibox:~# ll ~/.profile
    -rw------- 1 root root 31 Mar 6 13:54 /root/.profile

    markus@mrk-fujibox:~$ ll ~/.kde/Autostart/kufbootstuff.sh
    -rwx------ 1 markus markus 284 Dec 16 19:52 /home/markus/.kde/Autostart/kufbootstuff.sh

    The filename kufbootstuff.sh can be changed to anything.sh
    You can set the executable bit with: chmod u+x ~/.kde/Autostart/filename.sh

    You also need to logout and login again for the file under .kde to get loaded, or just do: xhost local:

Similar Threads

  1. Can only log on as Root
    By Amdmhz in forum Networking
    Replies: 4
    Last Post: 10-23-2004, 04:21 PM
  2. root pwd
    By metroidprime13 in forum General Support
    Replies: 1
    Last Post: 03-15-2004, 03:13 AM
  3. root on USB
    By Alexxx in forum Customising & Remastering
    Replies: 0
    Last Post: 02-27-2004, 03:31 PM
  4. How do you log in as Root
    By Snow in forum General Support
    Replies: 10
    Last Post: 02-03-2004, 03:12 PM
  5. df -a has no (root) / ??
    By KnoDeb in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 01-06-2003, 09:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


IBM Power S822 12-Bay Server System Power8 Core 3.42Ghz DVD-Rom Drive 64GB No HD picture

IBM Power S822 12-Bay Server System Power8 Core 3.42Ghz DVD-Rom Drive 64GB No HD

$399.99



IBM System X3650 Server M2 2 x Xeon X5570 2.93 Ghz w/128 GB/DVDRW picture

IBM System X3650 Server M2 2 x Xeon X5570 2.93 Ghz w/128 GB/DVDRW

$169.99



IBM Power 720 POWER7 00E6516 3.6GHz CPU 64GB RAM Server  picture

IBM Power 720 POWER7 00E6516 3.6GHz CPU 64GB RAM Server

$209.98



IBM 7944AC1 System x3550 M3 Server 1*Intel Xeon X5650 2.67GHz 4GB SEE NOTES picture

IBM 7944AC1 System x3550 M3 Server 1*Intel Xeon X5650 2.67GHz 4GB SEE NOTES

$26.97



IBM System x3250 M4 Server Intel Xeon E3-1220 3.10GHz 8GB RAM No HDDs picture

IBM System x3250 M4 Server Intel Xeon E3-1220 3.10GHz 8GB RAM No HDDs

$74.77



IBM SYSTEM x3650 M4 Xeon E5-2609 2.40GHZ 16GB DDR3-1066MHZ 2x 550W PSU TESTED picture

IBM SYSTEM x3650 M4 Xeon E5-2609 2.40GHZ 16GB DDR3-1066MHZ 2x 550W PSU TESTED

$109.95



IBM Power 740 8205-E6C Express 8-SFF Power7 3.55GHz CPU 64GB RAM *No HDD* Server picture

IBM Power 740 8205-E6C Express 8-SFF Power7 3.55GHz CPU 64GB RAM *No HDD* Server

$191.99



IBM LOGO PLASTIC COLOR RAISED LOGO SERVER RACK CASE DRAWER ENCLOSURE SYSTEM picture

IBM LOGO PLASTIC COLOR RAISED LOGO SERVER RACK CASE DRAWER ENCLOSURE SYSTEM

$51.85



IBM Power S822 8284-22A 2.5

IBM Power S822 8284-22A 2.5" 12-Bay 64GB 2X 00ND478 2X 00E2865 *READ*

$599.99



IBM Lenovo X3650 M5 2U 8x 2.5” CTO Rack Server – 2x HS, 2x 750W picture

IBM Lenovo X3650 M5 2U 8x 2.5” CTO Rack Server – 2x HS, 2x 750W

$199.00