Remastersys and AVLinux Forum
May 21, 2013, 10:40:55 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Remastersys depends on user donations to survive.  Please help keep Remastersys going.

http://www.remastersys.com
 
   Home   Remastersys Home Remastersys downloads Donate Login Register AV LINUX Home Help Search  
Pages: [1]
  Print  
Author Topic: fixpolkit  (Read 466 times)
0 Members and 1 Guest are viewing this topic.
iam2
Jr. Member
**
Offline Offline

Posts: 14


« on: March 27, 2012, 07:55:32 PM »

Hello fragadelic
I want you to know how much I have appreciated your help to date, and say thank you again.  Now, if I may, I would like to ask you about “fixpolkit” code you included in your last transmission.  I have been trying to make it work, but I am at a bit of a loss as to how to activate the code.  You said to install it in: /etc/rc.local, so I brought up my root terminal and typed in: /etc/rc.local, with the response that no such command was found.  So, still in root, I typed in: sudo /etc/rc.local, again, “no such command was found.”  Will you direct me as to where I am supposed to type in the code for fixpolkit?

I also went into the File System, Home Folder, Usr/ Local Folder, and looked for /etc/rc.local, but that folder was empty.  So, I thought maybe I am supposed to make a text file with the code in it, and save it with the name /etc/rc.local.  So I opened gedit text editor, and found out I could only save it in the File System proper, I thought it better not to put anything anywhere unless it went directly into the usr/etc folder lest I mess up my system, so chose instead to save the file first to the home folder or desktop and transfer it then directly into the etc folder.  But no matter where I wanted to save it (except the File system) I got the message that is was a read only file and implying that it already existed everywhere I wanted to put it, and that this file would replace it, but not as a 'read only' file.  So, I am totally confused as to how this all works and where to install the fixpolkit code you sent me.  I attached a picture of the 'save' window below as an attachment.  Will kindly direct me in this matter?  Thank you.
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #1 on: March 27, 2012, 08:43:59 PM »

Okay, this is it step by step:

Step 1 - Create the /usr/local/bin/fixpolkit
sudo nano /usr/local/bin/fixpolkit
(now paste in the fixpolkit code I posted in another thread and save)

Step 2 - make it executable
sudo chmod 755 /usr/local/bin/fixpolkit

Step 3 - put the command to run it in /etc/rc.local
sudo nano /etc/rc.local
(add this line in for the fixpolkit before the "exit 0" line and paste in the sudo stuff if you like)
/usr/local/bin/fixpolkit
(save)

Step 4 - make sure /etc/rc.local is executable
chmod 755 /etc/rc.local

Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
iam2
Jr. Member
**
Offline Offline

Posts: 14


« Reply #2 on: March 28, 2012, 07:31:33 AM »

I opened a terminal window and pasted the following code:
sudo nano /usr/local/bin/fixpolkit

and then pressed enter after giving my admin password:.

It opened a different terminal window in the same terminal window I was in, which I will call the 'nano terminal window'.  Then I pasted in the first code:

#!/bin/bash
if [ "$UID" != "0" ]; then
echo "Must be root. Exiting..."
exit 1
fi
cd /usr/share/polkit-1/actions
find ./ -type f -exec sed -i -e 's/auth_admin_keep/yes/g' '{}' \;
find ./ -type f -exec sed -i -e 's/auth_admin/yes/g' '{}' \;
find ./ -type f -exec sed -i -e 's/auth_self_keep/yes/g' '{}' \;
find ./ -type f -exec sed -i -e 's/auth_self/yes/g' '{}' \;
/usr/local/bin/fixpolkit
exit 0

Further down the instructions you said to paste the following code:
/usr/local/bin/fixpolkit
in front of the
exit 0
which, I did as you see above.

You then said to "save" it, but not how to save it, because, unlike the regular terminal window, there is no 'save' option, so I used Ctl S to save it.  But that does not work because when I close the window the message says the process is still working, which I take to mean it has not been saved.  I tried to execute the commands at the bottom of the nano terminal window and typed an uppercase "G" to get help, and pressed enter, but got no help.  I typed the one for Write, the one for Justify, and a couple of others, each with an uppercase letter, and pressed enter to 'go' but nothing happened except the message at the bottom: "X ignored, mumble, mumble."  And I do not know how to make an upperward facing arrow in front of the uppercase letters as in the command examples, so I am at a standstill again.  Will you be so kind as to give me a little basic guidance and be patient with me, because I am new to command lines and all the 'unique' keystrokes that are called for, and not a programmer like yourself.

Thank you.
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #3 on: March 28, 2012, 07:41:34 AM »

Look at the bottom of the nano window and you will see the keystrokes for different things.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
iam2
Jr. Member
**
Offline Offline

Posts: 14


« Reply #4 on: March 28, 2012, 10:38:08 AM »

Yes, I see the 'keystrokes' at the bottom of the window.  That is what I was referring to when I said: "I tried to execute the commands at the bottom of the nano terminal window and typed an uppercase "G" to get help, and pressed enter, but got no help.  I typed the "W" for Write, the "J" for Justify, and a couple of others, one at a time, each with an uppercase letter as indicated, and pressed enter to 'go' but nothing happened except the message at the bottom: "X ignored, mumble, mumble."  After typing one or another of the "keystrokes" in uppercase as indicated, I pressed Enter and got the "... mumble, mumble" message at the top of the 'keystroke' diagram.  If the keystrokes called for the 'upperward' pointing arrow in front of them, I do not find that keystroke on my keyboard, so it must call for a special combination of keystrokes in order to get an upward pointing arrow, which I do not know.  Am I right so far?  Or am I still missing something?
Logged
iam2
Jr. Member
**
Offline Offline

Posts: 14


« Reply #5 on: March 28, 2012, 10:41:00 AM »

I think I just spotted the upperward pointing arrow, does that share the number "6" key?  I will try that, but I still would like to know if pressing "Enter" after typing in the keystroke executes the command, or is there something else to do?
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #6 on: March 28, 2012, 10:53:01 AM »

The ^ means CTRL key.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
iam2
Jr. Member
**
Offline Offline

Posts: 14


« Reply #7 on: March 28, 2012, 11:16:57 AM »

I would never have guessed. Thanks.  I will try that, but the question still remains: How does one 'save' the file?  The 'nano terminal' window's keystroke guide at the bottom offers:

^G Get Help
^X Exit
^O WriteOut
^J Justify
^Y Prev Page
^V Next Page
then there is Read File; Where Is' Cut Text' UnCut Test; Cur Pos; and To Spell.  None of those seemed relevant, and none of the others really indicate they Save anything.  However, I typed the Get Help, Exit, Write Out, Justify, Previous Page, and Next Page in, one at a time using the appropriate keystrokes, but with the upperward facing arrow on the "6" key, as indicated, pressing enter and to no avail.

Does it make a difference "where" I type the keystrokes in?  Where I have been typing them was on the line following the “exit 0”

Is that correct?

Moreover, on the Menu bar, under File, is: Open Terminal; Open Tab; and New Profile and Close Window, but no Save.
Under Edit, is: Copy, Paste, Select All, Profiles, Keyboard shortcuts, and Profile Preferences, but no Save.
There is no “Save” option under View, Search, Terminal, or Help.

So the question: How does one “save” the file?  I have not a clue other than the keystroke: Ctl S.  And that does not do it.  None of the keystrokes offered at the bottom indicate or come right out and say 'save'.  So I do not know what keystroke to use to save the file. Would you please take the mystery out of it for me and just tell me which keystroke or combination thereof saves the file?  Thanks.

 
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #8 on: March 28, 2012, 11:33:04 AM »

You can just use CTRL-X when you are done and it will ask you if you want to save the file.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
iam2
Jr. Member
**
Offline Offline

Posts: 14


« Reply #9 on: March 28, 2012, 01:22:16 PM »

okay, opened the terminal, pasted the code for nano, got the window, pasted the full code of the first code part down to the “exit 0”, did the Ctl X, and the window wanted confirmation, “Y” or “N”, typed “Y” pressed Enter and got another window at the bottom that is highlighted as:
File name to write: /usr/local/bin/fixpolkit,
and gives the following choices:
Get Help
Cancel
DOS Format
Mac Format
Append
Prepend
and Backup File.

Now what?  Let me guess ... it has to be either “DOS Format”, “Append”, or “Prepend”, but I am probably wrong and it is “Backup File.”  So in order to save time I will just ask you since you are being so patient with me: Please tell me which one it is; 1, 2, 3, 4, 5, 6, 7 - or none of the above?
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #10 on: March 28, 2012, 01:43:47 PM »

I usually just do CTRL-X and then answer Y and press enter.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
iam2
Jr. Member
**
Offline Offline

Posts: 14


« Reply #11 on: March 28, 2012, 02:19:47 PM »

"Y" only brought up the next window with those other options, which I gather implies either to "save it as ...", or add it to something, or whatever, but I do not think it has been saved yet but it has not let me get out of the window without making another selection first.  Any suggestions on where to go from there?
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #12 on: March 28, 2012, 02:26:19 PM »

If you are getting that then you might not be running nano as root.  That is the only time you will get a message like that.

Try doing "sudo su" in the terminal first and then "nano /usr/local/bin/fixpolkit" after you are running as root.

Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
iam2
Jr. Member
**
Offline Offline

Posts: 14


« Reply #13 on: March 28, 2012, 03:20:35 PM »

It does the same thing, ends up window after window: first, Yes or No or cancel; type “Y”, press Enter and next window gives all those other “save as” type of options.

Did Ctl G for help and got this window:

"Write File Help Text

 Type the name that you wish to save the current file as and press Enter to
 save the file.

 If you have selected text with the mark, you will be prompted to save only the
 selected portion to a separate file.  To reduce the chance of overwriting the
 current file with just a portion of it, the current filename is not the
 default in this mode.

 The following function keys are available in Write File mode:

^G      (F1)            Display this help text
^C                      Cancel the current function
M-D                     Toggle the use of DOS format
M-M                     Toggle the use of Mac format
M-A                     Toggle appending
M-P                     Toggle prepending
M-B                     Toggle backing up of the original file

^Y Prev Page        ^P Prev Line        ^X Exit
^V Next Page        ^N Next Line "

Closed that terminal window, and went to the “Root Terminal” proper under Applications/System Tools, and it does exactly the same thing, window 1, 2, and 3 with all the options.  I copied the text:

#!/bin/bash
if [ "$UID" != "0" ]; then
echo "Must be root. Exiting..."
exit 1
fi
cd /usr/share/polkit-1/actions
find ./ -type f -exec sed -i -e 's/auth_admin_keep/yes/g' '{}' \;
find ./ -type f -exec sed -i -e 's/auth_admin/yes/g' '{}' \;
find ./ -type f -exec sed -i -e 's/auth_self_keep/yes/g' '{}' \;
find ./ -type f -exec sed -i -e 's/auth_self/yes/g' '{}' \;
/usr/local/bin/fixpolkit
exit 0

Just below this text is the keystroke menu and the top line states the file name (/usr/local/bin/fixpolkit), but acts like it wants a name typed in for the file, and that is the same impression I am getting from the above response to the “Help” window information.  On the first line it says: “Type the name that you wish to save the current file as and press Enter to save the file. ”

If that be the case, am I to type the same name it is already showing (/usr/local/bin/fixpolkit) right after it, or erase what is there and type something else?
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #14 on: April 04, 2012, 05:00:55 PM »

No. Just hit enter.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!