Leafpad - font changes revert back to Monospace 12- SOLVED!

If none of the more specific forums is the right place to ask

Leafpad - font changes revert back to Monospace 12- SOLVED!

Postby tedrogers » 2017-09-05 15:26

Hi,

Changing fonts through Leafpad preferences for normal user works while Leafpad is open, but once I close it reverts to Monospace 12.

Changing the same when Leafpad is opened via term and root is the same.

If I edit the Leafpad preference file (.config/Leafpad) via root term and change the font, save etc., then the changes persist, but only for root user.

This has no effect on normal user which is still Monospace 12!

How can I change the font permanently?

I want Noto Mono 10 in Leafpad for all users..

I have changed fonts everywhere in LXDE Debian Stretch to the Noto Sans family, in line with my wishes, but this has no effect on Leafpad font.

My normal user is already in sudoer file.

Can someone advise? It's driving me batty.

Thanks.
Last edited by tedrogers on 2017-09-05 16:45, edited 1 time in total.
tedrogers
 
Posts: 27
Joined: 2017-08-23 19:19

Re: Leafpad - font changes revert back to Monospace 12

Postby wizard10000 » 2017-09-05 15:41

tedrogers wrote:...Can someone advise? It's driving me batty.


root has its own .config directory which is why when you edit as root only root's configuration is changed. Try editing ~/.config/leafpad/leafpadrc as a normal user instead of root and you should be fine. DO NOT edit leafpad's config in your home directory as root - the resulting breakage will make you sad :)
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Leafpad - font changes revert back to Monospace 12

Postby tedrogers » 2017-09-05 15:54

wizard10000 wrote:DO NOT edit leafpad's config in your home directory as root - the resulting breakage will make you sad :)


That's exactly what I think I've been doing, but I always reverted the changes. I'll try what you suggest later on. Thanks.
tedrogers
 
Posts: 27
Joined: 2017-08-23 19:19

Re: Leafpad - font changes revert back to Monospace 12

Postby wizard10000 » 2017-09-05 16:08

tedrogers wrote:That's exactly what I think I've been doing, but I always reverted the changes. I'll try what you suggest later on. Thanks.


That's probably why it's not working - it's likely that root owns ~/.config/leafpad/leafpadrc so when you try to make changes they don't stick because your user account doesn't have rights to change a file owned by root. All the files and folders in your home directory should be owned by you; if you edit them as root they're owned by root and can't be modified by an unprivileged user :)

Just for the heck of it the easy way to fix would be to make sure all the files in your home directory are owned by you like this - as root:
Code: Select all
chown -R username:username /home/username
That should reset file ownership to where it should be and you should be able to configure leafpad using your normal user account.

Good luck -
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Leafpad - font changes revert back to Monospace 12

Postby tedrogers » 2017-09-05 16:21

Interesting that when I try to cd into the .config folder in my home I get permission denied!

It must be a permissions problem then. I'll have a good go at this later when my 2 year old isn't climbing on me!
tedrogers
 
Posts: 27
Joined: 2017-08-23 19:19

Re: Leafpad - font changes revert back to Monospace 12

Postby tedrogers » 2017-09-05 16:45

wizard10000 wrote:Just for the heck of it the easy way to fix would be to make sure all the files in your home directory are owned by you like this - as root:
Code: Select all
chown -R username:username /home/username
That should reset file ownership to where it should be and you should be able to configure leafpad using your normal user account.


Just to let you know...it was an ownership issue. Performed the chown as suggested, and now can edit fonts within Leafpad for normal user (no config editing needed) and the changes stick.

Don't quite understand how there were ownership issues...the install is only 2 days old and is virtually 'ISO fresh'.

Thanks anyway. Your help = awesome.
tedrogers
 
Posts: 27
Joined: 2017-08-23 19:19

Re: Leafpad - font changes revert back to Monospace 12

Postby wizard10000 » 2017-09-05 16:59

tedrogers wrote:Don't quite understand how there were ownership issues...the install is only 2 days old and is virtually 'ISO fresh'.


The ownership issues happen when files in your home directory are modified using the root account. When that happens root ends up owning the files and they can't be modified by your normal user - either through a settings menu or with a manual edit.

So - when you try to edit leafpad's config through its settings menu leafpad can't write to ~/.config/leafpad/leafpadrc because root owns the file. Resetting file ownership resolves the issue. IMO the #1 issue that causes this problem is running graphical applications with sudo when we should be using either gksudo or kdesudo - or better yet, not running graphical applications as root unless we absolutely have to :)

I wouldn't worry too much - almost every one of us got to learn this the hard way :mrgreen:
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Leafpad - font changes revert back to Monospace 12

Postby bryanmc » 2017-09-05 17:01

tedrogers wrote:Don't quite understand how there were ownership issues...the install is only 2 days old and is virtually 'ISO fresh'.


If I was going to guess, you initially edited the config in your home directory as root....
bryanmc
 
Posts: 65
Joined: 2016-11-18 12:21

Re: Leafpad - font changes revert back to Monospace 12

Postby tedrogers » 2017-09-05 18:00

wizard10000 wrote:Or better yet, not running graphical applications as root unless we absolutely have to


That is good advice. Thanks.

I've come from Ubuntu, started getting too heavy for my T500 laptop. So I've come to Debian which isn't a bridge too far, but it is different.

The main advantages I'm finding are that my cmd knowledge is improving massively...e.g. having to dpkg instead of using gdebi, for example. Adding my normal user to the sudoers etc.

I'm running LXDE now and have it quite nice so far, but there are still other tweaks to do. Right now, there doesn't seem to be a way to edit menu entries, so I'm guessing menulibre. Anyway, that is for another thread.
tedrogers
 
Posts: 27
Joined: 2017-08-23 19:19

Re: Leafpad - font changes revert back to Monospace 12

Postby tedrogers » 2017-09-05 18:04

bryanmc wrote:
tedrogers wrote:Don't quite understand how there were ownership issues...the install is only 2 days old and is virtually 'ISO fresh'.


If I was going to guess, you initially edited the config in your home directory as root....


Well, to be honest, it was probably (definitely) something I did!

I've been rooting around everywhere (pun intended!), been places I wouldn't normally have been (bashrc editing for $PATH, for example) as part of my efforts to get a Python 3 linter-flake8 working...you get the idea. I'm basically digging. and learning.

Even managed to get Quicktile working, because I missed the window snapping from other distributions. Quite please I managed that.

Now if only I could properly configure my Lenovo UltraNav! Damn thing, so slow. I think I'll start a thread about that now actually.

Thanks.
tedrogers
 
Posts: 27
Joined: 2017-08-23 19:19

Re: Leafpad - font changes revert back to Monospace 12

Postby sunrat » 2017-09-05 22:07

tedrogers wrote:...e.g. having to dpkg instead of using gdebi,...

You can use apt to install local packages now and it will resolve dependencies as gdebi does whereas dpkg doesn't. eg.
Code: Select all
# apt install ./package.deb

cd to directory containing package first.

And as you like "rooting around everywhere", I suggest you do a full system backup when it's in a working state so you can restore when you stuff it all up. See my sig. ;)
Last edited by sunrat on 2017-09-05 23:51, edited 1 time in total.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2035
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Leafpad - font changes revert back to Monospace 12

Postby tedrogers » 2017-09-05 22:22

sunrat wrote:
tedrogers wrote:...e.g. having to dpkg instead of using gdebi,...

You can use apt to install local packages now and it will resolve dependencies as gdebi does whereas dpkg doesn't. eg.
Code: Select all
# apt install package.deb


And as you like "rooting around everywhere", I suggest you do a full system backup when it's in a working state so you can restore when you stuff it all up. See my sig. ;)


I was just going to use partimage to be honest...haven't investigated your sig yet.

My system is dual boot Xubuntu and Debian LXDE, with a 70gb 'fluff and stuff' NTFS partition for dumping vitals!
tedrogers
 
Posts: 27
Joined: 2017-08-23 19:19

Re: Leafpad - font changes revert back to Monospace 12- SOLV

Postby stevepusser » 2017-09-05 22:40

If you're used to gdebi, you can install and use it just like in Ubuntu.

I've found that installing debs with apt is a little different from dpkg in that you either have to give the full path of the deb file(s), or if your terminal is in the same folder, you can precede it with a "./". Apt can also install multiple debs at once, even if they depend on another, and pull in missing dependencies at the same time, something gdebi can't do. So to install all i386 debs in a folder at once:
Code: Select all
# apt install ./*i386.deb


I want to see if I can get a custom action in Thunar to install debs that way if they are right-clicked.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Krita 3.3.2.1, Pale Moon 27.6.0, Audacity 2.2.0, mpv 0.27.0, Corebird 1.7.1, Firefox 57.0, SMPlayer 17.11.2
User avatar
stevepusser
 
Posts: 8900
Joined: 2009-10-06 05:53

Re: Leafpad - font changes revert back to Monospace 12- SOLV

Postby sunrat » 2017-09-05 23:23

stevepusser wrote:I've found that installing debs with apt is a little different from dpkg in that you either have to give the full path of the deb file(s), or if your terminal is in the same folder, you can precede it with a "./".

I think I did that instinctively when I used it, didn't know it is required. Will edit my last post.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2035
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Leafpad - font changes revert back to Monospace 12

Postby bryanmc » 2017-09-05 23:38

tedrogers wrote:My system is dual boot Xubuntu and Debian LXDE, with a 70gb 'fluff and stuff' NTFS partition for dumping vitals!


Rather than hold your backup on the same metal, invest in a usb hd or thumb drive and use clonezilla. That way you system is protected from both you AND hardware gremlins. :lol:
bryanmc
 
Posts: 65
Joined: 2016-11-18 12:21


Return to General Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable