Fewrup - File Editor With Root or User Permissions

fewrup - File Editor With Root or User Permissions is one of those programs you never knew that you needed. fewrup is one way to allow the editing of your many system files from a standard file manager such as Dolphin. Now you can run a File Manager as a Super User, but fewrup does not require this and it has several pluses you don’t get running a File Manager as a Super User. fewrup works with openSUSE 11.4, 12.1, 12.2 & our latest openSUSE 12.3.

The advantages of using fewrup are:

  1. Allow editing of system files as a standard user from a standard file manager such as Dolphin.
  2. Will request the root user password just before editing a system text file.
  3. Creates a Backup file of the system file just in case you need to go back to using it.
  4. Will not edit a personnel text file as a root user. This is a big deal as a Super User File Manage will change the owner of your text files to root.
  5. fewrup has been written to work with five different openSUSE desktops. Here is the bash coding that does that. (I got some help for this from please_try_again)

# Determine which desktop that we are using ***********************************
ps nc -C plasma-desktop >/dev/null && de=1     # For kde
ps nc -C xfce4-panel >/dev/null && de=2     # For xfce
ps nc -C gnome-panel >/dev/null && de=3     # For gnome2
ps nc -C gnome-shell >/dev/null && de=4     # For gnome3
ps nc -C lxsession >/dev/null && de=5             # lxde

# Insert the Name Of your Favorite KDE or GNOME File Editor *******************
case "$de" in

  "1") EDITOR="kwrite"         ;  SU_CMD="kdesu"     ;; # For KDE
  "2") EDITOR="mousepad"     ;  SU_CMD="xdg-su -c"     ;; # For xfce
  "3") EDITOR="gedit"         ;  SU_CMD="gnomesu"     ;; # For gnome2
  "4") EDITOR="gedit"         ;  SU_CMD="gnomesu"     ;; # For gnome3
  "5") EDITOR="leafpad"     ;  SU_CMD="xdg-su -c"     ;; # For lxde 
  *) exit 1 ;;


To create fewrup, Copy and Paste the text of this script into a text editor and save it as the file fewrup in your home area bin folder (~/bin/fewrup). The script is too large to be posted in a message here and is now included in SUSE Paste.

fewrup - File Editor With Root or User Permissions

Open the above Link in a new Tab. Select the Download option in the top right and then select Open With Kwrite or other text editor and then save the bash script text file as ~/bin/fewrup. It is possible to directly download fewrup using the following terminal command (You must delete or rename the old version of fewrup first should one exist):

rm ~/bin/fewrup
wget -nc http://paste.opensuse.org/view/download/23644270 -O ~/bin/fewrup

Save this bash script as the text file fewrup in the folder ~/bin (/home/username/bin). This script must be marked executable to be used. Please run the following Terminal command:

chmod +x ~/bin/fewrup

It is even possible to string all three of these commands together as one. Copy the following command, open up a terminal session, paste it in and press enter:

rm ~/bin/fewrup ; wget -nc http://paste.opensuse.org/view/download/23644270 -O ~/bin/fewrup ; chmod +x ~/bin/fewrup

Now to use fewrup you do not run this from a terminal prompt. Instead, after the bash script file fewrup file has been created, open up Dolphin or other File Manage. Search through your system files till you find the one you wish to edit (such as /etc/fstab). Right Click on the text file and select **Open With. **If this is the first time to ever use fewrup, select the option Other.


Now in the Open With window open, type in the command /home/yourname/bin/fewrup and check the option that says “Remember application associated for this type of file” and press the OK button.


Now, each time you right click on this type of file, you will find fewrup as one of your selectable Open With file manager options. If you have any questions or comments about the usage of this bash script, please let me know.

Thank You,

Blogs: asroot : Bash : Packet Filter : C.F.U. : GPU’s : fewrup : F.S.M. : H.I. : nVIDIA : LNVHW : N.S.F. : S.A.K.C. : MMCHECK
S.A.S.I. : S.C.L.U. : S.G.T.B. : S.K.I.M. : S.L.A.V.E. : S.L.R.C. : S.T.A.R.T. : S.U.F.F. : SYSEdit : systemd : YaST Power