Quantcast

Maximum PC

It is currently Wed May 22, 2013 9:01 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: help with konsole commands [alias]
PostPosted: Thu Apr 03, 2008 2:18 am 
Team Member Top 100
Team Member Top 100
User avatar

Joined: Fri Aug 12, 2005 3:14 am
Posts: 2134
i setup a new folder today, and it is weird, the ~/ folder is locked with root priv. only, and i havent quite learned ubuntu well enough to remember the stuff for changing priv's...what i need help with is, i want to get an alias command setup so when i type
Code:
alias fah
it will do a 2 part command:
Code:
cd ~/FAH
sudo ./FAH504-Linux.exe -forceasm -advmethods -verbosity 9
is this possible? if so, how? and also, is there something easier to do? i remember that you can get FAH set to run at boot, but forgot how...whatever it takes to make sure this will be as easy as possible to run for the person whos pc it is...doesnt matter how hard it is for me [tho i am n00b...h3ar m3 r0ar!!!]

also, say i got an alias setup to be run w/o the sudo i there, could i then run
Code:
sudo alias fah
would that work as well as having the sudo embedded in the alias command?

ty in advance for any help offered...


Top
  Profile  
 
 Post subject:
PostPosted: Thu Apr 03, 2008 1:01 pm 
Million Club - 5 Plus*
Million Club - 5 Plus*
User avatar

Joined: Sun Sep 12, 2004 6:37 pm
Posts: 4734
Location: In the monkey's litterbox
You could start by creating a quick script like this:

Code:
cat > ~/runfah.sh << EOF
#!/bin/bash
cd ~/FAH
sudo ./FAH504-Linux.exe -forceasm -advmethods -verbosity 9
EOF
chmod +x ~/runfah.sh
alias fah ~/runfah.sh


You would then run it with:
Code:
fah


However, the alias will only stick for the length of the terminal session.

The similar way to do it (if you rebooted after using the alias) would be to run:
Code:
~/runfah.sh


Top
  Profile  
 
 Post subject:
PostPosted: Wed Apr 09, 2008 7:08 am 
Monkey Federation (Top 10)
Monkey Federation (Top 10)
User avatar

Joined: Tue Oct 11, 2005 5:20 pm
Posts: 10468
Location: Kansass
Just curious, why are you running fah with sudo?


Top
  Profile  
 
 Post subject: Re: help with konsole commands [alias]
PostPosted: Thu Apr 10, 2008 1:44 am 
Team Member Top 100
Team Member Top 100
User avatar

Joined: Fri Aug 12, 2005 3:14 am
Posts: 2134
nebbuchanezzar wrote:
i setup a new folder today, and it is weird, the ~/ folder is locked with root priv. only, and i havent quite learned ubuntu well enough to remember the stuff for changing priv's...

for some reason the home folder needs root priv. to be modified, and i couldnt get F@H to keep a config file, it kept looping, and i figured it just wasnt making one, so i ran it with sudo and it worked fine...


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group