Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, 15 September 2020

Fine tuning BSPWM

 I've been using BSPWM for some time now.  I had been rather bored with making the normal setups/configs for standard window managers for my linux boxes and started to look at tiling window managers rather than all in one desktops.

Eventually this lead me to BSPWM (via quite a few of the others,  honourable mentions to Awesome & Qtile) set off with a nice polybar panel.  

Here's what it looks like now:


I've played around with it quite a bit (not short of time these days!) even setting up a script to use rofi to display all my keyboard shortcuts.

I used a base of ArcoLinux which I highly recommend: they have builds for almost all the nicer tiling window managers right out of the box: and its easy to mix and match if you want to do that.   

The only real problem I've had was setting things up so that particular applications always worked on particular desktops.  Until I used a tiling WM I never really saw the point of desktops: but they are so practical and easy to use in a tiling setup.  Once I started using them I wanted to automate things so that I would always know the quickest way to find the window I was after.

This is rather more difficult in BSPWM than I'd hoped.

You need to edit your main config file for BSPWM to get these settings sorted: when you open up bspmwmrc with your text editor its easy to find the correct section to start looking at: (assuming you got a leg up as I did with much of the initial config coming from Arco) but quickly I found that many of my extra lines to specify desktops for particular programs were not working.  I did a deal of googling around which did lead to some results: but it seems inconsistent: working for some things and not for others.  

Anyway after much mucking around I include the section of code with my working setup: so you can copy some of these and use them for yourself without having to go through all the hoops I had to to get this working.....




Friday, 8 February 2019

Fixing an unreliable NFS mount

I store my music,  photos and documents in a central location so that I can access them via any of my systems.

Since I don't use any windows systems at home I can use NFS as a sharing method rather than SMB (or SAMBA).

This has always meant that the share seems quite a bit faster and more reliable.  Recently,  however,  the mapping as set out in my /etc/fstab file has not always been working.  Sometimes I get a waiting symbol rather than the regular icon for network manager just after logon: and on these occasions I find that the mapping has not been done.

After some research I found a package that fixed the issue for me (given that I use network manager).

The fix involves enabling a service on bootup:

systemctl enable NetworkManager-wait-online.service

Credit goes to the Arch WIKI for this little nugget

Saturday, 26 January 2019

Setting up a music player using PiCorePlayer and Bluetooth speakers

I've used LMS (Logitech Media Server) for quite some time.  I stared off running it on a windows machine many years ago.  It was where I already had my music files and the service seemed quite light running.

I'd been on the search for an easy way to play my MP3s via my stereo system rather than my crappy computer speakers for ages.  The Logitech range of hardware helping you do so seemed ideal. 

I started off with the Squeezebox Duet:
As you can see you have a rather nice remote with just enough screen to show off your lovely album art and another small box:  which turns out to be the interface between your data (in my case on the computer connected through the network) and my stereo system.

Joy abounded: for quite some time.  And then.....well the hardware got older.  I stopped using the remote because it kept disconnecting and the battery degraded.  So,  when setting things up again I had to configure the squeezebox in a headless fashion as I was no longer using the remote: it can be done,  but easy its not.   If anyone is interested in how this is done: comment on the piece and I'll see if I can remember.

Then (still aeons ago!) I moved over to Linux,  so I needed a way of keeping my system going using a new operating system for the server.

My home server runs on vanilla debian: and there is a version of the server software which runs just fine on there : after some persuasion.  So,  once you get the service running you can do the rest from the web interface:


To bring things up to date,  this was all fine,  but it only connected to my main stereo in the front room.

For my bedroom upstairs I had a squeezebox radio:


This worked fine,  and doubled up as a handy alarm clock too.

However,  the darn thing gave up the ghost a short while ago leaving me bereft of sounds upstairs.

So,  in went my old LED alarm clock again (I convince myself it has a retro look) and I started to look at alternatives.

I've long been a fan of all things Raspberry Pi and as a result of this I had an old Pi 2 lying around not doing anything.

This is easily fast enough to convert into a standalone player which can expand your already existing LMS ecosystem. 

I've tried a number of music players running on this Raspberry Pi 2 before (because its fun and I'm sad) but I settled on PiCorePlayer this time.

My plan was to get up to date and use a bluetooth speaker with the player.  To this end I chose a soundbar eventually,  in fact this one,  the Azatom Studio Soundbar 2.1.  Its not bad,  for the approx £50 I shelled out,  but nothing special. 

So: how to do it?

The Build


  • Download the image file you require first.  As of writing,  this can be found here
  • Write the image file onto your SD card that is to be placed into the Pi.  You really don't need a large SD card,  4GB would be easily big enough.  Remember,  we are not putting any music on this thing,  that stays on the server.  I used USB image writer on my distro (currently ArcoLinux Openbox) to write the image onto the card.
  • Put the SD card into the PI.
  • I added a bluetooth dongle via USB so the Pi could connect to the soundbar.  The one I used was a Rocketek,  and it seemed to work fine.  I did check first and Amazon suggested it was fine to work with Linux and a Pi.  
  • The Pi will need to connect to the network (to find the server service and also "see" the music files) so I connected it via ethernet.  I've read warnings about using WiFi and bluetooth concurrently in this setup,  so a good old wired connection seemed a good idea (it was).  
  • Googling around suggested that the newest versions of PiCorePlayer would now work with bluetooth connections so once I had my hardware connected together I fired the thing up.
  • This is another piece of hardware with a web interface,  but to use this you need to know its assigned IP address.  I found this out by going into my router and looking at what was currently connected to the network.  
  • Once you know the IP you can open up your browser and check out the interface.  Once you are in,  click on the button labelled "main page" and have a look at the bottom of the page.  Here,  you will find a way to display the more exotic controls via the "beta" controls,  so make sure you have this selected as below:



  • By default only the player software "squeezelite" will be running.  You can use the PiCorePlayer to run a full version of LMS and make the unit a whole sound system in itself.  I've done this before with great success,  using a USB stick attached to the PI to hold the MP3 files.  However,  for this example we just need the player running.  
  • Lets have a go at setting it up.  My first port of call was expanding the image on the SD card so that the software could make full use of the space available on the SD card.  There's a button for this on the interface under "main page" and "advanced mode operations": like this

  • I decided to get everything up to date next,  so I did an update.  This is also on the main page,  under "main Pi Core operations":

  • With this done,  its a good idea to give it a restart.  You can see the button for this in the picture above as well.
  • You may want to take one of the other options on these dialogs as well: to set a fixed IP address for the player: this means that if you need to get onto the interface in the future,  you don't have to go rooting around in your router's settings to find its IP again.  
  • Given we are using an ethernet connection in this example,  I wanted to turn the WiFi off.  This is quite easy as you can see below:

  • Now we need to see if we can get things going with bluetooth.  This was the bit I was afraid of,  TBH.  I had done quite a bit of googling around in preparation,  but the help available on this was rather spartan as its quite a new feature.  There are some help pages available from the PiCorePlayer people,  but I was getting confused.  
  • I worked out that I had to change the output of the squeezelite player, but only after I had enabled my bluetooth setup.  There were references to the "squeezelite settings" tab on the interface,  but I couldn't for the life of me find where I could input these settings.
  • Eventually I did twig it: there is a small box labelled "Card Control" and that is where we have to head:

  • If you actually click on this box (which was non obvious,  to me) you see:

  • If you study the picture above you'll see that my bluetooth is recognised,  as is the soundbar (you can see that in the picture above and the one above that,  too),  but the devices are not currently connected.  You need to click on the "scan" buttons to get the bluetooth on your Pi to "see" the soundbar. 

Conclusions


Its quite a nice setup,  the Pi is tiny and can be kept out of the way (although not too far from the bluetooth device you want it to connect to) and it seems to run for ages with no errors. 

I run OrangeSqueeze on my android phone and tablet,  and on that you now only have to swap players to output music from the Pi to the bluetooth speaker. 

For music enthusiasts: you may wish to get a better bluetooth speaker than I did with my soundbar.  I'm not attacking the Azatom device here,  for the price I paid its excellent: but I would have liked something with slightly higher quality sound and a more reliable bluetooth connection.  I get bluetooth cutting out occasionally,  but its not a deal breaker at this stage. 

Friday, 16 June 2017

New look for my Plasma

I've settled on the breeze dark "look and feel" for some time now.

I did try ark dark because I loved ark dark in my GTK desktops and I particularly like the window decorations.

However,  going through all KDE's extra options to try to get GTK apps to display the same as native QT I could never get the consistency I was looking for,  so back to breeze dark.

These are the look and feel themes I have installed currently:


Setup like this I did have the consistency I was looking for but I wanted something more.  

Breeze dark with a little transparency would be even nicer: so I delved into the nether reaches of the "get new theme" button and came up with Breeze Transparent Dark,  which does the trick nicely.

Here are my installed desktop themes:


Now I can have some lovely effects on my menu and taskbar:



Thursday, 8 June 2017

I've moved back to KDE with Antergos

I had a bit of a disaster with my Manjaro XFCE and despite my best efforts I could not revive it.  If you watch a lot of YouTube videos on linux distros you often see people starting off on Manjaro and then leaving it when something goes wrong.  Usually,  its Manjaro that gets the blame.  So,  just to be clear,  this was all my fault: nothing to do with the distro.

I'd decided to fiddle around with my graphics settings to try to reduce screen tearing and after putting in some extra settings on the nividia-settings module life got awfully nasty.  Initially I had no visuals at all: but after a bit of terminal work I did get the GUI back: but Steam in particular refused to play ball despite my frantic googling efforts.

This seemed a good opportunity to try something new: so I decided to have a look at KDE again.  I like KDE: I like the way you can fiddle around with all aspects of the desktop to your heart's content. It also gave me the excuse to put another 8GB of RAM in my tired old HP desktop taking it up to the giddy heights of 16GB.

I decided to go for a "purer" Arch with Antergos rather than stick with Manjaro (although they do a KDE version) so with some trepidation I set up the ISO on a trusty USB stick and off I went.  In the past I've had all sort of fun and games with Antergos and in particular,  the installer.  However,  on this occasion I did get the install completed after some playing around with the updater which did eventually update the running ISO and do the install.

Its my first serious go (I don't count virtualbox) at KDE 5 and its a bit of a revelation.  In common with other commenters I've found it far less resource intensive than I had expected.  Of course it does use more RAM than XFCE (which I still use on a laptop via the ever reliable MX-16) but it seems far better than my previous installs.

Here's what I'm rocking now:


This is with my trusty NVidia GT-640.  I do have a much better NVidia card but its too power hungry for the PSU in the HP plus its too big for the motherboard: so that one will have to wait for a new build for now.  

I experimented with quite a few themes (as you do) but settled on breeze dark in the end.  I do love the arc-dark look,  especially the window buttons,  but I just couldn't get it to look consistent between the normal and GTK windows so in the end I gave up and went for breeze in look and feel and desktop themes.  

I have to say I'm well pleased with the results: and it does perform well as a gaming rig too.  I've just added Mad Max to my steam library and despite its dire warnings of performance issues on first run: it does run just fine: even with antialiasing on.

Update
I've just updated my Mad Max to use the vulkan driver that's available via the Steam beta: and the results are fantastic.

Friday, 19 May 2017

Delay the startup of Latte Dock in KDE

I'm now using a KDE build (Antergos) : and loving it!

I've been using Latte Dock since I had some issues with Plank under KDE: on occasions it would show an extra icon for Plasma and that started me looking for something new.

I do like Latte Dock a lot: but I've been having an issue with KDE occasionally crashing out of GL compositing on startup: which always shows up in the dock since its background re appears and looks ugly.

My theory is that if I could delay the dock startup a while: the compositing would be unaffected when the dock loaded: and so far it seems to have worked.

So I changed the line in my autostart to look like this:


The only thing I changed was the command which reads:

sleep 20s && latte-dock &

Now the compositing can load ahead of the dock and all seems to be well.  

Friday, 16 December 2016

Strange Mouse Effects with Virtualbox

Since the latest updates to Virtualbox I've noticed a strange issue with the mouse pointer on the guest systems.

I usually run Linux VM guests but I've read reports that this can be  an issue with windows guests as well.  A very large and annoying pointer shadow appears on the screen:


I've googled all around and tried a few fixes but nothing works for me so far.  Plenty of other people seem to get this issue,  but there are no workarounds that have helped my situation.

The issue seems to vary in severity according to the mouse pointer scheme you choose,  with plain black pointers its much less pronounced but if you are using the chameleon cursor set you are really out of luck.

If anyone knows a fix: please let me know.

Freetype update issue from the aur

If you use the infinality font set one of the fonts you get is Freetype.

Recently when  updating I found there was an issue with updating this package,  which was from the AUR on my manjaro.

The update was failing and coming up with an error which complained about the PGP key in the update.

As always google is your friend,  and it lead me here

It turns out that you can refresh the required key with this command:

gpg --keyserver hkp://pgp.uni-mainz.de --recv-keys 58E0C111E39F5408C5D3EC76C1A60EACE707FDA5

Once that was done the update went through without an issue.

Infinality Fonts and text antialiasing issue

I always set up the infinality fonts when I set up a Linux distro.  Its not that Linux is awful at fonts,  but its hard to argue its always as good as windows.  If something can be improved with regards to a linux config,  I'll have a go.

Until now I've never had an issue with the infinality fonts which I use both in Manjaro and MX15/16.   However,  the other day I did come across something rather strange.

I was trying to set  up a logo for my sister's blogsite and I wanted a clear background with the text on top.  So I googled how to do this with gimp and off I went: but when I typed in my logo  this is what I saw:

The green highlight around the edge of the font was  hideous,  so I had to go another way.  

So off to google I went and eventually I found this

The solution was this:

Creating /etc/gimp/2.0/fonts.conf and adding


fixes the problem.

Tuesday, 24 May 2016

Getting my Manjaro to look just right

I use Manjaro (main XFCE edition) on my main desktop machine,  a second hand HP 6000 Pro bought for around £150 a year ago,  upgraded to 8Gb RAM and now running a moderate Nivida video card.

Its been running fine with just the odd hiccup since then.

I'm generally a fan of the dark themes and I do like a bit of Compiz (I'm a sucker for the wobbly windows).  I went with the manjaro-compiz package and I run it at startup using the Compiz Fusion Icon.

A consequence of this is that you end up redoing a lot of your settings again in compiz settings manager.  For example: I had to set new keyboard shortcuts for minimizing and maximizing windows.    One annoyance is that if you go this way you lose windows snapping.  The addon for wobbly windows conflicts with the one for snapping via CCSM and I chose my good old wobbly windows.  I'd like to have both.

Now that we have GTK3 coming in things change again.

Manjaro have recently updated pamac, their app for updates and installing packages that runs as default in the main XFCE edition.

This means that I need a theme which can deal with GTK2,  GTK3 and Compiz.

If you have had Manjaro running for a while you will of course have had all the updates but you may still be on the first theme that came with your initial install and that is the Menda theme.  I moved away from this when I had some issues with it and GTK3.  The solution is the great new theme that now comes with Manjaro : Vertex-Maia.  This works great with GTK3.

I used to use Emerald theme manager for Compiz but I've gone back to GTK for the window decorations.

However,  when you do this you'll find that the window decorations (the look for the maximize,  minimize & close buttons) are not consistent with the theme.

I found the solution in the Arch WIKI:

  • Selecting the theme in Compiz 0.9: The 0.9 version of GTK Window Decorator will read Metacity's theme settings from GSettings. The theme can be set with the following command:
$ gsettings set org.gnome.metacity theme theme-name
where theme-name is the name of the theme you wish to use.
  • Selecting the theme in Compiz 0.8: The 0.8 version of GTK Window Decorator expects Metacity's theme settings to be stored in GConf. Despite the fact that Metacity no longer uses GConf, the GTK Window Decorator theme can still be set using the following command:
$ gconftool-2 -s /apps/metacity/general/theme -t string theme-name
where theme-name is the name of the theme you wish to use.

I'm using  vertex-maia as my icon theme as well.  I use the dark variant of the main theme,  the package is: Vertex-Maia-Dark.

Here's what a normal window looks like:



And Pamac is now pretty consistent in its GTK3 guise:



I think the theme looks great on the start menu as well:


I think the background is of of Charlie Henson's excellent backgrounds.

Finally: the GKT Greeter: if you had the old menda theme and then are moving to Maia then you will need to look at this too.

Get in via the "all settings" manager and click on:






Now make sure that you have the new theme selected in there instead of the old menda one:



Finally lets consider LibreOffice.  It works fine with a dark shell but the icon set used is not the best by default.  I like the breeze and sifr icon sets available to LO but the standard ones don't show up well on a dark theme.

To get round this you may want to look up libreoffice-breeze-icons in the AUR.  This will allow you to install a special set of adjusted icons:


You can now select the icon set from within settings in LibreOffice Writer:


And this is how things should look now in LO:








Sunday, 31 January 2016

Logitech Media Server memory mangement under Linux

I've had a Squeezebox up and running for many years.  Its served me very well in that time,  and although admittedly a bit "techie" for all tastes it runs well and  has been reliable over the years. 

Around a year ago the NAS I was holding the data on and running the server software from (ancient Netgear ReadyNAS NV+ running sparc) died a sudden death.  Despite many attempts I could neither revive the NAS nor even get the data back from it.

I did have some backups and other sources for getting the data back,  and after a few weeks I had amassed most of it again,  thank goodness.  All those hours of burning CDs,  filling in MP3 tags and finding appropriate album images had not been wasted. 

I have an old Dell machine running in a small area I laughingly refer to as an "office area" and I thought: since its almost always running: why not use this as a media server instead.  So I went ahead and installed the linux version of the Logitech software on there and then added a 2nd hard drive and copied over my music and photos. 

After a good deal of fiddling around the setup seemed to work well: except for one thing.  A huge memory leak!  Within a week of a reboot the machine (Dell Vostro 200 with 4GB of RAM) had pretty much run out of memory.

A few days ago I came across a YouTube posting by Joe Collins which was talking about memory management under Linux.

He mentioned this command:

sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"

I ran this on the machine and lo and behold: back came some free memory.

The next job was to schedule this to run regularly: otherwise the freed up memory would slowly disappear again. 

So I created a cron job to facilitate this.

Since the command was preceded by "sudo" I needed to edit the root contab file in order for it to run so the command was:

sudo crontab -e

This command takes you into the appropriate file to edit (after choosing your editor, in this case I chose NANO).

 At this point you need to enter some syntax into the file which firstly tells cron how often you want the command to run and secondly gives it the command to run. 

In my case the command was:

*/120 * * * * sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"

The first bit (*/120 * * * *) tells cron to run the job every 120 minutes,  and the 2nd is our command.

No more reboots to reclaim memory for me! 


Sunday, 7 June 2015

Clean shutdown for Manjaro from a keyboard shortcut

I always like to shut down my computer using a keyboard shortcut rather than the GUI.  For me,  its just faster and its one of the things I set up in all new linux setups.

The command I always used to achieve this was:

dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop

However,  recently I found that this stopped working.

When I ran the command from a terminal I found the following error:

The name org.freedesktop.ConsoleKit was not provided by any .service files

Eventually I found a post on the ubuntu forums (referencing their french forums) which suggests that this no longer works and to try instead:

dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.PowerOff" boolean:true


When combined with a keyboard shortcut this works perfectly again.

Tuesday, 5 May 2015

Power saving and the kernel on a Dell Vostro 200

The power saving features on the Dell I've been using for a while have been bothering me for a while.  Its running Mint 17.1 cinnamon and has always had a few issues with sleep.  I tried all sorts of permutations but left on its own the machine always crashed after a while: when going into power saving mode.

I've not totally sorted it: but I have found a parameter to add to the kernel startup which helps quite a bit:

quiet splash acpi_backlight=vendor

You'll probably find using grub customizer the easiest way to test this parameter.

Sunday, 23 June 2013

Get an up to date version of Clementine for your Debian based setup

My favourite linux audio player is Clementine.

You can get this in the debian repositories but its a bit out of date: but there is an extra repository which is much more up to date and works a treat with debian,  here.

So just update your sources.list and off you go.

Get an up to date version of XBMC on your debian rig

I am a big fan of the latest version of XBMC : frodo (version 12).

If you are using an Ubuntu based distro then you can get hold of this latest version with no problems.

If,  however,  you are using a Debian based distro,  such as the excellent SolydXK or the also excellent Crunchbang then you are stuck at version 11.  Apparently debian did not like some of the non FOSS eliments used in the newer version so its not in their repos.  I make no critisism of Debian for that,  that is their philosophy and they are entitled to it.

If,  you are still after version 12 on a Debian distro: what to do:

Well....head over here

Quite a bit of that page is in German,  but fear not,  the important bits are in English as well.

I tried to set this up under Crunchbang a little while ago and had no success,  but yesterday I tried again with SolydXK and it seemed to work just fine.

This is what I did.....

wget http://debian.oppserver.net/gpg-debian.oppserver.net-signing-pubkey.asc -O - | sudo apt-key add -
sudo su -c 'echo "deb http://debian.oppserver.net/xbmc/ wheezy main non-free contrib" > /etc/apt/sources.list.d/oppxbmc.sources.list'
sudo su -c 'echo "deb-src http://debian.oppserver.net/xbmc/ wheezy main non-free contrib" >> /etc/apt/sources.list.d/oppxbmc.sources.list'
sudo aptitude update 
 

Update: May 2016

These days life is a little easier for those who wish to mix a bit of debian with XBMC (nowadays Kodi).

When I build machines for those very new to linux who need reliability above all I now use MX-15.  It uses the stable debian repos by default and yet it has the latest version of XFCE (4.12 at time of writing) powering things.

I recently had a brief forum exchange on using Kodi in MX-15.  It turns out if you want to do this: don't enable the debian multimedia repos as they carry an old version of Kodi.  I had done this and also given the debian multimedia repos a higher priority: so when I searched in Synaptic for Kodi all it found was the old version.

MX-15 now carries version 16.0 of Kodi in its stable repos,  and 16.1 in its testing repos: so you can have the best of both worlds.

Consistent mouse cursors with XFCE

This is one that has annoyed me for quite some time: so when I finally found a solution I was delighted.

The issue is that when you change your default mouse theme under XFCE it does not appear to change completely: run firefox for example and take your cursor up to the top of the window and you will find that the cursor changes back to its old default.  All rather annoying....

However: thanks to the good people at makandra a solution is at hand:


Go to your terminal and type this in:

sudo update-alternatives --config x-cursor-theme
 
 
You can now choose to assign the theme globally.

You will need to log in again for the changes to take hold: but at last, consistency is yours!

Saturday, 23 March 2013

Xubuntu: adjust screen brightness

Xubuntu: adjust screen brightness

install xbacklight (sudo apt-get install xbacklight) and try:

xbacklight -set 50

Linux menus and the Windows Start Key

Linux menus and the Windows Start Key

Linux distributions like Ubuntu open the main menu with Alt+F1 instead of the Windows key that most new Linux users would be expecting, but it used to be simple to change the shortcut key. Since Ubuntu 9.10 the process isn’t so obvious, but we’ve got the instructions for you.

Set up a Fog server for open source image deployments

Set up a Fog server for open source image deployments

Credit for the below should go to the Spiceworks user who posted this on the Spiceworks forum some while ago.  Its a great guide and I always turn back to it when setting up a Fog server.

Change the kernel that Fog clients use for PXE boot

Change the kernel that Fog clients use for PXE boot


We recently tried to use FOG to image a Dell Latitude E6510, and had problems due to the kernel that FOG was pushing to it. The kernel didn't support the Intel 82577LM Gigabit NIC. Here are the steps I
took to change the kernel to one that supported the NIC.