LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-10-2017, 12:47 PM   #1
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 221

Rep: Reputation: Disabled
What to do with this script?


I have installed the browser qutebrowser by creating a virtual environment with the tox command. Now I get this instruction:

Quote:
Creating a wrapper script

You can then create a simple wrapper script to start qutebrowser somewhere in your $PATH (e.g. /usr/local/bin/qutebrowser or ~/bin/qutebrowser):

#!/bin/bash
~/path/to/qutebrowser/.venv/bin/python3 -m qutebrowser "$@"
What do I have to do?
Do I have to save this script as path.sh and then run ./path.sh?
Or must I do something else?

(this is the link to the instructions:
https://github.com/qutebrowser/quteb...wrapper-script)
 
Old 10-10-2017, 01:05 PM   #2
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,575

Rep: Reputation: 249Reputation: 249Reputation: 249
Put it in your path. You can figure out your path by running:

Code:
echo $PATH
/usr/local/bin, if it's in your path, would be the place to put it so everyone could use it. I keep programs I write for my own use in my own bin directory and put $HOME/bin in my path. I think 'path.sh' is a bad name for a program that runs qutebrowser - how about 'qute' instead? Then you can run qute from anywhere.

Do you understand that ~/path/to/... is a dummy variable, to be substitute with the actual path to python3?
 
1 members found this post helpful.
Old 10-10-2017, 01:34 PM   #3
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 221

Original Poster
Rep: Reputation: Disabled
I am still confused. I made this script (called qute) according the instructions:
Quote:
#!/bin/bash

/home/porter/Gitclone/qutebrowser/.venv/bin/python3.5 -m qutebrowser "$@"
And put it in /usr/local/bin/ (indeed the best place to put it in).

But running qute in the terminal doesn't work. Nor does sudo qute. I get the error message: command not found.
 
Old 10-10-2017, 01:40 PM   #4
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 221

Original Poster
Rep: Reputation: Disabled
Ah, found it. It is running now.

Quote:
cd /usr/local/bin/
sudo chmod +x qute
and done.

Thank you for your answer, RandomTroll.
 
  


Reply

Tags
script


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
Shell script/Perl Script to remove the string until it finds special character '_' pooppp Programming 10 07-17-2012 09:36 AM
Shell script, Perl script, command or utility to convert Binary to text Perseus Programming 26 07-12-2012 06:00 AM
[SOLVED] bash and xterm: how make apps started by and for a script persist when script terminates porphyry5 Linux - General 4 06-15-2011 01:27 PM
[SOLVED] Script question: create a shell script in kde to log in on a server with ssh c4719929 Linux - Newbie 1 01-31-2011 03:05 AM
How to get full path to script file inside script itself? And in case of sym links? maggus Linux - Newbie 3 05-28-2009 08:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:23 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
Open Source Consulting | Domain Registration