# Revision history [back]

~/.local/share/mime/packages$vi application-x-bag.xml: <?xml version="1.0" encoding="utf-8"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-type type="application/x-bag"> <comment>ROS bag file</comment> <icon name="application-x-bag"/> <glob-deleteall/> <glob pattern="*.bag"/> </mime-type> </mime-info> ~/.local/share/applications/bag.desktop [Desktop Entry] Type=Application Name=RqtBag # Exec=bash -c "source ~/catkin_ws/devel/setup.bash; rqt_bag %f" Exec=bash -c "source ~/catkin_ws/devel/setup.bash; ROS_HOME=pwd roslaunch rqt_bag_launch rqt_bag.launch bag:=%f" MimeType=application/x-bag StartupNotify=true Terminal=true Then: update-desktop-database ~/.local/share/applications update-mime-database ~/.local/share/mime The commented out Exec that runs rqt_bag directly works only if there is an already running roscore (does rqt_bag really need a roscore if it isn't going to publish anything, just inspect the bag within the gui? Maybe it could have a mode where publishing is disabled and no roscore required). In order to make it more usable rqt_bag can be wrapped in a launch file, so roslaunch will start a roscore if no other is available: rqt_bag_launch/launch/rqt_bag.launch: <?xml version="1.0"?> <launch> <arg name="bag" default="" doc="bag file to load"/> <node name="rqt_bag" pkg="rqt_bag" type="rqt_bag" args="$(arg bag)"/>
</launch>

If I set Terminal to false in the bag.desktop then the roslaunch and rosmaster processes are still running after exiting rqt_bag, but it looks cleaner without the terminal- is there something additional to be done in the Exec to make sure exiting is handled correctly?

~/.local/share/mime/packages$vi application-x-bag.xml: <?xml version="1.0" encoding="utf-8"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-type type="application/x-bag"> <comment>ROS bag file</comment> <icon name="application-x-bag"/> <glob-deleteall/> <glob pattern="*.bag"/> </mime-type> </mime-info> ~/.local/share/applications/bag.desktop [Desktop Entry] Type=Application Name=RqtBag # Exec=bash -c "source ~/catkin_ws/devel/setup.bash; rqt_bag %f" Exec=bash -c "source ~/catkin_ws/devel/setup.bash; ROS_HOME=pwd roslaunch rqt_bag_launch rqt_bag.launch bag:=%f" MimeType=application/x-bag StartupNotify=true Terminal=true Then: update-desktop-database ~/.local/share/applications update-mime-database ~/.local/share/mime The commented out Exec that runs rqt_bag directly works only if there is an already running roscore (does rqt_bag really need a roscore if it isn't going to publish anything, just inspect the bag within the gui? Maybe it could have a mode where publishing is disabled and no roscore required). In order to make it more usable rqt_bag can be wrapped in a launch file, so roslaunch will start a roscore if no other is available: rqt_bag_launch/launch/rqt_bag.launch: <?xml version="1.0"?> <launch> <arg name="bag" default="" doc="bag file to load"/> <node name="rqt_bag" pkg="rqt_bag" type="rqt_bag" args="$(arg bag)"/>
~/.local/share/mime/packages$vi application-x-bag.xml: <?xml version="1.0" encoding="utf-8"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-type type="application/x-bag"> <comment>ROS bag file</comment> <icon name="application-x-bag"/> <glob-deleteall/> <glob pattern="*.bag"/> </mime-type> </mime-info> ~/.local/share/applications/bag.desktop [Desktop Entry] Type=Application Name=RqtBag # Exec=bash -c "source ~/catkin_ws/devel/setup.bash; rqt_bag %f" Exec=bash -c "source ~/catkin_ws/devel/setup.bash; ROS_HOME=pwd roslaunch rqt_bag_launch rqt_bag.launch bag:=%f" MimeType=application/x-bag StartupNotify=true Terminal=true Then: update-desktop-database ~/.local/share/applications update-mime-database ~/.local/share/mime The commented out Exec that runs rqt_bag directly works only if there is an already running roscore (does rqt_bag really need a roscore if it isn't going to publish anything, just inspect the bag within the gui? Maybe it could have a mode where publishing is disabled and no roscore required). required -> short answer: no https://github.com/ros-visualization/rqt_common_plugins/issues/238). In order to make it more usable rqt_bag can be wrapped in a launch file, so roslaunch will start a roscore if no other is available: rqt_bag_launch/launch/rqt_bag.launch: <?xml version="1.0"?> <launch> <arg name="bag" default="" doc="bag file to load"/> <node name="rqt_bag" pkg="rqt_bag" type="rqt_bag" args="$(arg bag)"/>