D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] adding a 2nd swap partition

 


Ok got it, if you have kde menu editor, you can create a new menu item for kwrite


if you enter kwrite as root in the description
kwrite in the command box
and then root in run as another user box

save it, now if you click on your new menu item, it will ask for the root password, then open kwrite, you can then open /etc/fstab and edit and it should! be savable, I just pressed enter then back space to remove it, and it saved happily, (not making any real changes to the file),

That may work, using this you can run pretty much any programme as root, once it's working perhaps create a new sub menu and put a few programs in there you want to run as root, and remove from the main part of the kde k menu.

hope this helps

On a different note

The following link explains how to add menu options,

http://hacks.oreilly.com/pub/h/3156



Simon Waters wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Arrow wrote:


Iv got the swapfile already and its running now. My problem is editing
/ect/fstab as its owned by root and when I log on I only have the option
to log on as tom not root. Also I tryed running kwrite/edit from a su
shell but just got about 100 pages of errors for my time.



Scary as it is learning "vi"/"vim" (or similar) is good advice if you want to administer Linux/Unix boxes, especially if they are a long way away from you.

Failing that you ought to be able to do something like...

xhost + # this disables all your X security - be careful

su -    # become root with root enviroment variables (you could also use
"su" here without the "-").

export DISPLAY=:0 # tell the root shell your X display is local (you
probably don't need this if you just use "su" without the "-"!).

xedit /etc/fstab # make changes wih editor that just needs "X" working
not KDE or GNOME or ....

Ctrl-d # logout of root shell

xhost -  # get some security back ;)

I've also been known to do "ssh -X -l root localhost" which says create
a secure connection (ssh) with X environment variables set up (-X) as
user root (-l root) to the machine "localhost". Which is an ugly hack,
but it works. Encrypting a connection from your local machine to your
local machine is a bit of security overkill ;)

My guess is kwrite depends on KDE stuff, so you are seeing a lot of
errors about KDE not being there, but it wouldn't surprise me if it
still worked, it just isn't pretty.

Generally as root you want to be depending on as small a set of
libraries as possible when editting files, both for security, and for
the more practical reason that if you can't use a command line editor,
how will you fix a machine that can't boot into X. Or if your preferred
editor requires "Python", or "glibc" <sic> what happens when that is
missing (Okay these days people just boot from Knoppix CDs).





-----BEGIN PGP SIGNATURE-----
Comment: Encryption...is a powerful defensive weapon for free people.
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCoYYlGFXfHI9FVgYRAk7FAJ41n01gDo+yBu0Z6si8aO7HZP4GAgCeINWF
OeZwR33C27KkHx6eoFmbFjA=
=nt13
-----END PGP SIGNATURE-----

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe. FAQ: www.dcglug.org.uk/linux_adm/list-faq.html





--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe. FAQ: www.dcglug.org.uk/linux_adm/list-faq.html