LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-31-2014, 03:12 PM   #1
patrick160356
LQ Newbie
 
Registered: May 2014
Posts: 6

Rep: Reputation: Disabled
Basics of running a program


Hello,

I cannot seem to find an answer to the question I have, so I hope you will bear with me if it has been asked previously (and I am certain that it has been).

I installed Linux Mint today, so that tells you how new I am to Linux. I used the Software Manager to install a program a few hours ago, but this program does not seem to include a menu item to run it. The web site for the program has a "Usage" section that gives a # followed by the name of the program, but nothing else. I entered this string through Terminal, but nothing happens when I enter the string. I just get a new $ line.

I assume there must be a command, such as "run," that must be entered before the string, but in 3 hours of searching sites and reading forum entries (here and elsewhere), I have not found what that command is. Can someone please help me by giving a simple 1, 2, 3 on how to run a program?

And, please, I have read some rather snide and nasty comments from experienced users to people like myself over the past few hours. I know nothing about using Linux. I am not a programmer. I am just a simple computer user who would like to learn how to use Linux so I can get away from Windows. What I need is some simple help, not to be told how stupid I am. I know that I am stupid at Linux and I will work to become less stupid over the next few weeks and months. Right now, I just need to know the basic steps to get an installed program running.

Many thanks for the assistance.

Patrick
 
Old 05-31-2014, 03:37 PM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
Hi and welcome to LQ.

What was the name of the program that you installed?
 
Old 05-31-2014, 03:43 PM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
The simple way of running a program is to type just the name of the program at the prompt in terminal.

The # you saw in the instructions is not something you were supposed to type. Depending on the distribution used by the person who wrote the instructions, that # was probably supposed to tell you that you must be the root user to run the program (obviously that is not a very beginner friendly way of telling you that).

If # in the instructions meant you must be root, I'm not sure of details of Mint to answer the question of how you accomplish that. Some likely possibilities are:

1) You type sudo then space then the name of the program, rather than just the program name. It probably then asks for your password.

2) You type
sudo su
then it prompts for your password, then the prompt changes to # and you type the name of the program.

3) You type
su
then it prompts for the root password (not your password), then the prompt changes to # and you type the name of the program.

In some distributions and for most programs, any one of those three will work. But other distributions might default to disabling one or two of those and a very few programs can't work with method (1) but can with 2 or 3.

Last edited by johnsfine; 05-31-2014 at 03:50 PM.
 
Old 05-31-2014, 03:54 PM   #4
patrick160356
LQ Newbie
 
Registered: May 2014
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hmmm ... Thanks, Johnsfine. Okay, so I entered the name of the program and I get "Can't open file. No such file or directory."

To answer sycamorex's question, the program is Pykaraoke and the command line given is:

python pykaraoke.py

What I don't understand is why developers don't include a menu item in their distribution. Is that such a big thing to write? It's now 4 hours trying to set this simple karaoke program up for a party.
 
Old 05-31-2014, 04:10 PM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Most Linux programs don't make things that hard.

I hope you don't need to be root for a karaoke program. So I don't know what the # meant, but anyway not something you were supposed to type.

If you knew which directory pykaraoke.py was in, you could cd to that directory and then the command should work.

Ubuntu is very similar to Mint, but easier for non users to check online where things are. I just checked (at packages.ubuntu.com) and found pykaraoke.py is in
/usr/share/pyshared/

So to run it, you might try:

cd /usr/share/pyshared
python pykaraoke.py

Last edited by johnsfine; 05-31-2014 at 04:17 PM.
 
Old 05-31-2014, 04:19 PM   #6
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 4,184

Rep: Reputation: 1168Reputation: 1168Reputation: 1168Reputation: 1168Reputation: 1168Reputation: 1168Reputation: 1168Reputation: 1168Reputation: 1168
"python" is a programming language.

"pykaraoke.py" is the name of a python program that somebody wrote.

"python pykaraoke.py" means in English "run the python program called pykaraoke.py."

It's not particularly complicated or confusing if you think about it for a minute. Now, maybe the website where you downloaded it has confusing instructions, but that's not Linux's fault in general.
 
Old 05-31-2014, 04:24 PM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,974
Blog Entries: 1

Rep: Reputation: 620Reputation: 620Reputation: 620Reputation: 620Reputation: 620Reputation: 620
Some developers run window managers that DON'T HAVE MENUs. Not that it's a justification. But if you develop something it's assumed that you tested it, which you can't do if you run a window manager which has no menus. Or sometimes your window manager has menus, but it's so off the radar that the distro provides no menu items for it.

From the command prompt you would normally prefix the executeable with ./

$ ./program

But for script languages you would prefix them with the interpreter.

$ bash script.sh
(although ./ uses the shebang / interpreter line to determine the interpreter.)

$ python program.py

$ java -c program.jar

etc...

There's "which" and "find" to help you locate the program if you don't know where it installed to.
 
Old 05-31-2014, 08:39 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 16,357

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
"Can't open file. No such file or directory."

Just type in python and see what it returns. I assume it will work. If so then it can't find the script you have as Shadow7 suggests. Not sure what the software manager did to install it either. I'd find where it is from command line and then issue command to start or make direct full path in what ever directory you are in.

Guess it wouldn't be too hard to make a launcher for that app so that you can run it from desktop or start menu.

The program you want to run is not a mainstream type of app. You have to accept this stuff. People like yourself may write a program in the only way they know how and offer it to others. In this case you do run the program as you stated. You have the program Python execute/run the script.

http://www.kibosh.org/pykaraoke/installation.php has exact requirements too. It may be that you have to add in other files or apps. We usually call that dependencies.

Last edited by jefro; 05-31-2014 at 08:40 PM.
 
Old 05-31-2014, 11:50 PM   #9
patrick160356
LQ Newbie
 
Registered: May 2014
Posts: 6

Original Poster
Rep: Reputation: Disabled
Many thanks for all the help. I've been fiddling with this for another couple of hours now and simply cannot get the program to run. I think it needs one of the add-on programs, but since that program has zero help in how to install it, I can't do that either.

I may change to another version of Linux. In the research I did, Mint came up with lots of claims of its ease of use and the large quantity of software available for it. It also came up as one of the top 2 for those with little programming knowledge, but I guess that's not correct.

Long-story short, I went out searching for a Windows karaoke program that would install (and work! :-)) through Wine. I tried about 30 of them. I got 5 of those to actually install and a simple little program called Karaoke Builder Player actually works. So, I'm set for this party later today.

Thanks, again, and I'm sure I'll be back with more head-scratching questions in the not-too-distant future.
 
Old 06-01-2014, 12:22 AM   #10
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
I think you downloaded the source code rather than the compiled program. Debian has a package called pykaraoke with an executable placed in /usr/games. Since /usr/games is in the system's PATH variable you don't need to specify a location. The command to run the program is most definitely
Code:
pykaraoke
You can run it from a terminal or from a desktop shortcut or from your desktop's "Run Command:" window. Note that pykaraoke.py is not included in the package pykaraoke but rather in the package python-pykaraoke which is one of the dependencies for the pykaraoke package.

Hope that clears up the matter.
jdk
 
Old 06-02-2014, 07:41 AM   #11
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 5,119
Blog Entries: 10

Rep: Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815
Quote:
Originally Posted by patrick160356 View Post
Many thanks for all the help. I've been fiddling with this for another couple of hours now and simply cannot get the program to run. I think it needs one of the add-on programs, but since that program has zero help in how to install it, I can't do that either.

I may change to another version of Linux. In the research I did, Mint came up with lots of claims of its ease of use and the large quantity of software available for it. It also came up as one of the top 2 for those with little programming knowledge, but I guess that's not correct.
I'd consider continuing to give MINT a try; this sounds more like the case you stated in your first paragraph which is that the author may have not provided too much information for a python uninitiate to know in order to get the program running. If you're just getting going with Linux, hopping from one distro to another may add to frustration. Personally I find that most of the main ones include a good suite of browser, mail, multimedia (viewing not mixing/editing/creating), and office-like softwares; as well as most of the normal Linux command capabilities. There are design differences, desktop view differences; however if you want your desktop to look different, you can work at that in any distribution and attain it; I feel. I care more that it's stable, it does work as expected, and that it performs well.

A question to consider asking in a thread would be if any persons have some recommendations for karaoke software which runs under Linux and what they think about it. Because I think most distributions do not include that type of software; you'd then have to install it via package manager, compile it, or grab something like what you've gotten here. Also I've found that a lot of multimedia editing software may require special packages; unless it's been around for a bit and it turns out that those packages are already included in most distributions. Editing, mixing, or creating multimedia tries to be very open about formats, as well as cutting edge. It's just either a programming direction which has gotten a lot of attention, or it hasn't. Doesn't mean there's anything wrong with MINT by the way, and doesn't mean that karaoke software for Linux doesn't exist that's easy to use and works well; unfortunately I do not have any recommendation on that particular front.
 
Old 06-02-2014, 07:49 AM   #12
patrick160356
LQ Newbie
 
Registered: May 2014
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi rtmistler. The Pykaraoke is the only Linux karaoke program I've seen. It's not critical for me to have this, I just needed it for this particular evening because of a problem I have with my Windows installation (for which I will probably start another thread :-)). The karaoke program I got to work through Vine worked perfectly for last night's party, so that sorts that problem.

I won't switch from Mint because I like the interface and, other than the karaoke program, everything I've downloaded has been simple to install and use.

Thanks, again, for the thoughts.
 
  


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
[SOLVED] My Visual basics program isn't running properly, Why? errigour Programming 3 06-25-2012 02:38 PM
Shell Script to start a program either not running or kill if running avataratar Linux - Newbie 1 03-29-2012 02:45 AM
Stuck on the basics: Installing and running downloaded applications obrienaj Linux - Newbie 9 10-24-2009 12:15 PM
Running program from terminal with & does nothing, program stops DittoAlex Linux - General 1 10-05-2007 01:35 AM
NEWBIE: I need the basics of installing a program SRSilvia Linux - Software 3 11-03-2003 07:53 PM


All times are GMT -5. The time now is 12:45 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