0

What I want to achieve is making a string command start server run the command wine ./_server.exe.

How would I do this?

0

2 Answers 2

2

You need to define an alias for your command.

Edit your ~/.bash_aliases file and add your command there.

Example:

alias start-server='wine ./_server.exe'

More details -> here

1
  • No problem. Have a great day!
    – Andy
    Sep 23, 2014 at 14:02
0

The particular syntax you use (start server) brings to mind Upstart session jobs, since it looks you want to use it as a service. Create a file in ~/.config/upstart/ called some-server.conf (change the name to suit your need, but it must have the .conf extension).

As contents use:

description "Describe your server"

script
    cd /to/where/ever/_server.exe/is
    wine ./_server.exe
end script

Now you can actually do:

start some-server

and

stop some-server

to start and stop the server. You could look at the respawn option too, if you want the program to restart if it exited.

3
  • Omg, how did I not read this comment! This solved my problem (which i've spend 2 hours on..) to run it as a process, thanks! (EDIT: I can't upvote your answer.. sorry about that) Sep 23, 2014 at 18:59
  • @RemyKooistra as a service, you mean? (That's OK. :) )
    – muru
    Sep 23, 2014 at 19:07
  • Yeah that's what I meant haha Sep 23, 2014 at 19:28

Not the answer you're looking for? Browse other questions tagged .