PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Browser mit remote-Faehigkeit



Samsara
14.07.03, 00:48
Hallo Leuts!

Habe gerade das Sahnefeature an Mozilla entdeckt - wer's noch nicht kennt:

bash> mozilla &
bash> mozilla -remote "openURL(http://www.google.com)"

Wenn man sich ein kleines Skript (in meinem Falle Perl) dazu schreibt, kann man bald wie Neo in The Matrix googlen!

Meine Frage: Koennen andere Browser das auch? Bei Netscape geht es genau wie bei Mozzi (war ja eigentlich klar). Opera? The rest?

Bei Konqueror wuerd's mich ueberraschen - KDE ist ja ein bisschen windoof* (hab' mich neulich geaergert, dass man KDE Anwendungen nicht als Prozesse verwalten kann - zumindest nicht unter Originalnamen). Aber ich lasse mich auch gerne mal positiv ueberraschen :D

Gruss,

Samsara

* ist ja eigentlich ein Adjektiv :p

THEReapMan
14.07.03, 10:32
Hey coole Funktion!

Kannte ich noch nicht.
gleich maln paar Suchskripte Basteln. *g*

Gibt es eigentlich noch mehr Befehle als nur "openURL"?

Greets THEReapMan

Samsara
14.07.03, 15:51
Such auf der Mozilla-Site nach "remote", dann muesstest Du drauf kommen.

Es gibt z.B. noch openFILE (case?) fuer lokale Seiten.

Gruss,

Samsara

PS: Freut mich, dass ich nach nur drei Monaten Linux jetzt mal eine Entdeckung fuer Euch gemacht habe. Es lohnt sich also doch! ;)

dennler
15.08.03, 20:56
soll auch mit opera gehen. opera --help gibt ne schöne liste.
habs jedoch noch nicht versucht.

BLUESCREEN3D
16.08.03, 01:44
mozilla --help
(...)
-remote <command> Execute <command> in an already running
Mozilla process. For more info, see:

http://www.mozilla.org/unix/remote.html
(...)

was will man mehr? ^^

schnebeck
16.08.03, 04:02
Mehr kann der nicht? Nur beim Programmstart??

Konqi ist zur Laufzeit fernsteuerbar. Hier die Funktionen auf der Hauptebene:

bash-2.05b$ dcop konqueror-11705
qt
KBookmarkManager-/home/schnebeck/.kde/share/apps/konqueror/bookmarks.xml
KBookmarkNotifier
KDebug
KIO::Scheduler
KShortURIFilterIface
KURIIKWSFilterIface
KURISearchFilterIface
KonqFavIconMgr
KonqHistoryManager
KonqUndoManager
KonquerorIface (default)
LocalDomainURIFilterIface
MainApplication-Interface
html-widget2
html-widget3
html-widget4
konqueror-mainwindow#1
konqueror-mainwindow#2
ksycoca


Will ich jetzt die Funktionen nur von html-widget2 steuern, ergänzt man den Dcop-Befehl und erhält die Kontroll-Funktionen vom Widget:

bash-2.05b$ dcop konqueror-11705 html-widget2
QCStringList interfaces()
QCStringList functions()
KURL url()
bool closeURL()
void setJScriptEnabled(bool enable)
bool jScriptEnabled()
void setMetaRefreshEnabled(bool enable)
bool metaRefreshEnabled()
void setDNDEnabled(bool b)
bool dndEnabled()
void setJavaEnabled(bool enable)
bool javaEnabled()
void setPluginsEnabled(bool enable)
bool pluginsEnabled()
void setAutoloadImages(bool enable)
bool autoloadImages()
void setOnlyLocalReferences(bool enable)
bool onlyLocalReferences()
bool setEncoding(QString name)
QString encoding()
void setUserStyleSheet(QString styleSheet)
void setFixedFont(QString name)
bool gotoAnchor(QString name)
bool nextAnchor()
bool prevAnchor()
void activateNode()
QString selectedText()
void selectAll()
QString lastModified()
ASYNC print(bool quick)
void debugRenderTree()
void debugDOMTree()
void viewDocumentSource()
void viewFrameSource()
void saveBackground(QString url)
void saveDocument(QString url)
QString evalJS(QString script)
void stopAnimations()

Allerdings auch die Steuerung einer Browerinstanz ist - sagen wir mal - vielfältig :-)

bash-2.05b$ dcop konqueror-11705 konqueror-mainwindow#1
QCStringList interfaces()
QCStringList functions()
QVariant property(QCString property)
bool setProperty(QCString name,QVariant property)
QValueList<QCString> propertyNames(bool super)
QCString name()
void setName(QCString name)
bool isTopLevel()
bool isDialog()
bool isModal()
bool isPopup()
bool isDesktop()
bool enabled()
void setEnabled(bool enabled)
QRect geometry()
void setGeometry(QRect geometry)
QRect frameGeometry()
int x()
int y()
QPoint pos()
void setPos(QPoint pos)
QSize frameSize()
QSize size()
void setSize(QSize size)
int width()
int height()
QRect rect()
QRect childrenRect()
QRegion childrenRegion()
QSizePolicy sizePolicy()
void setSizePolicy(QSizePolicy sizePolicy)
QSize minimumSize()
void setMinimumSize(QSize minimumSize)
QSize maximumSize()
void setMaximumSize(QSize maximumSize)
int minimumWidth()
void setMinimumWidth(int minimumWidth)
int minimumHeight()
void setMinimumHeight(int minimumHeight)
int maximumWidth()
void setMaximumWidth(int maximumWidth)
int maximumHeight()
void setMaximumHeight(int maximumHeight)
QSize sizeIncrement()
void setSizeIncrement(QSize sizeIncrement)
QSize baseSize()
void setBaseSize(QSize baseSize)
BackgroundMode backgroundMode()
void setBackgroundMode(BackgroundMode backgroundMode)
QColor paletteForegroundColor()
void setPaletteForegroundColor(QColor paletteForegroundColor)
QColor paletteBackgroundColor()
void setPaletteBackgroundColor(QColor paletteBackgroundColor)
QPixmap paletteBackgroundPixmap()
void setPaletteBackgroundPixmap(QPixmap paletteBackgroundPixmap)
QBrush backgroundBrush()
QColorGroup colorGroup()
QPalette palette()
void setPalette(QPalette palette)
BackgroundOrigin backgroundOrigin()
void setBackgroundOrigin(BackgroundOrigin backgroundOrigin)
bool ownPalette()
QFont font()
void setFont(QFont font)
bool ownFont()
QCursor cursor()
void setCursor(QCursor cursor)
bool ownCursor()
QString caption()
void setCaption(QString caption)
QPixmap icon()
void setIcon(QPixmap icon)
QString iconText()
void setIconText(QString iconText)
bool mouseTracking()
void setMouseTracking(bool mouseTracking)
bool underMouse()
bool isActiveWindow()
bool focusEnabled()
FocusPolicy focusPolicy()
void setFocusPolicy(FocusPolicy focusPolicy)
bool focus()
bool updatesEnabled()
void setUpdatesEnabled(bool updatesEnabled)
bool visible()
QRect visibleRect()
bool hidden()
void setHidden(bool hidden)
bool shown()
void setShown(bool shown)
bool minimized()
bool maximized()
bool fullScreen()
QSize sizeHint()
QSize minimumSizeHint()
QRect microFocusHint()
bool acceptDrops()
void setAcceptDrops(bool acceptDrops)
bool autoMask()
void setAutoMask(bool autoMask)
bool customWhatsThis()
bool inputMethodEnabled()
void setInputMethodEnabled(bool inputMethodEnabled)
bool rightJustification()
void setRightJustification(bool rightJustification)
bool usesBigPixmaps()
void setUsesBigPixmaps(bool usesBigPixmaps)
bool usesTextLabel()
void setUsesTextLabel(bool usesTextLabel)
bool dockWindowsMovable()
void setDockWindowsMovable(bool dockWindowsMovable)
bool opaqueMoving()
void setOpaqueMoving(bool opaqueMoving)
int viewCount()
int activeViewsCount()
QString locationBarURL()
bool fullScreenMode()
QString currentTitle()
QString currentURL()
bool isHTMLAllowed()
QCStringList actions()
bool activateAction(QCString action)
bool disableAction(QCString action)
bool enableAction(QCString action)
bool actionIsEnabled(QCString action)
QCString actionToolTip(QCString action)
DCOPRef action(QCString name)
QMap<QCString,DCOPRef> actionMap()
int getWinID()
void grabWindowToClipBoard()
void hide()
void maximize()
void minimize()
void resize(int newWidth,int newHeight)
void move(int newX,int newY)
void setGeometry(int newX,int newY,int newWidth,int newHeight)
void raise()
void lower()
void restore()
void show()
void openURL(QString url)
void newTab(QString url)
DCOPRef currentView()
DCOPRef currentPart()
DCOPRef action(QCString name)
QCStringList actions()
QMap<QCString,DCOPRef> actionMap()
bool windowCanBeUsedForTab(int screen)


Wohlgemerkt: zur Laufzeit!!

dcop konqueror-11705 konqueror-mainwindow#1 openURL "gg:sqrt(6+3)"

11705 ist die PID meines Konquerors, die Liste aller laufenden fernsteuerbaren KDE-Programme erhält man mit
dcop
bzw.
kdcop

Have fun!

Thorsten