LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   What applications should be started from command line? (https://www.linuxquestions.org/questions/slackware-14/what-applications-should-be-started-from-command-line-665869/)

glore2002 08-27-2008 03:32 PM

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.-

janhe 08-27-2008 03:56 PM

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

bashyow 08-27-2008 04:09 PM

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.

keefaz 08-27-2008 04:12 PM

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 (Post 3261926)
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 ;)

ErV 08-27-2008 04:16 PM

Quote:

Originally Posted by glore2002 (Post 3261895)
What applications would you recommend me to start from command line instead of gui?

Anything you want.

Quote:

Originally Posted by glore2002 (Post 3261895)
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 (Post 3261895)
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 (Post 3261895)
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 (Post 3261895)
Terminal, Konsole or Xterm? (Am I missing any?)

You are missing mrxvt and yakuake(the one I'm using).

keefaz 08-27-2008 04:24 PM

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)

glore2002 08-27-2008 05:26 PM

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.-

Franklin 08-27-2008 05:34 PM

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 ;-)

ErV 08-27-2008 05:50 PM

Quote:

Originally Posted by keefaz (Post 3261961)
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.

glore2002 08-27-2008 05:56 PM

Quote:

Originally Posted by bashyow (Post 3261935)
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.-

bashyow 08-27-2008 07:02 PM

Quote:

Originally Posted by glore2002 (Post 3262039)
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.

rob.rice 08-27-2008 10:01 PM

one thing about the command line is you get to see the error messages you don't get to see from the GUI

glore2002 08-28-2008 04:05 AM

Thanks to all!
 
I will try those CD/DVD burning scripts!

Thank you!
Glore2002.-

vharishankar 08-28-2008 04:25 AM

Quote:

Originally Posted by bashyow (Post 3261935)
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.

GazL 08-28-2008 05:29 AM

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.


All times are GMT -5. The time now is 09:20 AM.