LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   wysywig text editing in debian (https://www.linuxquestions.org/questions/debian-26/wysywig-text-editing-in-debian-589930/)

hugeness 10-06-2007 02:41 PM

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.

pixellany 10-06-2007 03:12 PM

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.

David the H. 10-06-2007 03:12 PM

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.

hugeness 10-06-2007 03:25 PM

wow! thanks for that, i swear the complex stuff i'm fine with, its always the simple stuff catches me out!

rickh 10-06-2007 03:26 PM

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:~#


almatic 10-06-2007 06:51 PM

Quote:

Originally Posted by rickh (Post 2915563)
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.

rickh 10-06-2007 08:26 PM

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.


All times are GMT -5. The time now is 08:44 AM.