Archivio

Archivio per la categoria ‘Kubuntu’

ubuntu 15.04 64bit: PLEX doesn’t work

17 Agosto 2015 Commenti chiusi

First of all remove old plex packages.
From terminal:

cd /var/lib/dpkg/info

and

sudo rm -f plexmediaserver*

and finally:

sudo dpkg -r plexmediaserver

now get the package that fixes the issue:

sudo wget https://downloads.plex.tv/plex-media-server/0.9.12.1.1079-b655370/plexmediaserver_0.9.12.1.1079-b655370_amd64.deb

Install the new package (with default answers)…

sudo dpkg -i plexmediaserver_0.9.12.1.1079-b655370_amd64.deb

…and run the service:

sudo service plexmediaserver start

njoy

Categorie:Kubuntu, plex, Ubuntu Tag: , ,

Kubuntu 14.04: impossible to shutdown, logout, reboot

25 Aprile 2015 Commenti chiusi

After the last upgrade it’s impossible to reboot, shutdown and logout from K menu. When I click on the icon, the system does nothing.
No errors in log files.
If I open the konsole and shutdown the system with command

sudo halt

or reboot it with:

sudo reboot

I’ve no problems, the system, shutdowns/reboots correctly.

The only way to correct everything is to rename the file
.kde/share/config/ksmserverrc
and let the system to recreate it, after reboot.
So from the konsole:

sudo mv .kde/share/config/ksmserverrc .kde/share/config/ksmserverrc.old
sudo reboot
Categorie:Kubuntu, Linux Tag:

Python: current trace calculator

30 Luglio 2014 Commenti chiusi

la formula approssimata per il calcolo della corrente massima su una pista di spessore ‘thickness’, larghezza ‘width’, tenendo conto del delta termico ‘t_diff’ è:

I = k_layer * t_diff^0.44 * A^0.725

dove k_layer assume i valori di 0.024 per gli inner layer e 0.048 per i layer esterni.

Il codice python è il seguente:

import Tkinter as Tk
import ttk
import tkMessageBox as Mb

CENTER = Tk.N + Tk.S + Tk.W + Tk.E


class View(object):
    def __init__(self):
        self.root = Tk.Tk()
        self.root.title('Current trace calculator')
        self.rb_var = Tk.IntVar()
        self.thickness_var = Tk.StringVar()
        self.current_var = Tk.StringVar()
        self.t_diff_var = Tk.StringVar()
        self.width_var = Tk.StringVar()

    def build_ui(self):
        """Build the UI with all widgets"""
        frame = Tk.Frame(self.root)
        frame.pack(fill=Tk.BOTH)

        ##### Radio buttons
        rb_inner = Tk.Radiobutton(frame, text='Inner', variable=self.rb_var,
                                  value=1)
        rb_inner.grid(sticky=CENTER, row=0, column=0, padx=5)
        rb_ext = Tk.Radiobutton(frame, text='External', variable=self.rb_var,
                                value=2)
        rb_ext.grid(sticky=CENTER, row=0, column=1, padx=5)

        ttk.Separator(frame).grid(sticky=CENTER, row=1, column=0,
                                  columnspan=2, padx=2, pady=2)
        ##### Thickness
        Tk.Label(frame, text='* Cu thickness (um)').grid(
            sticky=CENTER, row=2, column=0, padx=2, pady=2)
        en_thickness = Tk.Entry(frame, textvariable=self.thickness_var)
        en_thickness.grid(sticky=CENTER, row=2, column=1, padx=2, pady=2)
        ttk.Separator(frame).grid(sticky=CENTER, row=3, column=0,
                                  columnspan=2, padx=2, pady=2)

        ##### T_diff
        Tk.Label(frame, text='* delta temp.(max - Ta)', width=25).grid(
            sticky=CENTER, row=4, column=0, padx=2, pady=2)
        en_t_diff = Tk.Entry(frame, width=5, textvariable=self.t_diff_var)
        en_t_diff.grid(sticky=CENTER, row=4, column=1, padx=2, pady=2)

        ttk.Separator(frame).grid(sticky=CENTER, row=5, column=0,
                                  columnspan=2, padx=2, pady=2)
        ##### width box
        Tk.Label(frame, text='* Trace width (mils)', width=25).grid(
            sticky=CENTER, row=6, column=0, padx=2, pady=2)
        en_width = Tk.Entry(frame, textvariable=self.width_var)
        en_width.grid(sticky=CENTER, row=6, column=1, padx=2, pady=2)
        ttk.Separator(frame).grid(sticky=CENTER, row=7, column=0,
                                  columnspan=2, padx=2, pady=2)

        ##### current box
        Tk.Label(frame, text='Current max (A)', width=25).grid(
            sticky=CENTER, row=8, column=0, padx=2, pady=2)
        en_current = Tk.Label(frame, bg='yellow',
                              textvariable=self.current_var, anchor='w')
        en_current.grid(sticky=CENTER, row=8, column=1, padx=2, pady=2)
        ttk.Separator(frame).grid(sticky=CENTER, row=9, column=0,
                                  columnspan=2, padx=2, pady=2)

        ##### buttons
        self.btn_gen = Tk.Button(frame, text='Calculate!')
        self.btn_gen.grid(sticky=CENTER, row=10, column=0, padx=2, pady=2)
        btn_quit = Tk.Button(frame, text='Quit', command=self.root.destroy)
        btn_quit.grid(sticky=CENTER, row=10, column=1, padx=2, pady=2)
        self.rb_var.set(2)

    def start(self):
        """Start the mainloop"""
        self.root.mainloop()


class Controller(object):
    def __init__(self):
        self.view = View()
        self.view.build_ui()
        self.view.thickness_var.set('35')
        self.view.t_diff_var.set('15')

    def run_app(self):
        """Start the View (UI) mainloop"""
        self.view.start()

    def bind_widgets(self):
        """Bind the view widgets to the callbacks"""
        self.view.btn_gen.configure(command=self.on_calculate)

    def on_calculate(self):
        """Calculate Button callback, calculate the max current"""
        try:
            t_diff = float(self.view.t_diff_var.get())
            thickness = float(self.view.thickness_var.get())
            width = float(self.view.width_var.get())
        except (TypeError, ValueError):
            alert("Fill [*] with numbers not literals!")
        else:
            k_layer = 0.024 if self.view.rb_var.get() == 1 else 0.048
            current = calculate_current(width, thickness, t_diff, k_layer)
            self.view.current_var.set(str(current))


def calculate_current(width, thickness, t_diff, k_layer):
    """Calculate the max current for a trace of width=width.
       formula: I = k_layer * t_diff^0.44 * A^0.725
       A is measured in mils^2
    """
    section = thickness / 25.4 * width
    return k_layer * t_diff**0.44 * section**0.725


def alert(message):
    """Return a MessageBox with "string" message passed as argument"""
    Mb.showinfo(title='Alert!', message=message, icon=Mb.INFO)


def main():
    c = Controller()
    c.bind_widgets()
    c.run_app()


if __name__ == '__main__':
    main()

curtracecalc

Categorie:Kubuntu, python Tag:

Kubuntu Amarok shoutcast

17 Luglio 2014 Commenti chiusi

Per attivare shoutcast su Amarok procedere come segue.

Accedere al gestore degli script:

Impostazioni, Configura Amarok, Script

premere il bottone Gestisci gli script

nella entry di ricerca digitare

SHOUTcast

ed installare SHOUTcast service

SHOUTcast1

Confermare, chiudere e riavviare Amarok.
Tornare in:

Impostazioni, Configura Amarok, Script

e attivare lo script installato in precedenza:

SHOUTcast2

Ora dal pulsante Internet sarà possibile ascoltare “in shoutcast”!

SHOUTcast3

Categorie:Kubuntu Tag:

Kubuntu: halt mount: / is busy

5 Febbraio 2014 Commenti chiusi

Ho installato Kubuntu 13.10 su un laptop HP DV6000.
Mi sono accorto che in fase di spegnimento, il pc va in
stallo, rimanendo bloccato sul messaggio:

mount: / is busy

indagando sui vari log, ho scoperto essere colpa di network-manager
che tiene bloccato il tutto, impedendo al sistema di completare lo
shutdown.

In effetti, se prima disconnetto la rete e poi spengo,
tutto va a buon fine.

Googlando ho scoperto essere questo un bug noto.
Intervenendo sui runlevel del sistema, si può automatizzare il
tutto con uno script, che viene lanciato poco prima dello spegnimento.

aprire un terminale:

kate connection_down.sh

e mettere il seguente codice:

#!/bin/bash
## the script put all network interfaces down before halt,
## except 'lo'

for x in /sys/class/net/*; do
  interface="${x##*/}"
  if [ interface!='lo' ]
    then
      sudo ifconfig $interface down
      echo "+++ $interface is down!" ## debug
  fi;
done

assegnare i permessi in esecuzione

chmod +x connection_down.sh

spostare lo script in /etc/init.d

sudo mv connection_down.sh /etc/init.d/

Ora i runlevels di linux:

Level Purpose
0 Shut down (or halt) the system
1 Single-user mode; usually aliased as s or S
2 Multiuser mode without networking
3 Multiuser mode with networking
4 Free
5 Multiuser mode with networking and the X Window System
6 Reboot the system

mi interessano lo spegnimento (0) ed il reboot (6).
Piccola parentesi:
Dentro ogni runlevel (da /etc/rc0.d ad /etc/rc6.d) i link agli script,
vengono eseguiti in ordine alfabetico, quindi dobbiamo linkare il nostro
script nelle directory specifiche, utilizzando un nome che venga chiamato
al momento giusto.

Siccome il “kill all remaining processes” durante la fase di shutdown, viene
eseguito nel file S20sendSIGS, e considerato il file S10* che si occupa
di unattended upgrades (la connessione deve essere ancora attiva),
chiameremo i link al nostro script con S11*, così varrà chiamato
a metà strada tra i due citati.

quindi:

sudo ln -s /etc/init.d/connection_down.sh /etc/rc0.d/S11connection_down

per lo shutdown e

sudo ln -s /etc/init.d/connection_down.sh /etc/rc6.d/S11connection_down

Questo è tutto.

Per controllare che tutto vada a buon fine, vedendo a video che non ci sia il messaggio
iniziale, modifichiamo il grub in modo da poter leggere quello che accade:

sudo kate /etc/default/grub

modifichiamo la riga

GRUB_CMDLINE_LINUX=”nosplash”

sudo update-grub

Allo spegnimento sembra tutto risolto.

Categorie:Kubuntu, Linux Tag:

KDE: finestre aMule e Firefox

13 Maggio 2012 Commenti chiusi

Per migliorare l’aspetto minimale riservato a FireFox e aMule, installare il pacchetto kde-style-qtcurve

sudo apt-get install kde-style-qtcurve

poi andare in Impostazioni di Sistema/Aspetto e selezionare Aspetto GTK+
Selezionare qtcurve in Stili Gtk+ e confermare.


al riavvio di firefox e aMule, sarà tutto molto più gradevole:

Categorie:Kubuntu Tag:

Ubuntu 12.04 Precise Pangolin LTS

26 Aprile 2012 Commenti chiusi


Rilasciata finalmente la versione stabile:
UbuntuKubuntuxubuntulubuntu

Categorie:Kubuntu, Ubuntu Tag:

Kubuntu Karmic Hardware drivers: BCM4311 e Nvidia Go 7400

18 Novembre 2009 Commenti chiusi

Ho installato da zero Kubuntu Karmic Koala sul mio Laptop HP DV6215EA

Mi sono accorto che in Hardware drivers non vengono proposti driver per le periferiche in oggetto.
Ovviamente le periferiche sono riconosciute come verificato da

lspci

Per attivare la scheda di rete wi-fi, è necessario installare il <a href=”http://packages.ubuntu.com/search?keywords=bcmwl-kernel&searchon=names&suite=karmic&section=all”>pacchetto</a>:
<strong>bcmwl-kernel-source</strong>

quindi da terminale

sudo apt-get install bcmwl-kernel-source

Dopo aver riavviato la scheda di rete wifi ha funzionato.

<p> </p>

Per quello che riguarda la scheda video <strong>NVIDIA GEForce GO 7400</strong>, ho installato il <a href=”http://packages.ubuntu.com/karmic/nvidia-glx-185″>pacchetto</a>
<strong>nvidia-glx-185</strong>.

Sempre da terminale:

sudo apt-get install nvidia-glx-185

e

sudo nvidia-xconfig

riavviato e anche la scheda video tutto ok.

Categorie:Kubuntu Tag: