Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3212934
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:53:22+00:00 2026-05-17T14:53:22+00:00

I have made a script to open Spotify with wine: #!/bin/bash DIR=/home/jorgsk/.wine/drive_c/Program Files/Spotify/ cd

  • 0

I have made a script to open Spotify with wine:

#!/bin/bash
DIR="/home/jorgsk/.wine/drive_c/Program Files/Spotify/"
cd "$DIR"
wine spotify.exe 2>/dev/null

I’m passing “$DIR” to cd with quotes because of the whitespace in “Program Files”; if I don’t have the quotes “/home/jorgsk/.wine/drive_c/Programs” will be considered as the argument to cd, which obviously will result in an error message.

Spotify starts fine if I launch the above script from its local directory (/home/jorgsk/bin) with ./spotify. However, since I wish to launch it from wherever, I have /home/jorgsk/bin added to the $PATH variable in .bashrc. When I write “spotify” from for example my home directory, I get the error message

bash: /home/jorgsk/.wine/drive_c/Program: No such file or directory

which is the same error message I get if I don’t include $DIR in quotes when launching tje script with ./spotify from the script’s directory.

What is happening here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T14:53:23+00:00Added an answer on May 17, 2026 at 2:53 pm

    I don’t know the answer but I think I can give you a procedure that will identify the issue.

    Add set -x to have the script echo the lines it is running.

     #!/bin/bash
     set -x
     DIR="/home/jorgsk/.wine/drive_c/Program Files/Spotify/"
     cd "$DIR"
     wine spotify.exe 2>/dev/null
    

    Also, name the script something other than spotify. Although it doesn’t immediately look like it would matter, who knows what complex behavior is happening once wine gets control?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made this script to open a fancybox from code behind, but it
I have made a program in c and wanted to see, how much memory
I have ajax call which pulls from the processing script 'getajax.php'. Call is made
I have made a simple webpage to check for regular expressions. <html> <head> <script
Guys/Gals I have made a website but now I want to encode the script
I have made this sandbox test: <html> <head> <title>whatever</title> <script type=text/javascript> function myLittleTest() {
I have made a SVG image, or more like mini application, for viewing graphs
I have made some code which exports some details of a journal article to
I have made a custom UserControl i Vb.net (windows application). How can I add
I have made a little app for signing up for an event. User input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.