Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Installation Elementary OS Freya to do some settings     - Oracle inline view updates problems encountered (Database)

- Linux process stack and process function stack frame (Linux)

- Single-node Hadoop installation notes distributed pseudo & (Server)

- Ubuntu PPA install SMPlayer 14.9 (Linux)

- Nine artifact control disk partition under Linux (Linux)

- DM9000 bare Driver Design (Programming)

- MultiWriter: while the ISO image concurrent writes 20 USB Startup Disk (Linux)

- BCP importing and exporting large amounts of data Practice (Database)

- Summary of Docker mounted directory (Server)

- Linux install Eclipse for C / C ++ Development (Linux)

- Emacs install clojure development environment (Linux)

- Secondary exponential smoothing prediction method implemented in Python (Programming)

- Let your PHP 7 faster (GCC PGO) (Linux)

- ogg start being given libnnz11.so: can not open shared object file (Database)

- CentOS Nginx achieve 3 virtual machine load balancing (Server)

- Solve ORA-01012: not logged on (Database)

- Zabbix monitoring disk IO status (Server)

- Ubuntu and derived versions of the user how to install G Mic (Linux)

- Oracle 11g new features and associated SQL TUNING (Database)

- Hadoop virtualization performance comparison and tuning experience (Server)

  Installation Elementary OS Freya to do some settings
  Add Date : 2017-08-31      
  Buy the sofa when the primary consideration is the size (can not put down, can not lie straight), followed by quality, brand, look and feel ......, is the primary function, the extension is necessary, I will put a variety of sizes , thickness, cushion, pillow on the couch piled inside a nest and lay reading. Because so often lay their own (own selection, cut yourself, make your own) two sets of sofa sets, easy to wash. Nowadays computer may be second only to the phone's high-frequency information media used (for me than the phone book frequency), and how to use, use the cool unhappy only you know, habits, tastes and other factors during doping ...... . Bahrain bare metal operating system, how many will do is set - like install software, add a shortcut, set wallpaper, screensaver set .......

After six months with the Elementary OS freya, to solve the various problems encountered daily, was found to be a simple conclusion is necessary (some solutions quickly forgotten).

1, closed lightdm guest session
More than one way, I personally prefer the program appear to be more clean, seen from the askUbuntu.

sudo sh -c 'printf "[SeatDefaults] nallow-guest = falsen"> /usr/share/lightdm/lightdm.conf.d/50-no-guest.conf'

2, plank set
 That is, a docker, widescreen display will be a lot of people on the edge of the starter, and I on the left (whether Linux or Windows, regardless of Unity or Plank) I have also seen people use MAC also put the dock left. If you do not like the default GTK theme can consider three themes installed by default, I like transparent (although the default theme that function better), if there is love to toss a third-party themes available.
 Themes to be placed in / usr / share / plank / theme, the directory name is the subject name. Themes previous settings can be set in the system settings, set back after the upgrade interface gone. You can manually modify the configuration file.

#The Position for the dock on the monitor. If 0, left. If 1, right. If 2, top. If 3, bottom.
 Position = 0
 #The Name of the dock's theme to use.
 Theme = Transparent

3, the hot zone set
 This is what I think should have gnome function (KDE there seems to have), I usually set the two lower corners of the hot zone.

4, complete the full language pack installation
 When you install it before you start menu choose Chinese, the installation process will download the language pack is displayed, but the results are still incomplete. In the system settings "Regional and Language" section to complete the installation of language support for the prompts. But sometimes the translation is incomplete, my method is to uninstall the language-pack-gnome-zh-hans install.

sudo apt-get remove language-pack-gnome-zh-hans
sudo apt-get install language-pack-gnome-zh-hans

by the way:
 If you install from beta2 mirror, it is possible to see on the tray input indicator, call also no input method. Run ibus-setup set about input, the indicator will not necessarily come out.
"Regional and Language" in the "used in the login window, visitors and new user accounts" Do not point, if you accidentally point to restore / etc / keyboard and locale to default under.

5, conventional software installation - browser, editor, etc.
 I am a heavy user browser system so we do not default browser, personal preferences and needs with firefox or chromium, I rely on a number of plug-ff and has opened more than 60 tabs habit, so use firefox and "Start Firefox when (S) "is set to" display the last open windows and tabs "

sudo apt-get install firefox firefox-locale-zh-hans
sudo apt-get install chromium-browser chromium-browser-l10n

Recently entered firefox address bar after the upgrade Chinese have a strange phenomenon (such as these would be deleted when selecting the address bar with the mouse) and even lead firefox dead, the solution is to switch to a non-phonetic input in the address bar (pinyin ) input method such as sunpinyin or English. Later I decided to use the sublime text anyway, so the installation Sogou Pinyin. Installation may refer to:
 The system did not take office software, if you need to install wps also good. Installation may refer to: In the lower elementary OS 0.3 with WPS

The default editor scratch support utf8 Chinese, but can not enter the Chinese, no detailed study anyway, write some code on the installation of the sublime text 3
 sublime text Chinese input method with reference to the official forum

/ *
 Use LD_PRELOAD to interpose some function to fix sublime input method support for linux.
 By Cjacker Huang
 By whitequark@whitequark.org

How to compile:
 gcc -shared -o libsublime-imfix.so sublime_imfix.c `pkg-config -libs -cflags gtk + -2.0` -fPIC
 How to use:
 LD_PRELOAD =. / Libsublime-imfix.so sublime_text

 1, Fix cursor position update for sublime text 3.
 2, Combine the codes from whitequark (fix for xim immodule) and add cursor update support for XIM immodule.
 * /

/ * For RTLD_NEXT * /
 #define _GNU_SOURCE


#ifdef VERBOSE
 #define DEBUG (fmt, ...) do {
 FILE * err = fopen ( "/ tmp / libsublime-immethod-fix.log", "a");
if (err) {
 fprintf (err, fmt, __VA_ARGS__);
 fclose (err);
 } While (0)
 #define DEBUG (fmt, ...)

typedef GdkSegment GdkRegionBox;

struct _GdkRegion
 long size;
 long numRects;
 GdkRegionBox * rects;
 GdkRegionBox extents;

GtkIMContext * local_context;

// This func is interposed to support cursor position update.
 gdk_region_get_clipbox (const GdkRegion * region,
 GdkRectangle * rectangle)
 g_return_if_fail (region = NULL!);
 g_return_if_fail (rectangle = NULL!);

rectangle-> x = region-> extents.x1;
 rectangle-> y = region-> extents.y1;
 rectangle-> width = region-> extents.x2 - region-> extents.x1;
 rectangle-> height = region-> extents.y2 - region-> extents.y1;
 GdkRectangle rect;
 rect.x = rectangle-> x;
 rect.y = rectangle-> y;
 rect.width = 0;
 rect.height = rectangle-> height;
 // The caret width is 2 in sublime text 2
 // And is 1 in sublime text 3.
 // Maybe sometimes we will make a mistake, but for most of the time, it should be the caret.
 if ((rectangle-> width == 2 || rectangle-> width == 1) && GTK_IS_IM_CONTEXT (local_context)) {
 gtk_im_context_set_cursor_location (local_context, rectangle);

// This is needed, for example, if you input something in file dialog and return back the edit area
 // Context will lost, so here we set it again.
 static GdkFilterReturn event_filter (GdkXEvent * xevent, GdkEvent * event, gpointer im_context)
 XEvent * xev = (XEvent *) xevent;
 if (xev-> type == KeyRelease && GTK_IS_IM_CONTEXT (im_context)) {
 GdkWindow * win = g_object_get_data (G_OBJECT (im_context), "window");
if (GDK_IS_WINDOW (win))
 gtk_im_context_set_client_window (im_context, win);

void gtk_im_context_set_client_window (GtkIMContext * context,
 GdkWindow * window)
 GtkIMContextClass * klass;
 g_return_if_fail (GTK_IS_IM_CONTEXT (context));
 klass = GTK_IM_CONTEXT_GET_CLASS (context);
 if (klass-> set_client_window)
 klass-> set_client_window (context, window);

// Below is our interposed codes to save the context to local_context.
 if (! GDK_IS_WINDOW (window))
 g_object_set_data (G_OBJECT (context), "window", window);
 int width = gdk_window_get_width (window);
 int height = gdk_window_get_height (window);
 if (width! = 0 && height! = 0) {
 gtk_im_context_focus_in (context);
 local_context = context;
 // Only add this event_filter when using 'fcitx' immodule.
 // For xim immodule, this function is as same as original from gtk2.
 const gchar * immodule = g_getenv ( "GTK_IM_MODULE");
if (immodule &&! strcmp (immodule, "fcitx")) {
gdk_window_add_filter (window, event_filter, context);

/ * Below codes is from whitequark, fix for xim immodule * /

/ * See gtkimcontextxim.c * /
 GType gtk_type_im_context_xim = 0;

#define GTK_TYPE_IM_CONTEXT_XIM (gtk_type_im_context_xim)

typedef struct _GtkIMContextXIM GtkIMContextXIM;
 typedef struct _GtkIMContextXIMClass GtkIMContextXIMClass;

struct _GtkIMContextXIMClass
 GtkIMContextClass parent_class;

typedef struct _StatusWindow StatusWindow;
 typedef struct _GtkXIMInfo GtkXIMInfo;

struct _GtkIMContextXIM
 GtkIMContext object;

GtkXIMInfo * im_info;

gchar * locale;
 gchar * mb_charset;

GdkWindow * client_window;
 GtkWidget * client_widget;

/ * The status window for this input context; we claim the
 * * Status window when we are focused and have created an XIC
 * * /
 StatusWindow * status_window;

gint preedit_size;
 gint preedit_length;
 gunichar * preedit_chars;
 XIMFeedback * feedbacks;

gint preedit_cursor;

XIMCallback preedit_start_callback;
 XIMCallback preedit_done_callback;
 XIMCallback preedit_draw_callback;
 XIMCallback preedit_caret_callback;

XIMCallback status_start_callback;
 XIMCallback status_done_callback;
 XIMCallback status_draw_callback;

XIMCallback string_conversion_callback;

XIC ic;

guint filter_key_release: 1;
 guint use_preedit: 1;
 guint finalizing: 1;
 guint in_toplevel: 1;
 guint has_focus: 1;

static GClassInitFunc orig_gtk_im_context_xim_class_init;
 static GType (* orig_g_type_module_register_type) (GTypeModule *,
 GType, const gchar *,
 const GTypeInfo *, GTypeFlags);
 static gboolean (* orig_gtk_im_context_xim_filter_keypress) (GtkIMContext * context,
 GdkEventKey * event);

static gboolean
 hook_gtk_im_context_xim_filter_keypress (GtkIMContext * context, GdkEventKey * event) {
 GtkIMContextXIM * im_context_xim = GTK_IM_CONTEXT_XIM (context);
 if (! im_context_xim-> client_window) {
 DEBUG ( "im_context_xim ==% pn", im_context_xim);
 DEBUG ( "event-> window ==% pn", event-> window);

gtk_im_context_set_client_window (context, event-> window);

return orig_gtk_im_context_xim_filter_keypress (context, event);

static void
 hook_gtk_im_context_xim_class_init (GtkIMContextXIMClass * class) {
 orig_gtk_im_context_xim_class_init (class, NULL); / * wat * /?

GtkIMContextClass * im_context_class = GTK_IM_CONTEXT_CLASS (class);

assert (orig_gtk_im_context_xim_filter_keypress!);
 orig_gtk_im_context_xim_filter_keypress = im_context_class-> filter_keypress;
 im_context_class-> filter_keypress = hook_gtk_im_context_xim_filter_keypress;
 DEBUG ( "orig_gtk_im_context_xim_filter_keypress:% pn",

 g_type_module_register_type (GTypeModule * module,
 GType parent_type,
 const gchar * type_name,
 const GTypeInfo * type_info,
 GTypeFlags flags) {
 if (! orig_g_type_module_register_type) {
 orig_g_type_module_register_type = dlsym (RTLD_NEXT, "g_type_module_register_type");
assert (orig_g_type_module_register_type);

if (type_name &&! strcmp (type_name, "GtkIMContextXIM")) {
assert (orig_gtk_im_context_xim_class_init!);
 orig_gtk_im_context_xim_class_init = type_info-> class_init;

assert (sizeof (GtkIMContextXIM) == type_info-> instance_size);

const GTypeInfo hook_im_context_xim_info =
 type_info-> class_size,
 type_info-> base_init,
 type_info-> base_finalize,
 (GClassInitFunc) hook_gtk_im_context_xim_class_init,
 type_info-> class_finalize,
 type_info-> class_data,
 type_info-> instance_size,
 type_info-> n_preallocs,
 type_info-> instance_init,

DEBUG ( "orig_gtk_im_context_xim_class_init:% pn", orig_gtk_im_context_xim_class_init);

gtk_type_im_context_xim =
 orig_g_type_module_register_type (module, parent_type, type_name,
 & Hook_im_context_xim_info, flags);

return gtk_type_im_context_xim;

return orig_g_type_module_register_type (module, parent_type, type_name, type_info, flags);

gcc -shared -o libsublime-imfix.so sublime_imfix.c `pkg-config --libs --cflags gtk +
 -2.0` -fPIC

 kai @ EOSFreya: ~ $ cat /usr/share/applications/sublime-text.desktop
 [Desktop Entry]
 Version = 1.0
 Type = Application
 Name = Sublime Text
 GenericName = Text Editor
 Comment = Sophisticated text editor for code, markup and prose
 Exec = / usr / bin / subl% F
 Terminal = false
 MimeType = text / plain;
 Icon = sublime-text
 Categories = TextEditor; Development; Utility;
 StartupNotify = true
 Actions = Window; Document;

X-Desktop-File-Install-Version = 0.22

[Desktop Action Window]
 Name = New Window
 Exec = / usr / bin / subl -n
 OnlyShowIn = Unity;

[Desktop Action Document]
 Name = New File
 Exec = / usr / bin / subl --command new_file
 OnlyShowIn = Unity;
 kai @ EOSFreya: ~ $ cat / usr / bin / subl
 #! / Bin / sh
 LD_PRELOAD = / opt / sublime_text / libsublime-imfix.so exec / opt / sublime_text / sublime_text "$ @"
 kai @ EOSFreya: ~ $

6, system settings Keyboard settings crash problems
 In fact, quite simple, set check the "Keyboard Settings", "Chinese" button in the "Regional and Language" in. If you like to see which key or keyboard shortcut is available.
- PL / SQL how to make the program every few seconds to insert a data (Database)
- HBase vs Oracle (Database)
- MyCAT log analysis (Database)
- in no backup ex: error: Xin Tourou ah backup child process has Singles DAT / US person / bin / in no backup ex (Database)
- When Linux Detailed time zone and common function of time (Linux)
- Using Linux stat command to view the files (Linux)
- Linux user directory (Linux)
- Oracle utilized undo data recovery operations (Database)
- Linux file content inspection - cat, tac, no, more, less, head, tail, od (Linux)
- Multi-core CPU, multi-threading and parallel computation (Linux)
- Linux, security encryption to transfer files between machines (Linux)
- Linux cron job (crontab) Examples (Linux)
- RMAN backup file is much larger than the size of the database Cause Analysis (Database)
- Linux System Getting Started Learning: DeVeDe installed on Linux to create a video DVD (Linux)
- grep search from files and display the file name (Linux)
- Linux disk management practices (Linux)
- Kibana use installation (Linux)
- Linux Task Scheduler (at, crontab) (Linux)
- Enterprise Hadoop cluster architecture - Hadoop installation (Server)
- How to create an alternative Android / iOS connected wireless hotspot AP in Ubuntu 15.04 (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.