LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-27-2008, 03:32 PM   #1
glore2002
Member
 
Registered: Mar 2007
Location: Buenos Aires, Argentina.
Distribution: Lubuntu 17.10 x64
Posts: 510

Rep: Reputation: 33
What applications should be started from command line?


What applications would you recommend me to start from command line instead of gui?

Does starting from command line mean any kind of advantage/s? (memory use, etc?)

For instance, I've read that mplayer from command line is better than gmplayer (the one from gui). Is this true or is it exactly the same?

Well, I am willing to learn so any advice on this subject will be very welcome.

By the way, What command line do you prefer? Terminal, Konsole or Xterm? (Am I missing any?)

Thank you!
Glore2002.-
 
Old 08-27-2008, 03:56 PM   #2
janhe
Member
 
Registered: Jul 2007
Location: Belgium
Distribution: slackware64 14.2, slackware 13.1
Posts: 371

Rep: Reputation: 54
which version of the program is best for you (command line or GUI), depends on your situation.
GUI versions are meant to be easier to control, so you might learn faster how to use the application productively
on the other side, the command line versions don't have the GUI code, so you can expect them to use less memory. But depending on how much memory your computer has and which app you arhe e considering, this can be neglected.

To take mplayer as an example: gmplayer has right-click menus and a control window so you can adapt pretty much every setting without reading manpages to find that magic key combination to do the same in mplayer.
I notice no difference in performance between mplayer and gmplayer (intel core2 duo @ 1.80 GHz with 2 Gb RAM)
The only reason I still use mplayer is out of habit, and because I like to play incomplete files while I'm still torrenting them, so I can kill mplayer from the commandline if necessary.

GUI-only applications like, say, konqueror are run the same way wether you run them from command line or from a menu. The only advantage I know in this situations is to see error messages when a program misbehaves.

As for my favorite terminal emulator: I use Konsole, mainly because of the way it's integrated with the rest of KDE. In situations where I don't use Konsole, I use the "real" command line, outside of X
 
Old 08-27-2008, 04:09 PM   #3
bashyow
Member
 
Registered: Jun 2008
Location: uk
Distribution: Slackware 12.1, AND IM LOVIN EVERY MINUTE OF IT, JERRY! :D
Posts: 122

Rep: Reputation: 15
I like burning discs on the commandline, with mkisofs & cdrecord.

copy the files into my burn folder (specified in my burn scripts). then execute the script.

I dont get why anyone would need a GUI for that.

Last edited by bashyow; 08-27-2008 at 04:13 PM.
 
Old 08-27-2008, 04:12 PM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
I prefer start mplayer from command line as I think it is an advantage to not load the gui imho, not for big performances reason, but just because I watch movies full screen so I don't see the need for a GUI

Quote:
Originally Posted by janhe View Post
I notice no difference in performance between mplayer and gmplayer (intel core2 duo @ 1.80 GHz with 2 Gb RAM)
Sorry, couldn't resist to quote
 
Old 08-27-2008, 04:16 PM   #5
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by glore2002 View Post
What applications would you recommend me to start from command line instead of gui?
Anything you want.

Quote:
Originally Posted by glore2002 View Post
Does starting from command line mean any kind of advantage/s? (memory use, etc?)
With modern machines (2+GB of ram) you'll hardly notice any difference.

Quote:
Originally Posted by glore2002 View Post
For instance, I've read that mplayer from command line is better than gmplayer (the one from gui). Is this true or is it exactly the same?
It's the same mplayer. If you start it from command line, though, you won't be able to use mouse, only keyboard shortcuts. But I don't think you'll be able to play gmplayer on root window, and you certainly won't be able gmplayer in "real" terminal.

Quote:
Originally Posted by glore2002 View Post
By the way, What command line do you prefer?
It isn't "command line" it is "terminal" or "terminal emulator".

Quote:
Originally Posted by glore2002 View Post
Terminal, Konsole or Xterm? (Am I missing any?)
You are missing mrxvt and yakuake(the one I'm using).
 
Old 08-27-2008, 04:24 PM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Erv, you can watch movies with mplayer in linux console (ctrl-alt-f1-f6, not real terminal though) if the linux console uses framebuffer, mplayer will switch to SDL video driver (the SDL games can run on Linux console with framebuffer)
 
Old 08-27-2008, 05:26 PM   #7
glore2002
Member
 
Registered: Mar 2007
Location: Buenos Aires, Argentina.
Distribution: Lubuntu 17.10 x64
Posts: 510

Original Poster
Rep: Reputation: 33
Thanks!

Thank you. I am learning a lot from you guys!

Whenever I press CTRL+ALT+F1-F6, I go to linux console (is that right?) but without any possibility to write my commands. Maybe this happens because I set my computer to start directly into X. What should I do to go to that console being able to type some commands?

Thanks again,
Glore2002.-
 
Old 08-27-2008, 05:34 PM   #8
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Rep: Reputation: 217Reputation: 217Reputation: 217
I would suggest the running a program (or every program) from the command line at least once as such:

Code:
steve@sundog:~$ audacious --help
This may provide insight to options you might not know existed:

Code:
steve@sundog:~$ audacious --help
Usage:
  audacious [OPTION...] - play multimedia files

Help Options:
  -?, --help                      Show help options
  --help-all                      Show all help options
  --help-gtk                      Show GTK+ Options
  --help-sm-client                Show Session Management options

Application Options:
  -r, --rew                       Skip backwards in playlist
  -p, --play                      Start playing current playlist
  -u, --pause                     Pause current song
  -s, --stop                      Stop current song
  -t, --play-pause                Pause if playing, play otherwise
  -f, --fwd                       Skip forward in playlist
  -j, --show-jump-box             Display Jump to File dialog
  -e, --enqueue                   Don't clear the playlist
  -E, --enqueue-to-temp           Add new files to a temporary playlist
  -m, --show-main-window          Display the main window
  -a, --activate                  Display all open Audacious windows
  -H, --headless                  Enable headless operation
  -N, --no-log                    Print all errors and warnings to stdout
  -v, --version                   Show version and builtin features
  --display=DISPLAY               X display to use
Then, if you like one of the options as a default, you can edit the gui menu (for your choice of DE or WM) so that when you click the icon, you get the desired options instead of the standard ones. Prior to HAL inclusion in Slackware, I used this to edit the way digikam and gtkam started such that it automagicly found my camera and downloaded the pics. I never really missed hal ;-)
 
Old 08-27-2008, 05:50 PM   #9
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by keefaz View Post
Erv, you can watch movies with mplayer in linux console (ctrl-alt-f1-f6, not real terminal though) if the linux console uses framebuffer, mplayer will switch to SDL video driver (the SDL games can run on Linux console with framebuffer)
mplayer will display movies, I know that (even within non-framebuffer console, by the way (requires svgalib)). But I'm not sure that gmplayer will also work.

Last edited by ErV; 08-27-2008 at 05:52 PM.
 
Old 08-27-2008, 05:56 PM   #10
glore2002
Member
 
Registered: Mar 2007
Location: Buenos Aires, Argentina.
Distribution: Lubuntu 17.10 x64
Posts: 510

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by bashyow View Post
I like burning discs on the commandline, with mkisofs & cdrecord.

copy the files into my burn folder (specified in my burn scripts). then execute the script.

I dont get why anyone would need a GUI for that.
I would really like learning how to burn CDs/DVDs from command line using those scripts.

Glore2002.-
 
Old 08-27-2008, 07:02 PM   #11
bashyow
Member
 
Registered: Jun 2008
Location: uk
Distribution: Slackware 12.1, AND IM LOVIN EVERY MINUTE OF IT, JERRY! :D
Posts: 122

Rep: Reputation: 15
Quote:
Originally Posted by glore2002 View Post
I would really like learning how to burn CDs/DVDs from command line using those scripts.
the best way is to look at the man pages for mkisofs & cdrecord, its good to make some notes in a pad too, oh and have plenty of discs ready to test

so:

Code:
man mkisofs

man cdrecord

mkisofs is the first program, it creates a filesystem (.iso) out of your files that you want to burn.

cdrecord then burns that .iso to the disc.



if your a normal user, you may need to be root to run the cdrecord program. I do this by creating a burn group, adding my user to that group, then, as root, run 'visudo' at the CL, and edit the /etc/sudoers file.

my entry in the sudoers file is like this:

Code:
%burn ALL=(root) NOPASSWD: /usr/bin/cdrecord


here are my simple scripts to give you an idea:

this is a burn once data dvd
Code:
#! /bin/sh

echo  PREPARE FOR THE BURN
echo
sleep 3
mkisofs -o ~/.burn/databurn.iso -r -J ~/backup
echo
echo  START THE BURN
sleep 3
sudo /usr/bin/cdrecord -v speed=2 dev=10001,0,0 /home/user/.burn/databurn.iso
sleep 3
echo
echo  DONE.
sleep 3
this is to burn an iso
Code:
#! /bin/sh

sudo /usr/bin/cdrecord -v speed=2 dev=1001,0,0 /home/user/.burn/*.iso
make the scripts executable, and make sure your files are in your 'backup' folder, then execute the script.


the scripts are a bit confusing, but thats just how I have my folders set up.

Last edited by bashyow; 08-27-2008 at 07:05 PM.
 
Old 08-27-2008, 10:01 PM   #12
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Rep: Reputation: 205Reputation: 205Reputation: 205
one thing about the command line is you get to see the error messages you don't get to see from the GUI
 
Old 08-28-2008, 04:05 AM   #13
glore2002
Member
 
Registered: Mar 2007
Location: Buenos Aires, Argentina.
Distribution: Lubuntu 17.10 x64
Posts: 510

Original Poster
Rep: Reputation: 33
Thanks to all!

I will try those CD/DVD burning scripts!

Thank you!
Glore2002.-
 
Old 08-28-2008, 04:25 AM   #14
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by bashyow View Post
I like burning discs on the commandline, with mkisofs & cdrecord.

copy the files into my burn folder (specified in my burn scripts). then execute the script.

I dont get why anyone would need a GUI for that.
Actually I can supply you the answer.

I use a GUI for CD burning (like k3b) as it's far more convenient to drag and drop files from multiple locations you need into the GUI frontend rather than go through the trouble of creating an ISO image of the CD before burning it.

Sure I can play around with scripts as I have enough knowledge for that, but I don't feel the need for them as such.
 
Old 08-28-2008, 05:29 AM   #15
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Code:
xv `locate family_holiday_shot.jpg`
or if you know the file is in your pictures directory:

Code:
xv pic<press tab>fam<press tab>
Just two basic examples of how the command shell can make your life easier. Once you start getting to the stage where you end up working with pipelines, doing for loops etc. things really start to get interesting.

Code:
ls ~/music/*.ogg | sort -R | head -5 | xargs ogg123
put that in an alias called play5 and its just 5 characters to type for a little chunk of random entertainment. Of course you could start your music player from the gui, do whatever actions are necessary to select 5 tunes at random and start them playing, but I bet it would take longer than just typing those 5 characters. In this particular example, you'd probably be better off just doing a ogg123 -z ~/music/*.ogg and hitting ctrl-c when you've had enough, but it does show you the sort of things you can do with command pipelines and a bit of imagination.


The main advantages of a GUI are that you don't need a great deal of knowledge or experience to use it. A good GUI is mostly intuitive. In contrast a command shell takes a good deal of knowledge and experience to use efficiently. At a very minimum you'll need to learn the commands and their syntax.

Learn to use both together. X11 was never intended to be a standalone GUI.
 
  


Reply



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
mplayer only plays video when started from the command line? AlucardZero Linux - Software 2 09-02-2007 08:01 PM
xine command line? or some other command line only engine? lumix Linux - Software 2 08-10-2007 10:46 AM
not ALL applications can be started from the terminal. randell6564 Ubuntu 13 06-10-2006 11:49 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM
51 characters only in the 1st Line of command line eggCover Linux - General 2 07-29-2004 01:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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