Skip to main content
1 of 3
WinEunuuchs2Unix
  • 104.4k
  • 11
  • 18

Is this OP running Ubuntu or not?

#Evasived comments On this question I'm getting the OP is answering if he's using Ubuntu or not as the comments illustrate:

  • You should include the "#some gksudo related output" because on my system there are no error messages. What version of Ubuntu are you using? : WinEunuuchs2Unix

  • The warnings are related to the gtk theme, however, is not really important what the errors are as I just want to hide the output, not fix the warnings : angrykoala

  • I get warnings related to gtk theme all the time when running gedit which I suppress programmatically so I totally understand your annoyance at them. My point is there are no errors with whoami on my system which makes me concerned about your system. I tried gksudo, gksu and pkexec all of them have no errors. : WinEunuuchs2Unix

  • whoami is just an example as well, it could be any other command, which I want to get the output, including errors : angrykoala

  • I understand. I'm just trying to duplicate the problem on my side. Are you using Ubuntu? In the mean time look at: askubuntu.com/questions/896935/… and: askubuntu.com/questions/505594/… as possible duplicates. : WinEunuuchs2Unix

  • This is for a script, so I would rather get a programmatic solution to avoid the output on any system. Instead of whoami, any command that send stderr would be valid to recreate the problem : angrykoala

#Background

##OP claims this happens on his system:

$ gksudo whoami
> #some gksudo related output
> root

##But on my Ubuntu 16.04 with a brand new terminal no such messages:

     July 2017           ┌────────────────────────────┐
Su Mo Tu We Th Fr Sa     │   ┏━┓╻ ╻ ╻ ╻╻ ╻   ┏━┓┏┳┓   │
                   1     │   ┃┃┃┗━┫╹┗━┫┗━┫   ┣━┫┃┃┃   │
 2  3  4  5  6  7  8     │   ┗━┛  ╹╹  ╹  ╹   ╹ ╹╹ ╹   │
 9 10 11 12 13 14 15     └────────────────────────────┘
16 17 18 19 20 21 22  
23 24 25 26 27 28 29  
30 31                 

───────────────────────────────────────────────────────────────────────────────
rick@dell:~$ gksudo whoami
root
───────────────────────────────────────────────────────────────────────────────
rick@dell:~$ gksu whoami
root
───────────────────────────────────────────────────────────────────────────────
rick@dell:~$ pkexec whoami
root
───────────────────────────────────────────────────────────────────────────────
rick@dell:~$ 

So either he isn't on Ubuntu 16.04, or my version of terminal is corrupted or he isn't using Ubuntu at all. Which makes helping him difficult in this case as the problem isn't reproducible.

###Can others confirm there are no warnings on Ubuntu?

WinEunuuchs2Unix
  • 104.4k
  • 11
  • 18