Skip to content

Small KDE program that acts as a workaround to allow Firefox to play nice with KDE Plasma Activities.

Notifications You must be signed in to change notification settings

jasonmoofang/activityfox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

activityfox is a small KDE program that acts as a workaround to allow Firefox to
play nice with KDE Plasma Activities.

See this blog post for more info:
http://yuenhoe.com/blog/2012/08/associating-firefox-profiles-with-kde-activities/

============
Installing
============

Before you build, you may need to change the firefoxbin_path variable at the top of
main.cpp to the path of the firefox-bin executable on your system. It will usually be at

"/usr/lib/firefox/firefox-bin" for 32bit systems
and
"/usr/lib64/firefox/firefox-bin" for 64bit systems.

NOTE: It needs to be the *firefox-bin* executable path, not *firefox*, because
firefox will just spawn firefox-bin, which will end up out of reach of the program
preventing it from killing firefox when you stop the associated activity.

When done, just do the usual:
> mkdir build
> cd build
> cmake ..
> make

That should give you the 'activityfox' executable in the build folder. If you want
you can copy it somewhere accessible, like somewhere in $PATH

===========
Usage
===========

To associate a Firefox profile with a KDE activity, first activate and enter that
activity on your desktop. While in that activity, run:

> activityfox <Firefox profile name>

The profile doesn't need to exist: the program will create it if it doesn't. A small
blank window should appear, which would launch the Firefox process by proxy.
Wait a bit, and a Firefox window for that profile should appear. If the profile is new
then everything will be set to default settings, with no extensions, themes and whatnot:
that's how Firefox profiles work. Do what you want with the profile. In particular,
you would want to set

Edit > Preferences > General > When Firefox starts:
to
"Show my windows and tabs from last time"

So that your tabs get restored a'la Konqueror after you stop and restart the activity.
You can do this for any number of activities: just make sure you associate a different
profile name to each activity. Then stopping any activity will close the associated
Firefox Profile's window while leaving the others alone, and restarting any activity
will reopen the associated Firefox profile's window.

Sometimes when a Firefox profile window is restored, you'll get the "this is embarassing"
crash recovery tab. Just hit "restore session" and get your tabs back. Unfortunately
there doesn't seem to be a way to prevent this from happening once in awhile.

See http://blip.tv/moofang/associating-firefox-profiles-with-kde-activities-6306721 for
a brief screencast demonstrating basic usage.

===========
FAQ
===========


Q: My new Firefox profile instances have no plugins! This sucks!
A: If your new profile Firefox instance doesn't have any plugins, it may be because,
as in my system (OpenSUSE), somehow only the default instance looks in /usr/lib64/browser-plugins
for plugins. You can simply symlink all the plugins in that folder into ~/.mozilla/plugins,
for example:

> ln -s /usr/lib64/browser-plugins/libflashplayer.so ~/.mozilla/plugins/libflashplayer.so

And that should give your other profiles the plugin too.



Q: Can't we do something about the initial little blank window? It's ugly and annoying.
A: To hide the initial blank window, we can do a little bit of Kwin window-rule magic:
Right-click the title-bar of the window, select More Actions > Special Application Settings.
In the window rules settings that pop up, set:

- Size & Position > Minimized to Apply Initially, Yes
- Arrangement & Access > Keep below to Apply initially, Yes
- Arrangement & Access > Skip Taskbar to Apply initially, Yes
- Arrangement & Access > Skip Pager to Apply initially, Yes
- Arrangement & Access > Skip Switcher to Apply initially, Yes

Basically this will keep it minimized while excluding it from the taskbar and from all
Kwin window switching capabilities, effectively rendering it phantom.

===========
License
===========
GPL v3
Copyright 2012 Yuen Hoe (Jason moofang)

About

Small KDE program that acts as a workaround to allow Firefox to play nice with KDE Plasma Activities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published