Open Linux Forums
Like Ubuntu forums, except with beer.
Moderator
Joined: Oct 04 2017
Posts: 74

I use the apt-get clean but just created an alias for it in the bash.rc for root. Then when in root I'll just type cln after I'm done with it. I haven't created anything for the others. But just the clean one. So at the root prompt I just type cln and let it take care of it.

Looking at some of those other commands for bash on the purge etc I might go ahead and add some of those to the .bashrc for root. also. Look good.

Moderator
Joined: Oct 04 2017
Posts: 74

Trying to figure how you run the clean in regular xterm. I've got setup in my root's .bashrc.

## to clean up
alias cln='apt-get clean'

#

I did that by going into my root terminal and going

# pluma /root/.bashrc

I setup the root's .bashrc like that all the time. But does look like I might be adding some of the other that's listed there into the root .bashrc. Create some more aliases. Thanks for the list.

Member
Joined: Oct 06 2017
Posts: 19

Well,I posted the how-to. You have to execute something in the terminal command. You can add a hold in order not to close the terminal if you like. So, point the terminal to what you want to be executed.

`/usr/bin/xterm  -hold -e /path/to whatever`

Edit: code box

Member
Joined: Oct 06 2017
Posts: 19

Works the same with xfce4 terminal. Any terminal that has a -H (hold) option really.

Member
Joined: Oct 06 2017
Posts: 19

I don't open this in a rootterminal. Plain xfce4-terminal. The executable scripts's somewhere in the scripts folder. I just point the terminal to execute it. The script prompts for my passwd.

Moderator
Joined: Oct 04 2017
Posts: 74

Asking for the root password. Ok. That clears up something in back of mind. Still a 'superuser' when using script.

Member
Joined: Oct 06 2017
Posts: 19

Well, it prompts for a sudo password, but as far as I can tell it picks the keyring's first. It should be possible to get rid of the sudo in the script.

Member
Joined: Oct 06 2017
Posts: 19

Well, put it somewhere, make it executable, change the user's name and profiles and see what gives.