Hello,
I've just found out some changes in the "starttde" script, see commit
77aed4a4
http://www.trinitydesktop.org/patches/1393268197:77aed4a4eba63e760c40cc5b3d…
I do not agree with what that patch for 2 reasons:
1) The principe: on my computer, I'm using TDE both on local session and
in remote session at the same time, using the same user account.
So when I login remotely, this patch will probably kill my
locally-opened session ...
2) The way it is written: there are several piped commands (why not
using a single awk or simply use bash ?) and the code is not robust at
all. What is my user is called "greppy" for example ? (ok this is
unlikely, but not impossible). The "grep -v grep" will eliminate this
line ...
Please avoid using a full-featured "ps" output then trying to parse the
output!
The "ps" command can already filter on user (ps -u $USER) and select
output format (ps -o field1,field2 ...)
So, at very least, the command could look like :
ps -u ${USER} -o pid,cmd h | while read pid command args; do
case "${command##*/}" in "dcopserver"|"gam_server")
kill $pid ;;
esac
done
Another approach would be to parse the /proc/[0-9]*/ folders, to avoid
using any "ps" command at all...
Francois
All,
I have always been frustrated by not knowing what variables were available to
cmake so that I could intelligently adjust include_directories or
target_link_libraries without pulling my hair out. I have stumbled on two very
different and very useful ways of showing all cmake variables available to your
build. They literally pull back the cmake veil of secrecy... Both are simple:
(1) simply include the following code snippet in any CMakeLists.txt to dump all
variables (both in-use & available) to stdout during the build (then just save
the list to a text file):
# dump all variable names
get_cmake_property(_variableNames VARIABLES)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
(2) simply call cmake with 'cmake -LAH' and it will do something similar, but
not quite as complete.
The outputs are this:
(1) (from an old kde3 install)
-- Could NOT find Threads (missing: Threads_FOUND)
-- Found KDE3 include dir: /opt/kde3/include
-- Found KDE3 library dir: /opt/kde3/lib64
-- Found KDE3 dcopidl preprocessor: /opt/kde3/bin/dcopidl
-- Found KDE3 dcopidl2cpp preprocessor: /opt/kde3/bin/dcopidl2cpp
-- Found KDE3 kconfig_compiler preprocessor: /opt/kde3/bin/kconfig_compiler
-- CMAKE_AR=/usr/bin/ar
-- CMAKE_BASE_NAME=g++
<snip>
-- KDE3PREFIX=/opt/kde3
-- KDE3_BUILD_TESTS=OFF
-- KDE3_DCOPIDL2CPP_EXECUTABLE=/opt/kde3/bin/dcopidl2cpp
-- KDE3_DCOPIDL_EXECUTABLE=/opt/kde3/bin/dcopidl
--
KDE3_DEFINITIONS=-DQT_CLEAN_NAMESPACE;-D_GNU_SOURCE;-D_XOPEN_SOURCE=500;-D_BSD_SOURCE
-- KDE3_FOUND=TRUE
-- KDE3_INCLUDE_DIR=/opt/kde3/include
-- KDE3_INCLUDE_DIRS=/usr/lib/qt3/include;/opt/kde3/include
-- KDE3_KCFGC_EXECUTABLE=/opt/kde3/bin/kconfig_compiler
-- KDE3_KDECORE_LIBRARY=/opt/kde3/lib64/libkdecore.so
-- KDE3_LIBTOOL_DIR=/lib64/kde3
-- KDE3_LIB_DIR=/opt/kde3/lib64
-- KDE3_MODULE_DIR=/usr/share/cmake/Modules
-- KDECONFIG_EXECUTABLE=/opt/kde3/bin/kde-config
-- PROJECT_BINARY_DIR=/home/david/dev/kde3/tutorial/p1bld
-- PROJECT_NAME=p1
-- PROJECT_SOURCE_DIR=/home/david/dev/kde3/tutorial/p1
-- QGLOBAL_H=#define QT_VERSION_STR "3.3.8c"
-- QT3_FOUND=TRUE
-- QTVERSION_MOC=
-- QTVERSION_UIC=
--
QT_AND_KDECORE_LIBS=/usr/lib/qt3/lib64/libqassistantclient.a;/usr/lib/qt3/lib64/libqt-mt.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so;dl;/opt/kde3/lib64/libkdecore.so
-- QT_DEFINITIONS=-DQT_SHARED;-DQT_NO_DEBUG;-DQT_THREAD_SUPPORT;-D_REENTRANT
-- QT_FOUND=TRUE
-- QT_INCLUDE_DIR=/usr/lib/qt3/include
--
QT_LIBRARIES=/usr/lib/qt3/lib64/libqassistantclient.a;/usr/lib/qt3/lib64/libqt-mt.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so;dl
-- QT_MOC_EXE=/usr/lib/qt3/bin/moc
-- QT_MOC_EXECUTABLE=/usr/lib/qt3/bin/moc
-- QT_MT_REQUIRED=TRUE
-- QT_QASSISTANTCLIENT_LIBRARY=/usr/lib/qt3/lib64/libqassistantclient.a
-- QT_QTMAIN_LIBRARY=
-- QT_QT_LIBRARY=/usr/lib/qt3/lib64/libqt-mt.so
-- QT_UIC_EXE=/usr/lib/qt3/bin/uic
-- QT_UIC_EXECUTABLE=/usr/lib/qt3/bin/uic
-- QT_VERSION_STRING=3.3.8c
-- QT_WRAP_CPP=FALSE
-- QT_WRAP_UI=FALSE
(2) # cmake -LAH
// Path to a program.
CMAKE_AR:FILEPATH=/usr/bin/ar
// Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS
used) Debug Release RelWithDebInfo MinSizeRel.
CMAKE_BUILD_TYPE:STRING=
// Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON
// CXX compiler.
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
// Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=
// Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
// Flags used by the compiler during release minsize builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
// Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs
will produce slightly less optimized but smaller files).
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
// Flags used by the compiler during Release with Debug Info builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g
// Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=
// Flags used by the linker during debug builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
// Flags used by the linker during release minsize builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
// Flags used by the linker during release builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
// Flags used by the linker during Release with Debug Info builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
// Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
// Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local
// Path to a program.
CMAKE_LINKER:FILEPATH=/usr/bin/ld
<snip>
--
David C. Rankin, J.D.,P.E.
Darrell,
I have a note to commit 77aed4a4. I'm afraid that used grep is dangerous. For
example, my colleague has a login name 's' (yes, only one letter). Such grep
would return unwanted results. I propose a change roughly as follows. This
will make it possible to omit some grep and also condition.
ps -u $USER -o pid= -o comm= | grep -w kdesktop_lock | awk '{print $1}' | xargs -r kill -9
The second note is that this killing can be dangerous. If the machine is
configured for multi-user login (multi-seat, xdmcp), the user could have
multiple active sessions. Alternatively, user could have running some
applications remotely - dcopserver would be active for remote session.
--
Slavek
Darrell, Slavek, All,
On your R14 install, open a 'top' or 'htop' window and tell me what your
'tdepowersave' use is.
By far -- tdepowersave is the top CPU user on my build continually taking more
than any other process. This is not right. It is using 2x-3x more CPU than X or
kded and is continually at the top of the list. It never stops.
What do you see?
--
David C. Rankin, J.D.,P.E.
All,
I was using showfoto earlier and noticed when you load images into the viewer
to prepare for a slide-show, etc, none of the thumbnails for the images are
generated. Is this something I'm doing wrong or is this a generic problem. Can
someone please confirm. Thanks. Here is a screenshot of what I see:
http://www.3111skyline.com/dl/dt/trinity/ss/showfoto-no-thumbs.jpg
--
David C. Rankin, J.D.,P.E.
All,
ktimer works fine in all respects, but when I closed the app (top-left
window-decoration control, rt-click -> close) ktimer crashed and produced the
attached kcrash. Can somebody see if they see the same on their system. Thanks.
--
David C. Rankin, J.D.,P.E.