How to have Gksu function in Ubuntu 18.04

Linux terminal

Many users use and use the gksu command when working with graphical applications from the terminal. This tool is very useful and popular with many users, but unfortunately its days are numbered. Currently Debian has removed this tool from its repositories and Ubuntu has deprecated it for the next Ubuntu LTS.

Thus, users will stop having gksu but it does not mean that its functions are lost by users. Not much less. Currently we can achieve the same by using the gvfs tool and a variable that will be compatible with almost any Ubuntu application.

Gksu is a command that was used to give a graphical interface to the su and sudo command, that is, a way to access superuser mode for graphical tools. It is also true that certain applications like Gedit can be used directly with the sudo command. But, now that we will not have such a tool we have to use the gvfs tool, a tool that will help us to have the Gksu functions without using the tool. Be careful, this does not mean that by adding a variable to the commands and lines of code we have superuser access, but in certain situations, such as editing documents, we will get something similar.

The variable we are referring to is "admin: //" a gvfs variable that will work like the gksu command. Thus, if before we wrote the following in the terminal:

gksu gedit /etc/apt/sources.list

(to edit the repositories file, to give a simple example)

Now we have to write the following:

gedit admin:///etc/apt/sources.list

This will make the tool work as if we had written the gksu command instead.

Possibly a nuisance for many users but once we get used to it, the process will be simple and natural, as has happened with the software installation of the snap packages.


2 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   I'll be back said

    I have a shortcut that executes a script where within the script I have a line to launch a java application, formerly I used the gksudo command to launch the application as root:

    #! / Bin / bash
    gksudo -u root "java -Xmx500m -jar application.jar full_screen"

    Now it's not working for me and

  2.   George said

    They really did a crime by releasing gksu, now you have to juggle to install a deb package. I wonder, it would not be better than Ubuntu avandone the DEB package and go to RPM. It really is a crime what they have done. For now, I'm going back to Debian.