Results 1 to 4 of 4

Thread: Getting "cannot connect to xserver" with sudo

  1. #1
    oceanexplorer NNTP User

    Default Getting "cannot connect to xserver" with sudo


    Hi,

    when I open bash and enter the following:-

    sudo kwrite /etc/fstab

    I get the following error:

    kwrite: cannot connect to X server

    This happens for anything opened with sudo, does anyone perhaps know of
    what is wrong? This is a new installation of openSUSE 11.1

    Many thanks

    Paul


    --
    oceanexplorer
    ------------------------------------------------------------------------
    oceanexplorer's Profile: http://forums.opensuse.org/member.php?userid=20203
    View this thread: http://forums.opensuse.org/showthread.php?t=405178


  2. #2
    Axeia NNTP User

    Default Re: Getting "cannot connect to xserver" with sudo


    Try the following command instead:
    *kdesu kwrite /etc/fstab*


    --
    'Special effects' (http://tiny.cc/Y0T) <- KDE 4.2 Showing off
    More KDE -> ' PINK KDE' (http://tiny.cc/v30h)
    'HQ Pink KDE' (http://tiny.cc/R4P)
    ------------------------------------------------------------------------
    Axeia's Profile: http://forums.opensuse.org/member.php?userid=4794
    View this thread: http://forums.opensuse.org/showthread.php?t=405178


  3. #3
    Malcolm NNTP User

    Default Re: Getting "cannot connect to xserver" with sudo

    Quote Originally Posted by oceanexplorer
    Hi,

    when I open bash and enter the following:-

    sudo kwrite /etc/fstab

    I get the following error:

    kwrite: cannot connect to X server

    This happens for anything opened with sudo, does anyone perhaps know of
    what is wrong? This is a new installation of openSUSE 11.1

    Many thanks

    Paul
    Hi
    Try kdesu kwrite /etc/fstab. Maybe it's a good time to learn vi or
    vim

    --
    Cheers Malcolm (Linux Counter #276890)
    openSUSE 11.1 x86 Kernel 2.6.27.7-9-default
    up 18:31, 2 users, load average: 0.06, 0.09, 0.08
    GPU GeForce 6600 TE/6200 TE - Driver Version: 180.22


  4. #4
    oceanexplorer NNTP User

    Default Re: Getting "cannot connect to xserver" with sudo


    thanks that worked a treat

    I will take a look at vi and vim as well.

    Paul


    --
    oceanexplorer
    ------------------------------------------------------------------------
    oceanexplorer's Profile: http://forums.opensuse.org/member.php?userid=20203
    View this thread: http://forums.opensuse.org/showthread.php?t=405178


Posting Permissions

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