LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-28-2005, 10:04 AM   #1
Four
Member
 
Registered: Aug 2005
Posts: 298

Rep: Reputation: 30
simplifying wine


I have installed a program using wine and want to run like 'wine programname' instead of 'wine c:/program files/program/programname'. How may I set it up this way?

thank you!
 
Old 12-28-2005, 12:12 PM   #2
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
I'd just add a function to do it in one of your startup scripts (ie: ~/.bash_profile or ~/.bashrc) like so:

wine-progname() {
wine "c:/program files/program/programname"
}

Then to run it, just type in the function name as the command:
wine-progname

To learn more about functions, do:
man bash (great reading)

Hope this helps you
 
Old 12-28-2005, 01:50 PM   #3
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
I think I'd make an alias. You can put this in your .bashrc file:

alias winamp="wine c:/program files/program/winamp"

This example is for winamp.

On the other hand you could use Crossover Office from Codeweavers. The installation is simple. Adding Windows application software to Crossover Office is simple. It runs Microsoft Office 2003. It automatically adds your Windows applications to your KDE start menu. I love it.

Last edited by stress_junkie; 12-28-2005 at 01:54 PM.
 
Old 12-28-2005, 02:09 PM   #4
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
stress_junkie:
That alias will not work, because of the space in the argument's path (program files).

To test it:

Code:
mkdir -p "/tmp/program files"
echo "testing" > "/tmp/program files/file"
alias catt="cat /tmp/program files/file"
catt
cat: /tmp/program: No such file or directory
cat: files/file: No such file or directory
You would have to escape the space by either:
Code:
alias catt="cat '/tmp/program files/file'"
or
Code:
alias catt="cat /tmp/program\ files/file"
Either the alias or the function will get the job done.

Last edited by WindowBreaker; 12-28-2005 at 02:12 PM.
 
Old 12-28-2005, 02:45 PM   #5
Four
Member
 
Registered: Aug 2005
Posts: 298

Original Poster
Rep: Reputation: 30
Where is the ".bashrc" file. I checked ~/.bashrc its not there so I have created it and added the alias. However it doesn't apear to work yet. Do I need a restart? if so is there a way to do it without restarting?

I have Slackware 10.1

Thank you!
 
Old 12-28-2005, 03:06 PM   #6
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
Four:
~/.bashrc may not have existed yet, in which case you were right to create it. What you can do is add a line to ~/.bash_profile that will run the ~/.bashrc file, as such:
Code:
.  ~/.bashrc
or
Code:
source ~/.bashrc
Since you're sourcing the file, it's not required that it have a "#!/bash/sh" as it's first line. Sourcing (either 'source' or a period '.') means the contents of the file a put in the calling script. It's kind of like an Include line in programming.

Anyways, add the line above to your ~/.bash_profile, and log out and back in. Then it should be working for you.

If you don't want to logout and back in, just source it from a terminal yourself:
Code:
.  ~/.bashrc
And it should be working.
 
Old 12-28-2005, 05:02 PM   #7
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
WindowBreaker,
I didn't think the alias syntax through. Thanks for the observation and the correction. I was thinking in terms of the "/program files/" being an argument to the wine executable. I forgot that bash would process it. Next time I'll test a suggestion before writing.

Last edited by stress_junkie; 12-28-2005 at 07:18 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble running wine from src wine:error while loading shared libraries: libwine.so.1 brynjarh Linux - Newbie 2 05-28-2013 10:59 AM
Link targets - problems with Wine (Though not Wine specific - Wine site doesn't help) Kevjml Linux - Newbie 1 01-13-2006 07:53 AM
Simplifying guest-login - usability kiwibird Linux - General 1 07-24-2005 09:12 PM
Adding only new text/simplifying lists invisible_ink Linux - Newbie 1 11-24-2004 02:07 PM
wine: chdir to /tmp/.wine-tom/server-306-33fca : No such file or directory Kinstonian Linux - Software 19 06-21-2003 05:16 AM


All times are GMT -5. The time now is 12:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration