command line question

der.hans PLUGd at LuftHans.com
Tue Jan 29 14:57:43 MST 2013


Am 29. Jan, 2013 schwätzte joe at actionline.com so:

moin moin,

> Recently, Brian explained that I could add 2>/dev/null after a
> command to eliminate the display of errors that occurs when I just
> type gwenview filename.jpg.
>
> gwenview filename.jpg 2>/dev/null
>
> Thanks Brian. That is very helpful.
>
> But I would still like to know what might be done to stop all the
> error messages that the system generates when I just type gwenview
> filename.jpg (as shown below).

I just ran a test with gwenview. It just spits out junk :(.

I didn't get the nepomuk errors, but I did get some debug notices.

gwenview(29917)/kdeui (kdelibs): Attempt to use QAction "edit_redo" with
KXMLGUIFactory! 
gwenview(29917)/kdeui (kdelibs): Attempt to use QAction "edit_undo" with
KXMLGUIFactory! 
gwenview(29917) Gwenview::ViewMainPagePrivate::setCurrentView: No index
found for current view

It would be nice if it ran more cleanly.

> Also, is there some additional option I could add to the example
> script above that would cause the terminal window to close and leave
> gwenview open?  As it is now, the terminal remains open and if I
> close it, gwenview also closes.

Put an '&' at the end to run the command in the background, then you can
close the terminal.

gwenview filename.jpg 2>/dev/null &

This will also work for within a script if you want the script to move on
directly after launching gwenview.

Alternatively, you can use <alt>-<F2> to bring up a launcher and put your
command in that.

gwenview *png

That will run gwenview disassociated from a terminal, so there is no
terminal to close and there is no terminal to recieve the debug messages.

ciao,

der.hans

> Of course, I can open gwenview from the menu to avoid the terminal
> window, but it would be helpful to be able to execute commands in
> terminal (and create scripts for certain tasks) that I could execute
> without leaving a terminal open.
>
>
> -------------------
> $ gwenview test.jpg
> "/usr/bin/gwenview(24601)" Soprano:
> "org.freedesktop.DBus.Error.ServiceUnknown - The name
> org.kde.nepomuk.services.nepomukstorage was not provided by any
> .service files"
> "/usr/bin/gwenview(24601)" Soprano: "QLocalSocket::connectToServer:
> Invalid name"
> "/usr/bin/gwenview(24601)" Soprano:
> "org.freedesktop.DBus.Error.ServiceUnknown - The name
> org.kde.nepomuk.services.nepomukstorage was not provided by any
> .service files"
> "/usr/bin/gwenview(24601)" Soprano: "QLocalSocket::connectToServer:
> Invalid name"
> "/usr/bin/gwenview(24601)" Soprano:
> "org.freedesktop.DBus.Error.ServiceUnknown - The name
> org.kde.nepomuk.services.nepomukstorage was not provided by any
> .service files"
> "/usr/bin/gwenview(24601)" Soprano: "QLocalSocket::connectToServer:
> Invalid name"
> "/usr/bin/gwenview(24601)" Soprano:
> "org.freedesktop.DBus.Error.ServiceUnknown - The name
> org.kde.nepomuk.services.nepomukstorage was not provided by any
> .service files"
> "/usr/bin/gwenview(24601)" Soprano: "QLocalSocket::connectToServer:
> Invalid name"
> QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed:
> No such file or directory
> QFileSystemWatcher: failed to add paths: /home/joe/.config/ibus/bus
> "/usr/bin/gwenview(24601)" Soprano:
> "org.freedesktop.DBus.Error.ServiceUnknown - The name
> org.kde.nepomuk.services.nepomukstorage was not provided by any
> .service files"
> "/usr/bin/gwenview(24601)" Soprano: "QLocalSocket::connectToServer:
> Invalid name"
> gwenview(24601)/kdeui (kdelibs): Attempt to use QAction "edit_redo"
> with KXMLGUIFactory!
> gwenview(24601)/kdeui (kdelibs): Attempt to use QAction "edit_undo"
> with KXMLGUIFactory!
> gwenview(24601) Gwenview::ViewMainPagePrivate::setCurrentView: No
> index found for current view
> gwenview(24601) KXMLGUI::ActionList::plug: Index  20  is not within
> range (0 -  19
> gwenview(24601) KXMLGUI::ActionList::plug: Index  20  is not within
> range (0 -  19
> gwenview(24601) KXMLGUI::ActionList::plug: Index  20  is not within
> range (0 -  19
> gwenview(24601) KXMLGUI::ActionList::plug: Index  20  is not within
> range (0 -  19
>
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>

-- 
#  http://www.LuftHans.com/        http://www.LuftHans.com/Classes/
#  When in doubt, choose the interesting. -- der.hans


More information about the PLUG-discuss mailing list