How I can Open app as root by just using the right click menu

there r good cutom actions in nemo or thunar file manger, to add items in context menu, like open folder as root, edit as root for text files,
but I didn't found action for open app as root for application.
is there a way to do that in zorinlite?

I'm using cinnamon and with Nemo I already have this action just by right clicking

I'm not sure why anyone would want to do this as there is no point. An application will work system wide as long as it is installed that way. If an app has profiles then it doesn't really matter if it is under admin or a user, you would only see that profile. This isn't something that is coded for because it doesn't make much sense.

The only time you would really need "root" access to an app is if you're messing with the configuration files for the app. But if you install the app under the user and not system wide no root access is required.

1 Like

how i can manage that(installing the app under the user),
I have installed source code(with go language) and compile it with go and go build, but i haven't any option or info to manage installing it under user or root.

I am using Zorin LIte (default desktop XFCE) with Nemo installed and it also comes with the Right Click "Open as root".

4 Likes

You need to follow the directions of install when compiling. Usually they will automatically install to root, but not always. You can install it anywhere you want though when you give it the path you are using.

You can usually check the install.sh file to see where files will be installed to.

1 Like

Exactly.....

I'm too using nemo in xfce , and i have open as root in cotext menu, and i'm using thunar also , and i have added that fucntion in it , and it is working good, my question was about more of custom actions, like open app as root

https://docs.xfce.org/xfce/thunar/custom-actions

Thunar can display stored files of an application, but Thunar does not actively launch applications.

As noted: You currently have three open threads on the issue of launching applications as root...

2 Likes

Please seem my reply to this above. The reason you're finding it difficult is because it doesn't make much sense. You just open an app, it doesn't matter if it is root or not as it goes by your profile if one relies on that within the app itself. The app doesn't care if you're root or a user, it doesn't distinguish between the two.

1 Like

there r a lot of folder which required open as root in linux, and also a lot of files, so there r custom action like open as root, and action for edit as root,
for apps , u r right ,i faced apps run under root like synaptic and i noticed it's command appended with -pkexec in the end, and i also faced bleachbit ,and stacer etc.., but all of them pop up authentication window,so no need to action like open as root for app, but what about app that only can run in comandline by sudo and passwd, I need to run it as gui, i want to make applauncher for it(shortcut) , I want to get pop up gui authentication window,
so the solution that worked with me :
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY app_comand
there is anthor case, what about if i want to run that app in session and startup? in this case may be it is better to not get pop up autentication window

so i think the 3 thread r different
Edit:
if i put that in launcher, it doesn't work, but it works when put it like that:
sh -c "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY app_comand"

There are a lot of folders and files in Root. But there is no requirement that you open them unless you are modifying them.
Any Operating System like Windows, Mac or Linux will protect system-essential files.
This means that Authentication is required to open or modify in order to ensure that you take full responsibility for the results.

You can launch most applications by running a terminal:

sudo -i

Then launching the app by the app name. For example:

gedit

Or

nautilus

This method will not produce a Pop Up window asking for confirmation.
However, as you can see, you still needed to authenticate the action.

u r right, i like that, that is very good advantage , security is first, and that advantage of linux over other operating systems.
I mean for windows migration users like me, the gui work is more familiar, and the goal of zorin is to make it's familiar for new linux users.
working with terminal all the time in everything is not familiar with windows users.
instead of type sudo -i to open thanar or folder as root,and edit text by sudo in terminal, there r gui tool in fm in context-menu,
also when u copy or paste in folder that need to sudo, also can do it by gui context-menu in fm. like opening synaptic or bleachbit etc, all run with gui and popup authentication, instead of sudo terminal
also zip file, extracting it by terminal doesn't encourage windows user, what if he did like windows , just extracting it by gui and put it in the required path

I would say that Zorin OS achieves what it sets out to do. It creates a familiar environment for the majority of users migrating from Windows.
That familiarity can be utilized to help the user to Learn the Linux System and Subsystems.

If Linux gets to the point of being just Like Windows then what would be the point of Linux existing, at all?

The terminal is a useful, efficient and powerful tool. One of Microsoft Windows Biggest Failings was in trying to lead users away from the Prompt.
The result of this was a large number of users becoming dependent on the system instead of independently enabling themselves.

GUI functions are very limited. The user can only "run a command" if the GUI App developer includes it in the GUI app. If it is included, then there must be a button to push for that command. If there are enough buttons, then you need menus.
If you have enough menus and enough buttons to nominally perform at least one tenth of what a user could do by simply running a command in terminal...
Then the users will complain that the GUI app is too complicated.
Examples: Blender, Gimp, Synaptic...

The only logical solution to this self-circular problem is for the user to accept that in installing a Free Open Source (and often, no-cost) Operating System, they have a certain responsibility to learn, utilize and expand their comfort zones.

Open terminal and run:

sudo -i

It's easy. There is no part of that that is too hard.
And do it five times or so and... it becomes familiar to you.

1 Like

hi there I am trying to achieve the same, with thunar. I ask here since the post is open.
I would like to have that option of opening forlders as root with thunar since it comes in handy most of the times.
I have zorin litte xfce on a machine and linux mint in another , in my zorin that option isn't present.

You can add it as a custom action in Thunar.
Launch Thunar, then from Edit select Configure Custom Actions.
Click the (+) add button.
Name: Open as Root
Description: Open as Root
Command: pkexec thunar %f
Move to the Appearance Conditions and select all of the options.
Click the "OK" button when finished.
Re-launch Thunar and test.

1 Like

thank you so much. I will apply this on that computer. taking into account that i want to set zorin os in the one I have LM 20 (which hasn't have enough of treatment before its release, too many issues..)

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.