Find the answer to your Linux question:
Results 1 to 6 of 6
Hey Guys. Recently got myself Debian4.0 with KDE. Working pretty well. I can mount my USB drives etc fine however when trying to edit fstab in order to auto mount ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Posts
    3

    Mounting and Command Line text editing


    Hey Guys.
    Recently got myself Debian4.0 with KDE. Working pretty well. I can mount my USB drives etc fine however when trying to edit fstab in order to auto mount these devices i come across a problem.

    If i open kwrite (KDE text editor) and navigate to the correct file at /etc/fstab i can edit the file but i do not have permission to save the new file. I find this odd as i am the administrator user of the computer and hence by directory is root.

    From the mounting USB devices tutorial on these pages i know that i should be doing this from command line.
    The tutorial is slightly different as it uses gedit.
    This is what my terminal tells me when i invoke kwrite on the fstab file.

    edwardfisher@localhost:~$ su
    Password:
    localhost:/home/edwardfisher# kwrite /etc/fstab
    Xlib: connection to ":0.0" refused by server
    Xlib: No protocol specified

    kwrite: cannot connect to X server :0.0
    localhost:/home/edwardfisher

    From reading the tutorial it seems i need to be in root directory hence:

    localhost:/home/edwardfisher# cd /
    localhost:/# ls
    bin dev initrd lost+found opt sbin sys var
    boot etc initrd.img media proc selinux tmp vmlinuz
    cdrom home lib mnt root srv usr
    localhost:/# cd /root
    (change directory to root folder with password(see above))
    localhost:~# kwrite /etc/fstab
    Xlib: connection to ":0.0" refused by server
    Xlib: No protocol specified

    kwrite: cannot connect to X server :0.0
    localhost:~#

    OK so as mentioned i can mount my USB drives etc fine however when i come to automount i cannot save the edited fstab file.

    In the tutorial it mentions:
    in terminal type as root: gedit /etc/fstab
    What does it mean by type as root? and Is my above method completely wrong?


    Any help much appreciated.

    Cheers.
    Ed

  2. #2
    Linux User glennzo's Avatar
    Join Date
    Sep 2004
    Location
    Salem, Mass
    Posts
    466
    Hi EddieFisher. As root means to open a terminal and log in as root, then type the command gedit /etc/fstab. The error you see,
    Code:
    Xlib: connection to ":0.0" refused by server
    Xlib: No protocol specified
    is something I've experienced in Fedora, but usually one time only. Seems like it happens just after an install when I'm doing first time configuration. A reboot seems to fix this 'error' so I wouldn't worry about it right now.
    Glenn
    Powered by Fedora

  3. #3
    Just Joined!
    Join Date
    Dec 2007
    Posts
    3
    Thanks Glennzo.
    I take it that changing to root when in terminal uses the su command, or thats what i thought anyway.
    After a reboot the same error message is displayed.

    edwardfisher@localhost:~$ su
    Password:
    localhost:/home/edwardfisher# kwrite /etc/fstab
    Xlib: connection to ":0.0" refused by server
    Xlib: No protocol specified

    kwrite: cannot connect to X server :0.0

    Cheers.
    Ed

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User glennzo's Avatar
    Join Date
    Sep 2004
    Location
    Salem, Mass
    Posts
    466
    Yes, changing to root means typing su or su -. su gives you root powers with the current path, su - gives you root powers with root's path. Is there another text editor you could try? I'm a Gnome user. Don't use KDE too often.
    Glenn
    Powered by Fedora

  6. #5
    Just Joined!
    Join Date
    Dec 2007
    Posts
    3
    Ok so finally got kwrite to save the fstab file. All seemed fine.
    So i do a reboot expecting fstab to auto mount the usb drive.

    However when i navigate to the drive using Konqueror i get this message:

    "Could not enter folder /mnt/usbflash."

    The thing is that the drive comes up fine in the navigator complete with a little usb icon etc.

    Any ideas?

  7. #6
    Linux User glennzo's Avatar
    Join Date
    Sep 2004
    Location
    Salem, Mass
    Posts
    466
    In a terminal dmesg | grep mount might tell you something. Also the mount command will tell you what's currently mounted. How about posting your /etc/fstab file in a reply here, cat /etc/fstab in a terminal. Also, is the USB drive EXT3, NTFS or FAT32?
    Glenn
    Powered by Fedora

Posting Permissions

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