Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Installation Elementary OS Freya to do some settings     - Android imageView in the Src and Background (Programming)

- The SVN installation, configuration and start - up under Linux (CentOS 6.5) (Server)

- Spring JDBC Comments (Programming)

- Fedora 21 setting boot script (Linux)

- shell script: LVS start simple script (Server)

- Linux system last command usage (Linux)

- To install and deploy Apache under the CentOS (Server)

- Experience RHEL7 new features (Linux)

- Ora-1092: OPI colleague K aborting process --- killed by OO Well killer (Database)

- Security: Unix operating system intrusion tracking Strikes Back (Linux)

- VMware Workstation virtual machine cloning (Linux)

- PXE installation of Linux servers (Server)

- CUDA (including GPU card driver) installation process under Ubuntu (Linux)

- Analysis of Java reflection mechanism (Programming)

- CentOS 7 repair MBR and GRUB (Linux)

- Install Mac OS X 10.9 systems VMware10 (Linux)

- Use HugePages optimize memory performance (Database)

- Observation network performance tools for Linux (Linux)

- 10046 trace only open for a particular SQL statement (Database)

- Github inventory objects Algorithm (Linux)

 
         
  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

/ *
sublime-imfix.c
 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

Changes:
 201406-09
 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

#include
 #include
 #include
 #include
 #include
 #include
 #include
 #include
 #include

#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)
 #else
 #define DEBUG (fmt, ...)
 #endif

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.
 void
 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);
 }
 return GDK_FILTER_CONTINUE;
 }

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))
 return;
 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)
 #define GTK_IM_CONTEXT_XIM (obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IM_CONTEXT_XIM, GtkIMContextXIM))
 #define GTK_IM_CONTEXT_XIM_CLASS (klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_IM_CONTEXT_XIM, GtkIMContextXIMClass))
 #define GTK_IS_IM_CONTEXT_XIM (obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_IM_CONTEXT_XIM))
 #define GTK_IS_IM_CONTEXT_XIM_CLASS (klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IM_CONTEXT_XIM))
 #define GTK_IM_CONTEXT_XIM_GET_CLASS (obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_IM_CONTEXT_XIM, GtkIMContextXIMClass))

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",
orig_gtk_im_context_xim_filter_keypress);
 }

GType
 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.
     
         
         
         
  More:      
 
- awk Programming Model (Programming)
- VMware Workstation virtual machine Ubuntu achieve shared with the host (Linux)
- General Linux interface server parameter tuning (Server)
- About Samba certification process and permissions (Linux)
- When Vim create Python scripts, vim autocomplete interpreter and encoding method (Programming)
- Strategy Games Ubuntu installation of Wesnoth 1.12.1 (Linux)
- MySQL5.7 implement virtual column expression index (Database)
- 17 How to install the Ubuntu 14.04 and Linux Mint Kodi14 (XBMC) (Linux)
- Docker Private Registry Installation Guide at CentOS6.X (Linux)
- Oracle to create an external table (Database)
- Linux FTP setting file description (Server)
- Based shell: using read, the command-line script to achieve mass participation and input two integer calculation (Programming)
- To install MySQL on Linux (Database)
- Nagios (centreon) monitoring Linux Log (Server)
- dmidecode command Detailed (Hardware information) (Linux)
- CentOS 7 repair MBR and GRUB (Linux)
- Shell Scripting early experience (Programming)
- The Sublime Text 3 configuration file (Linux)
- To get Java class / jar package path (Programming)
- How Linux Log Analysis (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.