*nix notes
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.
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**
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.
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!
Subscribe to:
Posts (Atom)