pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-users] Use Multiple Server Names?


From: David Shochat
Subject: Re: [Pan-users] Use Multiple Server Names?
Date: Thu, 19 Apr 2012 00:00:30 +0000 (UTC)
User-agent: Pan/0.136 (I'm far too busy being delicious; GIT 926a150 git://git.gnome.org/pan2)

On Wed, 18 Apr 2012 00:02:07 -0500, Ron Johnson wrote:

> To follow up on David's post, from a terminal window:
>    mkdir .pan2_text mkdir .pan2_bin echo "alias
>    text_pan='$PAN_HOME=~/pan2_text pan'" >> .bashrc echo "alias
>    bin_pan='$PAN_HOME=~/pan2_bin pan'" >> .bashrc
> 
> Exit the window and then reopen it.  Again, from a terminal window:
>    alias text_pan bin_pan
> 
> If you see the two alias definitions, then I didn't screw up!  Treat the
> aliases as "regular" commands:
>    text_pan
> 
> Use that when you want to access text groups and bin_pan when you want
> binary groups.
> 
> Yes, it means actually typing in commands but that's ok; it won't kill
> you and you might learn something...  :)

But maybe we can learn even more by doing it without typing commands: 
Instead of aliases, make two scripts, one for each mode, and then 
reference those in two desktop files (make both the scripts and the 
desktop files executable). We can now launch pan in either mode by double-
clicking the appropriate desktop file from Nautilus (I'm assuming Ubuntu 
here). Looking over at the launcher (I almost said "dock" and had to 
correct myself), we see an icon for the currently running pan. Right-
mouse it and select "Keep in launcher". Now after exiting from pan, the 
icon is still in the launcher and we can now bring it up the Unity way by 
single-clicking that icon.
In more detail, the "bin" script might be made in ~/bin and named 
pan2_bin.sh, containing 2 lines:
#!/bin/sh
PAN_HOME=~/pan2_bin pan
Make it executable:
chmod 755 pan2_bin.sh
Next create a desktop file in ~/.local/share/applications. It might be 
called pan2_bin.desktop and could contain 10 lines:
[Desktop Entry]
Encoding=UTF-8
Name=Pan Newsreader Binary Mode
Comment=Read and Post Usenet Stuff
Exec=~/bin/pan2_bin.sh
Icon=pan.png
Terminal=false
Type=Application
Categories=GTK;Application;Network;News
StartupNotify=false
Make this file executable too (or you'll get a complaint about it not 
being marked "trusted" (!)):
chmod 755 pan2_bin.desktop
Ok, this is the file to double-click on from Nautilus etc. I tried 
something similar (except I'm trying to use Ron Johnson's terminology and 
naming here) and it worked. I hope I didn't screw anything up in the 
above. It would be so much simpler if you could set an environment 
variable right in the .desktop file, eliminating the shell script 
completely, but I don't believe you can, based on some half-hearted 
googling. Hey. That gives me an idea. If you could choose the profile 
using a command-line argument instead of relying on PAN_HOME... ah but 
that would be a feature request.
-- David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]