Skip to content

Instantly share code, notes, and snippets.

@dichotomies
Last active August 24, 2016 09:24
Show Gist options
  • Save dichotomies/e400fa96f8c25dc1297d8d3e2030aa8b to your computer and use it in GitHub Desktop.
Save dichotomies/e400fa96f8c25dc1297d8d3e2030aa8b to your computer and use it in GitHub Desktop.
ubuntu

Setup

Saving settings before Reinstalling Ubuntu

dconf has its own mechanism to dump the configuration with the command dconf dump /.

  • better: before making changes in keyboard settings, start monitoring with dconf watch /, note changes and load them later

Remapping Alt & Control

  • write to ~/.Xmodmap
clear control
clear mod1
keycode 37 = Alt_L Meta_L
keycode 64 = Control_L
add control = Control_L Control_R
add mod1 = Alt_L Meta_L
  • load these settings with xmodmap .Xmodmap

Remapping standard Hotkeys, e.g. Minimize

/org/gnome/desktop/wm/keybindings/minimize
  ['<Primary>e']

/org/gnome/desktop/wm/keybindings/close
  ['<Primary>q']

/org/gnome/desktop/wm/keybindings/maximize
  ['<Primary><Shift>e']

/org/gnome/settings-daemon/plugins/media-keys/screensaver
  '<Super>l'

/org/gnome/settings-daemon/plugins/media-keys/area-screenshot
  '<Primary><Shift>dollar'

/org/gnome/settings-daemon/plugins/media-keys/home
  '<Super>f'

/org/gnome/desktop/wm/keybindings/switch-input-source
  ['']

/org/gnome/settings-daemon/plugins/media-keys/search
  '<Super>space'

/org/compiz/integrated/show-hud
  ['']

# change icon size in task bar

/org/compiz/profiles/unity/plugins/unityshell/icon-size
  32

/org/compiz/profiles/unity/plugins/expo/y-bottom-offset
  48

Remapping Alt Tab to Control Tab

dconf write /org/compiz/profiles/unity/plugins/unityshell/alt-tab-forward "'<Control>Tab'"

Network: Shared Folders

Get all available Domains in Network

  • run smbtree after installing it
  • it returns something like
WORKGROUP
	\\WDFN30007029A  		Samba 4.2.4-40.1-3678-SUSE-oS13.2-x86_64
		\\WDFN30007029A\IPC$           	IPC Service (Samba 4.2.4-40.1-3678-SUSE-oS13.2-x86_64)
		\\WDFN30007029A\home           	
	\\LU654656       		lu654656 server (Samba, Ubuntu)
		\\LU654656\PDF            	PDF
		\\LU654656\IPC$           	IPC Service (lu654656 server (Samba, Ubuntu))
		\\LU654656\print$         	Printer Drivers

Specific: Get IPs for mounted folders

  • if connected folders in root, then cd / and df will output something like:
/dev/sda1                                              504740   107973    396767  22% /boot
d066124@lu33985079.local:/home/d066124/Desktop/sles 851853796  5080372 803478704   1% /home/d066124/mnt/ubuntu
10.68.90.187:/area51/makes                           67108864 41069568  26039296  62% /area51/makes
  • in this case, area51 can be accessed via 10.68.90.187

Mount server with its IP and smbclient

  • after having acquired the IP, use dnslookup to get domain or IP of a host via DNS: nslookup 10.68.90.187
Server:		10.17.122.10
Address:	10.17.122.10#53

187.90.68.10.in-addr.arpa	name = ld9664-nfs.wdf.sap.corp.
187.90.68.10.in-addr.arpa	name = area51.wdf.sap.corp.
  • install smb and smbclient - both necessary for sharing and accessing shared folders/files in a network

Etc

Unity and Compiz

  • both are preinstalled on Ubuntu 16
  • Compiz settings overwrite Unity settings
    • therefore it's not possible to remap AltTab (application-switcher) in general System Settings

Change Compiz settings with CCSM

  • in order to change specific keys, the Compiz config has to be changed
  • if the paths to the config settings are known, then the settings can be changed with dconf write
  • otherwise use compizconfig-settings-manager (CCSM)
    • for replacing original AltTab behaviour search in CCSM for Ubuntu Unity Plugin
    • go to switcher
    • edit Key to start the Switcher, e.g. to Ctrl Tab

Monitor changes written to System Settings

  • dconf watch / monitors all changes made to system files in root directory / and results in
/org/compiz/profiles/unity/plugins/unityshell/alt-tab-forward
  '<Control>Tab'

Overwrite System Settings with dconf

  • example problem: remapping alt tab of compiz:
dconf write /org/compiz/profiles/unity/plugins/unityshell/alt-tab-forward "'<Control>Tab'"
  • it's "'<Control>Tab'" and not "'[<Control>Tab]'" !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment