command-not-found is enabled out of the box and it rules. openSUSE should have it by default too.
dpkg phrasebook:
rpm -ql foodpkg -L foorpm -qa "foo*bar"dpkg -l "foo*bar"(and it also shows packages that are not installed)
openSUSE. Linux. computers.
rpm -ql foodpkg -L foorpm -qa "foo*bar"dpkg -l "foo*bar" (and it also shows packages that are not installed):set check_mbox_size on works around that.dpkg -i {subversion,libsvn1,libneon27-gnutls}*.deb from here and here.
http://svn.opensuse.org/svn/yast/trunk/libyui/examples/HelloWorld.cc#line=,13
emerge -uND --world && knotify "Done!". I thougt it would be a piece of cake, but apparently not.zypper in libnotify; notify-send Done, has a disadvantage of requiring a fair amount of GNOME software. But it does use a proposed freedesktop.org standard.# killall knotify4; cp /usr/bin/knotify4{,.bak}
# sed 's/type="a(ss)"/ type = "av"/g' /usr/bin/knotify4.bak > /usr/bin/knotify4Now which event should we use so that the user actually sees the message? There are many of them, with user configurable actions. warning/kde seems to work out of the box.#! /usr/bin/python
import sys
import dbus
m = sys.argv[1]
kn = dbus.SessionBus().get_object("org.kde.knotify", "/Notify")
i = kn.event("warning", "kde", [], m, [0,0,0,0], [], 0,
dbus_interface="org.kde.KNotify")
That did it. But I still hope that there is a simple solution for KDE4 that I have missed.
Like dbus-monitor, it monitors the system or session bus. Additionally, it can write the traffic to a file and read it later (-w, -r). It can dump all the gory details (-d) or pretty print all the gory details (-p). Like DBusMessageBox which inspired it, it can make message sequence charts (-c). It has some simple filtering abilities (-f, -F).
Try 0.1 if that sounds interesting.
cnetworkmanager is a command line interface for Network Manager. It is still lacking many features but I decided to announce it now, when it can:
It is working for me on RC1 of openSUSE-11.0, which has NetworkManager-0.7.0.r3685-3. It is my first project in Python, so the code is somewhat cumbersome. Thanks to Mišo for getting me started (idea.o.o, abclinuxu.cz), and Bille for the API docs.
Regarding related projects, I have seen network-manager-cli, but it is for 0.6 only and the developers were only active last August, so I decided that I should first write some working code for 0.7.
I am interested in comments, bugs, feature requests, patches, any feedback.
Here are some screenshots ;-)
$ cnetworkmanager -h
cnetworkmanager 0.3 - Command Line Interface for NetworkManager
Options:
-d, --dev list devices
-c, --actcon list active connections
-s, --syscon list system connection settings
-u, --usrcon list user connection settings (can CRASH nm-applet)
-a, --ap list found access points
-n, --nets list found wireless networks
-C<net>, --connect=<net> connect to a wireless network (using knetworkmanagerrc)
-m, --monitor loop to show dbus signals
Listing the networks:
$ cnetworkmanager -n
cnetworkmanager 0.3 - Command Line Interface for NetworkManager
Wifi Networks:
49: onenet (54Mb, protected)
46: IT (54Mb, protected)
48: TiborBrunclik (11Mb, protected)
46: linksys (54Mb)
46: IT (54Mb, protected)
46: 23 (54Mb)
$ zypper moo
\\\\\
\\\\\\\__o
__\\\\\\\'/_
I realized that I dislike beta bug reporting because it is so painful to search for duplicates before I report a problem. The search form is so ****ing painful to use!
So I wrote a replacement. Enjoy, view source, share, improve.
Try also:# yast2 firewall services add zone=EXT service=service:sshd
(Saying "yast" instead of "yast2" should work too, but there is bug 374259.)# yast2 firewall help
# yast2 firewall longhelp
# yast2 firewall summary
# yast2 firewall services list
# yast2 -l
# yast2 FOO help
$ cnetworkmanager -d -c
cnetworkmanager 0.1 - Command Line Interface for NetworkManager
state: CONNECTED
wifi: 1
wifi hw: 1
/org/freedesktop/Hal/devices/net_00_02_3f_0d_7d_93
Udi: /org/freedesktop/Hal/devices/net_00_02_3f_0d_7d_93
Interface: eth0
Driver: 8139too
Ip4Address: 268702730
Capabilities: NM_SUPPORTED,CARRIER_DETECT
Dev State: FAILED
Dev Type: 802_3_ETHERNET
HwAddress: 00:02:3F:0D:7D:93
Speed: 100
Carrier: 1
/org/freedesktop/Hal/devices/net_00_11_d8_70_00_2f
Udi: /org/freedesktop/Hal/devices/net_00_11_d8_70_00_2f
Interface: wlan0
Driver: rt2500pci
Ip4Address: 1476989962
Capabilities: NM_SUPPORTED
Dev State: FAILED
Dev Type: 802_11_WIRELESS
Dev Mode: INFRA
Wifi Capabilities: RSN,CIPHER_WEP40,CIPHER_WEP104,CIPHER_TKIP,CIPHER_CCMP,WPA
HwAddress: 00:11:D8:70:00:2F
Bitrate: 1000
ActiveAccessPoint: /org/freedesktop/NetworkManager/AccessPoint/4
Active Connections
/org/freedesktop/NetworkManager/ActiveConnection/8
ServiceName: org.freedesktop.NetworkManagerSystemSettings
Connection: /org/freedesktop/NetworkManagerSettings/0
SpecificObject: /
SharedServiceName:
SharedConnection: /
Devices: dbus.Array([dbus.ObjectPath('/org/freedesktop/Hal/devices/net_00_02_3f_0d_7d_93')], signature=dbus.Signature('o'), variant_level=1)
/org/freedesktop/NetworkManager/ActiveConnection/9
ServiceName: org.freedesktop.NetworkManagerUserSettings
Connection: /org/freedesktop/NetworkManagerSettings/Connection/0
SpecificObject: /org/freedesktop/NetworkManager/AccessPoint/4
SharedServiceName:
SharedConnection: /
Devices: dbus.Array([dbus.ObjectPath('/org/freedesktop/Hal/devices/net_00_11_d8_70_00_2f')], signature=dbus.Signature('o'), variant_level=1)
Then you need to tell the daemon to reread the config:--- /etc/dbus-1/system.conf.orig 2008-05-02 17:08:03.000000000 +0200
+++ /etc/dbus-1/system.conf 2008-05-02 17:08:30.000000000 +0200
@@ -55,6 +55,9 @@
<allow send_requested_reply="true">
<allow receive_requested_reply="true">
</allow>
+ <policy context="mandatory">
+ <allow receive_interface="*" eavesdrop="true">
+ </policy>
<!-- Config files are placed here that among other things, punch
holes in the above policy for specific services. -->
# pkill -HUP -u messagebusBTW I still haven't figured out how to monitor method_return. I guess receive_requested_reply="false" should do it but not sure how. Does anyone know?
$ dbus-send --print-reply \
--dest=org.kde.klipper \
/klipper \
org.kde.klipper.klipper.getClipboardContents
method return sender=:1.37 -> dest=:1.73 reply_serial=2
string "Hello D-Bus"
The type option is necessary because dbus-call defaults to type=signal which would not work. (BTW does anyone have a nice example for demonstrating a signal?) With print-reply in the first example, type=method_call is implied.$ dbus-send --type=method_call --dest=org.kde.kwin \
/KWin org.kde.KWin.nextDesktop
$ dbus-send --type=method_call --dest=org.kde.kwin \
/KWin org.kde.KWin.previousDesktop
$ dbus-send --type=method_call --dest=org.kde.plasma \
/App org.kde.plasma.App.toggleDashboard
So far we have been using the session bus. The system-wide bus offers even more fun:$ dbus-send --type=method_call --dest=org.kde.klipper \
/klipper org.kde.klipper.klipper.setClipboardContents \
string:'Test Beta2!'
$ dbus-send --type=method_call --dest=org.kde.krunner \
/Interface org.kde.krunner.Interface.display \
string:'system'
(Interesting, every even call to NMS fails with a timeout)$ dbus-send --system --print-reply \
--dest=org.freedesktop.NetworkManagerSystemSettings \
/org/freedesktop/NetworkManagerSettings \
org.freedesktop.NetworkManagerSettings.ListConnections
array [
object path "/org/freedesktop/NetworkManagerSettings/0"
object path "/org/freedesktop/NetworkManagerSettings/1"
object path "/org/freedesktop/NetworkManagerSettings/2"
]
$ dbus-send --system --print-reply \
--dest=org.freedesktop.NetworkManagerSystemSettings \
/org/freedesktop/NetworkManagerSettings/1 \
org.freedesktop.NetworkManagerSettings.Connection.GetSettings
array [
dict entry(
string "802-11-wireless"
array [
dict entry(
string "ssid"
variant array [
byte 102
byte 114
byte 111
byte 103
byte 115
]
)
dict entry(
string "security"
variant string "802-11-wireless-security"
)
]
)
/* more data. BTW you can't see any of this in qdbusviewer. */
]
$ dbus-send --system --print-reply \
--dest=org.freedesktop.Hal \
/org/freedesktop/Hal/Manager \
org.freedesktop.Hal.Manager.GetAllDevices
cp /usr/share/X11/twm/system.twmrc ~TODO: make it the default in openSUSE.
echo RandomPlacement >> ~/.twmrc
Well now there are: iogrind in openSUSE Build Service. The packaging is very crude for now, but it appears to work. Now I have to make some sense of the tool :-)
$ yzpper info kezboard
* ...
* Reading installed packages [100%]
Information for package kezboard:
Repository:
Name: kezboard
Version: 1.0-1
Arch: noarch
Installed: Yes
Status: up-to-date
Installed Size: 0 B
Summary: Adapts zour QWERTY habits to a QWERTZ world
Description:
Do zou keep tzping loadkeys instead of loadkezs and zypper instead of yzpper?
Then this package could help zou.
Authors:
--------
Martin Vidner
$ rpm -ql kezboard
/bin/gunyip
/bin/gyip
/bin/loadkezs
/bin/sznc
/bin/ycat
/usr/bin/byip2
/usr/bin/compiy
/usr/bin/pzthon
/usr/bin/rubz
/usr/bin/unyip
/usr/bin/yip
/usr/bin/yzpper
Get kezboard as an RPM in the openSUSE Build Service.