Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 24 Oct 2014, 16:44
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
change process name in gtkdialog
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
hannysabbagh

Joined: 14 Apr 2013
Posts: 17

PostPosted: Sat 25 May 2013, 03:30    Post_subject:  change process name in gtkdialog  

Hello.

I wonder if there is a way to change process name for my gtkdialog apps?
i mean when i write an app using gtkdialog, and when i run this app, the process name is always "gtkdialog", can i change this??

thanks.
Back to top
View user's profile Send_private_message 
akash_rawal

Joined: 25 Aug 2010
Posts: 232
Location: ISM Dhanbad, Jharkhand, India

PostPosted: Sat 25 May 2013, 04:41    Post_subject:  

Use 'title' tag attribute to <window> tag. e.g.
Code:

<window title="some other title">
...
</window>

For other uses http://code.google.com/p/gtkdialog/ can be helpful.
Back to top
View user's profile Send_private_message 
hannysabbagh

Joined: 14 Apr 2013
Posts: 17

PostPosted: Sat 25 May 2013, 04:48    Post_subject:  

Thank you.

but this only changes the window title, i want to change the process name so i can run 'killall' on the window i want, not all gtkdialog windows.

thanks.
Back to top
View user's profile Send_private_message 
akash_rawal

Joined: 25 Aug 2010
Posts: 232
Location: ISM Dhanbad, Jharkhand, India

PostPosted: Sat 25 May 2013, 07:31    Post_subject:  

There are two ways of doing it.
1. Start gtkdialog asynchronously and record its process id. Later kill it with its process id like:
Code:

gtkdialog -p EXAMPLE & #<< Note the '&' at the end
pidof_dialog="$!" #To record process ID into pidof_dialog
wait "$pidof_dialog" #To suspend execution till gtkdialog ends, optional
...
#later
kill "$pidof_dialog"

2. Symlink the gtkdialog executable and give it another name.
Code:

ln -sT "`which gtkdialog`" /tmp/my_gtkdialog
/tmp/my_gtkdialog -p EXAMPLE
...
#later
killall my_gtkdialog
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0493s ][ Queries: 12 (0.0044s) ][ GZIP on ]