Terminal cannot start GUI apps
Forum rules
Before you post please read how to get help
Before you post please read how to get help
-
- Level 1
- Posts: 3
- Joined: Fri Feb 23, 2018 1:30 am
Terminal cannot start GUI apps
I've been using Linux Mint XFCE for years, current version is 17.3 "Rosa".
Yesterday I faced a weird problem. I cannot start any GUI apps from terminal as ROOT:
- I open terminal
- sudo su giving the password which is accepted
- type in eg. leafpad & enter
The indicator of hard disk starts to flash but the app won't open. But a task (in Task manager) takes 25% of CPU-time using hard disk and I even can't kill the task.
Apps starts fine as a normal user.
Same thing if I try to open a folder as root, in File Manager, Thunar 1.6.10. The folder won't open but Thunar starts to use the disk taking 25% of CPU-time. And this never ends, well, I waited half an hour...
Same thing with Update Manager. Click Install Updates, type in the password, all package items will be grayed (disabled) and then nothing happens. In Task Manager "synaptic" is taking 25% of CPU-time.
In every case the hard disk indicator is blinking heavily, no matter how long I wait. And tasks cannot be killed, just gives an error saying something about missing previledges.
So guys, what to do?
Yesterday I faced a weird problem. I cannot start any GUI apps from terminal as ROOT:
- I open terminal
- sudo su giving the password which is accepted
- type in eg. leafpad & enter
The indicator of hard disk starts to flash but the app won't open. But a task (in Task manager) takes 25% of CPU-time using hard disk and I even can't kill the task.
Apps starts fine as a normal user.
Same thing if I try to open a folder as root, in File Manager, Thunar 1.6.10. The folder won't open but Thunar starts to use the disk taking 25% of CPU-time. And this never ends, well, I waited half an hour...
Same thing with Update Manager. Click Install Updates, type in the password, all package items will be grayed (disabled) and then nothing happens. In Task Manager "synaptic" is taking 25% of CPU-time.
In every case the hard disk indicator is blinking heavily, no matter how long I wait. And tasks cannot be killed, just gives an error saying something about missing previledges.
So guys, what to do?
- catweazel
- Level 19
- Posts: 9805
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: Terminal cannot start GUI apps
gksu ...
instead of sudo su ...
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
-
- Level 1
- Posts: 3
- Joined: Fri Feb 23, 2018 1:30 am
Re: Terminal cannot start GUI apps
If you're in the habit of opening GUI applications with
I'm sure someone will be able to show you how to restore ownership of your files.
sudo
and/or su
, then you have most likely created permissions problems which are now giving you trouble. Graphical applications should always be started from a terminal with gksudo
or gksu
. Otherwise, any file they write to becomes owned by root and not by the user. The message you saw about missing privileges confirms that this is the case here.I'm sure someone will be able to show you how to restore ownership of your files.

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
-
- Level 1
- Posts: 3
- Joined: Fri Feb 23, 2018 1:30 am
Re: Terminal cannot start GUI apps
I don't have that habit but sometimes when I want to edit some conf-file needing root, I might do that, using leafpad. This "habit" has been working fine for years.Moem wrote: ⤴Fri Feb 23, 2018 3:06 amIf you're in the habit of opening GUI applications withsudo
and/orsu
, then you have most likely created permissions problems which are now giving you trouble. Graphical applications should always be started from a terminal withgksudo
orgksu
. Otherwise, any file they write to becomes owned by root and not by the user. The message you saw about missing privileges confirms that this is the case here.
I'm sure someone will be able to show you how to restore ownership of your files.
But using directly File or Update Manager won't work either.
Actually, first time I faced this problem was in File Manager when I tried to open a folder as root. And also this has been working fine before.
Re: Terminal cannot start GUI apps
That makes sense, because the ownership of certain files in your home directory is now messed up no matter which application you try to use. I can't tell you how to check for ownership issues but I know other people will be along who can.markku2812 wrote: ⤴Fri Feb 23, 2018 3:29 amBut using directly File or Update Manager won't work either.
As for the word 'habit', once is enough. It doesn't matter how often. Just don't use 'sudo' or 'su' with graphical applications, ever. That is what 'gksudo' is for.

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
Re: Terminal cannot start GUI apps
To find all files in your home directory not owned by your regular user, execute as said regular user,
If satisfied that the displayed files should indeed be reowned, you can do so with
Code: Select all
find ~/ -xdev ! -user $(whoami)
Code: Select all
find ~/ -xdev ! -user $(whoami) -print0 | xargs -0 sudo chown $(whoami):