|
2010-08-04
, 08:17
|
Posts: 755 |
Thanked: 406 times |
Joined on Feb 2008
@ UK
|
#2
|
The Following User Says Thank You to codeMonkey For This Useful Post: | ||
|
2010-08-04
, 08:44
|
Posts: 134 |
Thanked: 91 times |
Joined on Nov 2009
@ Imperial College London
|
#3
|
The Following User Says Thank You to Big Phat Jan For This Useful Post: | ||
|
2010-08-04
, 09:04
|
Posts: 1,751 |
Thanked: 844 times |
Joined on Feb 2010
@ Sweden
|
#4
|
echo "apt-get -y clean && apt-get -y autoclean && apt-get -y autoremove" | sudo gainroot
The Following 2 Users Say Thank You to AlMehdi For This Useful Post: | ||
|
2010-08-04
, 10:12
|
Posts: 101 |
Thanked: 30 times |
Joined on Jul 2010
|
#5
|
|
2010-08-04
, 10:16
|
Posts: 557 |
Thanked: 370 times |
Joined on Apr 2010
|
#6
|
if you have installed rootsh 1.8 from extras devel uninstall it and install rootsh 1.5 from extras.
in your qbw widget replace all "sudo" with "rootsh" et voilą !
all your commands works !!
The Following User Says Thank You to gft2k1 For This Useful Post: | ||
|
2010-08-04
, 11:57
|
Posts: 1,751 |
Thanked: 844 times |
Joined on Feb 2010
@ Sweden
|
#8
|
The Following User Says Thank You to AlMehdi For This Useful Post: | ||
|
2010-08-04
, 12:09
|
Posts: 557 |
Thanked: 370 times |
Joined on Apr 2010
|
#9
|
The Following User Says Thank You to IzzehO For This Useful Post: | ||
|
2010-08-04
, 13:16
|
Posts: 326 |
Thanked: 335 times |
Joined on Feb 2010
|
#10
|
Just use sudo gainroot and the problem is solved. I prefer v1.8 as i use sudo my self.. but when i want to instruct on something i use sudo gainroot.
~ $ dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs dpkg --purge | sudo gainroot Root shell enabled dpkg: Requested operation requires superuser privilege
~ $ echo "dpkg --list |grep "^rc" | cut -d ' ' -f 3 | xargs dpkg --purge" | sudo gainroot Root shell enabled dpkg: --purge needs at least one package name argument Type dpkg --help for help about installing and deinstalling packages[*]; Use `dselect' or `aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values; Type dpkg --force-help for a list of forcing options; Type dpkg-deb --help for help about manipulating *.deb files; Type dpkg --license for copyright license and lack of warranty (GNU GPL)[*]. Options marked[*] produce a lot of output - pipe it through `less' or `more' ! ~ $
is a bit that I'm playing with QBW to create buttons on the desktop that will allow me to make some tedious procedures about packages ..
In particular I would like one to remove old dependencies .. one to upgrade the app ... and finally one to purge the old packages
1) To remove old dependencies I added a simple
sudo apt-get -y clean && apt-get -y autoclean && apt-get -y autoremove
Result: The first time asking for the password (and even this is not good because if I enter the command in QBW there is no way to enter the password) ... I enter "root" ... and he replies:
2) To upgrade the app a :
sudo apt-get update && apt-get -y upgrade
Result .. :
sudo dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs dpkg --purge
Result
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs dpkg --purge | sudo gainroot
to first run the command sudo gainroot.. response ..
But for QBW i need the commands to work with only 1 input...
Why all these problems with sudo? T_T
I even tried uninstalling and reinstalling rootsh .. but nothing ..
Solutions?
EDIT: and there's something even more strange... the sudo command for the "sudo kernel-config ecc ecc" works..
I can change frequences and kernel options without any problem .. o.o ...
Last edited by Dany-69; 2010-08-04 at 02:39.