LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-06-2007, 02:41 PM   #1
hugeness
Member
 
Registered: Aug 2003
Location: northwest uk
Distribution: debian etch Ubuntu
Posts: 32

Rep: Reputation: 15
wysywig text editing in debian


Hello
i would be happy to get a grip on vim joe emacs etc, but i am struggling with a learning curve as it is. in fedora i can just edit flat files, in debian how can i do this in the gui? seems you have to be root, but dont know how to open a file as root in the gui.
i do and will get to grips with the terminal in due course, just need to fix a bunch of samba stuff quickly. can this be done this way or will i have to bite the emacs bullet? (it really does drive me nuts!).
thanks.
 
Old 10-06-2007, 03:12 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I am not sure I understand the question---including the meaning of wysyiwyg text editing. Word Processors give you wysyiwyg text formatting, but text editors just edit text.

Whatever your current favorite editor is, you can run it as root by simply opening it from a terminal (as root)

Suppose you want to use GEDIT:

open a terminal
type "su" to become root
type "gedit"

GEDIT will open and you you can now open and edit any file as root.
 
Old 10-06-2007, 03:12 PM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
You can run just about any program with root permissions simply by prefixing the command with either gksu (gtk) or kdesu (kde). Enter the root password at the prompt, and away you go.

Just run 'gksu gedit', for example.

By the way, I recommend nano as an easy-to-use cli text editor. It's light and simple, and comes installed standard in most distributions.
 
Old 10-06-2007, 03:25 PM   #4
hugeness
Member
 
Registered: Aug 2003
Location: northwest uk
Distribution: debian etch Ubuntu
Posts: 32

Original Poster
Rep: Reputation: 15
wow! thanks for that, i swear the complex stuff i'm fine with, its always the simple stuff catches me out!
 
Old 10-06-2007, 03:26 PM   #5
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
To the OP: While I sympathize with the learning curve issues, we all went through it at one time. If you want to use Debian, please take the time to learn to do it right. Using root privileges in a gui environment is strongly discouraged in the Debian default setup. It is purposely made difficult, because it is not the correct "linux" way. Start out using nano and when you have a better handle on day-to-day system management take some time to learn basic vim. Vimtutor will be your friend in that effort.

If you're not willing to make that level of commitment, a more newbie friendly distro would probably provide a better experience.

To David the H.:
Quote:
You can run just about any program with root permissions simply by prefixing the command with either gksu (gtk) or kdesu (kde). Enter the root password at the prompt, and away you go. Just run 'gksu gedit', for example.
I have seen that advice given many times, but it has never worked for me. I never cared enough to try figuring out why, but:
Code:
debian64:~# gksu gedit

(gksu:26711): Gtk-WARNING **: cannot open display:  
debian64:~#

Last edited by rickh; 10-06-2007 at 04:37 PM.
 
Old 10-06-2007, 06:51 PM   #6
almatic
Member
 
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
Quote:
Originally Posted by rickh View Post
To David the H.:
I have seen that advice given many times, but it has never worked for me. I never cared enough to try figuring out why, but:
Code:
debian64:~# gksu gedit

(gksu:26711): Gtk-WARNING **: cannot open display:  
debian64:~#
that's because you are already root in your example. Do this as normal user or just type 'gedit' in your root console. If you still get this message you need to set appropriate permissions to the xserver (as user type 'xhost +local' or just 'xhost +').

Personally I don't think it's worth the time to really learn vi except for the basic things, like saving, changing the mode and c+p in case you need it in the busybox.
Other than that there are so many more editors in linux which are more pleasant to use than the awkward and fiddly vi.
 
Old 10-06-2007, 08:26 PM   #7
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Quote:
that's because you are already root in your example. Do this as normal user or just type 'gedit' in your root console. If you still get this message you need to set appropriate permissions to the xserver (as user type 'xhost +local' or just 'xhost +').
Ah! I see. Typing just gedit at the root prompt doesn't work, but gksu gedit as a regular user does. That may be handy at some point if I needed to edit some file owned by root. Why I would want to do so is not really apparent to me, but now that I know how it works, I'll keep an eye out for a reason to use it.

Quote:
Personally I don't think it's worth the time to really learn vi except for the basic things, ...
I agree with that. I'd much rather use a GUI text editor for general writing, or even programming. But sooner or later every user of even moderate sophistication is going to need to use an editor from the console and vi/vim is always there. And, it's much more appealing than nano, pico, etc. You don't need to know much more than how to navigate around in it, but that much is pretty critical.

Last edited by rickh; 10-06-2007 at 08:27 PM.
 
  


Reply



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
text editing linuxsavy Linux - General 1 02-12-2007 10:55 PM
text editing from a script vogelbaugh Linux - General 2 09-22-2005 12:53 PM
Editing text Files kool_kid Linux - Newbie 12 12-26-2004 11:21 PM
text editing machinemen Linux - Newbie 2 06-18-2004 04:38 AM
Text editing PhuckFonix Linux - Newbie 5 05-22-2004 09:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:58 AM.

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