Root Access via the GUI?

View previous topic View next topic Go down

Root Access via the GUI?

Post by WinfugeeLa on Wed May 25, 2016 5:27 pm

Hi, I'm new to Linux trying to acclimate myself to ChaletOS in VirtualBox before I actually make the leap and ditch Microshaft altogether. The only thing that's been holding me back all of these years it the fact that most distro's look pretty awful. I'm thrilled with ChaletOS's design as it's very familiar and makes the prospect of switching to Linux a little bit less intimidating.

Question: Long story short, I had to lookup and enter a terminal command for ChaletOS to enable the LED backlight on my keyboard. After some research I was able to create a bash script so that this could be done by executing a file. I wanted to   put that file in ChaletOS' equivalent of a startup folder. When I navigated to the folder where I was to place the script, I find out that I do not have root access.

So I was wondering if there is a temporary way where I can enable and then later disable root access via the GUI. Using terminal commands for something like this is not very optimal for me. I really don't know how often I'd need to access these protected areas, but if I needed to it would be nice to be able to do so by navigating the GUI.
avatar
WinfugeeLa

Posts : 4
Join date : 2016-05-25

Back to top Go down

Re: Root Access via the GUI?

Post by James Tobin on Thu May 26, 2016 2:54 am

If it is a .sh script or linux executable or .desktop, whichever it is you should be able to add it to /etc/init.d . To do this I typically just run "sudo nautilus" in the terminal which loads file manager as root user, then I'd copy that file to /etc/init.d folder. Be careful though when running your file manager as root! Note that when you run it as root by putting sudo before the command you will need to type the root password you set. It throws newbies off because no characters display while you type the root password this is OK. Just type it and hit enter Very Happy

Or if the directions you are using tells you to put it into a different folder do that, just whenever you are putting a file anywhere other than /home/username and it's subdirectories you will need to run your file manager (default is nautilus) as root.

Hope this helps!

___________________________________________________________________________________________________________________________________

The only good thing about Windows is that it never gives you any terminal illnesses.
Needless to say, Terminal illnesses are the only problem with Linux.
avatar
James Tobin

Posts : 681
Join date : 2016-05-05
Location : United States

https://tobinbridge.zohosites.com/

Back to top Go down

Re: Root Access via the GUI?

Post by WinfugeeLa on Thu May 26, 2016 3:12 am

Thanks for the tip. For whatever reason when I launch ChaletOS Terminal and enter sudo nautilus and then hit enter it says 'sudo: nautilus: command not found'?
avatar
WinfugeeLa

Posts : 4
Join date : 2016-05-25

Back to top Go down

Re: Root Access via the GUI?

Post by James Tobin on Thu May 26, 2016 3:15 am

hmm.... that's wierd. Are you sure you spelled "nautilus" correctly?

If you cant do it you could try getting thunar with "sudo apt-get install thunar" enter sudo password and watch the letters fly Very Happy then use "sudo thunar" instead.

Also i forgot to say: Welcome to the forums! Wink Very Happy

___________________________________________________________________________________________________________________________________

The only good thing about Windows is that it never gives you any terminal illnesses.
Needless to say, Terminal illnesses are the only problem with Linux.
avatar
James Tobin

Posts : 681
Join date : 2016-05-05
Location : United States

https://tobinbridge.zohosites.com/

Back to top Go down

Re: Root Access via the GUI?

Post by WinfugeeLa on Thu May 26, 2016 10:40 am

Thank you again, I was able to get LED.ON.sh into the /etc/init.d folder using the sudo thunar command after installing thunar via apt-get. It's a small script consisting of only:

#!/bin/bash
xset led 3

The only problem that I run into now is that it doesn't want to execute. I did right click and go to properties and permissions and ticked the option to 'allow this file to run as a program'. However I must be missing some other key element because it does not seem to be executing.
avatar
WinfugeeLa

Posts : 4
Join date : 2016-05-25

Back to top Go down

Re: Root Access via the GUI?

Post by James Tobin on Thu May 26, 2016 10:56 am

Here's another idea.

go to gedit and paste this (you can customize it):

[Desktop Entry]
Type=Application
Exec=/etc/init.d/LED.ON.sh
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_US]=LED on
Name=Comment[en_US]=LED on
Comment=LED on

then save it and REMEMBER IT MUST END WITH .desktop FILE EXTENTION!

for some reason i've never had luck with hidden folders with both nautilus (default FM) and gedit the text editor. So just save it in your home folder. Then run thunar and copy it and then put "~/.config/autostart" in the location bar then paste it there. Alternatively supposing you saved it in your /home/[your username] directory you can open terminal and run cp [name of file you saved.desktop] ~/.config/autostart

That should execute it upon startup for your local user.

Hope this helps! Wink Very Happy

___________________________________________________________________________________________________________________________________

The only good thing about Windows is that it never gives you any terminal illnesses.
Needless to say, Terminal illnesses are the only problem with Linux.
avatar
James Tobin

Posts : 681
Join date : 2016-05-05
Location : United States

https://tobinbridge.zohosites.com/

Back to top Go down

Re: Root Access via the GUI?

Post by WinfugeeLa on Thu May 26, 2016 11:55 am

Ahh, At first it didn't work so I tweaked the file name to LED.sh and then removed the three instances of 'on' in the .desktop file and that seems to work just fine. I really appreciate your help James, thank you so much!
avatar
WinfugeeLa

Posts : 4
Join date : 2016-05-25

Back to top Go down

Re: Root Access via the GUI?

Post by James Tobin on Thu May 26, 2016 11:56 am

you're very welcome! enjoy Chalet OS! feel free to ask more questions as you have them Very Happy

___________________________________________________________________________________________________________________________________

The only good thing about Windows is that it never gives you any terminal illnesses.
Needless to say, Terminal illnesses are the only problem with Linux.
avatar
James Tobin

Posts : 681
Join date : 2016-05-05
Location : United States

https://tobinbridge.zohosites.com/

Back to top Go down

Re: Root Access via the GUI?

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum