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 Wed 26 Nov 2014, 02:38
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Intelligent script to start Thunderbird
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count_1  
Author Message

Joined: 20 May 2006
Posts: 6458
Location: Auckland, New Zealand

PostPosted: Sat 15 Mar 2008, 23:28    Post_subject:  Intelligent script to start Thunderbird  

Intelligent script to start Thunderbird - assuming you have thunderbird.

Save as /usr/local/thunderbird or something, and make sure it is lauching Thunderbird from the place it actually is (e.g. you might have it installed in /usr/local/lib/thunderbird)

It has a splash screen.
If you send mailto: links to it, it deals with them correctly, if you send any of the -something arguments to it, then it deals with them, if you don't send any arguments, it just opens thunderbird, otherwise it composes a message, with everything you sent to it as attachments.

Intended for use with a plain roxapp like the one I am about to update here, although you don't NEED the roxapp.
Uncomment the gxmessage line if you prefer it to xmessage (I don't but I'm strange).

I tried playing around, trying to get the splash screen to run whenever:
-thunderbird isn't already running
-a compose window is already open but nothing else
-we are opening a compose window, regardless of what is already open
as it always takes a while to open in these situations, but I don't think it is possible to get the logic complete.


# Splash Screen Duration

# Show Splash if Thunderbird is not already running
if [ "`ps | grep --extended-regexp 'thunderbird\-bin'`" = "" ]
 #if which gxmessage > /dev/null
 # gxmessage -timeout $DISPLAY_TIME -buttons "" -bg "#d0ffd0" -center -title "Thunderbird" "
 # Thunderbird is starting" &
  xmessage -timeout $DISPLAY_TIME -buttons "" -bg "#d0ffd0" -center -fn "10x20" -title "Thunderbird" " Thunderbird is starting " &

# Compose with attachments
if [ "$1" != "" ]; then
 if [ "$1" != "-mail" ]; then
  if [ "$1" != "-compose" ]; then
   if [ "$1" != "-news" ]; then
    if [ "$1" != "-addressbook" ]; then
     if [ "$1" != "-options" ]; then
      if [ "`echo "$1" |head -c 7`" != "mailto:" ]; then
       for i in "$@"
        do attachments="$attachments,file:///$i"
       exec /usr/lib/thunderbird/thunderbird -compose "attachment='$attachments'"

# Start Thunderbird
exec /usr/lib/thunderbird/thunderbird "$@"

I suspect it needs to be fixed for links to news channels or whatever they are too, but I don't use any, so complain if you want that fixed.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count_1  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot attach files in this forum
You can download files in this forum

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