Coder Social home page Coder Social logo

ubuntu-scripts's Introduction

ubuntu-scripts's People

Contributors

a-vaniev avatar alextairbekov avatar apfelwurm avatar cedricbrx avatar cypresslin avatar drshajul avatar enzolis avatar forabi avatar illwieckz avatar jeremjr avatar john98nf avatar malipetek avatar nicolasbernaerts avatar oserhiye avatar rodoviario avatar skarmoutsosv avatar vsimko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ubuntu-scripts's Issues

monitors.xml structure is not compatible on Ubuntu 18.04

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

Feature Request: new file name for pdf-generator

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

gnome shell-extension-install script returns "unknown parameter" for shell and extension params

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

some errors seen

  1. in README.md the link http://www.bernaerts-nicolas.fr/linux/ is broken
  2. the script ubuntu-scripts-master/ubuntugnome/update-monitor-position do not pass a shellscheck verification
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.
  1. tryng to run the script produces the following message (on Ubuntu 22.04): ubuntu-scripts-master/ubuntugnome/update-monitor-position: line 64: syntax error: unexpected end of file

[mozilla-extension-manager] Unable to install extension with --user option

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

[mozilla-extension-manager] Does not work with FF 60

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

"USB port is of unknown type. Try to use another USB port."

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

pdf-repair: Output file name format

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.

Take <scale> tag of monitors.xml into account for ubuntugnome/update-monitor-position

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>

[Feature request] Action "update extension" in mozilla-extension-manager script

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!

[mozilla-extension-manager] Action to check that extension already installed and list all installed extensions

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).

Unexpected end of file

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...

Vidstab using UI makes only a white video

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.

video.zip

Allow install gnome extensions even if older version

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.

generate-booklet script can accidentally remove the source file

[ "${TYPE}" != "pdf" ] && unoconv -f pdf -o "${FILETMP}" "${FILE}" || FILETMP="${FILE}"

[ "${TYPE}" != "pdf" ] && rm "${FILETMP}"

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).

Setting screen resolution in update-monitor-position

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!

[mozilla-extension-manager] Can't install checkcompatibility mozilla extension

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?

[gnomeshell-extension-manage] version detection broken on Fedora

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.