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 7633117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:47:41+00:00 2026-05-31T06:47:41+00:00

I have made an image viewer in python. And I want to use it

  • 0

I have made an image viewer in python. And I want to use it to view images from my folders. I have made a bash file, which would start the image viewer. Now I am stuck. When I right click on an image, and choose option “open with” and provide bash file(above mentioned file, to start image viewer), what arguments/parameters (if any) does it pass to bash script ?
I am using Arch Linux. My Desktop environment is Gnome + Awesome. My File Manager is Nautilus.

I have stopped using bash file(which I have mentioned earlier in the question).

I have added

   #!/usr/bin/python2 

and made it executable.
It’s working in terminal.

I have added alias in .bashrc as

   alias imview='~/./image-viewer.py'

When used imview in terminal, it works.

But when I add imview you in “open with” command line, A new tab opens, but then it doesn’t work. And it hides after few seconds.
Any idea what could be the problem ?

  • 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-31T06:47:43+00:00Added an answer on May 31, 2026 at 6:47 am

    You don’t need a Bash script to start your image viewer. Instead add this as your first line in the Python script:

    #!/usr/bin/python
    

    And also make the Python script executable.

    Then you will be able to run the script directly.

    If you select “Open with…” then the filename should the be first argument to the script (sys.argv[1]).

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

Sidebar

Related Questions

I have made an application which displays Images .Now I want to implement zoom
I have an image which is just made of one color ? (it could
I have made CAlayer that contains an image. What i basically want to do
I have made a swing application which uses image files located in a folder
What i want is that i have made a picture chooser, the image chosen
I have made a php image gallery, which should list all the subdirectories of
I have made my Toggle() function that alternates an image (changes the images to
I have made a website that uses unordered lists. These lists use an image
I have made an application which captures image in every one minute and uploads
Im writing a base 64 string that i have made from an image to

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.