https://www.liberiangeek.net/2012/03/disable-ubuntu-overlay-scrollbars-in-ubuntu-12-04-precise-pangolin/
~$ gsettings set org.gnome.desktop.interface ubuntu-overlay-scrollbars false
This can be set by hand in dconf editor:
org > gnome > desktop > interface > ubuntu -overlay-scrollbars [remove checkmark]
This is a tutorial for HP-Compaq TC4400 Users on Ubuntu. Note, that I'm a total beginner with Linux, so this page will contain everything I did with my Notebook called Alice :-)
A következő címkéjű bejegyzések mutatása: gnome-classic. Összes bejegyzés megjelenítése
A következő címkéjű bejegyzések mutatása: gnome-classic. Összes bejegyzés megjelenítése
2015. április 26.
2015. január 25.
Nautilus scripting in bash: processing multiple files / handle space in filenames
Where do I put the scripts?
Nautilus scripts folder is in your user home directory:
in Ubuntu 12.04 and before: .gnome2/nautilus-scripts/
from Ubuntu 14.04: .local/share/nautilus/scripts/
You'll have to make all script files executable in order to be able to run them.
chmod +x
What does a nautilus script do?
All executable files in this folder will appear in the Scripts menu. Choosing a script from the menu will run that script.
When executed from a local folder, scripts will be passed the selected file names. When executed from a remote folder (e.g. a folder showing web or ftp content), scripts will be passed no parameters.
What nautilus script specific variables can I use?
In all cases, the following environment variables will be set by Nautilus, which the scripts may use:
Nautilus scripts folder is in your user home directory:
in Ubuntu 12.04 and before: .gnome2/nautilus-scripts/
from Ubuntu 14.04: .local/share/nautilus/scripts/
You'll have to make all script files executable in order to be able to run them.
chmod +x
What does a nautilus script do?
When executed from a local folder, scripts will be passed the selected file names. When executed from a remote folder (e.g. a folder showing web or ftp content), scripts will be passed no parameters.
What nautilus script specific variables can I use?
In all cases, the following environment variables will be set by Nautilus, which the scripts may use:
- NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
# newline-delimited paths for selected files (only if local) - NAUTILUS_SCRIPT_SELECTED_URIS
# newline-delimited URIs for selected files - NAUTILUS_SCRIPT_CURRENT_URI
# URI for current location - NAUTILUS_SCRIPT_WINDOW_GEOMETRY
# position and size of current window
- NAUTILUS_SCRIPT_NEXT_PANE_SELECTED_FILE_PATHS
# newline-delimited paths for selected files in the inactive pane of a split-view window (only if local) - NAUTILUS_SCRIPT_NEXT_PANE_SELECTED_URIS
# newline-delimited URIs for selected files in the inactive pane of a split-view window - NAUTILUS_SCRIPT_NEXT_PANE_CURRENT_URI
# URI for current location in the inactive pane of a split-view window
How do these variables work?
To test what these variables do you might use this nautilus script:
How to use these variables?
The variables you get will look something like this (in case of selecting 4 files with spaces in the names):
The FAQ of the G-Scripts site suggests some ways to handle this:
Google search keywords to find the solution:To test what these variables do you might use this nautilus script:
#!/bin/bash
# test your nautilus variables
touch $HOME/nautilustesting.txt
echo "SELECTED_FILE_PATHS: " "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" >> $HOME/nautilustesting.txt
echo "SELECTED_URIS: " "$NAUTILUS_SCRIPT_SELECTED_URIS" >> $HOME/nautilustesting.txt
echo "CURRENT_URI: " "$NAUTILUS_SCRIPT_CURRENT_URI" >> $HOME/nautilustesting.txt
echo "WINDOW_GEOMETRY: " "$NAUTILUS_SCRIPT_WINDOW_GEOMETRY" >> $HOME/nautilustesting.txt
echo " " >> $HOME/nautilustesting.txt
How to use these variables?
The variables you get will look something like this (in case of selecting 4 files with spaces in the names):
SELECTED_FILE_PATHS: /home/username/.gnome2/nautilus-scripts/Screen rotate/Set screen inverted
/home/username/.gnome2/nautilus-scripts/Screen rotate/Set screen left
/home/username/.gnome2/nautilus-scripts/Screen rotate/Set screen normal
/home/username/.gnome2/nautilus-scripts/Screen rotate/Set screen right (notes)
SELECTED_URIS: file:///home/username/.gnome2/nautilus-scripts/Screen%20rotate/Set%20screen%20inverted
file:///home/username/.gnome2/nautilus-scripts/Screen%20rotate/Set%20screen%20left
file:///home/username/.gnome2/nautilus-scripts/Screen%20rotate/Set%20screen%20normal
file:///home/username/.gnome2/nautilus-scripts/Screen%20rotate/Set%20screen%20right%20(notes)
CURRENT_URI: file:///home/username/.gnome2/nautilus-scripts
WINDOW_GEOMETRY: 1022x690+0+1024
How to read nautilus selected file paths with spaces into a bash array?
To have a use of them as input file path for example imagemagick, I'll have to deal with the spaces, because these command line programs usually take "file path" as input and do not take "file URI" as input, and file path may contain spaces.The FAQ of the G-Scripts site suggests some ways to handle this:
- protect your variable with double quotes: instead of $1 use "$1"
- process the filenames with SED:
files=`echo "$1" | sed 's/ /\\ /g'` - process the filenames with AWK and SED:
quoted=$(echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | awk 'BEGIN {FS = "\n" } { printf "\"%s\" ", $1 }' | sed -e s#\"\"##); eval "your-program $quoted"
Actually, for me NONE of the above worked.
I found my solution in a stackoverflow post. It uses the IFS value to deal with the filenames. I read somewhere that using the IFS is an inelegant way to deal with field separators, and one should use AWK FS variable instead.
I found my solution in a stackoverflow post. It uses the IFS value to deal with the filenames. I read somewhere that using the IFS is an inelegant way to deal with field separators, and one should use AWK FS variable instead.
My solution:
This is to use with nautilus scripts:IFS=$'\n' read -d '' -r -a filelist < <(printf '%s\n' "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"); unset $IFS
This is to use with my image manipulation scripts (where the script file is located in the same folder as the to-b-manipulated files):IFS=$'\n' read -d "" -r -a filelist < <(find -iname "*.jpg" | sort); unset $IFS
When you want to call the elements of the array, you'll have to put them in double quotes, likefor i in "${filelist[@]}"
do echo "$i"
done
- escape space in bash script
- awk fs line break
- sed change space to newline
- escape space in bash script with sed
- internal field separator
- bash read file names into array
- bash read space file names into array
- echo into array bash
- while read output array bash
2015. január 19.
Some trouble I experience with Ubuntu 12.04 and Gnome Classic w/o effects
- nautilus crash on removing external drives
- window shadows are partially left behind after the window was moved or closed
- after awaken from suspended mode, pressing the ctrl key caused a change in the display settings on a dual monitor setup. Each time the ctrl key was pressed the display setting changed between 1. extended displays 2. mirrored displays 3. one display turned off.
- in Firefox, Google applications tend to freeze for like 20 seconds and don't register clicks
2015. január 18.
Gnome Classic tweaks on Ubuntu 12.04.5 Precise Pangolin compared to 14.04.1 Trusty Thar
In this post I'm going to configure Ubuntu 12.04.5. LTS to my taste. Since I configured a 14.04.1 LTS just a couple of weeks ago the exact same way, I will compare the how-to of these settings.
What do I need from Ubuntu?
- this post has the list of features I'm going to test against Precise Pangolin.
Desktop Environment Choices
- I chose Gnome Flashback Services again, but in 12.04 it is called Gnome Classic (with or without effects) and can be installed by installing the package gnome-session-fallback instead of gnome-session-flashback.
- Synaptic package manager is not installed by default on 12.04, just like on 14.04, so it has to be installed from terminal with the sudo apt-get install synaptic command (or probably from Ubuntu Software Center, which I prefer to not use)
All the following notes are based on using Gnome Classic without Effects.
Setting up everything
Gnome Classic is somewhat different from Gnome Session Flashback.
Some useful tips can be found in this ubuntu forum thread.
Otherwise, compared to Ubuntu 14.04:
Changing the Date and Time format in the indicator applet
- on Precise there is no configuration editor pre-installed.
- DConf Editor can be installed by installing dconf-tools - then it will be available as dconf-editor of from the Applications menu > System Tools > DConf Editor
- after installing it, setting custom date and time format can be done as in Trusty, described in the post linked above.
Indicator Applet
- Gnome Classic installs indicator-applet-complete, but there are more then one indicator applet that can be downloaded with synaptic. The difference between them is this:
Remove messaging envelope from indicator applet
This AskUbuntu post holds the solution: to remove just the envelope icon from the indicator applet indicator-messages package has to be removed with
Running Java Applets on websites
- icedtea-7-plugin solves this on Ubuntu 12.04.5, just like it does on 14.04.1.
Reserving space for the top panel between monitors
the same, except for the panel height. It is still 24 pixels, but when set with
Enable Compositing for Gnome Classic without effects
In Trusty Thar Metacity Compositing can be enabled by opening dconf-editor and navigating to > org > gnome > metacity > compositing-manager > mark checked.
In Precise Pangolin there is no such option in dconf-editor. Instead you'll have to install gconf-editor and set it there. Once installed, you can find it in the Applications menu > System Tools > Configuration Editor. Inside it navigate to apps > metacity > general and set a checkmark next to "compositing_manager"
This will enable real window transparency (i.e. terminal window), window shadow, Alt+Tab window selector shows screenshot of the window; and it is said to support AWN, and Gnome Do, but I did not try these.
Aero Snap for Gnome Classic (no effects)
the same, except for the key combinations: in Ubuntu 12.04 instead of
Repository download checklist:
to install deb packages run
to install packages with dependencies, install
- when installing nautilus-dropbox the process failed to move forward after downloading 100% of the dropbox installer. After killing this process somehow, I could not install anything, but got the message: "E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem." So I did as was asked, and then nautilus-dropbox configuration continued with downloading the installer and stopping after 100% again. I could get out of this infinite loop by following the instructions in this post. I edited the /var/lib/dpkg/info/nautilus-dropbox.postinst file and inserted a "exit 0" line as the second line right after the "#!" line. Then dpkg could finish the process by quitting without really configuring dropbox, so after this I removed the whole thing with sudo apt-get remove nautilus-dropbox and intalled the deb package downloaded from dropbox site.
- the deb package installed all right, but the dropbox tray icon is missing from the notification area. I searched for a solution, and some places suggest removing dropbox and installing nautilus-dropbox instead, but this obviously will not work for me. Another post is suggesting more ways to get the icon working, and I tried all of it (notification area, unity-panel whitelist, autostart y), but none of them worked.
- I added the dropbox gpg key to the repositiry, did an apt-get update, and than tried to install nautilus-dropbox, but got the message: "Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: nautilus-dropbox : Depends: dropbox but it is not going to be installed E: Unable to correct problems, you have held broken packages." So I searched, and found, and did an apt-get upgrade, which upgraded dropbox only, because this was the broken package, and then after restarting dropbox, nautilus and gnome-panel, there was this 1x1 pixel white dot in the notification area, which on mouse-over shows a label "Dropbox 3.0.5 Up to date" and can be right-clicked to reach dropbox menu. Nautilus-dropbox is still not installed as a package.
- when I copied the dropbox icons to the icon fallback directory, the dropbox icon showed up on the panel.
Dropbox icons are stored in the /home/[user]/.dropbox-dist/dropbox-[version]/images/hicolor/16x16/status/
Icon fallback directory for them is /usr/share/icons/hicolor/16x16/status/
However, after restarting the panel it was only the 1x1 pixel dot again, and restarting dropbox didn't help. Icons are still there in the fallback directory.
A note: Skype puts it's icon next to the Dropbox pixel, and it works perfectly, so the problem is definitely with Dropbox.
What do I need from Ubuntu?
- this post has the list of features I'm going to test against Precise Pangolin.
Desktop Environment Choices
- I chose Gnome Flashback Services again, but in 12.04 it is called Gnome Classic (with or without effects) and can be installed by installing the package gnome-session-fallback instead of gnome-session-flashback.
- Synaptic package manager is not installed by default on 12.04, just like on 14.04, so it has to be installed from terminal with the sudo apt-get install synaptic command (or probably from Ubuntu Software Center, which I prefer to not use)
All the following notes are based on using Gnome Classic without Effects.
Setting up everything
Gnome Classic is somewhat different from Gnome Session Flashback.
Some useful tips can be found in this ubuntu forum thread.
Otherwise, compared to Ubuntu 14.04:
- HP Compaq TC4400 native features:
- pen features: the same
- screen rotation: the same
- on-screen buttons: the same
- Terminal: the same
- Workspaces: the same
- Panels: the same
- Synaptic: the same
- File manager: Nautilus still can do all I want, so I'll stick with it.
- Scripts: the same
- Open in Terminal: the same (install nautilus-open-terminal package to get right click option "Open Terminal")
- xinput has a new version, and it enables to map the tablet input device to the tablet screen by using xinput --map-to-crtc device crtc
- where device is the device ID of the stylus or the eraser taken from xinput --list
- and the crtc is the name of the tablet monitor taken from xrandr
- on Precise there is no configuration editor pre-installed.
- DConf Editor can be installed by installing dconf-tools - then it will be available as dconf-editor of from the Applications menu > System Tools > DConf Editor
- after installing it, setting custom date and time format can be done as in Trusty, described in the post linked above.
Indicator Applet
- Gnome Classic installs indicator-applet-complete, but there are more then one indicator applet that can be downloaded with synaptic. The difference between them is this:
- indicator-applet-complete is: messaging applications, power settings, bluetooth settings, network settings, sound settings, date and time settings, user accounts, session management
- indicator-applet is: messaging applications, power settings, bluetooth settings, network settings, sound settings
- indicator-applet-session is: user accounts, session management
- indicator-applet-appmenu is: your active application's menu header
Remove messaging envelope from indicator applet
This AskUbuntu post holds the solution: to remove just the envelope icon from the indicator applet indicator-messages package has to be removed with
sudo apt-get remove indicator-messages and then gnome-panel restarted with sudo pkill gnome-panel Running Java Applets on websites
- icedtea-7-plugin solves this on Ubuntu 12.04.5, just like it does on 14.04.1.
Reserving space for the top panel between monitors
the same, except for the panel height. It is still 24 pixels, but when set with
_NET_WM_STRUT_PARTIAL 1024,0,0,0,1024,1048,0,0,0,0,0,0 a single pixel space remains under it, so it has to be set with _NET_WM_STRUT_PARTIAL 1024,0,0,0,1024,1047,0,0,0,0,0,0Enable Compositing for Gnome Classic without effects
In Trusty Thar Metacity Compositing can be enabled by opening dconf-editor and navigating to > org > gnome > metacity > compositing-manager > mark checked.
In Precise Pangolin there is no such option in dconf-editor. Instead you'll have to install gconf-editor and set it there. Once installed, you can find it in the Applications menu > System Tools > Configuration Editor. Inside it navigate to apps > metacity > general and set a checkmark next to "compositing_manager"
This will enable real window transparency (i.e. terminal window), window shadow, Alt+Tab window selector shows screenshot of the window; and it is said to support AWN, and Gnome Do, but I did not try these.
Aero Snap for Gnome Classic (no effects)
the same, except for the key combinations: in Ubuntu 12.04 instead of
Mod4 + Super_L + Left combination it is only Mod4 + LeftRepository download checklist:
- synaptic
- gnome-session-fallback
- nautilus-open-terminal
- wmctrl
- xbindkeys
- dconf-tools
- gconf-editor
- gimp (GUI image manipulation tool)
- inkscape (GUI vector-based drawing program)
- imagemagick (convert, mogrify, identify)
- pdftk
- pdfjam (pdfjoin)
- djvulibre-bin (ddjvu, djvused, cjb2, djvm, c44)
- potrace (mkbitmap)
- unpaper
- keepass2
- keepassX
nautilus-dropbox (Dropbox)fails to complete installation.
to install deb packages run
sudo dpkg --install [packagename.deb]to install packages with dependencies, install
gdebi first from synaptic, then run sudo gdebi [packagename.deb] - gdebi is like Ubuntu Software Center ("USC") in the Command Line Interface ("CLI")- Dropbox: does not show system tray indicator in notification area (see description below)
- Skype: looks all right.
- Rescuetime: looks all right.
- Plex Media Server: looks all right.
- Google Chrome: looks all right.
- when installing nautilus-dropbox the process failed to move forward after downloading 100% of the dropbox installer. After killing this process somehow, I could not install anything, but got the message: "E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem." So I did as was asked, and then nautilus-dropbox configuration continued with downloading the installer and stopping after 100% again. I could get out of this infinite loop by following the instructions in this post. I edited the /var/lib/dpkg/info/nautilus-dropbox.postinst file and inserted a "exit 0" line as the second line right after the "#!" line. Then dpkg could finish the process by quitting without really configuring dropbox, so after this I removed the whole thing with sudo apt-get remove nautilus-dropbox and intalled the deb package downloaded from dropbox site.
- the deb package installed all right, but the dropbox tray icon is missing from the notification area. I searched for a solution, and some places suggest removing dropbox and installing nautilus-dropbox instead, but this obviously will not work for me. Another post is suggesting more ways to get the icon working, and I tried all of it (notification area, unity-panel whitelist, autostart y), but none of them worked.
- I added the dropbox gpg key to the repositiry, did an apt-get update, and than tried to install nautilus-dropbox, but got the message: "Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: nautilus-dropbox : Depends: dropbox but it is not going to be installed E: Unable to correct problems, you have held broken packages." So I searched, and found, and did an apt-get upgrade, which upgraded dropbox only, because this was the broken package, and then after restarting dropbox, nautilus and gnome-panel, there was this 1x1 pixel white dot in the notification area, which on mouse-over shows a label "Dropbox 3.0.5 Up to date" and can be right-clicked to reach dropbox menu. Nautilus-dropbox is still not installed as a package.
- when I copied the dropbox icons to the icon fallback directory, the dropbox icon showed up on the panel.
Dropbox icons are stored in the /home/[user]/.dropbox-dist/dropbox-[version]/images/hicolor/16x16/status/
Icon fallback directory for them is /usr/share/icons/hicolor/16x16/status/
However, after restarting the panel it was only the 1x1 pixel dot again, and restarting dropbox didn't help. Icons are still there in the fallback directory.
A note: Skype puts it's icon next to the Dropbox pixel, and it works perfectly, so the problem is definitely with Dropbox.
Feliratkozás:
Megjegyzések (Atom)
