Various installation & administration scripts for Ubuntu workstation.
Most of these scripts are used by some articles available under
Various installation & administration scripts for Ubuntu workstation
Various installation & administration scripts for Ubuntu workstation.
Most of these scripts are used by some articles available under
I am running Ubuntu 18.04. My monitors.xml structure is a bit different like below.
<configuration>
<logicalmonitor>
<x>1280</x>
<y>133</y>
<scale>1</scale>
<primary>yes</primary>
<monitor>
<monitorspec>
<connector>LVDS-1</connector>
<vendor>LGD</vendor>
<product>0x0335</product>
<serial>0x00000000</serial>
</monitorspec>
<mode>
<width>1368</width>
<height>768</height>
<rate>59.882049560546875</rate>
</mode>
</monitor>
</logicalmonitor>
<logicalmonitor>
<x>0</x>
<y>0</y>
<scale>1</scale>
<monitor>
<monitorspec>
<connector>VGA-1</connector>
<vendor>unknown</vendor>
<product>unknown</product>
<serial>unknown</serial>
</monitorspec>
<mode>
<width>1280</width>
<height>800</height>
<rate>59.810325622558594</rate>
</mode>
</monitor>
</logicalmonitor>
</configuration>
</monitors>
A PR is created #51
Hi,
I had a nice and simple Nautilus script which I later used in Nemo file manager of Linux Mint as well, but it doesn't seem to work properly anymore (maybe due to some changes in convert/imagemagick).
It doesn't convert text files any longer, and converts office document files very badly (a bad image), which it used to convert to PDF properly but only saving in a subdirectory without including in the PDF file generated (I didn't mind this because I used it only to merge image files to a PDF file).
So your script came as a rescue for me - thank you very much!
Apart from being very short and simple, the previous script had an additional option to enter new file name for the PDF to be generated, which is missing in your script.
I've tried adding this to your script with my very primitive scripting skills, but I couldn't.
I'm hoping that you might like to do it.
For your information, I copy below the script I've been previously using:
filesall=""
while [ $# -gt 0 ]
do
lastname="$1"
files=`echo "$1" | sed 's/ /\?/g'`
filesall="$filesall $files"
shift
done
customname=`zenity --entry --title="Merge into PDF" --text="will use last filename or this name:"`
if [ -z "$customname" ]
then
notify-send "Merge into PDF" "Merging files into one PDF with the same name as the last selected file" -i gtk-dialog-info &
convert $filesall "$PWD/$lastname.pdf"
else
notify-send "Merge into PDF" "Merging files into one PDF with the name entered" -i gtk-dialog-info &
convert $filesall "$PWD/$customname.pdf"
fi
Hi there, thanks for the great script - came across it when reading your post over here.
Two things - the link in the post should be updated to:
Annnd... I can't get it to work! Following example commands both output Unknown Parameter
shell-extension-install $(echo $(gnome-shell --version) | grep -Eo '[0-9]?[0-9]\.[0-9]?[0-9]') 779
Should install Clipboard Indicator extension, based on current gnome shell version
Manually:
shell-extension-install 3.28 779
Also outputs:
Unknown parameter 3.28
Unknown parameter 779
In ubuntu-scripts-master/ubuntugnome/update-monitor-position line 22:
esc() { printf "%s\n" "$1" | sed -e "s/'/'\"'\"'/g" -e "1s/^/'/" -e "\$s/\$/'/" }
^-- SC1009 (info): The mentioned syntax error was in this function.
^-- SC1073 (error): Couldn't parse this brace group. Fix to allow more checks.
^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.
In ubuntu-scripts-master/ubuntugnome/update-monitor-position line 64:
^-- SC1056 (error): Expected a '}'. If you have one, try a ; or \n in front of it.
^-- SC1072 (error): Missing '}'. Fix any mentioned problems and try again.
ubuntu-scripts-master/ubuntugnome/update-monitor-position: line 64: syntax error: unexpected end of file
Dear Nicolas,
When I use the mozilla-extension-manager with the --user option, I get the following errors:
$ mozilla-extension-manager --firefox --user --install https://update.adblockplus.org/latest/adblockplusfirefox.xpi
/usr/local/sbin/mozilla-extension-manager: ligne 311: : commande introuvable
/usr/local/sbin/mozilla-extension-manager: ligne 314: : commande introuvable
[success] install firefox user extension Adblock Plus, uid={d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}, version=2.9.1
$
And the extension is not installed. After looking into the script, it seems that bash is not able to execute a command when starts by an empty "${EXT_SUDO}"
, IE when the --system option is not set:
Line 311:
"${EXT_SUDO}" cp -f "${ADDON_XPI}" "${EXT_PATH}/../${EXT_UID}.xpi"
Line 314:
"${EXT_SUDO}" unzip -qq "${ADDON_XPI}" -d "${EXT_PATH}/${EXT_UID}"
My version of bash is 4.3.48.
A quick workaround I'm currently using is to remove the "${EXT_SUDO}"
, as I only install the extensions on my user.
Could you please have a look into this ?
Thank you,
LRGN
Google translation
Hello,
I have a problem with the script, it works fine, whenever it seems that Firefox have changed are working for add-on / extention.
After many attempts, I found that you should not extract the .xpi archive, just rename it with the UUID.
example for:
Bitwarden (https://addons.mozilla.org/en/firefox/addon/bitwarden-password-manager/)
once download -> bitwarden_free_password_manager-1.27.0-fx.xpi
rename to work: {446900e4-71c2-419f-a6a7-df9c091e268b} .xpi
Ubuntu 18.04 LTS
FireFox 60.0.2
#####################################################################
Original
Bonjour,
J'ai un souci avec le script, il fonctionne correctement, toute fois il semble que Firefox ai changer sont fonctionnement pour les add-on/extention.
Après de nombreuse tentative, j'ai trouver qu'il ne faut pas extraire l’archive .xpi, juste la renommer avec le UUID.
exemple pour :
Bitwarden (https://addons.mozilla.org/fr/firefox/addon/bitwarden-password-manager/)
une fois télécharger -> bitwarden_free_password_manager-1.27.0-fx.xpi
renommer pour fonctionner : {446900e4-71c2-419f-a6a7-df9c091e268b}.xpi
Ubuntu 18.04 LTS
FireFox 60.0.2
mozilla-extension-manager --user --install https://addons.mozilla.org/firefox/downloads/file/453945/tree_style_tab-0.17.2016061501-fx.xpi?src=dp-btn-primary
grep 'em:id=' install.rdf
em:id="[email protected]"
<RDF:Description em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
Hi. thank you for this greate collection. i want to use mtp-declare script. after two steps and recognize my device in sterp 3 i got following error:
"USB port is of unknown type. Try to use another USB port."
How to fix it?
Android device: huawei g8
OS: arch linux
wm: i3
http://bernaerts.dyndns.org/linux/76-gnome/345-gnome-shell-install-remove-extension-command-line-script
Referenced here:
https://github.com/NicolasBernaerts/ubuntu-scripts/blob/master/ubuntugnome/gnomeshell-extension-manage
Doesn't exist:
Not Found
The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Hello Nicolas and dear contributors,
I came accross your repo by reading this article. It came in handy as I repaired my documents and made them readable with open-source document viewers 👏. Thank you very much 😄!
I managed to locate a small typo/bug inside the pdf-repair script. In line 82, the filename variable is declared as:
ORIGINAL_FILE=$(basename "${ORIGINAL_URI}")
but in line 95 the new file is created with the command:
gio copy "${TMP_REPAIRED}" "${ORIGINAL_DIR}/${ORIGINAL_NAME}-repaired.pdf" // NAME instead of FILE
This results to the name format "-repaired.pdf" for the output. One can easily fix the typo of the variable, but still this would result to files with the pdf extension inside their name (e.g. input.pdf-repaired.pdf).
📝 Proposed solution:
I would recommend a dirty fix in line 82, where we could drop the file extension from the OUTPUT_FILE
variable.
ORIGINAL_FILE=$(basename "${ORIGINAL_URI}" | cut -f 1 -d '.')
⚠ This fix will not work properly if the input file has dots inside to name (e.g. input.foo.pdf).
Please, let me know if you want me to contribute to this project with this minor change.
http://bernaerts.dyndns.org/linux/76-gnome/283-gnome-shell-install-extension-command-line-script
now has broken links due to 7e3e2b0
Hi.
The script update-monitor-position does not take into account to create the xrandr command. Would it be possible to include this into your very handsome script? That would be really awesome.
See my config:
<monitors version="2">
<configuration>
<logicalmonitor>
<x>416</x>
<y>2160</y>
<scale>1.4953271150588989</scale>
<primary>yes</primary>
<monitor>
<monitorspec>
<connector>eDP-1</connector>
<vendor>MEI</vendor>
<product>0x96a2</product>
<serial>0x00000000</serial>
</monitorspec>
<mode>
<width>2560</width>
<height>1440</height>
<rate>59.999069213867188</rate>
</mode>
</monitor>
</logicalmonitor>
<logicalmonitor>
<x>3840</x>
<y>0</y>
<scale>1</scale>
<transform>
<rotation>left</rotation>
<flipped>no</flipped>
</transform>
<monitor>
<monitorspec>
<connector>DP-2-2</connector>
<vendor>DEL</vendor>
<product>DELL U2412M</product>
<serial>Y1H5T22R2HUL</serial>
</monitorspec>
<mode>
<width>1920</width>
<height>1200</height>
<rate>59.950172424316406</rate>
</mode>
</monitor>
</logicalmonitor>
<logicalmonitor>
<x>0</x>
<y>0</y>
<scale>1.75</scale>
<monitor>
<monitorspec>
<connector>DP-2-1</connector>
<vendor>ACI</vendor>
<product>ASUS MG24U</product>
<serial>0x00003478</serial>
</monitorspec>
<mode>
<width>3840</width>
<height>2160</height>
<rate>30</rate>
</mode>
</monitor>
</logicalmonitor>
</configuration>
</monitors>
Thanks for so useful mozilla-extension-manager script! I don't understand why this feature is not available in Firefox core.
Now I can easily install and remove extensions via command line. But after installing, seems extensions stay on old version after new releases, because Firefox users have no write access to global extension folder.
How can I update version of extension via command line in your script?
If no way now, can you add it in future versions? Thanks!
I want to convert a .ts file recorded with VDR (Video Disc Recorder), but this fails with the error message:
video-convert2mkvaac: line 209: 32776 (0x8008): syntax error in expression (error token is "(0x8008)")
mediainfo file is attached.
Many Firefox extension files have very strange names like {e4a8a97b-f2ed-450b-b12d-ee082ba24781}.xpi so there are too difficult to understand which extension already exist, or which extension contains current file.
Please add action to check that extension already exists.
Also will be good to have action for output table with names of all installed extension (and maybe type local/global, and version).
Seems that your script downloads addon.xpi in current folder (and removes it after install). But if user have no write access to this folder, process will broken.
Can we download extension into /tmp folder, in which all users have write access?
When there is no extension enabled. The output of gsettings get org.gnome.shell enabled-extensions
on gnome-shell 3.18.5 (Ubuntu 16.04.2) will return:
@as []
This will cause an "Unknown keyword" error, as the unwanted string 'as [' will be caught with sed and pass to gsetting set command.
unknown keyword:
[as [,'[email protected]']
^^
0x0421
When encoding any file with a path containing letter "ě", the rendering dialog disappears a second after rendering starts.
On XUbuntu 20.04 LTS it installs OK, makes autostart entry, but when I execute it from terminal (to save the layout initially), i get error:
/usr/local/sbin/update-monitor-position: line 61: syntax error: unexpected end of file
and there is no ~/.config/monitors.xml created
If that matters, I use arandr to design the screen layout and removed/replaced the xfce4 utility with /sbin/true, because it pops a new window each 5 seconds or so, which is...
What is the licence? Could you add a LICENSE
file please?
Hi,
I'm trying to stabilize this video with the Rotation and stabilization script. I have already used it on some other videos from other cameras, but this one, as well as others in this format, produces just a white clip. I can choose the stabilization parameters, then it shows the loading bar and after a second, it closes and the video is encoded in the background just to white. The problem seems to be in somehow skipping of the analyzing phase.
However, when I stabilize it only via terminal, everything works well. I've attached the problematic video here.
Add a "--unsafe" flag or something similar to avoid messages like:
Gnome Shell version is 3.26
Extension System Monitor is not available for this version.
Available versions are :
3.10 3.12 3.14 3.16 3.18 3.20 3.22 3.24
It seems gnome is not checking compatibility anymore. See here for more info.
ubuntu-scripts/pdf/generate-booklet
Line 94 in e05a1b1
ubuntu-scripts/pdf/generate-booklet
Line 109 in e05a1b1
The generate-booklet script contains a critical bug: the original non-pdf file is removed if the unoconv
command fails (!). If unoconv
fails, the FILETMP="${FILE}"
expression is executed, and so at the end of the script the original file is deleted. I've accidentally deleted an important file because of the bug.
A simple bug fix could be: replace [ "${TYPE}" != "pdf" ] &&
with an if-else
statement. In addition an additional check/assertion can be added before calling rm
: "${FILETMP}"
must not be equal to "${FILE}"
. Another possible safety precaution is adding set -e
at the top of the script (this may require other script modifications if it relies on proceeding after some command's failure).
Hey,
The Mad Catz M.O.J.O has "0x0738" as USB vendorID
Hi, I'm using Ubuntu 14.04 with Gnome 3. I have two monitors, one of them is a CRT monitor with 4:3 ratio, for some reason besides of losing the position set in ~/.config/monitors.xml
I'm also losing the screen resolution of the CRT monitor. The position problem is fixed using your script but the resolution is always lost after every reset.
Is there a way to also set the screen resolution of the monitors in your script?
Thanks!
I can't install checkcompatibility https://addons.mozilla.org/ru/firefox/addon/add-on-compatibility-reporter/?src=api mozilla extension via mozilla-extension-manager script, here is output:
# LANG=C mozilla-extension-manager --install --global https://addons.mozilla.org/firefox/downloads/latest/checkcompatibility/addon-300254-latest.xpi
--2017-05-18 10:34:45-- https://addons.mozilla.org/firefox/downloads/latest/checkcompatibility/addon-300254-latest.xpi
Resolving addons.mozilla.org (addons.mozilla.org)... 52.88.190.249, 35.167.231.223, 54.148.72.151, ...
Connecting to addons.mozilla.org (addons.mozilla.org)|52.88.190.249|:443... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: https://addons.cdn.mozilla.net/user-media/addons/300254/disable_add_on_compatibility_checks-1.3-fx+fn+sm+tb.xpi?filehash=sha256%3Aef6400c10417062f8e1c67aa3ff9cdb412877418eb95aaf9e22d195a95c394d5 [following]
--2017-05-18 10:34:46-- https://addons.cdn.mozilla.net/user-media/addons/300254/disable_add_on_compatibility_checks-1.3-fx+fn+sm+tb.xpi?filehash=sha256%3Aef6400c10417062f8e1c67aa3ff9cdb412877418eb95aaf9e22d195a95c394d5
Resolving addons.cdn.mozilla.net (addons.cdn.mozilla.net)... 54.192.92.141
Connecting to addons.cdn.mozilla.net (addons.cdn.mozilla.net)|54.192.92.141|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7729 (7.5K) [application/x-xpinstall]
Saving to: 'addon.xpi'
100%[=====================================================================================================================================================================================================================================>] 7,729 --.-K/s in 0s
2017-05-18 10:34:46 (1.03 GB/s) - 'addon.xpi' saved [7729/7729]
Could not retrieve extension file from server
After this I see "addon.xpi" file stayed in current folder.
Where can be the problem?
Please add ability to set extension path folder manually from argument like:
mozilla-extension-manager --install --path="/mnt/pxe-system-root/usr/lib/firefox-addons/extensions"
or environment variable.
I have PXE netboot environment in custom folder, and must install extension on server to guest system root disk, mounted to custom folder.
Hi,
Would it be possible to mount FlashAir as a volume through FSTAB as opposed to Nautilus scripts/extensions?
On Fedora (23 and 24), gnome-session --version
(currently used by the script) prints nothing. To detect the gnome version I used instead:
DISPLAY=":0" gnome-shell --version | cut -d' ' -f3 | cut -c1-4
This alternative should be cross-platform (to be checked on ubuntu-gnome)
Thanks for this very handy script. However I think installing texlive-extra-utils package is overkill. Pdfjam is enough
http://packages.ubuntu.com/search?keywords=pdfjam
https://github.com/NicolasBernaerts/ubuntu-scripts/blob/master/pdf/generate-booklet#L24
also, unoconv should be optional
Thoughts?
The video stabilizer encodes videos in about 20 mbps, no matter what was selected. As a result, the video is useless.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.