I am using Terminator, because it has cool ability to split itself into more terminals. But can it be run as root, without need to type sudo -i after launch? (adding Run as root into Terminator shell for example)
Asked
Active
Viewed 3,117 times
2
PKM
- 789
- 2
- 12
- 23
-
Just curious: why do you need a root shell? – edwinksl Jun 22 '16 at 14:26
-
I'm assuming you don't want to start it from another terminal? – anonymous2 Jun 22 '16 at 14:31
-
@edwinksl Sincerely, I'm lazy to type password everytime I use `sudo` command. – PKM Jun 22 '16 at 14:37
-
1@PKM You can just tell `sudo` to use the `NOPASSWD` setting (as it says — no password asked) as a safer method than a permanent root shell. – Jun 22 '16 at 14:38
-
@PKM That is not recommended though; see http://askubuntu.com/questions/135428/what-are-the-benefits-of-sudo-over-su for example. Nonetheless, I cannot stop you from doing it if you insist. – edwinksl Jun 22 '16 at 14:38
-
@anonymous2 No, I want it to automatically run as root when I click on its icon – PKM Jun 22 '16 at 14:39
-
@BharadwajRaju I tried do it, but I don't know what to edit in `etc/sudoers`. And if set `sudo` to `NOPASSWD`, will it completely disable password for `sudo`, or just for chosen applications? – PKM Jun 22 '16 at 14:44
-
@edwinksl I know that it can be unsafe, but I'm really sick of writing my long-long password everytime :( – PKM Jun 22 '16 at 14:49
-
1@PKM You can choose. Go [here](http://askubuntu.com/questions/192050/how-to-run-sudo-command-with-no-password) to disable asking for all programs or [here](http://askubuntu.com/questions/159007/how-do-i-run-specific-sudo-commands-without-a-password) to disable for chosen ones. – Jun 22 '16 at 14:52
-
@BharadwajRaju That is what I needed, I think now I can somehow manage to set Terminator to run in root. Thanks! – PKM Jun 22 '16 at 15:07
-
@PKM Alternatively, don't start Terminator as root, but you you can still run `sudo
` without being asked for a password. – Jun 22 '16 at 15:09
1 Answers
0
Copy the .desktop file from /usr/share/applications (or just add it to desktop and then create a copy) so that you don't have to edit all from the start and then:
First option
Change the
Exec=line to:Exec=terminator -e "sudo -i"This will ask for your password when you open terminator.
Second option
Install
gksu(sudo apt-get install gksu) and change theExec=line to:Exec=gksu terminatorThis will open a pop up which will ask you your password and give you a root terminator without any user preferences though.
NOTE: Never run sudo terminator because it might change the user folder ownership or cause other problems, always use gksu for gui applications.
Thanos Apostolou
- 4,481
- 2
- 19
- 24