Diclaimer on cookies. For those of you in Europe, this blog may use third party cookies to which we have no responsibility for. The cookies will mainly be used for targeted advertising since this site uses Google's advertising system. If you have any doubts you should review the cookies appearing in your browser.
Tuesday, August 11, 2015
Setting the keyboard and language RHEL and CentOS 7 command line
Sunday, August 9, 2015
Fedora 22 - What a mess!!!!
The problems;
1. First WTF - you do an fsck on every partition and disk, making us wait days before we can go and select the disks we want to use for the installation. There are many complaints I see out their about slow installations and people blaming anaconda for kernel issues, when clearly you decide to run an fsck on every disk and partition. I have 1TB of disk space partitioned across about 6 or so partitions, this took nearly 1 hour before I could continue the install, and only found out by monitoring the processes and running strace on what you were doing. COME ON - we're supposed to install sub 20 minutes, not take 3 hours to do an install.
RECOMMENDATION: Shoot the person who created the new installer. Do they work for Microsoft or something? A spy in the camp perhaps?
2. The fedup upgrade messed up the audio big time. Instead of being able to plug in and out a head set I find that the audio recording works fine as long as you don't plug in an external headset, or unplug it if you booted it with the headset in. The weird thing is that when you do this it for some reason decides to only record the last second or so of what you recorded last! Another WTF moment, when Fedora 20 worked perfectly fine with plugging in and out a headset between the built-in and external jack sockets.
I'm still working on what the cause of this is, since I have to remember to boot my system with the headset in if I want to use it for recording or using skype, since as soon as I unplug I have no microphone capability. The output audio is working (but only after installing from scratch).
This is without mentioning the freezes and hard reboots.
RECOMMENDATION: Use the driver code that worked previously for older kit, and add to it, not destroy it.
3. Although FedUp is a nice way of getting your system up to date, it unfortunately has the same problems as with any upgrade - existing files. I'm a stickler and even more so for keeping my system config files in a directory of their own and symlinking to them. So that way I can do a fresh update and a diff if need be to work in the new, and of course a good partitioning scheme.
4. Slow start up and shutdown. Another backward step, thanks guys. How slow do you really want this system to be? I'm using an SSD and F20 came up faster and shutdown a lot quicker (apart from the pulse audio process that would take ages to stop if you didn't log out before shutting down). Now, I don't know what you're doing, but come on, if the system doesn't shutdown in less than 30 seconds I want to know what you're playing at.
5. The Live image is a nice image, although takes ages to start up from USB, and too long for the installer, but it works nicely with audio and everything. So why when I install it does it then break everything?
- I'm forced to create a new user as any old GNOME configs cause the log in screen to break, that's if you can get to the login screen.
- The login screen might not even appear - until after you update the system, which you have to do from single user mode since the whole damn system hangs at the login screen or before.
- After the update you can eventually get to the login screen, and start to get your system working, but don't take any of your old GNOME config, apart from specific applications
On going work
Only a few points so far, as I've only just got 22 working today from a fresh install, and so far NOT impressed. If the developers at Fedora keep going in this direction I will almost likely move to Debian, which for me would be a nightmare as since 1996 I've been a RedHat fan and promoted it everywhere with its stability and resilience, but all of a sudden we seem to be leaking crap into the development of the system and as an S.A. and infrastructure builder, would not currently be encouraging people to use the next RHEL 8 (if it's going to be based on this) into their environments.
Be warned!
So a warning to you all, don't believe what these magazine writers (online or otherwise) tell you. If you do this stuff for real and use it every day for your main operating system, I would give F22 a miss, and wait until they can make it faster, other wise like me you will lose a day and a half of your life debugging the crap that has recently made the best operating system one that will quickly slip away if it continues on this path.
Saturday, July 4, 2015
XBMC iPlayer and other tv
Scenario
In this page I will take you through getting iPlayer working in XBMC through the chromium web browser in full screen mode with audio.Requirements
- XBMC plugin Advanced Launcher
- pepper plugin for the o/s (to get flash audio working)
- chromium-browser
- wrapper script to stay chromium in XBMC nicely
- http://www.bbc.co.uk/iplayer, or any other urls you want to view
Download and install Advanced Launcher
Download the plugin from:http://ftp.heanet.ie/mirrors/xbmc/addons/eden/plugin.program.advanced.launcher/plugin.program.advanced.launcher-1.7.6.zip
Install package with;
sudo apt-get install
Install for chromium with;
sudo apt-get install pepperflashplugin-nonfree
sudo update-pepperflashplugin-nonfree --install
Wrapper scripts to run chromium within XBMC
I wrote 2 scripts to make it possible to run the web browser through XBMC without having to exit to a different window manager. I set various options with chromium to make it run in full screen mode. The key difference between the two scripts is whether we want the address bar or not. You will need to access the command line on your XBMC system for this, which you can do with CTRL+ALT+F2. You will then be asked to login in. You will need to know the user and password that was created during install. I created a directory called bin in that users home directory and put the scripts in their.#!/bin/bash
CHROMIUM_FLAGS=""
flashso="/usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so"
flashversion=`strings $flashso|grep ^LNX|sed -e "s/^LNX //"|sed -e "s/,/./g"`
CHROMIUM_FLAGS="$CHROMIUM_FLAGS --ppapi-flash-path=$flashso --ppapi-flash-version=$flashversion"
openbox &
/usr/bin/chromium-browser --start-maximized --disable-new-tab-first-run --no-default-browser-check --no-first-run --kiosk $CHROMIUM_FLAGS $*
killall -9 openbox
Full screen with address bar, called browser-nonfull.sh;
#!/bin/bash
CHROMIUM_FLAGS=""
flashso="/usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so"
flashversion=`strings $flashso|grep ^LNX|sed -e "s/^LNX //"|sed -e "s/,/./g"`
CHROMIUM_FLAGS="$CHROMIUM_FLAGS --ppapi-flash-path=$flashso --ppapi-flash-version=$flashversion"
openbox &
/usr/bin/chromium-browser --start-maximized --disable-new-tab-first-run --no-default-browser-check --no-first-run $CHROMIUM_FLAGS $*
#/usr/bin/firefox
killall -9 openbox
Adding the scripts directory as a source
You must make your bin directory available to the Advanced Launcher so that you can use your scripts.- Select Advanced Launcher
- Right click Default
- Select Manage Sources
- Select Add Source
- Select Browse and locate your bin directory
Creating the menu items
Create the menu items to launch the web browser with the right starting page using the advanced launcher. Since we used the $* in the scripts we can pass extra parameters of which one is the url we require.To do this go to the Programs menu in XBMC.
- Select Advanced Launcher
- Using the mouse right click the Default
- Select add new launcher
- Select standalone (in my example below it is the xbmc-scripts)
- Locate your script.
- Provide any arguments, e.g. the url, such as http://www.bbc.co.uk/iplayer
- Give the program a name, e.g. BBC iPlayer
- Select Linux as the operating system
- Select ok for the next 2 items which are thumbnails and fanarts
- The final link
One thing you need to be aware of though, is that the audio will take a little while to become available as XBMC likes to work out that it's not using it and then lets the web browser use it. This can take several minutes, so be patient.
Thursday, June 18, 2015
Red Hat 6 to Red Hat 7 system start up configuration
- Essential commands to start and stop services
- Commands to disable or enable a service at boot
- How to change the default run level
- How to configure your own boot script
Essential service commands
Starting a service Red Hat 6
Starting a service Red Hat 7
Stopping a service Red Hat 6
Stopping a service Red Hat 7
Systemctl syntax
Listing services Red Hat 6
Listing services Red Hat 7
Red Hat 6 enable or disable services at boot
Red Hat 7 enable or disable services at boot
Modifying the boot sequence
Red Hat 6 setting default runlevel
Red Hat 7 setting default runlevel
Red Hat 6 temporarily change runlevel at boot
Red Hat 7 temporarily change runlevel at boot
Red Hat 6 boot scripts
# and if lock file exists
;;esac
Red Hat 7 boot scripts
Useful references
- https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet
- http://unix.stackexchange.com/questions/47695/how-to-write-startup-script-for-systemd
Tuesday, April 14, 2015
XBMC useful repos and add ons
This page is my list of useful xbmc links for add-ons.
Live sport streams
http://www.besttvbox.com/best-xbmc-sports-channel-list/
Navi-x from http://code.google.com/p/navi-x/downloads/list
Super repo
Instructions to install https://superrepo.org/get-started/
The repo link http://srp.nu
Live tv streams from around the world including UK
https://kinkin-xbmc-repository.googlecode.com/files/repository.Kinkin-1.2.zip
Unofficial addons
http://addons.tvaddons.ag/
If you want to stream video direct from the web xbmc can make use of various streaming protocols, e,.g. rtmp;
Add the following line to a file called bt-sport1.strm;
rtmp://80.82.78.87:443/liverepeater playpath=28 swfUrl=http://popeoftheplayers.eu/atdedead.swf live=1 pageUrl=http://popeoftheplayers.eu/crichd.php?id=28&width=530&height=370 token=#atd%#$ZH
As long as the strm file is in your videos directory it will attempt to play if the link is good and the options correct.
Tuesday, November 25, 2014
XBMC 13.2 Gotham random changing resolution
Having recently updated to XBMC Gotham i have found some interesting issues, such as;
- screen keeps changing size during watching videos which messes up the GUI and overscans too far
- location of some settings that used to be under system settings have gone.
To clear this up i eventually worked out where these can be fixed.
Screen changing size randomly
Most web sites tall about seeing the overscan in the system settings, which works until one of your videos changes the resolution and then your overscan is to far and the video beyond the screen. Many others refer to setting the resolution through xorg.conf, which on Gotham does not exist by default and does not need to.
You should be able to set the resolution to the highest possible for your hdmi tv, and it may be that xbmc shows a narrow view of the GUI add though it is wide screen. Also if the video chances size during viewing and then the GUI is too big after the video finishes then it's probably not XBMC as i find out, but your tv.
My tv had an auto size which could choose 16:9, 4:3 and so on. By changing this to 16:9 the screen stored changing resolution, so check your TV for aspect ratio setting.
Black lines
The black lines and videos having different assist us note dealt with by playing a video and then pressing your remote OK button.
Select the video reel icon, and this pants various video options. Here at your aspect ratio and remove black lines, and other settings until your videos look good, then toward the end of the list you'll find "set as default", which will apply it to all your videos.
You can also use the same technique for audio to boost the volume, by selecting the speaker icon next to the movie reel.
Now i can enjoy my videos without the screen keep changing. So watch for conflict between tv and XBMC aspect ratio.
Building Vagrant Base Boxes
Download the versions of the operating systems you wish to use with Vagrant. You can use either the live ISOs or the full install media, the difference being is that you have greater flexibility with the full install for creating minimal builds. The live ISOs may include to much.
- http://www.ubuntu.com
- http://www.linuxmint.com/
- http://www.slackware.com/
- https://access.redhat.com/downloads
- https://www.suse.com/
- http://www.opensuse.org/en/
All users of your system will want to have the same virtual environment installed, in this one we will use VirtualBox, and it is important to install the guest additions too (known as the extension pack on the download page).
Create your base VM in VirtualBox.
To build a CentOS host you will need the following minimal hardware requirements;
- 1024mb Ram
- make the virtual disk dynamic and the bigger the better. The VM will grow to use the space and will be small to start with.
NOTE: the disk should be VMDK this allows vagrant to make the disk available to different VM hosting software.
- cdrom iso image
- for a console you don't need much in the way of video ram so the default 12mb is sufficient
- attach the CentOS 7 iso to the cdrom
- the 1st network adapter should be NAT. All other NICs can be added in the Vagrantfile when building new VMs from the base box.
If you can add users during the install create a user called vagrant with password of vagrant.
Preparing the VM for Vagrant requires some extra configuration. In this step we will cover all necessary steps to configure the VM to be a bar box regardless of the OS.
$ apt-get install -y dkms linux-kernel-headers
NOTE: on Red Hat type systems you may need kernel headers and development tools;
$ yum -y install kernel-headers
$ yum -y groupinstall "Development tools"
For Debian;
$ apt-get update -y
$ apt-get upgrade -y
For Red Hat;
$ yum -y update
Select Devices --> Install guest additions
In a console only VM this will insert the CD into the virtual drive, so you'll need to mount it;
$ mount /dev/cdrom /mnt
Run the VBoxLinuxAdittions.run command to install;
$ /mnt/VBoxLinuxAdittions.run
$ umount /mnt
$ eject cdrom
$ useradd -m vagrant
$ passwd vagrant
Set the password to vagrant
vagrant ALL=(ALL) NOPASSWD: ALL
In /etc/sudoers make sure you have this line;
Default requirestty
Change to;
#Default requirestty
$ mkdir -p /home/vagrant/.ssh
$ curl -k https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub > /home/vagrant/.ssh/authorized_keys
# Ensure we have the correct permissions set
$ chmod 0700 /home/vagrant/.ssh
$ chmod 0600 /home/vagrant/.ssh/authorized_keys
$ chown -R vagrant /home/vagrant/.ssh
NOTE: you may also need to install wget, or curl for the above wget step.
On Debian based systems;
$ apt-get install -y openssh-server
On Red Hat systems;
$ yum -y install openssh
- Port 22
- PubKeyAuthentication yes
- AuthorizedKeysFile %h/.ssh/authorized_keys
- PermitEmptyPasswords no
$ service ssh restart
$ init 0
Now we are ready to package the box. Using the vagrant commands.
NOTE: replace "Name of VirtualBix VM" with the name of the VM shown in your VirtualBox list of VMs.
If you use a Web server to host your vagrant base boxes you can then create Vagrantfile environments. For example;
config.vm.define :default_fail do |failconfig|
# This is here to fail the config if all machines are started by mistake
failconfig.vm.provision :shell, :path => 'FAIL: This box is invalid, use vagrant up BOXTYPE'
end
config.vm.define :testme do |testme|
testme.vm.customize ["modifyvm", :id, "--name", "testme", "--memory", "1024"]
testme.vm.network :hostonly, "33.33.33.54"
testme.vm.host_name = "testme"
end
config.vm.define :gui do |gui|
gui.vm.customize ["modifyvm", :id, "--name", "gui", "--memory", "1024"]
gui.vm.network :hostonly, "33.33.33.55"
gui.vm.host_name = "gui"
gui.vm.provision :shell, :path => 'bin/gui_profile.sh'
end
###
# General config
###
config.ssh.timeout = 60
config.vm.box = "default.box"
config.vm.box_url = "http://myvagrant.websrv.net/baseboxes/CentOS7_x86-64.box"
config.ssh.username = "vagrant"
config.ssh.private_key_path= "/home/user/.ssh/vagrant_id"
end
vagrant up testme
Will build the minimal CentOS build.
I haven't discussed the Web server build he as that silly requires the ability to list files, so a simple web server where you can simply add the base box files.