gnome

How to override handle_message in GstBin?

风格不统一 提交于 2019-12-12 04:21:21
问题 Trying to make a subclass: mybin.h: #pragma once #include <gst/gstbin.h> G_BEGIN_DECLS G_DECLARE_DERIVABLE_TYPE(MyBin, my_bin, MY, BIN, GstBin) struct _MyBinClass { GstBinClass parent_class; }; GstElement* my_bin_new(const gchar *name); G_END_DECLS mybin.c: #include "mybin.h" G_DEFINE_TYPE(MyBin, my_bin, GST_TYPE_BIN) static void my_bin_init(MyBin *bin) { } static void my_bin_class_init(MyBinClass *class) { // virtual function overrides go here } GstElement* my_bin_new(const gchar *name) { //

Use gnome-screensaver-command on python

纵饮孤独 提交于 2019-12-12 03:53:23
问题 I have the following code to check whether the screen is locked or not (using gnome-screensaver) gnome-screensaver-command -q | grep "is active" From this link, https://askubuntu.com/questions/17679/how-can-i-put-the-display-to-sleep-on-screen-lock there is a code on using it on a shell script. But how do I use the code in python? And store it in a varaiable whether if it is active or not. 回答1: You can also talk to the gnome-screensaver via D-Bus: import dbus def screensaver_active(): bus =

Tray Icon not working on Ubuntu 16.04

笑着哭i 提交于 2019-12-12 02:44:50
问题 I ran into an Issue with Java awt tray icons under Ubuntu Gnome 16.04: The Icon is displayed in the top left corner of my screen and in the System Tray appears a black square. The MouseListener is also not working (neither on the icon nor on the black square). Here is my Code: if (SystemTray.isSupported()) { Image image = ImageIO.read(EyeUNIFYlocal.class.getResource("/star.png")); TrayIcon trayIcon = new TrayIcon(image); trayIcon.setImageAutoSize(true); trayIcon.addMouseListener(new

How do I prevent JDialog from showing in gnome-panel(Linux)?

佐手、 提交于 2019-12-11 18:34:37
问题 I have a class: public class ANote extends JDialog{...} In GNOME(Linux) it shows an entry in the gnome-panel. I want it to show nothing (under Windows the instances of JDialog show nothing in the Windows taskbar), because there may be present several instances of the class simultaneously, and this overcrowds the gnome-panel. How do I prevent it from showing an instance in the gnome-panel? EDIT: So far I have tried playing with the modality, which hides it from the gnome-panel, but blocks the

XReparentWindow works sporadically

☆樱花仙子☆ 提交于 2019-12-11 18:17:46
问题 I'm experimenting with XReparentWindow with the end goal to aggregate windows of multiple processes into one "cockpit" simulating process. Experiments with XReparentWindow works sporadically ; sometimes the window is reparented successfully, sometimes not . When unsuccessfully reparented the (not) grabbed window flickers for a second and then proceedes as usual, and the grabber show undefined window content. It is successfull every other time (tempted to brute-force the problem away by always

GtkStatusIcon label in Gnome3

杀马特。学长 韩版系。学妹 提交于 2019-12-11 18:17:33
问题 How can affect on my app's status icon label in Gnome3? When i moving cursor on it shows me my app's executable name. How can I change it? 回答1: You can use gtk_status_icon_set_tooltip_text() or gtk_status_icon_set_tooltip_markup(). Alternatively, you can handle the query-tooltip signal and set the text dynamically when the tooltip is shown. 回答2: it was gtk_status_icon_set_title sorry for stupid question. 来源: https://stackoverflow.com/questions/7966414/gtkstatusicon-label-in-gnome3

How do I get the monitor of an active window in GNOME?

跟風遠走 提交于 2019-12-11 17:10:57
问题 I am very new to GNOME extension development, and I am having a hard time working with it, due to a profound lack of documentation (or maybe my Internet is clandestinely censored) of the API. I started by modifying an existing extension, so that it is easier to make my way around it. The issue is, I can obtain the active window using global.display.focus_window , and also a list of monitors connected to the computer using Main.layoutManager.monitors . Now, what I would like to do, is find out

I added a gtk widget to the main window UI file, but it doesn't show up

試著忘記壹切 提交于 2019-12-11 15:59:19
问题 I am trying to add a GtkImage to my main window *.ui file, which was made using the GNOME Builder project template. <?xml version="1.0" encoding="UTF-8"?> <interface> <requires lib="gtk+" version="3.20"/> <template class="PodiumWindow" parent="GtkApplicationWindow"> <property name="default-width">600</property> <property name="default-height">300</property> <child type="titlebar"> <object class="GtkHeaderBar" id="headerBar"> <property name="visible">True</property> <property name="show-close

ubuntu强迫症自用删除无用图标及系统自带软件

怎甘沉沦 提交于 2019-12-11 12:21:36
1 删除文件管理器左边Music、Videos等标签 首先删除相应文件夹 sudo rm -rf Music Videos 打开Files文件管理器--点击顶部Bookmarks--选择Bookmarks...--选择你要删除的书签--修补该书签location为当前已有目录--此时左下角"-"由灰变黑--点击"-",ok删除完成。 2 删除无用软件 #!/bin/sh sudo apt-get remove thunderbird totem rhythmbox empathy brasero simple-scan gnome-mahjongg aisleriot gnome-mines cheese transmission-common gnome-orca webbrowser-app gnome-sudoku landscape-client-ui-install # 卸载libreoffices sudo apt-get remove libreoffice-common # 卸载Amazon的链接 sudo apt-get remove unity-webapps-common 来源: CSDN 作者: 不是Gonga 链接: https://blog.csdn.net/qq_33698226/article/details/103489285

高并发与负载均衡-lvs-3种模型推导

試著忘記壹切 提交于 2019-12-11 06:14:57
[root@centos7-1 ~]# ifconfig ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.159.10 netmask 255.255.255.0 broadcast 192.168.159.255 inet6 fe80::20c:29ff:fe99:5ef2 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:99:5e:f2 txqueuelen 1000 (Ethernet) RX packets 1137094 bytes 1121340388 (1.0 GiB) RX errors 101 dropped 0 overruns 0 frame 0 TX packets 293297 bytes 21587168 (20.5 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 19 base 0x2000 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid