Monday, September 30, 2019

Gentoo

It has been a long time since I have blogged on this and a lot has changed.  A little over a year ago I finally got fed up with Slackware.  It has been lagging behind too much with updates and I was spending more time trying to update core packages just to get an application compiled, than I was spending time doing anything else.  A lot has changed in linux over the years.  There are a lot of developers and projects move much faster now.  Slackware although "stable" is lagging behind quite considerably in my opinion and running -current was getting annoying with breakages.  So, I dumped Slackware completely.  I tried ArchLinux for a little, but it was not to my liking.  I enjoyed pacman but unfortunately the distribution just wasn't working out for me the way I wanted.  Then I looked at openSUSE.  I have played with it on and off for many years and wanted to give it another go.  I gave it a good full month or two but again, it just was not a good fit for me.  So I took a look at Gentoo and immediately found this is the distribution for me.  I have been running Gentoo on four boxes for about a year now.  Even my server is now on Gentoo after dumping Slackware.  The downside of Gentoo is, you have to compile EVERYTHING.  That means if you have QT5 in your makefile, it can be a total PITA.  Other than that.  I have so far enjoyed my switch and have been wondering why I waited so long to move.  The problem with Slackware is everything is controlled by one person.  Linux is just too huge these days for one person to track everything.  It needs a team of people, but I do not see this happening anytime soon or ever.  Gentoo certainly has a learning curve, Portage still has a lot of things I do not yet know.  I have tried to write a few build scripts but I really have no idea what I am doing.  It took me longer than I wanted to understand the whole make.conf logic, but once I figured that out it made a ton of sense.  The Gentoo wiki is heavily outdated, which is a downside, the community does not seem too concerned with keeping their wiki site up to date.  But like every other linux community they are full of narcissism and egos, so, not much we can do about the whole anti-social aspect of the geek world.  If I remember, I will post my Gentoo notes.

Saturday, May 2, 2015

XFCE 4.12 workspace-switcher wrap

The new XFCE 4.12 came with some very annoying new default changes that are only switchable through hidden configurations.  I have no idea why the devs decided it was a good idea to change how things have worked in the past and leave us with no easy method of switching it back.  It is this kind of update behavior from developers which makes me seriously contemplate switching to a different project.  After a week of trying to figure out how to fix this one rather simple annoyance, I finally found the answer.

You use to be able to wrap switch virtual desktops with the mouse from both the desktop and while your mouse is hovered over the Workspace Switcher panel.  For some reason wrapping is now disabled by default while the mouse is over the Workspace Switcher panel, but not when the mouse is on the desktop.  To fix this read below.

First we need to open our panel preferences (right click on your panel go to Panel --> Panel Preferences.

Click on the items tab (if you have more than one panel you will need to select the the panel that your workspace switcher is on from the panel dropdown menu on top).

Hover your mouse over the 'Workspace Switcher' icon.  A description will appear.  Make a note on which pager number it lists.  Mine is Pager-2 on Panel 1.  I also have a second Workspace Switcher on Pager-22 on Panel 2.

Now close out of your panel preferences and open a new terminal.

In your terminal type this command:

  %: xfconf-query -c xfce4-panel -p /plugins/plugin-2/wrap-workspaces -s true --create -t bool

**Notice the section that says 'plugin-2'  change that number to the pager number we just located.  Again mine is 2 and 22.  Do this command for each workspace switcher you have on your panel(s).

No X restart should be necessary.

Tuesday, December 16, 2014

iPhone 5c S/MIME and openssl

I just got an iPhone 5c (my very first iOS product) and wanted to send emails with key signing and possibly encryption.  Unfortunately it looks like Apple decided against using PGP or GPG and instead went with S/MIME.  Oh well, I had to create a  new pair of keys, but that is where my problems started.

The iOS platform is very particular when it comes to using S/MIME keys for signing and encrypting.  I shall outline the steps I went through to get this working on my device.

** As a side-note I will add that I spend about 3 hours online with Apple tech support, speaking to three separate managers and one person that works with enterprise.  They were all very 'Amazed' that I was able to figure this out, because they really had no idea how to help me out since I do not own any other Apple products. **

Step one:
Set up your email account on the iOS device and make sure it is working (sending and receiving email).

Step two:  edit your openssl.cnf file
  %: su
  %: vi /etc/ssl/openssl.cnf

Scroll down to where it says [ usr_cert ] and make sure your section looks like mine:

[ usr_cert ]
basicConstraints=CA:FALSE
nsCertType = client, email
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
nsComment = "OpenSSL Generated Certificate"
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer
subjectAltName=email:copy
extendedKeyUsage = emailProtection

Step three: Create your S/MIME keys (follow all prompts)
On slackware linux open a terminal session and create a new directory
  %: mkdir ~/smime
  %: cd ~/smime
  %: openssl genrsa -des3 -out cert.key 4096
  %: openssl req -new -key cert.key -out cert.csr
  %: openssl x509 -req -days 36500 -in cert.csr -signkey cert.key -out client.crt -extfile /etc/ssl/openssl.cnf -extensions usr_cert
  %: openssl pkcs12 -export -in cert.crt -inkey cert.key -out client.pfx -name "Your Name" -CAfile client.crt -caname "Your CA Name"

Step four:
Email the client.pfx file to yourself (preferably to the email address that you can access on your iOS device)

Step five:
Open the email on your iOS device and click on the client.pfx file.  Follow the on screen instructions to install your key which you can view at Settings --> General --> Profiles

Step six:
On your iOS device go to Settings --> Mail, Contacts, Calendars --> --> Account --> Advanced

Scroll to the bottom and enable S/MIME
Click on Sign
Slide Sign to Green for enabled.

If you get a message that says "No valid certificates found" you probably missed a step in your key creation.  Please go back and try again.  It took me about 4 hours to figure out how to get my iPhone to realize I do in fact have a valid certificate.

** Note **
You do not need to slide the 'encrypt by default' to green in order to send an encrypted email.  When you compose a new email, if you click on the persons name you wish to send to, there will be a lock key icon.  Clicking that icon to close it will attempt to send an encrypted message but YOU MUST HAVE A COPY OF THEIR KEY TO SEND AN ENCRYPTED MESSAGE TO THEM.  You do not need anyone else's key to sing an email, but you do need their public key to send them an encrypted message.  If you do not have their key you will be given an error message.

Wednesday, July 10, 2013

Display the Moon current phase as wallpaper

I have this working on my second display in xfce4

Place this in your ~/.xinitrc file

########################################################################
##  Start xfce Desktop Environment                                    ##
########################################################################
while true; do xplanet -body moon -geometry 1024x768 -background /home/username/.xplanet/stars/stars_custom.png -glare 0.001 -output /home/username/Wallpaper/moon.xplanet.jpg -num_times 1 && /usr/bin/xfdesktop --reload; sleep 45m; done &

After you paste that, go into your xfce settings manager and tell xfce to use the jpg as a wallpaper (if it does not exist yet, run that command once in a terminal session so it can generate the file.

Note... Set the geometry to your monitor's value.  The background file will not exist on your computer, if you want a background I suggest googling around a bit to find a background image you like (you do not need a background if you prefer no background image then you can remove that section of the code).  Then edit that image so it is exactly the geometry of your display.  The -glare 0.001 option kills the glare render during new moon and full moon.  Trust me, you will want this unless you like seeing a very bright yellow glare for a few hours during full and new moon cycles.

For the moon body to work in xplanet, you will first need to download a moon map.  Xplanet does not ship with moon maps... I have no idea why, it comes with almost every other planet and Sattlite in our solar system.  Google around for the xplanet moon map.  (if anyone finds a Deathstar map please let me know.  I actually want one of the second incomplete deathstar).

(The above command is a single line command, copy paste on this blog may have added some hard returns).
**MAKE SURE YOU REPLACE 'username' WITH YOUR ACTUAL USERNAME**

Wednesday, June 5, 2013

Add all KDE crap to slackpkg blacklist

First, we will backup our blacklist file:
cp /etc/slackpkg/blacklist /etc/slackpkg/blacklist.old

Mount your slackware install dvd/cd/usb

Navigate to the slackware directory on the install media (you need to be inside the directory that has all the package sets a, ap, d, e, n... etc...)

Then, as root issue this command:

\ls kde | grep '\.t.z$' | rev | cut -d- -f4- | rev >> /etc/slackpkg/blacklist

note the '\' it is *NOT* a type-o!  this will add all the packages inside the kde directory to the bottom of your blacklist file.

Monday, March 25, 2013

Making your user use dmesg again


[06:49:52]  eh, the dmesg thing is a change that happened between 13.1 and 13.37. I personally put it back the way it was, by putting "kernel.dmesg_restrict = 0" in /etc/sysctl.conf

Thank you Urchlay from ##slackware on irc.freenode.com

Thursday, March 7, 2013

Jpilot on Slackware

The Slackbuild readme is missing some key information that is very simple to add (not sure why the maintainer failed to post this as Jpilot is useless without it).

For your user to sync a palm device it must first be added to the dialout group

Second, you may need to edit the preferences in Jpilot:

File --> Preferences --> Settings
   Click the drop-down menu 'Serial Port' and select usb: (if you are using a usb device like I am)
   Click the drop-down menu 'Serial Rate' and select anything 19200 or lower (the higher serial rates may not work, if you are getting problems keep lowering the serial rate, some have reported that 9600 is the highest they can use.  I am able to use 19200, experiment with your system)
   Click Ok

Now for the sync part.  DO NOT click the sync button on Jpilot first!!!!  It will not sync.  You must first click the sync button on your Palm cradle or from the palm hotsync app on your device FIRST, then click the sync button on Jpilot.

Same for when trying to do a backup.

Now that jpilot works for your user, you will probably just buy an overpriced iPhone POS or an ultra buggy crash happy android device.  I warn you, you are just wasting your time with that crap.  Keep your palm, or give it to me!

Friday, September 14, 2012

Saturday, August 25, 2012

Find working process on a mounted device

fuser -m /any/mounted/dir should give you whatever processes could still be active on the mounted device.

Tuesday, July 31, 2012

Mass Resize Photos

mogrify -resize 35% -quality 50% _MG*.JPG
mogrify -rotate -90 _MG*.JPG

Sunday, July 8, 2012

Blogilo 1.1

Blogilo 1.1 Blogger testing Using any hard returns will result in a posting error due to the xml parsing, this now makes Blogilo impossible to use with blogger. Some punctuation also results in an error.

Truecrypt User Mount

If you have truecrypt and want to mount a volume using the gui, you will notice that it requires root access to mount.  Here is how to use the gui to mount and unmount volumes as a user:

First we need to create a group which will have all the permissions required for our users to mount and umount volumes

Login to a shell as root and type the following commands:

groupadd truecrypt

now we need open the visudo file and add permissions for the truecrypt group to work:  (I added the line to the bottom of the file)

visudo

# Users in the truecrypt group are allowed to run truecrypt as root
%truecrypt ALL=(root) NOPASSWD:/usr/bin/truecrypt

make sure you save and exit (if you do not know how to use visudo or vi, man visudo or man vi will help you, you can also google for common vi commands.  IT IS NOT RECOMENDED TO EDIT THE VISUDO FILE FROM ANOTHER EDITOR.  THE SAFE WAY TO EDIT THE VISUDO FILE IS TO RUN VISUDO FROM A ROOT SHELL

Finally we need to add our trusted users to the truecrypt group so they can mount and unmount truecrypt files.

gpasswd -a USERNAME truecrypt

Sunday, June 10, 2012

Boinc Slackbuild on github

Since Slackbuilds will not host my BOINC slackbuild which uses svn to download, compile sources, I created a github account and uploaded them there.

https://github.com/KaMiila/BOINC-SlackBuild

Wednesday, June 6, 2012

Disable root access on SSHD

Why slackware does not initially disable root access on SSHD is beyond me, here is how to turn it off:

login as root:

nano /etc/ssh/sshd_config

Change from:

# PermitRootLogin yes

Chang to:

PermitRootLogin no

Save and exit

Issue command:

/etc/rc.d/rc.sshd restart

**** Make sure you remove the comment (#) or nothing will change ****

Monday, June 4, 2012

Manually Configure Blogilo

The auto-fetch option for blogger did not work for me so I manully configured Blogilo to use blogger. This is my first post from Blogilo (lets hope it actually posts)
Login to your blog via webpage (you may have to click on the name of your blog to get the correct url ID, copy the location)
URL = http://www.blogger.com/blogger.g?blogID=000111222333444555666
Add your username and password
username@gmail.com
Mypasswordisweak
Click on the Advanced tab
Select blogspot.com from the dropdown menu
copy just the blog id number from the url (this was the first step we did)
click OK

EDIT:  This apparently is not working on slackware-current which uses Blogilo version 1.1 and KDE version 4.8.4.  There is an error message:  An error occured in the last transaction. Server (Atom) error: Could not regexp the id out of the result.

Enlightenment hacks

Quicklaunch

If you want to put a quicklaunch of Enligtenment's file manager on your IBar:

Right-click on the IBar --> IBar--> create new icon

Under applications type:

enlightenment_remote -efm-open-dir $HOME

Name it whatever you feel like it, choose an icon you like, click apply, save, then add the new icon to your IBar

Right-click on the IBar --> IBar --> Contents

Scroll down to the icon you created (sorted by name alphabetically)

Adding a systray for all the programs that are running:

Right-click on your shelf --> shelf bottom --> contents

click on systray

you will need to exit Enlightenment and restart it (DONT click the restart button, that will not enable it)  just exit the DE and startx again.


Caution


The Enlightenment devs seem to think their software is stable or at least not beta.  BEWARE IMO it is and should be in the ALPHA stage, there are tons of bugs and minor issues that will annoy you.  You have been warned.

I no longer use E17 after playing around with it for only 30 minutes.  Too many issues to worry about.  But I continue to look at it after each new release to see if they actually fixed anything to make it useable.

Sunday, June 3, 2012

Steam

I was having a lot of issues getting some steam games woring under wine.  This issue was prfesent on two machines.  One a desktop, AMD with NVIDIA GPU, thebother, ASUS N35SV laptop with Sandybridge.  At first I thought it was an issuewith Bumblebee not cooperating with wine and steam, but I was getting the same problems on my Desktop, so I started messing around with wine some more.

First:

Install wine it its own instance via winetricks
WINEPREFIX=/foo winetricks steam

This will probably create a steam folder in ~/.local but wecan always move it later if we want.  You're choice.
Next figure out what other winetricks you need.  Most likely and unfortunately you will need .NET

WINEPREFIX=/foo winetricks dotnet20

If it barfs at you about fonts, see my post on how to remove them, then run the same command again.

You will probably also need direct x drivers and service pack drivers.  Install al with winetricks, if possible.  I ran into an issue with servicepacks, so I had to grab them of Micro$hafts website.  Just google it, or if you love Micro$haft, use Bing.

Also, steam has an option to backup and then restore your saved games.  I have tested it and so-far it works.  So if you dont want to spend 27+ hours redownloading over 100 gigs, then use thebackup and restore option.  I did however notice an issue with backing up under wine.  When it reached 100% it just hung there saying it was archiving (I forget exactly what it said) so after a few hours I checked my system tonsee if it was actualy doing anything (cpu activity, HDD activity, ram, swap) there was no action, so I looked in the folder where it was suppose to save the file.  It was ther intact (from what I could tell) so I simply killed Steam, restarted and began gaming.

If games are still not playing, you might need to disable the in-game Community Overlay

Steam --> Settings --> In-Game --> Deslect the Steam Community In-Game check box. you may also need to install gecko, tehoma, and corefonts.

Monday, May 21, 2012

Slackware Community is killing their own distro

I have been using Slackware for over 3 years now.  I really like it a lot, but am seriously considering abandoning it 100% due to the community of Slackware users.  Their anti-help and high ego attitude is ruining the distribution for everyone.  Ok ok, there isn't an *official* community, which is the main problem.  Why don't the developers get on the ball and have an OFFICIAL irc room and forum for slackware users?  Right now people are stuck with irc.freenode.com ##slackware and linuxquestions.org.  And when you go into the irc channel new users are CONSTANTLY being flamed and baited.  Anytime someone asks for help the first answer they get from about 5 people is RTFM, man foo, or LMGTFY.  Seriously?  Yes sometimes there are bad questions being asked, but I see a lot of very legitimate questions being asked and no answers given.

There is also a lot of sexual harassment going on in that channel, the oppers know about it, but nothing is being done about it, their answer is /ignore.  Well, I disagree, when people are acting this immature on an irc network that is geared toward helping others, then these people who are trolling need to be banned or KLINED.

Slackware is losing IMO, it is losing users, good users who want to help the community but are constantly being harassed.  Where is the help?  Where is the community?  It's ironic how the Slackers like to elevate themselves above others, thinking they are far superior is intelligence and maturity, but the reality is, they are just a bunch of immature 12 year-olds.  Seriously guys, grow up!

Sunday, May 20, 2012

Laptop HDD head parking


My new ASUS laptop parked the HDD heads over 250,000 times in just 2
day, most HDD's only support 200,000 head parks over the HDD's entire
lifetime.  So how do you turn this off?

First lets check the stats:

%: smartctl -a /dev/sd?

This should display everything you ever wanted to know about the HDD

Load_Cycle_Count is the number of times your HDD has parked it heads.
About 12 times per day is average, NOT over 250,000 in two days.

So how do we turn these off?

%: hdparm -B 255 /dev/sd?

This *should* stop the drive from parking the heads until you turn off
your computer.

%: hdparm -B 254 /dev/sd?

This *should* keep power management on (meaning it will still park the
heads) but not as often.  I issued this command and saw an IMMEDIATE
decline in the number of head parks.  (It also helped stop that annoying
whinny sound I heard everytime the drive spooled up again).

Choose your option.  Turning it off completely is not bad it just uses
more power (I do not know how much more).

To make these permanant:

Check with your linux distribution on slackware I added to the bottom of
/etc/rc.d/rc.local

hdparm -B 254 /dev/sda

(of course you need to add the corresponding letter to your drive, if
its a laptop most likely its /dev/sda)

WebloggerMode

After 4 hours of looking on the internet, and fussing with emacs, I
finally (if this post submits) figured out a way to post to this blog
through emacs, instead of being forced to use the website.

First, load emacs, then paste the following in the buffer

(let ((buffer (url-retrieve-synchronously
      "http://tromey.com/elpa/package-install.el")))
  (save-excursion
    (set-buffer buffer)
    (goto-char (point-min))
    (re-search-forward "^$" nil 'move)
    (eval-region (point) (point-max))
    (kill-buffer (current-buffer))))

Then issue C-j (Command - j)

Then issue M-x (Alt - x) type "package-list-packages" (without the
quotes)

Scroll down until you find WebloggerMode press "i" scroll down to
xml-rpc press "i" then press "x" then edit your ~/.emacs file and add
"(require 'cl)" (without the quotes) to the bottom of the file, save,
restart emacs.

WebloggerMode usage commands:

 M-x weblogger-setup-weblog
 M-x weblogger-start-entry

;; C-x C-s    -- post-and-publish current buffer to the weblog.
;;               Calling weblogger-publish-entry with an prefix argument
;;               (i.e. C-u C-x C-s) will prompt for which weblog
;;               to use.
;; C-c C-c    -- save as draft and bury the buffer.
;; C-c C-n    -- post (but not publish) the current entry and
;;               load the next entry.
;; C-c C-p    -- post (but not publish) the current entry and
;;               load the previous entry.
;; C-c C-k    -- delete the current entry.
;; M-g        -- synchronise weblogger.el's idea of the entries available
;;               with the weblog server.
;; C-c C-t m  -- edit the main template.
;; C-c C-t a  -- edit the Archive Index template
;; C-c C-s s  -- Change the server being used.
;; C-c C-s w  -- Change the weblog.
;; C-c C-s u  -- Change the user (re-login).

You’ll need the “Server Endpoint”. Here are the values for various popular weblogging platforms:

Blogger.com:   http://www.blogger.com/api
Wordpress:     http://BLOG-URL/xmlrpc.php
                       http://hexmode.wordpress.com/xmlrpc.php. http://example.com/weblog/xmlrpc.php)
LiveJournal:     http://www.livejournal.com/interface/blogger/
OpenWeblog:  http://www.openweblog.com/interface/blogger/
MovableType: http://CGI-URL/mt-xmlrpc.cgi
                       http://www.example.com/cgi-bin/mt/mt-xmlrpc.cgi
Drupal: Enable the Blogger API and use http://DRUPAL-URL/xmlrpc.php (like Wordpress).

Thanks to:
     http://www.emacswiki.org/emacs/WebloggerMode
     http://tromey.com/elpa
     irc.freenode.com    #emacs