Text editor

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
tallkeesh
Level 1
Level 1
Posts: 2
Joined: Tue Aug 20, 2019 9:58 am

Text editor

Post by tallkeesh » Tue Aug 20, 2019 10:01 am

I thought Mint came with a text editor but I don't see one and when I search for "text" nothing comes up. Am I missing something? Is there a general light weight editor anyone can recommend?

User avatar
xenopeek
Level 24
Level 24
Posts: 24060
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Text editor

Post by xenopeek » Tue Aug 20, 2019 10:16 am

If you mean a plain text editor, that's Xed. It should show up when searching for text. Which Linux Mint version do you have and what desktop environment? (if unsure, check System Info in your menu or run inxi -S on terminal)

For document editing (with text formatting) there's LibreOffice Writer.
Image

wwfwng
Level 3
Level 3
Posts: 112
Joined: Tue Jul 24, 2012 9:19 pm

Re: Text editor

Post by wwfwng » Tue Aug 20, 2019 10:42 am

I like Pluma and Leafpad. You will have to install them which is easy to do with Synaptic Package Manager.

tallkeesh
Level 1
Level 1
Posts: 2
Joined: Tue Aug 20, 2019 9:58 am

Re: Text editor

Post by tallkeesh » Tue Aug 20, 2019 11:07 am

I upgraded to 19.2 and use Cinnamon. I didn't have Xed installed but found it and got it installed. Thanks!

missmoondog
Level 3
Level 3
Posts: 121
Joined: Wed Nov 07, 2018 9:17 am

Re: Text editor

Post by missmoondog » Tue Aug 20, 2019 11:44 am

another vote for leafpad! :)

User avatar
xenopeek
Level 24
Level 24
Posts: 24060
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Text editor

Post by xenopeek » Tue Aug 20, 2019 12:00 pm

That's strange. Are you missing any of the other default installed X-Apps?

pix
xplayer
xreader
xviewer
Image

User avatar
majpooper
Level 5
Level 5
Posts: 910
Joined: Thu May 09, 2013 1:56 pm
Location: North Carolina, USA

Re: Text editor

Post by majpooper » Tue Aug 20, 2019 5:08 pm

missmoondog wrote:
Tue Aug 20, 2019 11:44 am
another vote for leafpad! :)
+1 love leafpad and also install GKSU from Debian 9 (I know a version behind - but works great no issues) because I have to be able to gksudo leafpad. :D

User avatar
BenTrabetere
Level 5
Level 5
Posts: 977
Joined: Sat Jul 19, 2014 12:04 am
Location: Hattiesburg, MS USA

Re: Text editor

Post by BenTrabetere » Tue Aug 20, 2019 7:16 pm

Leafpad is okay, but I prefer Pluma. It is a tabbed text editor, and I really like being able to have several files open in tabs instead of in separate windows.


Edit: Yes, I know Xed is a fork of Pluma and that it is also a tabbed text editor.

User avatar
lsemmens
Level 8
Level 8
Posts: 2342
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: Text editor

Post by lsemmens » Wed Aug 21, 2019 9:51 am

Running Cinnamon here, and have not installed a text editor but I do note in the menu that under "Accessories" you will find "Text Editor".
Kernel: 4.15.0-46-generic x86_64 bits
Desktop: Cinnamon 3.8.9
Distro: Linux Mint 19 Tara

Laptop HP-ProBook-470-G2 8Gb RAM SSD
Server AMD Phenom 9650 - GEForce 9400GT 6Gb RAM
+ three other Mint machines
Out of my mind - please leave a message

TI58C
Level 4
Level 4
Posts: 354
Joined: Tue Jul 18, 2017 5:57 am

Re: Text editor

Post by TI58C » Sat Aug 24, 2019 6:16 am

majpooper wrote:
Tue Aug 20, 2019 5:08 pm
+1 love leafpad and also install GKSU from Debian 9 (I know a version behind - but works great no issues) because I have to be able to gksudo leafpad. :D
A bit outside of this thread, but as one major (RNLAF,retired who also uses gksu) to another, I bet you do have an issue: root-owned files in or below your home dir.
find and solve with

Code: Select all

find $HOME -user root && sudo chown -R $USER:$USER $HOME
Robert
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.

User avatar
majpooper
Level 5
Level 5
Posts: 910
Joined: Thu May 09, 2013 1:56 pm
Location: North Carolina, USA

Re: Text editor

Post by majpooper » Sat Aug 24, 2019 1:07 pm

TI58C wrote:
Sat Aug 24, 2019 6:16 am
majpooper wrote:
Tue Aug 20, 2019 5:08 pm
+1 love leafpad and also install GKSU from Debian 9 (I know a version behind - but works great no issues) because I have to be able to gksudo leafpad. :D
A bit outside of this thread, but as one major (RNLAF,retired who also uses gksu) to another, I bet you do have an issue: root-owned files in or below your home dir.
find and solve with

Code: Select all

find $HOME -user root && sudo chown -R $USER:$USER $HOME
Robert
HOOOAH Robert,
Good catch and I would have never realized the issue because I am a disciple of Pjotr,s Easy Linix Tips Project in which Pjotr recommends doing exactly what you suggest in the "Fix a potential permissions bug in your home folder" section - not to solve the GKSU issue specifically but as a matter of course. After every fresh install, I update then apply the tweaks recommended by Pjotr
https://easylinuxtipsproject.blogspot.com/p/1.html
-break-
Outside the thread as well. I am also retired, first time 2006 the recalled to active duty 2007 and retired again 2011. Started out in Army Aviation as a helicopter crew chief and after almost 9 years of enlisted service got out and finished college went back and went to OCS (Officer Candidate School) and was commissioned Field Artillery.

ajgreeny
Level 4
Level 4
Posts: 407
Joined: Mon Nov 19, 2007 3:27 pm

Re: Text editor

Post by ajgreeny » Sat Aug 24, 2019 3:35 pm

Assuming Mint works just like Ubuntu, you do not need to use or install gksu in order to edit files with root permissions, you can use

Code: Select all

sudo -H leafpad
which starts it as root without the potential problem of changing your /home file ownership to root, which simply using sudo leafpad without the -H option could do in some circumstances.

User avatar
majpooper
Level 5
Level 5
Posts: 910
Joined: Thu May 09, 2013 1:56 pm
Location: North Carolina, USA

Re: Text editor

Post by majpooper » Sat Aug 24, 2019 5:26 pm

ajgreeny wrote:
Sat Aug 24, 2019 3:35 pm
Assuming Mint works just like Ubuntu, you do not need to use or install gksu in order to edit files with root permissions, you can use

Code: Select all

sudo -H leafpad
which starts it as root without the potential problem of changing your /home file ownership to root, which simply using sudo leafpad without the -H option could do in some circumstances.
Interesting - never was aware of the

Code: Select all

sudo -H
option but makes sense if not in a graphical environment I suppose. Kind of over my head here, like waaaay over my head actually so take this with a grain of salt but forever this has been my understanding and why I have followed the

Code: Select all

gksudo leafpad
approach.
You should never use normal sudo to start graphical applications as Root.You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. This prevents files in your home directory becoming owned by Root.

TI58C
Level 4
Level 4
Posts: 354
Joined: Tue Jul 18, 2017 5:57 am

Re: Text editor

Post by TI58C » Sat Aug 24, 2019 7:45 pm

majpooper wrote:
Sat Aug 24, 2019 5:26 pm

HOOOAH Robert,
Good catch and I would have never realized the issue because I am a disciple of Pjotr,s Easy Linix Tips Project in which Pjotr recommends doing exactly what you suggest in the "Fix a potential permissions bug in your home folder" section - not to solve the GKSU issue specifically but as a matter of course. After every fresh install, I update then apply the tweaks recommended by Pjotr
https://easylinuxtipsproject.blogspot.com/p/1.html
Well, another thing we have in common: I am also a fan of Pjotr, a countryman of mine.
ajgreeny wrote:
Sat Aug 24, 2019 3:35 pm
Assuming Mint works just like Ubuntu, you do not need to use or install gksu in order to edit files with root permissions, you can use

Code: Select all

sudo -H leafpad
which starts it as root without the potential problem of changing your /home file ownership to root, which simply using sudo leafpad without the -H option could do in some circumstances.

Please forget about the l"sudo -H" !!!!
You have the right approach majpooper:
You should never use normal sudo to start graphical applications as Root.You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. This prevents files in your home directory becoming owned by Root.
[/quote]

Using sksudo is less of a problem than sudo -H
Read this post please: viewtopic.php?t=228412#p1206863 about the diverse options that (used to) exist.
Both xenopeek and pjotr make clear why this is not a good idea.

In the new system, the accepted way is to use xed (or leafpad as it is also a graphical program) like this:

Code: Select all

xed admin:///etc/default/grub
I use nano as editor for root-owned files as nano is totally non-graphical. have alias sumc that starts midnight commander like this:

Code: Select all

sudo EDITOR=nano mc
This way I can navigate with mc (like the "norton commander" of the old days), press F4 and edit root owned files without any problems.

I need gksudo for just one program I wrote a few years ago that will use file / loop device and LUKS encryption so encrypted file will act like an encrypted partition. Have a "legacy" of several such "vault-files and have not rewritten the bash-script yet.

Personnally I think the whole pkexec / polkit ensemble is needlessly complicated for the average user. And the way most people use it (like this:)

Code: Select all

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY  proram_name
Is hardly correct. You SHOULD start with defining policies. But nobody does because it is too complicated. See my earlier questions after upgrade from mint 17.3 here: viewtopic.php?f=90&t=291688&hilit=pkexec#p1618602

But do not want to rant. Use gksudo sometimes, but that does have the consequence that you WILL get root-owned files in/below your home-dir.

Robert



If you are interested, some reading material:
https://www.linuxmintusers.de/index.php?topic=50011.0
https://ubuntuforums.org/showthread.php?t=2244934
viewtopic.php?t=221167
https://ubuntuforums.org/showthread.php?t=2225832
viewtopic.php?t=268140
https://askubuntu.com/questions/287845/ ... ure-pkexec
https://askubuntu.com/questions/78352/w ... ksu-gksudo
https://unix.stackexchange.com/question ... ing-pkexec
https://askubuntu.com/questions/641593/ ... sktop-file
http://www.admin-magazine.com/Articles/ ... -PolicyKit
viewtopic.php?t=285675|
https://help.ubuntu.com/community/RootS ... ot_account
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.

Minux1
Level 2
Level 2
Posts: 72
Joined: Tue Aug 06, 2019 1:49 am

Re: Text editor

Post by Minux1 » Mon Aug 26, 2019 12:51 am

I'll be sticking with UI and graphical methods in LM.
Never had issues with DOS or VBA in the Windows environment but I take one look at that Terminal code and my eyes cross & my head starts aching.
I have to admire people who can make heads or tails of that gobbledygook.
Looks like "alphabet soup" to me.

TI58C
Level 4
Level 4
Posts: 354
Joined: Tue Jul 18, 2017 5:57 am

Re: Text editor

Post by TI58C » Sat Aug 31, 2019 8:19 pm

Minux1 wrote:
Mon Aug 26, 2019 12:51 am
I'll be sticking with UI and graphical methods in LM.
Never had issues with DOS or VBA in the Windows environment but I take one look at that Terminal code and my eyes cross & my head starts aching.
I have to admire people who can make heads or tails of that gobbledygook.
Looks like "alphabet soup" to me.
Well, some like it sweet, some like meat.
Mint will accomodate you either way.

But do not be intimidated by the thought of using the terminal. It really is not as hard as it seems at first. And learning how to use the command line will give you more power over your mint system, not to mention the fact that sometimes it simply is the only way to solve a problem.
Take small steps. You had to learn to walk before you could run too.

Robert
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.

Hoser Rob
Level 14
Level 14
Posts: 5441
Joined: Sat Dec 15, 2012 8:57 am

Re: Text editor

Post by Hoser Rob » Sun Sep 01, 2019 10:00 am

missmoondog wrote:
Tue Aug 20, 2019 11:44 am
another vote for leafpad! :)
Me too, it's been my default for years. Fast, light, nop dependencies, and it doesn't choke on big files.

TI58C
Level 4
Level 4
Posts: 354
Joined: Tue Jul 18, 2017 5:57 am

Re: Text editor

Post by TI58C » Mon Sep 02, 2019 4:58 am

Leafpad. was standard a long time ago (knoppix?) but almost forgot about it.

Installed it, tried it...now I'm a convert.
No gdk/gtk errors ! No depemdencies ! GREAT

As for root-owned files, will stick to my old ways though..

Still, Thank you all for pointing me to this sleek little beauty

Robert
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.

Petermint
Level 5
Level 5
Posts: 653
Joined: Tue Feb 16, 2016 3:12 am

Re: Text editor

Post by Petermint » Mon Sep 02, 2019 6:22 am

Bluefish is good for those occasions when you want 200 files open at the same time. Does the right thing for HTML and some other formats. Nice search on disk.

User avatar
busdriver12
Level 1
Level 1
Posts: 14
Joined: Mon Aug 12, 2019 9:34 am
Location: Perth WA

Re: Text editor

Post by busdriver12 » Sat Sep 07, 2019 7:22 am

I've only been using Linux for a couple of weeks, but have found xed is fine in a GUI and have been using nano on the command line.

FWIW
Phil

Linux Mint 19.2 Cinnamon Dual boot with Win 7

Post Reply

Return to “Newbie Questions”