AntumDeluge

  • Home
  • Tutorials
    • Multimedia
    • OS
      • Android
        • Rooting Motorola Moto-E LTE 2nd Generation
      • Windows
        • Open a Command Prompt from Windows Explorer
      • BSD
        • How to Install & Set Up FreeBSD with A Desktop Environment
      • Linux
      • OS X
      • Multi-Platform
        • How to Preview & Change Plymouth Bootsplash Under X11/Unix Desktops
        • LXDE: Refreshing Menu Cache
  • Software
    • My Software
      • Debreate
    • Software Information
      • OS Info
        • About BSD
        • About Linux
  • Writing
    • Children’s Stories
  • About
    • Favorite Quotes
    • Favorite Short Stories
    • Forums I Am Active In
    • My Favorite Software

Enabling Numlock with System Startup

Posted by AntumDeluge on April 17, 2023
Posted in: BSD, Linux, OS, Uncategorized. Tagged: numlock, numlockx, X11. Leave a comment

These instructions are written from a Debian based system, but may work similarly on other Posix/Unix/Linux/BSD desktops.

WARNING: make backups of any system files before altering them

The Arch wiki details some methods that are not included here. Including enabling numlock in the virtual TTYs.

If numlock is not enabled by default with the startup of your system but you would like it to be so, the following instructions may be helpful.

Contents

  • TTY
    • Systemd
    • init
  • Login/Display Manager
    • lxdm
    • sddm
    • gdm3
    • xdm
    • lightdm
  • numlockx
  • Global User Session
    • numlockx config
    • profile.d & bash.bashrc
  • Single User Session
    • .profile & .bashrc
    • .xinitrc & .xsessionrc
    • Desktop launcher
    • crontab

TTY

Numlock can be enabled in the virtual TTYs after system startup by creating a system service.

Systemd

Many current Linux distributions use Systemd for managing system services. First thing to do is create a shell script that will enable numlock for all TTYs using the setleds command when executed.

Example: /usr/sbin/numlockttyon.sh

#!/bin/bash

for tty in /dev/tty{1..6}; do
  /usr/bin/setleds -D +num < "$tty"
done

We can create another script for when the service is stopped.

Example: /usr/sbin/numlockttyoff.sh

#!/bin/bash

for tty in /dev/tty{1..6}; do
  /usr/bin/setleds -D -num < "$tty"
done

Now we create a Systemd service file.

Example: /etc/systemd/system/numlocktty.service

[Unit]
Description=Numlock on TTYs

[Service]
ExecStart=/usr/sbin/numlockttyon.sh
ExecStop=/usr/sbin/numlockttyoff.sh
RemainAfterExit=yes
StandardInput=tty

[Install]
WantedBy=multi-user.target

The service file should be executable as well (as far as I can tell). Now reload the services daemon & enable the numlocktty service.

# systemctl daemon-reload

# systemctl enable numlocktty.service
Created symlink /etc/systemd/system/multi-user.target.wants/numlocktty.service → /etc/systemd/system/numlocktty.service.

# systemctl is-enabled numlocktty.service
enabled

At the next system restart, numlock will be enabled when you enter the virtual TTYs.

init

For a SysVinit service we will use the same shell script from the Systemd example & add an additional for checking if the service is active.

Example: /usr/sbin/numlockactive.sh

#!/bin/bash

for tty in /dev/tty{1..6}; do
  setleds < ${tty} | grep "^Current flags:.*NumLock on" > /dev/null 2>&1
  res=$?
  if [[ ${res} -ne 0 ]]; then
    exit ${res}
  fi
done

exit 0

Now we create a service shell script in /etc/init.d.

Example: /etc/init.d/numlocktty

#!/bin/bash
### BEGIN INIT INFO
# Provides:          numlocktty
# Default-Start:     2 3 4 5
# Default-Stop:      0 6
# Short-Description: Enables numlock for TTYs.
### END INIT INFO

set -e

case "$1" in
  start)
    /usr/sbin/numlockttyon.sh
  ;;
  stop)
    /usr/sbin/numlockttyoff.sh
  ;;
  status)
    /usr/sbin/numlockttyactive.sh
    exit $?
  ;;
  *)
    echo "Usage: /etc/init.d/$NAME {start|stop|status}" >&2
    exit 2
  ;;
esac

exit 0

Now enable the service:

# /usr/sbin/update-rc.d numlocktty enable

Login/Display Manager

You may want numlock to be enabled for use at the login screen. Unfortunately, there is no universal method (as far as I am aware) to do so. But it depends on the configuration of your login/display manager. I will go over the ones I am familiar with.

Note: The system may need to restart before changes to display manager settings take effect.

lxdm

Configuring lxdm is simple. Edit the file /etc/lxdm/lxdm.conf or /etc/lxdm/default.conf & uncomment the line “# numlock=0” & set it’s value to “1”.

sddm

sddm also has a fairly simple configuration located at /etc/sddm.conf. If the file doesn’t exist, a default configuration can be generated using the following command.

# sddm --example-config > /etc/sddm.conf

But you really only need two lines:

[General]
Numlock=on

gdm3

From a terminal execute the following commands.

$ sudo -i
# xhost +SI:localuser:gdm
# su gdm -s /bin/bash
# gsettings set org.gnome.desktop.peripherals.keyboard numlock-state true

xdm & wdm

TODO

The following require numlockx. See instructions below.

lightdm

Find where lightdm stores its configuration files. On my system they were located in the directories /usr/share/lightdm/lightdm.conf.d & /etc/lightdm/lightdm.conf.d. Create a new file under one of these directories with the .conf extensions. I used 50-numlock.conf. Add the following as its sole contents.

[Seat:*]                                                                                                                                                                                       
greeter-setup-script=numlockx on

numlockx

numlockx is a command line utility that simplifies managing the numlock state. Most Linux/BSD systems make this available from their official package repositories.

Debian based systems:

# apt install numlockx

Arch based systems:

# pacman -S numlockx

Red Hat/Fedora based systems:

# dnf install numlockx

FreeBSD based systems:

# pkg install numlockx

or

# cd /usr/ports/x11/numlockx && make install

OpenBSD based systems:

# pkg_add numlockx

or

# cd /usr/ports/x11/numlockx && make install

On some systems, simply installing numlockx may be all you need to do. If it detects that the system is running on a laptop it will leave numlock disabled by default, even if you have a number pad.

From a command line terminal, there are three simple commands for numlockx:

$ numlockx on     # set numlock state to on
$ numlockx off    # set numlock state to off
$ numlockx toggle # toggle current state between on/off
$ numlockx status # display current state

Note: numlockx requires an X session. So executing from a tty terminal without X running will fail.

Your system may or may not use the same status as the display manager after login. If not, you can try the following suggestions.

Global User Session

There are multiple configuration files or startup scripts where numlockx can be invoked. The simplest solution is edit numlockx’s configuration file located at /etc/default/numlockx. Change the line “NUMLOCK=auto” to “NUMLOCK=on” or “NUMLOCK=keep”. If set to “keep”, it will use whichever state was last used at login. This configures the numlock state system-wide for any user that logs in.

profile.d & bash.bashrc

Another possible solution is to invoke numlockx in the shell startup scripts. Create a new file in /etc/profile.d with an .sh extension & put “numlockx on” as its sole contents. Or, if your system is running bash, you can add it to the end of the /etc/bash.bashrc script. If this does not work, it is possible the state is being overridden by the setting in /etc/default/numlockx.

Single User Session

If you only want to configure numlock for a single user session, & your session manager does not offer a setting for it, you can try one of the following. How numlockx is invoked depends on which scripts are executed at login.

.profile & .bashrc:

Add “numlockx on” to the end of either the .profile or .bashrc or .bash_login script in your home directory.

.xinitrc & .xsessionrc:

According to documentation, if the desktop environment was launched with the xinit or startx command, it should read the scripts .xinitrc or .xsessionrc in the user’s home directory. In theory, adding “numlockx on” to one of these should work. But it did not for me.

Some other instructions were to copy the xinit initialization script to the user home directory as .xinit or .xinitrc. On my system the script was located at /etc/X11/xinit/xinitrc. This file needs to be executable & will contain something like this:

#!/bin/sh                                                                                                                                                                                      
                                                                                                                                                                                               
# /etc/X11/xinit/xinitrc                                                                                                                                                                       
#                                                                                                                                                                                              
# global xinitrc file, used by all X sessions started by xinit (startx)                                                                                                                        
                                                                                                                                                                                               
# invoke global X session script                                                                                                                                                               
. /etc/X11/Xsession

In theory, again, adding “numlockx on” to this file should work. But did not for me. I tried adding the line before & after /etc/X11/Xsession is executed.

Desktop launcher:

If your desktop session supports it, you can create a launcher in the ~/.config/autostart directory with the extensions .desktop. Example: ~/.config/autostart/numlock.desktop. Add the following to it:

[Desktop Entry]                                                                                                                                                                                
Exec=numlockx on                                                                                                                                                                               
Name=Numlock On                                                                                                                                                                                                                                                                                                                                                                               
Type=Application                                                                                                                                                                               
Version=1.0

crontab:

Another suggestion that did not work for me was to add the command to the user’s crontab. Execute crontab -e to edit the user’s crontab. Then add the line “@numlockx on”.

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on Pinterest (Opens in new window) Pinterest
  • Print (Opens in new window) Print
  • More
  • Email a link to a friend (Opens in new window) Email
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Tumblr (Opens in new window) Tumblr
Like Loading...

Export/Save All Open Images In GIMP

Posted by AntumDeluge on December 20, 2017
Posted in: GIMP, Graphics, Software. Tagged: batch, batch export, batch save, export, exporting, GIMP, graphic, Graphics, save, saving, script, script-fu, scripting, scripts. 26 Comments

Contents:

  • Introduction
  • The Script
    • Original
    • Other Versions
  • Installation

Introduction: (top)

At times, in the GNU Image Manipulation Program (GIMP), I have many images open that I am editing at one time. Manually exporting/saving images using the menu or hotkeys can be a tedious task in a situation like this. So, I began looking for a solution that would save changes of all open images at once. The answer that I found was a GIMP Script, a.k.a. Script-Fu, file (.scm) floating around on the web. The original script appears to have been written in 2006. I have tested it with GIMP version 2.8.22 on MacOS 10.10.5.

The Script: (top)

Original: (top)

There are a few different versions of the script available. I believe the original, by Saul Goode, was posted here on this GIMP Nabble forum. However, I got the script from this answer on Stack Overflow. Content is the same, just some changes in the comment line breaks. This is the content of the script I have used:

; This program is free software
; you can redistribute it and/or modify 
; it under the terms of the GNU General Public 
; License as published by 
; the Free Software Foundation
; either version 2 of the License, or 
; (at your option) any later version. 
; 
; This program is distributed in the hope that it will be useful, 
; but WITHOUT ANY WARRANTY; without even the implied warranty of 
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
; GNU General Public License for more details. 

(define (script-fu-save-all-images) 
  (let* ((i (car (gimp-image-list))) 
         (image)) 
    (while (> i 0) 
      (set! image (vector-ref (cadr (gimp-image-list)) (- i 1))) 
      (gimp-file-save RUN-NONINTERACTIVE 
                      image 
                      (car (gimp-image-get-active-layer image)) 
                      (car (gimp-image-get-filename image)) 
                      (car (gimp-image-get-filename image))) 
      (gimp-image-clean-all image) 
      (set! i (- i 1))))) 

(script-fu-register "script-fu-save-all-images" 
 "<Image>/File/Save ALL" 
 "Save all opened images" 
 "Saul Goode" 
 "Saul Goode" 
 "11/21/2006" 
 "" 
 )

Other Versions: (top)

(As of this writing, I have not tested these versions)

  • A version, modified by Lauchlin Wilkinson, that prompts for base name, directory, etc. can be found here.
  • It appears that a version was posted on gimpscripts.org in 2015, but the site is currently unreachable.

Installation: (top)

To install, save the script contents to a text file & give it the .scm filename extension. Mine is saved as saveall.scm. Place the file in GIMP’s scripts directory.

GIMP Scripts Directory Locations:

  • Linux:
    • ~/.gimp-<version>/scripts
  • MacOS:
    • ~/Library/Application Support/GIMP/<version>/scripts
  • Windows (Vista & newer):
    • GIMP 2.8 & older:
      • C:\Users\<username>\.gimp-<version>\scripts
    • GIMP 2.9:
      • C:\Users\<username>\AppData\Roaming\GIMP\<version>\scripts
  • Windows (XP):
    • C:\Documents and Settings\<username>\.gimp-<version>\scripts

So, on my MacOS system, the file is located here:

  • ~/Library/Application Support/GIMP/2.8/scripts/saveall.scm

Once installed, restart GIMP. If it loads correctly, the menu option File → Save ALL will be available:

GIMP Save All

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on Pinterest (Opens in new window) Pinterest
  • Print (Opens in new window) Print
  • More
  • Email a link to a friend (Opens in new window) Email
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Tumblr (Opens in new window) Tumblr
Like Loading...

How To Enable Git Tab Completion In Bash On Mac OS X

Posted by AntumDeluge on December 5, 2017
Posted in: OS, OS X, Tutorials. Tagged: Bash, Bash completion, Bourne shell, Git, Mac OS, Mac OS X, MacOS, operating system, OS, OS X, OSX, script, scripting, settings, shell, Software, tutorial. Leave a comment

Contents:

  1. Original post
  2. Additional notes

This is a re-blog of How To Enable Git Tab Completion In Bash On Mac OS X.

Original post: contents

By Conor Livingston:

I use git from the command line all day long. In the process, I issue a lot of git commands. This can get (no pun intended) to be a lot of repetitive typing, especially when branch names get long. To illustrate, it’s no fun to type out git checkout feature/shiny-new-processing-system-database-optimization every time I want to checkout that branch. Of course, you can always use the mouse to copy and paste a long branch name rather than typing the whole thing out.

However, if you’re like me and like to keep your hands on the keyboard, this solution can feel slow. Tab completion would certainly be faster and easier. Unfortunately, the default install of git on some Mac computers doesn’t have tab completion enabled. This was the case for me and at least two of my colleagues.

Fortunately, this is an easy fix. There is a bash script that enables tab completion of git commands and branch names. At the time of writing, this file exists in git’s official repo on Github. In fact, it is likely that this file already exists on your local machine, but, if you’re reading this post, you probably haven’t tapped into its power, yet. In the rest of this article, I will show you how to enable git tab completion in bash on a Mac.

The first step is to figure out whether you already have the git-completion script on your machine. You can use the command sudo find / -type f -name “git-completion.bash” to see if the script already exists on your local machine. Note: the sudo command will require you to enter the password you use to log in to your Mac. Also, this command may take a minute to run, because it looks through your whole file system. Here are some possible locations for the git-completion script, but it’s okay if it’s somewhere else.

/Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash
/Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash
/usr/local/Cellar/git/2.3.0/etc/bash_completion.d/git-completion.bash
/usr/local/Cellar/git/2.3.0/share/zsh/site-functions/git-completion.bash
/usr/local/etc/bash_completion.d/git-completion.bash
/usr/local/share/zsh/site-functions/git-completion.bash

 
If the git-completion.bash script doesn’t exist on your machine, please retrieve it from the link I provided above and save it to your local machine in a new file called git-completion.bash in the /usr/local/etc/bash_completion.d/ directory.

If the git-completion.bash script exists on your machine, but is not in the /usr/local/etc/bash_completion.d/ directory, we should create a copy of it in that directory. A quick sudo cp /current/path/to/your/git-completion.bash /usr/local/etc/bash_completion.d/git-completion.bash should do the trick.

For those who are curious about the /usr/local/etc/bash_completion.d/ directory: it’s for storing new completion commands, and you may have to create it if it doesn’t already exist on your machine.

At this point the git-completion.bash script should exist on your local machine in the /usr/local/etc/bash_completion.d/ directory.

Now we’ll plug the git completion script into bash by pointing to it from ~/.bash_profile. Note: the tilde in the previous sentence refers to the home directory on your computer. Add the following line to ~/.bash_profile: source /usr/local/etc/bash_completion.d/git-completion.bash and save.

The final step is to reload your bash profile. You can achieve this by running source ~/.bash_profile in your current bash session.

There you have it! You should now be able to use tab completion with git commands and branch names. Try it out by typing “git chec” into your terminal and pressing tab. The git-completion script should snap into action and complete your command, so that it reads “git checkout.”

Additional notes: contents

Creating a symbolic link instead of copying the file should be enough:

$ sudo ln -s /current/path/to/your/git-completion.bash /usr/local/etc/bash_completion.d/git-completion.bash

On my system, it was like this:

$ sudo ln -s /opt/local/share/git/contrib/completion/git-completion.bash /usr/local/etc/bash_completion.d/git-completion.bash

If you want to make the changes system-wide instead of for just the current user, rather than add the source line to ~/.bash_profile you can add it to /etc/bashrc.

WARNING: Before making changes to /etc/bashrc, it is recommended to make a backup of the original:

$ sudo cp /etc/bashrc /etc/bashrc.orig

This is my entire /etc/bashrc file:

# System-wide .bashrc file for interactive bash(1) shells.
if [ ! -z "$PS1" ]; then
    PS1='\n\h:\W \u\$ '
    # Make bash check its window size after a process completes
    shopt -s checkwinsize
    # Tell the terminal about the working directory at each prompt.
    if [ "$TERM_PROGRAM" == "Apple_Terminal" ] && [ -z "$INSIDE_EMACS" ]; then
        update_terminal_cwd() {
            # Identify the directory using a "file:" scheme URL,
            # including the host name to disambiguate local vs.
            # remote connections. Percent-escape spaces.
	    local SEARCH=' '
	    local REPLACE='%20'
	    local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
	    printf '\e]7;%s\a' "$PWD_URL"
        }
        PROMPT_COMMAND="update_terminal_cwd; $PROMPT_COMMAND"
    fi
fi

# Include Git Bash completions
source /usr/local/etc/bash_completion.d/git-completion.bash

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on Pinterest (Opens in new window) Pinterest
  • Print (Opens in new window) Print
  • More
  • Email a link to a friend (Opens in new window) Email
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Tumblr (Opens in new window) Tumblr
Like Loading...

Debreate: One More for 0.7

Posted by AntumDeluge on January 8, 2017
Posted in: Debreate. Tagged: deb, debian, Debreate, Linux, mint, package, packaging, ubuntu. Leave a comment

debreate64

Contents

  • Description
  • New Features
    • Generate Full License Templates
    • Drag-&-Drop Support
    • List Attached Storage Devices
    • Caching Distribution Names
    • Strip Binary Files
  • Fixed Bugs
    • Config Corruption
    • Stripped Path Names


Description

I hadn’t planned on another release in the 0.7 line, but the 0.7.11/0.7.12 releases had a pretty bad anti-feature with adding directories to the files list. So, after fixing that issue I decided to work on some other features, finding a few more bugs in the process. I would have hoped to get a bugfix release out sooner, but the new changes are worth it.


New Features

Generate Full License Templates

One new feature is the option to generate complete copyright templates, rather than just reference their filename path. The complete text is imported from the template file.

license-template-buttons

Template Generation Buttons

Along with the previously listed templates acquired from the standard system directory /usr/share/common-licenses, Debreate now ships with a few common open source license templates that may not be included with the Debian/Ubuntu system common licenses. If any of the shipped templates share the same file name with a system license, the system license will take precedence.

Also, users can place text files in the .local/share/debreate/templates/licenses folder under the home directory. When Debreate starts up, any files found in this directory will be listed under available templates. These templates will take precedence over shipped & system license templates.

Short templates, that merely reference the filename path, can only be generated for system licenses.

short-license-template

Drag-&-Drop Support

Drag-&-drop is now supported for many actions. Some text areas, including on the copyright page, allow dragging text files from the system file manager. The file will be read & the text area will be filled with its contents. A confirmation dialog will pop up if the text area is not already empty.

drag-drop-overwrite

Drag-&-Drop Overwrite Prompt

Package files can be added by drag-&-drop as well, either from the system file manager or the directory tree provided by the app. Added directories preserve file path names up to the top-level directory name. This was part of the anti-feature in the previous releases.

drag-drop

Drag-&-Drop from Directory Tree to File List

An option to add files individually to the packaged files list has also been added.

individual-files-check

Selecting this will not affect the final build. It is only provided for convenience. Adding files individually is slower & can take a long time if a directory contains a lot of files. Previously, this was the only method available. Depending on the number of files being added a progress dialog that can be canceled will be displayed. Leaving the option unchecked will only list the name of the top-level directory.

In addition, multi-selecting items in the directory tree is now supported.

multi-select-files

Multi-select Files

List Attached Storage Devices

When Debreate is started, it will attempt to scan the system for mounted storage devices & list them in the directory tree on the Files page. The user’s home directory will be the first item listed under System, followed by any storage devices detected.

attached-storage

Attached Storage Devices

If any devices are mounted or unmounted while the app is open, the Refresh context menu option will update the tree.

tree-context

Directory Tree Context Menu

Support for renaming files & directories, & sending items to the trash, has been added via the context menu as well. The command gvfs-trash must be available on the system for removing/trashing items. It is provided by the gvfs-bin package.

Caching Distribution Names

Official package repositories require a correctly formatted changelog. Included in the changelog must be the name of the target distribution for which the package is intended. While this may not be required for binary package building, it is good practice.

Some examples of distribution names (e.g. codenames) are squeeze, stretch, stable, & testing for Debian systems. Some current Ubuntu distributions, as of writing this, are xenial & yakkety. Previously, Debreate did not provide any sort of list of distribution names to select from. In 0.7.13, it scans the system at launch for files containing distribution information & attempt to extract names for selecting. If any names are found, the Distribution text input area will have a drop-down box containing this optional list. If no distribution names could be found, only a text input will be shown.

A more extensive list can be cached from the menu Options ➜ Update dist names cache.

distcache-menu

Distribution Names Cache Menu

A dialog will open for options to create/update the cache file.

distcache-dialog

Distribution Names Cache Update Dialog

Pressing the Update Cache button will attempt to connect to select remote Debian, Ubuntu, & Linux Mint web pages & parse a number of distribution names. If any names are collected, the file .local/share/debreate/cache/distnames will be created & the list will be immediately updated on the Changelog page. Restarting the app may be required if Debreate did not find any distribution names when scanning at launch. Press the Preview Cache button to view the newly cached file’s contents.

distcache-preview

Cached Distribution Names Preview

If the cache file exists when Debreate starts up, it will load the list of names from it rather than scanning the system.

The reason that only three Linux OSes are supported is because they are currently the most popular of the Debian/Debian-based systems & parsing instructions are unique for each page.

Strip Binary Files

It is highly recommended, if not expected, that when releasing stable software, to strip any binaries of unnecessary symbols (such as debugging symbols). This makes the files smaller & puts less strain on end-users’ bandwidth when downloading/installing.

Debreate now has the option to perform stripping on detected ELF binary executables & shared objects (.so).

option-strip

Strip Binaries Option

This step is done during the build process, when all files are gathered into the staged (temp) directory before the final packaging.

Using the system command file on a binary file will tell you whether or not it has been stripped.

binary-not-stripped

Non-stripped ELF Executable

If Strip binaries is selected at build time, Debreate will use the system command strip to remove this extra information & slim down the final package.

binary-stripped

Stripped ELF Executable

Any previously stripped or non-ELF files will be unaffected.


Fixed Bugs

Config Corruption

While testing these new features a quite large bug had surfaced. When Debreate starts up, it checks for a configuration file in the user’s home directory (.config/debreate/config). If this file does not exist or is corrupted, a First Run message dialog will be displayed. After exiting the dialog the configuration file will be created/overwritten with default values.

The problem that was persisting was that Debreate was not appropriately checking an existing configuration for corruption. This either caused the app to misread some values or fail to launch.

Stripped Path Names

This was more of a mistake than a bug. The issue was that when adding a directory to the Files page file list, it would scan all files contained within the directory & its sub-folders & strip the files’ relative path. So, all files would be installed directly into the target directory.

Now Debreate preserves the relative path. If you add the folder /home/user/bar to target /usr/share/foo, the full directory layout will be preserved. So /home/user/bar/A/B/C will be installed to /usr/share/foo/bar/A/B/C, rather than /usr/share/foo/C.

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on Pinterest (Opens in new window) Pinterest
  • Print (Opens in new window) Print
  • More
  • Email a link to a friend (Opens in new window) Email
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Tumblr (Opens in new window) Tumblr
Like Loading...

Debreate 0.7.12

Posted by AntumDeluge on December 9, 2016
Posted in: Debreate, Software. Leave a comment

debreate64

Contents:

  • Description
  • Changelog
  • Links


It took longer than expected, but Debreate version 0.7.12 is here! And it is the biggest release yet. While working on the upcoming 0.8.0 release, many of the new changes & fixes were incorporated into the 0.7 line.

This is the first release to support the newer wx 3.0. Up until now, only version 2.8 had been supported. This had caused some frustrations with newer Debian/Ubuntu distributions because the deprecated 2.8 is no longer available in the default APT repositories.

Since Debreate 0.7.11, installation from a Launchpad PPA has been available. But manual downoads for installation & portable use are still available from the GitHub & SourceForge project pages.

I am very hopeful that this will be a popular release as I have put more time into testing & bug fixing than I have for any previous. This is also the first release to have code contributions from other developers.

Changelog:

• Fixes:
  ◦ Added fixed & updated modules from unstable branch
  ◦ Fix first run window not closing
  ◦ Fix opening projects from command line
  ◦ Fix problems with add/remove/delete in dependency list
  ◦ Fix progress dialogs cannot be cancelled
  ◦ Fix Quick Build
• Code Cleanup:
  ◦ Removed old/unused code & comments
  ◦ Removed some unused/deprecated modules & classes
• New Features:
  ◦ About dialog:
    ▪ Displays system information (Python & wxPython versions)
  ◦ Added manpage
  ◦ Command line:
    ▪ 'legacy': Forces wx 2.8 if available
    ▪ 'compile': Compiles Python source files (.py) into bytecode (.pyc)
    ▪ 'clean': Removes compiled Python bytecode from Debreate directory
    ▪ '-h|--help': Displays output of 'man debreate'
      ▫ installed: Uses default manpath
      ▫ portable: Uses sub-directory man/man1
    ▪ '-v|--version': displays Debreate version
    ▪ '-l=|--log-level=': sets the logger verbosity
      ▫ Value can be one of 'info|0', 'warning|1', 'error|2', or 'debug|3'
      ▫ Default level is 'error' (2)
    ▪ '-i=|--log-interval=': is reserved for 0.8.0 (currently does nothing)
  ◦ Logger added for outputting messages to text log
  ◦ Menu options:
    ▪ Enable/Disable tooltips (wx 3.0 only)
    ▪ Open logs directory in system file manager
      ▫ requires 'xdg-open' command
  ◦ Page Build:
    ▪ Option to install packages after build uses gdebi
      ▫ 'gdebi-gtk' or 'gdebi-kde' command required
  ◦ Page Changelog:
    ▪ New 'urgency' options 'medium' & 'emergency'
  ◦ Page Control:
    ▪ Added 'arm64' to architectures
  ◦ Page Files:
    ▪ File import progress dialog shows task count
    ▪ File list can be refreshed
      ▫ Updates missing files status & executable status
    ▪ Missing files marked by red-orange background
  ◦ Page Menu/Launcher:
    ▪ Optionally use custom filename for menu launcher
  ◦ wx 3.0 compatibility for newer systems
    ▪ wx 2.8 compatibility is retained
• Debreate Installation:
  ◦ Added Debian maintainer scripts for (un)installation
    ▪ postrm: Cleans up any residual files in /usr/share/debreate
  ◦ MIME type association for system "Open with..."
    ▪ .deb installation associates .dbp files (application/x-dbp)
    ▪ Icons for .dbp files added to Gnome icons directory
• Misc:
  ◦ Added/Altered some helper scripts for source management
    ▪ add-changes: adds new changes to changelog
    ▪ scripts_globals: contains variables for other scripts
    ▪ update-debian-changelog:
      ▫ Merges changes from changelog into debian changelog
    ▪ update-locale: scans source & updates .pot & .po gettext files
      ▫ Optionally compiles .mo binaries if 'compile' argument is used
    ▪ update-version:
      ▫ Set version information using 'INFO' file
  ◦ Added 'open', 'save', & 'preview' buttons to depends page
  ◦ License changed to MIT (see docs/LICENSE.txt)
  ◦ Merged new about dialog from 'unstable' branch
    Merged some modules from 'unstable' branch
  ◦ Replace some confirmation dialogs with ConfirmationDialog class
  ◦ Replace some selection controls with check boxes
  ◦ Scripts' text input areas are disabled when unchecked
  ◦ Show which required fields are empty in build dialog
  ◦ Use custom hyperlink controls
  ◦ Use GitHub URL to check for updates
  ◦ Use monospaced font for some multi-line text input fields
  ◦ Use Python modules in place of some system calls
  ◦ Wizard buttons disable on first & last pages
• Translations:
  ◦ Add Russian Gettext locale
  ◦ Update Spanish (es) Gettext locale

Links:

• Homepage
• GitHub project
• SourceForge project

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on Pinterest (Opens in new window) Pinterest
  • Print (Opens in new window) Print
  • More
  • Email a link to a friend (Opens in new window) Email
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Tumblr (Opens in new window) Tumblr
Like Loading...

Debreate

Posted by AntumDeluge on November 8, 2016
Posted in: Debreate, Software. Tagged: deb, debian, Linux, package, packaging, Software, ubuntu. 2 Comments

This is my first post about the software I created called Debreate.


CONTENTS:

  • What Is Debreate?
  • Upcoming Releases
  • What to Expect in the Future
  • How to Request Features or Report Bugs
  • Related Software


WHAT IS DEBREATE?:

Debreate is a utility designed to aid in packaging software & media for Debian & Debian-based Linux systems, such as Ubuntu & Linux Mint. It can be considered a GUI front-end for command line utilities like dpkg, & potentially more. But it does more than just run a packaging command. It organizes data & files into a staged directory tree, a required step before the back-end packaging utility can be run. It also allows data to be saved to project files & re-opened for editing. It provides a wizard-like interface & organizes the necessary input information into sections or pages, simplifying to potentially complicated process.

The project was started a few years ago while looking for a simple solution to creating Debian packages with a graphical user interface. I came across the project Packin, hosted at SourceForge. The software did what I wanted at the time. But as I got more into developing I wanted it to do more. Packin, however, did not seem to be actively developed. I had been trying to learn how to write code (or script) & decided this would be a good time to attempt my own project.

I wasn’t interested in learning Java (the language that Packin is written in). I had been dabbling in Python & decided to go with the wxPython toolkit since it was cross-platform (though this shouldn’t have influenced my decision at the time since Debreate was intended specifically for use on Debian Linux platforms) & used native widgets for most systems. wxPython wraps around the C++ library wxWidgets. I chose to have the project hosted on Sourceforge, perhaps one of, or the most, popular open-source software hosting sites at the time.

I took a break for a couple years, working on some other projects & things. I joined the Arianne Project & ended up learning some Java while working on the game Stendhal. This has probably turned out to be the most helpful experience I have had yet learning how to code.

After my break, I have resumed work on Debreate & am pretty excited about where it is going. While the project is still hosted on Sourceforge, I have migrated it over to GitHub, from where I now do most of the development. Moving to GitHub seems to have attracted the help of other developers. The site makes contributing to the projects of others very easy & enticing. After only a week or so after moving to GitHub, I already had a few offers & suggestions. Overseeing & critiquing contributions to my own projects is not something that is comfortable or comes naturally to me. But I am getting more used to it & am happy to say that there are others who have now contributed code to Debreate. Up until this point, there had been help with translations into different languages, but I had been the only code contributor (as far as I remember; I apologize if this is not the case).

I want to give a very big thank you to Hugo Posnic (Huluti) who created Debreate’s new homepage. I am not especially skilled at writing webpages, & managing a site is difficult as it is. But Hugo has used his excellent skills to create a modern page with more innovative features. This new design helps me worry less about posting updates to the site & focus more on the project itself.


UPCOMING RELEASES:

I am working on two upcoming releases. The first of which will be version 0.7.12 with some bug fixes & compatibility with wxWidgets 3.0. Plans are to release it within the next few days. This will likely, & hopefully, be the last release for the 0.7.x line.

The next release will be 0.8.0. I am more enthusiastic about this release & have probably put more time & testing into it than any other. It has many improvements & some new features (full changelog):

• Copyright templates generation (introduced in 0.7.11)
  ◦ Uses more directories for retrieving templates
    ‣ /usr/share/common-licenses (system licenses, previously the only templates used)
    ‣ Templates shipped with the app stored in its installation directory
    ‣ User-defined templates can be added to /home/[username]/.local/share/debreate/templates/licenses
      ▹ These templates take priority over those from the other searched directories
• Installation of license & changelog texts use a more Debian-like standard
  ◦ Changelog is compressed with Gzip
  ◦ License text is installed to the standard directory /usr/share/doc/[package]
• Project files are now stored in a compressed archive rather than a single text file
  ◦ Uses .dbpz file extenstion
    ‣ Projects can be compressed in multiple formats:
      ▹ Uncompressed (tar archive)
      ▹ Gzip compressed tar archive
      ▹ Bzip2 compressed tar archive
      ▹ XZ compressed tar archive
      ▹ Zip compressed archive
  ◦ Retains compatibility with reading legacy text format (.dbp)
• Projects MimeType association
  ◦ application/x-dbpz & application/x-dbp are now associated with Debreate
    ‣ While 0.7.12 supports association with the application/x-dbp, this actually started with 0.8.0 development
• Logging & debug log window
  ◦ Program logs to help with debugging are now stored in /home/[username]/.local/share/debreate/logs
  ◦ When logging level is set to “debug” a log window is displayed showing some output of the program
    ‣ The log window displays the output saved in the current log file
• Command line arguments now supported
  ◦ There was some support for this in earlier versions but has been improved
  ◦ Commands:
    ‣ legacy: Use wxWidgets 2.8 rather than 3.0
      ▹ This command will likely be removed & support for wx 2.8 dropped in the future
  ◦ Options:
    ‣ -v|--version: Displays Debreate version
    ‣ -h|--help: Displays help/manpage contents
    ‣ -l=|--log-level=: Sets logging level to one of the following
      ▹ info
      ▹ warning
      ▹ error (default)
      ▹ debug
    ‣ -i=|--log-interval=: Set the refresh rate for log window when debugging is enabled
      ▹ Higher value is lower frequency
      ▹ Default is 1
  ◦ Input project file
    ‣ The last argument supplied, if not an option, is assumed to be a Debreate project file or archive
    ‣ Project files are loaded from an argument just as would be from the File → Open menu

Recently, I have also created a PPA on Launchpad for distributing future releases. It’s possible that I will move the releases into a more general PPA & delete the one specific to Debreate.


WHAT TO EXPECT IN THE FUTURE:

I plan to have many more changes in the 0.8.x line, one of which will be the option to create man pages for a package. Development to implement this has already been started & a “Man Pages” page can be previewed if Debreate’s log level is set to “debug”. Currently the page is useless & does nothing in the final build.

It is also planned to be able to create multiple menu launchers (a.k.a. .desktop files) for a single package.

One of my most desired features is to be able to use Debreate to create Debianized source packages. While creating binary .deb packages is great & useful, it does no good if a developer wants to get a package into an official Debian/Ubuntu APT repository or Personal Package Archive (PPA) hosted on Launchpad. Debian source packaging takes a fairly different road altogether & is a bit more complex. As it was with me, it can be quite daunting to a new developer/packager. The task to create a binary package from source can be part of the Debianization process. Currently, Debreate does not use this method. It works purely with binary data & a simple packaging command to create .deb packages. One of my greatest hopes behind Debreate is to make developing & packaging for Linux distributions more appealing to software developers. I am hopeful to have this feature implemented in the 0.8.x lineup or begin 0.9.0 with it.

Another thing I am hopeful for is to make Debreate usable on platforms that are not Debian-based. Theoretically, it is already possible to use it on FreeBSD, since the OS supplies a version of dpkg in its Ports & Packages repositories. I would like to make use of various packaging methods to allow the software to be used on systems that do not supply Debian packaging utilities. One possible method would be to use or supply a custom version of the Unix archiver (ar), which is the actual format used in binary .deb packages. Unfortunately though, there are some complications. The ar format has never been standardized, which has resulted in different variations. This has created incompatibilities between versions. These incompatibilities are present in Debian & derived systems. The ar archiver supplied by Debian (& apparently most Linux systems) is a GNU derivative, while the dpkg utility uses a format similar to that of the BSD variant.

References:

• Debian forum thread on .deb built with dpkg vs with ar
• FreeBSD ar format manpage
• Descriptions of BSD & GNU variants on Wikipedia
• Wilmer van der Gaast's post about .deb files


HOW TO REQUEST FEATURES OR REPORT BUGS:

Debreate is hosted at SourceForge & GitHub.

Use the following links to request features or create bug reports:

• SourceForge:
  ◦ Feature requests
  ◦ Bug reports
• GitHub:
  ◦ Issues


RELATED SOFTWARE:

• Deb-Creator
• Deb-o-Matic
• DebianPackageMaker
• Packin
• Ubucompilator

More on alternativeTo.net

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on Pinterest (Opens in new window) Pinterest
  • Print (Opens in new window) Print
  • More
  • Email a link to a friend (Opens in new window) Email
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Tumblr (Opens in new window) Tumblr
Like Loading...

Rooting Motorola Moto E LTE 2nd Generation (XDA video)

Posted by AntumDeluge on June 1, 2016
Posted in: Android, OS, Tutorials, Uncategorized. Leave a comment

This guide is for the 2015 Motorola Moto E LTE (2nd generation), not the Moto E (1st generation).

(work-in-progress: steps in text to come)

!!!WARNING!!!

Rooting the Motorola Moto E LTE will COMPLETELY wipe the data from your phone. Please back up anything that you want to save.


INDEX:

  1. Prerequisites
  2. Unlocking the Bootloader
    1. Enable Developer Options & OEM Unlocking
    2. Download the Recovery
    3. Boot Into Bootloader Mode
  3. Install TWERP
  4. Root the Device
  5. Examine New Kernel
  6. Remove “BOOTLOADER UNLOCKED” Warning (optional)

PREREQUISITES

  • TWRP Recovery Image
  • SuperSU flashable zip file (or similar super user software)

UNLOCKING THE BOOTLOADER:

!!!WARNING!!!

Unlocking the bootloader will completely wipe the data from the device.

Enable Developer Options & OEM Unlocking

The first step is to enable “OEM Unlocking” in the developer options. Open the “Settings” app & scroll to the bottom. If “Developer Options” is not visible, select “About Phone”, then scroll down & tap “Build Number” seven times until the message “You are now a developer” appears. Go back to the main settings page & select “Developer Options”. Select to enable the options “OEM Unlocking” & “USB Debugging” (or “ADB Debugging”).

Download the Recovery

The TWRP recovery can be downloaded from the following pages:

Official Surnia Builds

Squid’s Surnia Builds

In the past, there had been errors in the official builds that failed to mount/unmount the system partition & made flashing some software impossible. If this is the case, try using one of the Squid builds.

Boot Into Bootloader Mode

Note: These instructions can be found on Motorola’s “Unlock My Device” page.

Boot into the bootloader/fastboot mode by shutting down the device and restart it by holding down the volume down and the power button.

Connect the phone to your computer with a USB cord.

Open a command prompt & enter the following command to get the unlock code:

$ fastboot oem get_unlock_data

The output will look something like this:

(bootloader) 0A40040192024205#4C4D3556313230
(bootloader) 30373731363031303332323239#BD00
(bootloader) 8A672BA4746C2CE02328A2AC0C39F95
(bootloader) 1A3E5#1F53280002000000000000000
(bootloader) 0000000

On Apple OS X it will look like this:

INFO0A40040192024205#4C4D3556313230
INFO30373731363031303332323239#BD00
INFO8A672BA4746C2CE02328A2AC0C39F95
INFO1A3E5#1F53280002000000000000000
INFO0000000

Copy the five lines together to make one single line, removing “(bootloader)” or “INFO” so that it looks like this:

0A40040192024205#4C4D355631323030373731363031303332323239#BD008A672BA4746C2CE02328A2AC0C39F951A3E5#1F532800020000000000000000000000

To get the unique unlock key, follow the instructions on the Motorola “Unlock my Device” page until you are prompted for the previous string. Paste the string into the input field & select “Can my device be unlocked”. Scroll to the bottom of the page, select “I Agree”, then “REQUEST UNLOCK KEY”.

With your phone back in bootloader/fastboot mode, copy the unique unlock key & enter the following in the command line:

$ fastboot oem unlock [unique-key]

Where “unique-key” is replaced with the unique unlock key previously acquired.

The phone can now be rebooted. The default boot logo will now be replaced by a “bootloader unlocked” warning.


INSTALL TWERP:

$ fastboot flash recovery [recovery-image-file]

If the recovery image is named “twrp-3.1.0-0-surnia.img”, use the following:

$ fastboot flash recovery twrp-3.1.0-0-surnia.img

Press the volume up or down button until “Recovery” is displayed. Press the power button to reboot the phone into recovery mode.

Note: If you do not wish to overwrite the stock recovery partition, it is not required to flash TWRP. You can boot into TWRP recovery without flashing using the following command:

$ fastboot boot [recovery-image-file]

The phone will restart & boot into the TWRP recovery.


BOOT INTO TWERP RECOVERY:

From the bootloader, press the volume-up or volume-down button until “Recovery Mode” is displayed. Press the power button & the device will reboot into the recovery.


ROOT THE DEVICE:


EXAMINE NEW KERNEL:


REMOVE “BOOTLOADER UNLOCKED” WARNING (optional):

Reboot the device into the bootloader.

$ fastboot flash logo [logo-image-file]

So, if the logo file is named “logo.bin”, do:

$ fastboot flash logo logo.bin

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on Pinterest (Opens in new window) Pinterest
  • Print (Opens in new window) Print
  • More
  • Email a link to a friend (Opens in new window) Email
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Tumblr (Opens in new window) Tumblr
Like Loading...

How to Preview & Change Plymouth Bootsplash Under X11/Unix Desktops

Posted by AntumDeluge on April 6, 2016
Posted in: Uncategorized. 3 Comments

What Is Plymouth?

Plymouth is a bootsplash/bootscreen for Unix operating systems, much like usplash (deprecated), xsplash, Splashy (deprecated?) and fbsplash.

Previewing Current Theme

_khAttAm_ has written a shell script, called PLYMOUTH-PREVIEW, to enable viewing the current Plymouth theme without the need to restart the system. To use the preview the Plymouth X11 interface must be installed. On Debian/Ubuntu based systems install the package plymouth-x11.

$ sudo apt-get install plymouth-x11

Now create an empty text file/script and name it whatever you want. I will simply call it “plymouth-preview” in this example. Add khAttAm’s script:

#!/bin/bash

## Preview Plymouth Splash ##
##      by _khAttAm_       ##
##    www.khattam.info     ##
##    License: GPL v3      ##

chk_root () {
  if [ ! $( id -u ) -eq 0 ]; then
    echo Must be run as root
    exit
  fi
}

chk_root

DURATION=$1
if [ $# -ne 1 ]; then
  DURATION=5
fi

plymouthd
plymouth --show-splash
for ((I=0; I<$DURATION; I++)); do
  plymouth --update=test$I;
  sleep 1;
  done;
plymouth quit

Now make the script executable:

$ chmod +x ./plymouth-preview

The script must be run as a Superuser:

$ sudo ./plymouth-preview

It accepts one argument for the duration (in seconds) that the preview should run. 5 is default:

$ sudo ./plymouth-preview 10

For more information on previewing Plymouth manually see the Ubuntu wiki page.

Changing Themes

Use the plymouth-set-default-theme command to view and change themes. On Debian systems the executable is located under /usr/sbin, so it should be executed as a Superuser. With no arguments, it will simply show the current theme. Use the –list (-l) option to show all available themes:

$ sudo plymouth-set-default-theme --list
details
fade-in
glow
joy
lines
script
solar
spacefun
spinfinity
spinner
text
tribar

To set the current theme, simply add the theme name as the last argument. The initramfs must be rebuilt after the change. To do this automatically use the –rebuild-initrd (-R) option. Otherwise you will have to run sudo update-initramfs -u afterwards.

$ sudo plymouth-set-default-theme -R solar

NOTE: Rebuilding initramfs is not necessary for running the preview, but must be done for the Plymouth theme to be updated for the boot process.

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on Pinterest (Opens in new window) Pinterest
  • Print (Opens in new window) Print
  • More
  • Email a link to a friend (Opens in new window) Email
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Tumblr (Opens in new window) Tumblr
Like Loading...

How to Deal With an Unhealthy INFP

Posted by AntumDeluge on February 11, 2016
Posted in: Personality, Psychology. Tagged: David Keirsey, Feeling, INFP, Introversion, Intuition, Isabel Briggs Myers, Keirsey, Keirsey Temperament Sorter, KTS, MBTI, Myers-Briggs, Myers-Briggs Type Indicator, Perception, Personality, Psychology. 1 Comment

According to my results from tests based on the Myers-Briggs Type Indicator and the Keirsey Temperament Sorter, I am an INFP-type personality (Introverted, Intuitive, Feeling, Perceiving). Since I learned about my personality type, I have done a bit of searching around for information on it. I especially appreciated one blog post that I came across. I felt much of what was expressed fit me very well and I wished that more people understood those things about me.

This is a re-post of the original blog entry, How to deal with an unhealthy INFP by Victoria Rose.

Tuesday, June 9, 2015

How to deal with an unhealthy INFP

So I have seen some posts about how to help an unhealthy INFP and as I am an INFP myself I thought I would give my two cents. Especially because there were some things I didn’t agree with. I’m not an expert on this and I am simply speaking for myself here in the hope that some other INFPs will relate. And of course, no two INFPs are the same.

First of all, I said ‘ deal with’ rather than ‘help’ for a few reasons. INFP’s are generally – or at least deep down on the inside – vulnerable, emotional and self conscious people. This sensitivity means we are going to have our low points – a lot. These low points can be really clear and concerning to others, or it could be more subtle as it fluctuates. Basically these low points are inevitable – regardless of the form they take. INFPs can also be quite stubborn and distant when unhappy so any attempt to help will be in vain and leave you feeling frustrated. Rather than trying to ‘help’ them so you can fix them, I advise that you simply acknowledge and accept them as they are. Know that eventually it will pass, but it’s vital also to remember that it will return again at any point. (This of course does not apply if you are seriously concerned for their mental health in which case you should encourage them to seek professional help). 

Words that best describe unhealthy me:

  • Moody (grumpy/serious and/or mood swings – cannot take pleasure in things the way I do when I’m healthy)
  • Stubborn
  • Easily frustrated (can get unnecessarily angry about things that would not usually effect healthy me)
  • Forgetful (about physical possessions and events in mine and friends lives)
  • Disregard for physical possessions (Messy room – like REALLY messy, dirty clothes, un-organised uni books etc)
  • Distant, guarded, quiet, private (to a point where I can come off as cold and unfriendly)
  • Fatigued, sleep-deprived.
  • Uncaring and self-centred (it’s all still there deep down inside but it’s hard for me to focus on external things when I’m unhappy/tired)
  • Lost sense of humour.

Sometimes these things don’t shine through as I can still act interested or like I find something funny even if I really don’t.

For me personally some signals that I’m probably stressed and unhappy include: losing personal possessions/leaving things behind more often and getting sick, always tired.

What to do:

  1. Give me space. I mean this in the most literal way possible. When I’m not doing good the last thing I need is someone being close in proximity or trying to be physically affectionate (healthy me is the opposite as I do not ever feel comfortable expressing affection in words and prefer to opt for hugs and close proximity). Sometimes great hugs can feel relieving, but generally speaking – unless I’ve got the hots for you – don’t touch me (please and thank you). I need to be left alone completely. If you want to contact me – use social media and I will respond if I want to. Please do not demand attention or affection from me. This ties in a lot to the way I become distant and quiet when unhealthy. I cannot explain why I feel any of these ways, but I do and I need space to combat it. I am usually guarded with everyone except for my closest friends and family, but when unhealthy I become distant to everyone. It will pass. Like a cat, you need to wait for me to come to you on my own terms.
  2. Patience. I’m just going to apologise for this one. Sometimes I will be self-centred and even though I’m thinking of them, I will not show support, care or friendship for those I care about and their struggles. I will be stubborn, short-tempered and probably quite irritating. All of which I am sorry for. (But also if you keep your distance you probably won’t have to deal with this as much).
  3. Don’t use guilt. Please don’t make me feel guilty for not being affectionate, social, interested or open. Guilt is like poison to me and will eat away at my insides and will definitely not improve anything. I cannot help the way I feel, nor do I want to feel this way but I do and you need to let me breathe.
  4. If you are frustrated be open and honest. One of the things I hate most is passive aggression. It makes me furious. (Surprisingly a lot of posts have described unhealthy INFPs as being passive aggressive which astonishes me. I cannot imagine ever being passive aggressive. I internalise and do not tend to let my anger out or show people when I am annoyed with them. I am more likely to be blunt and honest – if provoked – than passive aggressive. Or I will vent to a friend. I cannot be passive aggressive or tell people what I think to their face because it feels cruel and unnatural. It is just not possible for me. My anger goes deep down inside and then explodes later when my anger bank is full). Find a time to speak to me gently about what is on your mind and I am 10x more likely to listen and take it on board.

That’s it for now. We are all complex beings and even this lengthy post doesn’t really do me justice.
If you relate to this please let me know. If you need more help dealing with someone like this feel free to ask me things. IF YOU DISAGREE/DO NOT RELATE AS AN INFP LET ME KNOW BECAUSE I AM CURIOUS.

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on Pinterest (Opens in new window) Pinterest
  • Print (Opens in new window) Print
  • More
  • Email a link to a friend (Opens in new window) Email
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Tumblr (Opens in new window) Tumblr
Like Loading...

Add New Facebook Chat Protocol to Pidgin

Posted by AntumDeluge on July 13, 2015
Posted in: Tutorials. Tagged: chat, facebook, im, instant messaging, libpurple, Multi-Platform, network, pidgin, purple-facebook. 25 Comments

(updated 2017-01-11)

Contents

    • Description
    • Building and Installing purple-facebook
      • Dependencies
      • Windows
        • Pre-built DLL
        • MinGW/Cygwin/GCC/Clang Compilers
        • Microsoft Visual Studio
      • Unix/Linux/BSD
        • Debian-based: Installing .deb via APT repository
        • Fedora-based: Installing .rpm via DNF repository
        • openSUSE-based: Installing .rpm via YaST repository
        • Compiling Source Code
      • Apple
        • Clang Compiler
        • Apple Xcode
    • Facebook Account Setup
    • Links

Description

Recently Facebook dropped the XMPP/Jabber protocol login, which could be used with Pidgin Instant Messenger, for communicating via Facebook Chat. Facebook now uses its own protocol as of version 2.0 of the Facebook API. This might be disappointing as Pidgin can now no longer be setup for use to communicate via Facebook Chat by default. There is however, thanks to James Geboski, a plugin available that allows libpurple (part of Pidgin) to connect to the new Facebook protocol. It is called purple-facebook and it works quite well.

Building and Installing purple-facebook

Dependencies:

Before the plugin can be built, some development libraries that it links to must be installed. purple-facebook requires GLib, JSON-GLib, libpurple, and zlib (libz). Most Unix-like systems (Linux, BSD, etc.) will have these available in their software repositories usually accessible via a package manager. Some system maintainers package the development files separate from the actual libraries. The development files need to be installed along with the libraries. On Debian based systems, for example, these packages are usually suffixed with “-dev“.

You can download the latest source code for each dependency from the following locations if you are planning on manually compiling them:

  • GLib
  • JSON-GLib
  • libpurple (included in Pidgin source)
  • zlib (Sourceforge mirror)

Windows

Pre-built DLL:

The purple-facebook project provides a pre-built plugin (DLL) for download and installation on Win32 systems (64-bit builds currently not available as of writing this). There are some other dependencies required to run the plugin correctly. The only file that you should need to download that does not come with Pidgin is JSON-GLib. The purple-facebook GitHub project provides a pre-built DLL for Win32. Download the DLL and place it in either a directory located on your system’s PATH or in Pidgin’s installation directory (usually C:\Program Files\Pidgin or C:\Program Files (x86)\Pidgin for 64-bit systems).

Then download the latest pre-built purple-facebook plugin, called libfacebook.dll, from the GitHub releases page (NOTE: Pre-built DLL not always up to date with latest release). Place the DLL in Pidgin’s plugin directory. C:\Program Files\Pidgin\plugins on 32-bit systems, and C:\Program Files (x86)\Pidgin\plugins on 64-bit systems.

Instructions can also be found on the GitHub wiki page.

MinGW/Cygwin/GCC/Clang Compilers:

Building the plugin on Microsoft Windows should be similar to the instructions for Unix if you are using a Unix-like environment, such as MinGW or Cygwin, in combination with a compiler such as GCC or Clang. If pre-built library dependencies are not available they will have to be downloaded from the host websites and compiled from source manually.

Microsoft Visual Studio:

(instructions for Microsoft Visual Studio not available)

Unix/Linux/BSD

Package repository list & contents for multiple systems can be viewed in the OpenSuse repsitories downloads.

Linux (Debian-based): Installing .deb via APT repository:

An APT repository is now maintained for installing purple-facebook directly from a Debian/Ubuntu/Linux Mint package manager.

Add the following to your /etc/apt/sources.list file, substituting “[dist]_[version]” with desired distribution name & version (e.g. xUbuntu_16.04, Debian_8.0). A list of available repository sources, & more instructions, can be found on jgeboski’s GitHub page:

deb http://download.opensuse.org/repositories/home:/jgeboski/[dist]_[version] ./

Execute the following to add the public key:

# wget -O - https://jgeboski.github.io/obs.key | apt-key add -

If you are not in a root shell, use sudo apt-key add –.

(NOTE: On my system, after invoking the previous command, it showed the output of wget, but then just a blinking cursor. The prompt for my sudo password had been muted. So I entered my password & hit “Enter” & it completed successfully.)

Then update the repository cache & install purple-facebook package:

# apt update
# apt install purple-facebook

or

# apt-get update
# apt-get install purple-facebook

Linux (Fedora-based): Installing .rpm via DNF repository:

(I have not tested this)

For newer Fedora systems, use the following command to add the purple-facebook repository to your system, substituting “[version]” with your Fedora version (at time of writing only repositories for Fedora 22 & 23 are available):

# dnf config-manager --add-repo http://download.opensuse.org/repositories/home:/jgeboski/Fedora_[version]/

More detailed instructions for adding a DNF repository can be found on the Fedora System Administrator’s Guide.

Users with systems older than version 22 will probably need to install DNF via the yum package manager (I believe that DNF can read yum repositories, but I’m not sure about vice versa):

# yum install dnf

Repositories for Fedora systems older than version 22 are not available. So you will have to try one of the newer repositories & see if it is compatible with your system.

Linux (openSUSE-based): Installing .rpm via YaST repostory:

I don’t have any experience installing packages on openSUSE systems. But instructions for adding repositories can be found on the openSUSE wiki which might help in installing purple-facebook (at time of writing, repositories for 13.1, 13.2, Leap 42.1, & Tumbleweed are available).

Compiling Source Code:

Get the latest source code from the GitHub project’s releases page. It can be downloaded as a tarball or zip archive. Extract the contents of the archive, open a command line/terminal and change to the directory of the extracted source code. If you downloaded the latest unstable version you will need to run the command ./autogen.sh  from the source’s top-level directory to create a configure script and Makefile. If you downloaded a release version the configure script should already be available in the to-level directory. Run the command ./configure to generate the Makefile. If all dependencies are installed correctly there should be no errors. Now run make to build the plugin files. If the plugin builds correctly you can execute make install which will install the files libfacebook.so and libfacebook.la to the directory /usr/lib/purple-2, or wherever the libpurple plugin directory is located on your system.

Apple

Clang Compiler:

Building the plugin on Apple OS X should be similar to the instructions for Unix if you are using the Clang compiler from a command line/terminal.

Apple Xcode:

(instructions for Apple Xcode not available)

Facebook Account Setup

Once the plugin is installed restart Pidgin. Go to Accounts ➜ Manage Accounts (or press Ctrl-A on the keyboard). Click Add….

pidgin-accounts

Pidgin Accounts

Under “Protocol” put “Facebook” (not “Facebook (XMPP)“). Under “Username” put your Facebook username, email address, or phone number used by your account. Under “Password” put your Facebook password and check “Remember password” if you want it to automatically log in whenever Pidgin starts. “Local alias” is optional. Then click Add.

pidgin-add-account

Pidgin Add Account

If you previously set up Facebook chat using XMPP, under the “Manage Accounts” window you can highlight the account and click Modify. Under “Protocol” change “XMPP” (or “Facebook (XMPP)“) to “Facebook“. Remove the “@chat.facebook.com/” from your username if it exists. Then click Save. You should now be able to communicate with your Facebook friends via Pidgin.

Links

James Geboski:

    • Facebook
    • GitHub
    • Google+
    • Launchpad
    • Twitter

Purple-facebook:

    • GitHub project page

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on Pinterest (Opens in new window) Pinterest
  • Print (Opens in new window) Print
  • More
  • Email a link to a friend (Opens in new window) Email
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Tumblr (Opens in new window) Tumblr
Like Loading...

Posts navigation

← Older Entries
  • Search this Blog

  • Follow AntumDeluge on WordPress.com
  • Enter your email address to follow this blog and receive notifications of new posts by email.

  • Recent Posts

    • Enabling Numlock with System Startup
    • Export/Save All Open Images In GIMP
    • How To Enable Git Tab Completion In Bash On Mac OS X
    • Debreate: One More for 0.7
    • Debreate 0.7.12
  • Archives

    • April 2023
    • December 2017
    • January 2017
    • December 2016
    • November 2016
    • June 2016
    • April 2016
    • February 2016
    • July 2015
    • July 2014
    • February 2014
    • January 2014
    • August 2013
  • Categories

    • Psychology (1)
      • Personality (1)
    • Software (4)
      • Debreate (3)
      • Graphics (1)
        • GIMP (1)
    • Tutorials (14)
      • Multimedia (5)
      • OS (8)
        • Android (2)
        • BSD (3)
        • Linux (2)
        • OS X (2)
        • Windows (2)
    • Uncategorized (3)
  • Meta

    • Create account
    • Log in
    • Entries feed
    • Comments feed
    • WordPress.com
  • RSS Stendhal Trade Offers

    • New offer for 1 black shield at 100000. Stats are (DEF: 168 LIGHT: 80% DARK: 104% MIN-LEVEL: 200).
    • New offer for 1 aventail at 660. Stats are (DEF: 6 MIN-LEVEL: 10).
    • New offer for 1 stone cloak at 1700. Stats are (DEF: 13 FIRE: 125% ICE: 125% MIN-LEVEL: 18).
    • New offer for 1 katana at 1000. Stats are (ATK: 15 RATE: 4 MIN-LEVEL: 20).
    • New offer for 1 scimitar at 700. Stats are (ATK: 14 RATE: 4 MIN-LEVEL: 10).
    • New offer for 1 night dagger at 50000. Stats are (ATK: 2 [DARK] RATE: 1 MIN-LEVEL: 50).
    • New offer for 1 mainio shield at 50000. Stats are (DEF: 148 MIN-LEVEL: 50).
    • New offer for 1 elvish sword at 1000. Stats are (ATK: 16 RATE: 4 MIN-LEVEL: 25).
    • New offer for 1 steel boots at 600. Stats are (DEF: 6 MIN-LEVEL: 5).
    • New offer for 1 shadow cloak at 4800. Stats are (DEF: 19 LIGHT: 71% DARK: 125% MIN-LEVEL: 55).
Blog at WordPress.com.
AntumDeluge
Blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • AntumDeluge
    • Already have a WordPress.com account? Log in now.
    • AntumDeluge
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
Loading Comments...
%d
    Design a site like this with WordPress.com
    Get started