Blog atrasado con gajes del oficio

Network Has Been Disconnected Manjaro Kde Xfce

For some unknown reason, I was getting the message network has been disconnected even on connections that have been previously used.

Contrary to the post entitled NetworkManager doesn’t automatically ask for a password for new network, see see this post on bbs.archlinux.org in my case the connection was used many times before.

The dependency problem that has plagued this bug seemed to make a comeback on a most of Manjaro desktop environments.

Installing, or better put, reinstalling it with

 yaourt -S gnome-keyring

seemed to resolve the issue.

The same problem hasn’t been experienced on Antergos distribution.

Mounting a Windows Hard Drive on Arch Linux

After following some of the advice on ntfs-3g arch linux entry which described the procedure to mount a windows system:

A lsblk -f call on the filesystem returned:

 sdb                                                         
 ├─sdb1 vfat   SYSTEM   
 ├─sdb2 ntfs   Recovery 
 ├─sdb3                 
 ├─sdb4 ntfs   OS       
 └─sdb5 ntfs   Restore  

I was after sdb4 in this case. So I invoked on the command line:

 $ ntfs-3g /dev/sdb4 /mnt/fat/

Which returned the message:

 Unprivileged user can not mount NTFS block devices using the external FUSE
 library. Either mount the volume as root, or rebuild NTFS-3G with integrated
 FUSE support and make it setuid root. Please see more information at
 http://tuxera.com/community/ntfs-3g-faq/#unprivileged

So with sudo privileges I invoked it again, but this time around the more precise error message that Input/output error NTFS is inconsistent was returned on the terminal. The entire message was as follows:

 ntfs_attr_pread_i: ntfs_pread failed: Input/output error
 Failed to read of MFT, mft=391080 count=1 br=-1: Input/output error
 Falling back to read-only mount because the NTFS partition is in an
 unsafe state. Please resume and shutdown Windows fully (no hibernation
 or fast restarting.)
 ntfs_attr_pread_i: ntfs_pread failed: Input/output error
 Failed to read NTFS $Bitmap: Input/output error
 NTFS is either inconsistent, or there is a hardware fault, or it's a
 SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
 then reboot into Windows twice. The usage of the /f parameter is very
 important! If the device is a SoftRAID/FakeRAID then first activate
 it

If I were to invoke it with mount instead of ntfs-3g, then it would have mounted it without a setback

 $ sudo mount -t ntfs-3g /dev/sdb4 /mnt/fat

successfully mounted it and I was able to access the files on that hard drive.

Git Committing by User Name Config

I recently had to set up again the local branches through git.

An error that was not uncommon came up on the screen:

 *** Please tell me who you are.

 Run

   git config --global user.email "you@example.com"
   git config --global user.name "Your Name"

 to set your account's default identity.
 Omit --global to set the identity only in this repository.

This time around it was done through configuring a user.name and a user.email on git itself.

It came to memory that the last time I was setting it up on a different system by pulling the sources from the remote branch, this configuration was never used.

An answer on stackoverflow reminded me that this was indeed the case the last time I had done it. See instead of doing a git pull you can do a git fetch

 git fetch
 git reset --hard origin/master

Even if the error from git with the please tell me who you are comes up after an ssh key is granted, as it was posted on this other thread entitled Git-please tell me who you are error when using ssh key, the best alternative is to specify the --global option from git as it posted at run git config –global user.email - git config –global user.name

Of course, if the option to have a --global configuration is not desirable, then the removal of this .gitconfig file may be accomplished through git again by issuing git config --global --unset-all user.name and git config --global --unset-all user.email from the terminal.

On the website that aims at answering questions about the ubuntu distributiion, there are more examples with this purpose. See for example git config global file - remove settings

The most important part about it lies on the command –unset-all, even though the answer which pointed at it was not the accepted solution in this case.

For more details about the config-file for git it is recommended to read the manual man git-config for more details.

Npm Warn Saveerror Enonent During Uninstall

I recently tried a few utility programs through npm javascript manager. For further info see Npm package manager on Wikipedia.

But after trying them, I noticed that the output compilation was not what I had expected.

Usually, or so it seems, that by default the programs end up on /usr/lib/node_modules.

I kept one of the programs which I found it handy and very convenient. But I just wanted to remove the rest from the system.

But lo and behold. The removal outcome for the programs was not what I had expected either.

npm threw errors even with sudo privileges.

 npm WARN enoent ENOENT: no such file or directory, open 'package.json'
 npm WARN c No description
 npm WARN c No repository field.
 npm WARN c No README data
 npm WARN c No license field.

The problem was easily resolved by issuing the flag -g (get) for a successful uninstall. So that was npm uninstall <name> -g.

Later I checked on /usr/lib/node_modules, to make sure the program was no longer on the system.

Manjaro Xfce Qpdfview Problem With Qt5ct Unable to Load Plugin in First Attempt

I currently have two (2) identical - or that’s what it seemed like - xfce environments on two (2) different hardware systems.

I always keep at hand a list of viewers and if there is any problem removing those to be found unnecessarily large or extremely light to the point of rendering them useless, I tend to check the Arch Wiki at List of Applications for a refresher on what’s available at the moment.

I’ve always found useful, more or less two (2), or three (3) of them, among them, with a quick copy-paste from the Arch Wiki:

gv — Graphical user interface for the Ghostscript interpreter that allows to view and navigate through PostScript and PDF documents.

ePDFView — Free lightweight PDF document viewer using the Poppler and GTK+ libraries. Development stopped.

qpdfview — Tabbed document viewer. It uses Poppler for PDF support, libspectre for PS support, DjVuLibre for DjVu support, CUPS for printing support and the Qt toolkit for its interface.

The latter, strangely enough, was behaving differently on one of the manjaro xfce systems.

A quick google search turned pretty much nothing, related to this issue I was having: namely, the adjustment and consequent resizing for the Settings Window.

As you can see from the image above, I was unable to get to the bottom of the window whereto I could’ve specified to cancel or apply the changes to take effect via a GUI. What use is a GUI if one can’t access the main settings of the program?

This took me to the wrong path in trying to modify the settings upon which the Dialog box depended on.

The settings for qpdfview.conf were found right under the .conf/qpdfview/ directory.

To no avail I tried to change the settings for the

 settingsDialogSize=@Size(488 803)

on the qpdfview.conf file, but every single time I did so, even after changing the above size to other feasible settings, the settings window loaded the default and preconfigured values for it, rendering any change I had made earlier such as modifying the values for that settingsDialogSize onto the configuration file, obsolete.

Then I gave up tweaking around with the qpdfview.conf file. Even after removing this file, removing qpdfview along with all poppler libraries from the system, reinstalling the program again, logging out of the system, and restarting, and logging right back in, the problem still persisted.

The settings window remained, remained useless for the most part - and from a GUI’s perspective.

Of course I could have just pressed the carriage return key on the keyboard to apply the changes, or for that matter the escape key to discard any changes, but this was just besides the point, since it defeated the purpose of having GUI applications running. I needed it to be operational.

I tried another venue.

I noticed that every single time that the program qpdfview was invoked from the command line, several errors appeared, including the most significant of the lot:

 qt5ct: using qt5ct plugin
 qt5ct: D-Bus global menu: no
 Could not load plug-in in first attempt: ""
 "The shared library was not found."

the second of these messages was self-explanatory. The libraries upon which qpdfview relied upon, were not recognizing or finding the plugin.

A quick search on google later regarding qt5ct did not provide a satisfactory explanation behind the qpdfview problem.

I read some of the visual methods in adjusting the settings for qt on Change Qt5 application style with qt5ct

So I started qt5ct, and I noticed that the default settings for the window was to have gtk2 as the style to be loaded.

Then right after I had changed it to one of the other values, I had high expectations that the changes would improve the dimensions of the dialog box settings for qpdfview. But I was wrong. It made everything worse off.

I finally had to tweak around with the problem directly through the qt5ct.conf file by changing the style field. Only then the problem with qpdfview was resolved.

 [Appearance]
 color_scheme_path=
 custom_palette=true
 icon_theme=Vertex-Maia
 style=gtk2

The style value was modified to Breeze, I saved the file and exited.

The qt5ct.conf file should have on the Appearance the following:

 [Appearance]
 color_scheme_path=
 custom_palette=true
 icon_theme=Vertex-Maia
 style=Breeze

Right after making the changes - not even a logout was required - qpdfview dialog box dimensions were working and definitely manageable. The only glitch - if it may be rightfully called as such - was an apparent back-to-back unwanted behavior in which the whole window for the settings, was not clearly visible, but one quick maximizing drag-around-movement maneuver, fixed the annoyance once and for all.

Manjaro Xfce Bluetooth Problem

Bluetooth recognition - at least on Manjaro Xfce - has been erratic and inconsistent.

For no clear reason the LTS kernel and even a newer kernel have identified the hardware, while it has failed to do so in a great many occasions.

Many of the tweaks included reinstalling bluez, bluez-firmware, bluez-libs, bluez-tools, and bluez-utils.

Back to the drawing room and back again.

The bluetooth adapters were not being recognized however. And after logging out and back into the session, and even after sudo /sbin/shutdown -r now, nothing seemed to work.

The following day - to my surprise - I booted the system and it picked the bluetooth adapters without a problem.

It reminded me of a comment on the manjaro forum thread entitled Bluetooth adapters app not opening Bluetooth Manager in which one of the participants said:

Bluetooth support in Linux is always troublesome, even in Windows, smartphone, etc. So yeah, I think staying away from bluetooth related hardwares if you want a trouble free experience. Wireless hardwares nowadays are going towards a dedicated receiver way to handle wireless connection and that’s a better approach. Just my two cents 1

I have to agree with him on that regard.

On the other hand, the desktop environment KDE hasn’t - I ran it for a short while and perhaps my feedback is worthless of consideration on that regard - given me the same problems than the current configuration under xfce.

But I never thought that the problems would persist even after the installation of a newer kernel. That is perhaps the main reason which has been drifting me away from xfce until further notice.

And while KDE-fanboys have come up with the slogan that it grows on you, xfce is perhaps a more GNU/Linux-centric configurable environment than the former. I still enjoy tweaking with its features even though its less polished than Plasma KDE. There is no question about this. KDE aims at the latest hardware, while xfce focuses on the rest. I’ve never tried to benchmark its memory and CPU consumption, but I’m almost certain it fairs much better than KDE.

Whether xfce will be a daily desktop environment driver running the main programs on which my workflow depends upon, it’s a question of time and how well it will handle them without a major setback.

Further oversights around Bluetooth vulnerabilities include technical papers such as Security Risks in Bluetooth Devices, Bluetooth security threats and solutions

Even recent articles from Slashdot - BlueBorne Vulnerabilities Impact Over 5 Billion Bluetooth-Enabled Devices have gone on at length about it. The following paper - although unreliable since it looks more than a pamphlet from a company that advertises its products under the pretension of providing unparalleled protection - serves to confirm that regardless of its merit [this paper itsel] is worth considering the possible risks could arise as a result from the operations of bluetooth devices.

References

bluetooth adapters not opening bluetooth-manager-bluez-failed_↩︎

Urxvt Copy Paste Tweaking

I haven’t read the man pages enough to figure out some of the parameters that play an important behavior for the full functionality of the mighty urxvt, and it was not until I read a post - which was more of a comment on the thread entitled right click paste in urxvt terminal on the archlinux.org forum - when I realized that by the combination of ctrl and right mouse click would copy and paste the selected text on the X window system.

I found the above to work without a problem under xclip so far.

Urxvt Background Tweaking

I’ve never bothered with urxvt in the past. Perhaps was the way that dealt with the default glyph, which discouraged me from using it.

Later I found that the above was easily answered here at how can I get better looking fonts in my terminal (urxvt)

Nonetheless, the simple fact that I had to modify it directly on .Xresources, stopped me from doing all the necessary modifications to accomplish it.

Then I also found the excellent script urxvt-font-size which allows changing the font size on the fly.

The one problem I faced with this magnificent terminal was the handling of the background color.

Ignorant I was of the fact that although .Xresources is the responsible source to change the background, one must specify it, and not expect to interpret the default values of xterm, a different terminal.

It wasn’t until a post which was replying to a thread opened on the Arch\Linux forums entitled rxvt-unicode font color too dark which pretty much condensed what I was after, and made me feel more stupid afterward.

Setup Remote and Master Branches Before Updating Hugo

A while ago, I had to set remote and master branches on a different machine.

The methods included setting it up through the git pull command. By going tis route, both the master and remote branches were consequently set and configured without a major inconvenience.

Recently, although I tried to replicate the same method above, I faced problems that included among many other errors, the infamous error: src refspec master does not match any. error: failed to push some refs to 'origin

I wasn’t going to go through the poor method of setting up a new site and copy-paste among other files, the posts folder, the theme, the config files, and any other modification I had previously committed.

The site was being generated without a mishap, so I knew it had to do with the no less complicated git, since some of the errors, like the above, were clearly describing that origin did not match the one from the remote.

the necessary steps are as follow:

1-Remove with git all leftovers from the public folder with git rm -rf public

2-Remove the public folder itself with rm -rf.

3-Add the static site as a submodule to the master with git submodule add -b master <git@github.com:<USERNAME>/<USERNAME>.github.io.git public>.

And that should be more than enough to have it working in no time. Push your changes and update it accordingly.

Xfce Carpalx Layout

There are many ways to add the carpalx layout to X window system on GNU/Linux.

The desktop environment Plasma KDE does not have that problem. One could easily add it from the Input Devices from the settings of the system.

If however, one is running Xfce, things are not as straightforward as one would like them to be.

At the bottom of this post, one can find the zip archive where the carpax.xkb file resides.

Unzip the contents and open up the README.txt to have an idea of what to copy. But there are two (2) things/caveats to remember.

One shouldn’t modify the symbols/us file as it was suggested by the author

and

No need to follow Step 3 by loading the layout with setxkbmap carpalx. For one thing it will not load the default variant of the layout.

I’m just posting the following as it currently appears on the README.txt file provided by the author.

INSTALLATION INSTRUCTIONS

  1. Copy carpalx.xkb to your XKB symbols directory (path my differ slightly)

    $ cp carpalx.xkb /usr/share/X11/xkb/symbols/carpalx

  2. Add the following lines to /usr/share/X11/xkb/symbols.dir

    -dp—– a——- carpalx(qgmlwb) –p—– a——- carpalx(qgmlwy) –p—– a——- carpalx(qfmlwy) –p—– a——- carpalx(qwkrfy) –p—– a——- carpalx(qwyrfm) –p—– a——- carpalx(tnwmlc)

  3. Now it should be possible to load the layouts with, e.g.

    $ setxkbmap carpalx # defaults to QGMLWB $ setxkbmap -layout carpalx -variant qwkrfy # to select other variants

  4. The following files should also be updated:

    /usr/share/X11/xkb/rules/xorg.lst /usr/share/X11/xkb/rules/xorg.xml

One better way to accomplish it:

Instructions to follow

  1. Copy indeed carpalx.xkb to the XKB symbols directory with sudo privileges

    $ cp carpalx.xkb /usr/share/X11/xkb/symbols/carpalx

  2. Go to /usr/share/X11/xkb/rules

    $ cd /usr/share/X11/xkb/rules

  3. Once there and with sudo privileges again open evdev.lst. Add it.

  1. Edit the file edev.xml and add the variant to the list.

  1. Go to Keyboard Settings of the xfce graphical environment and add it. It will show on the list as shown in the following image:

  • Downloadable zip files:

http://mkweb.bcgsc.ca/carpalx/distribution/carpalx-x11.zip