Skype for Linux – Using corporate proxy

Since, unfortunately, I some times need to use Skype on Linux and because I’m behind a corporate proxy server, Skype doesn’t work or accept, at least on Arch Linux running KDE Plasma desktop, the system proxy settings.

Setting the http_proxy/https_proxy variables have no effect on the Electron (I think…) Skype based app.

Anyway the solution for this is quite simple: Just install ProxyChains.

[pcortex@desktop:~]$ sudo pacman -S proxychains-ng

After installing, edit the file /etc/proxychains.conf and under the [ProxyList] add your proxy:

http  10.1.1.1  3128  my_proxy_username  my_proxy_password

Save the file, and now just run skype with the following command:

[fpcortex@desktop:~]$ proxychains skypeforlinux

Making now the test call works.

Advertisements

Dropbox doesn’t start (Linux)

So a quick note regarding Dropbox running on ArchLinux with Nvidia drivers. Since I use KDE Plasma 5 that doesn’t show system tray icons of some applications that have not migrated to the new system tray protocol, I didn’t notice that after upgrading Dropbox it stopped working.

A quick investigation, I’ve found out that starting Dropbox from the command line did nothing. It started and stopped. Something is going on…

So I’ve used the strace command to see if I could catch something meaningful:

[pcortex@pcortex:~]$ cd .dropbox-dist/dropbox-lnx.x86_64-3.10.8/
[pcortex@pcortex:dropbox-lnx.x86_64-3.10.8]$ strace ./dropbox 2> stracedump.txt

And sure enough in the stracedump.txt I had the following error:

open("/usr/lib/dri/tls/swrast_dri.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/dri/swrast_dri.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
rt_sigaction(SIGSEGV, {0x7f09e1dea010, [SEGV], SA_RESTORER|SA_RESTART, 0x7f09e1a88d60}, NULL, 8) = 0
write(4, "Fatal Python error: ", 20)    = 20
write(4, "Segmentation fault", 18)      = 18
write(4, "\n\n", 2)                     = 2
write(4, "Traceback (most recent call firs"..., 36) = 36
write(4, "  File ", 7)                  = 7
write(4, "\"", 1)                       = 1
write(4, "d", 1)                        = 1

So the error is related to the Software Raster library, that I don’t have because I’m running Nvidia proprietary drivers.

The confirmation came with the following command:

[pcortex@pcortex:dropbox-lnx.x86_64-3.10.8]$ LIBGL_DEBUG=verbose ./dropbox
libGL: OpenDriver: trying /usr/lib/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
libGL error: dlopen /usr/lib/dri/swrast_dri.so failed (/usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: swrast_dri.so
libGL error: reverting to indirect rendering

The solution?
Quite simple, just remove (backup) the libGL.so.1 library that exists on the Dropbox directory.
After the removal, Dropbox starts just fine.

Using KDE Kate editor as an Arduino IDE

The Arduino IDE is the tool of choice for building and programming for the Arduino platform. It has all that is need for casual programming, namely a simple way to choose and select the Arduino board and serial port, a simple interface, and a simple editor.

But those of us used to other tools for programming, like NetBeans, IntelliJ IDEA (I use it as the Android Studio version) or Eclipse, can find the editor lacking in little things that makes programming easier.

Anyway I was able to use NetBeans for programming and deploying arduino sketchs, with a great feature that is/was command auto completion for the Arduino C “language”. But Netbeans is big, and all it does is to call the Atmel tools for compiling and uploading sketchs into the arduino boards.

So I’m a KDE user, and KDE has a great extensible editor named Kate. Why not use it for programming for the Arduino?

As I said, Kate is a powerful extensible editor and  there are two plugins for making Kate “friendlier” in this task as a replacement for the Arduino IDE.

What we need to accomplish this? We need the following files/software:

Syntax highlighting for ino and pde files: https://github.com/jeroendoggen/Arduino-KDE-syntax-highlighting/blob/master/ArduinoKate.xml

Base project at: https://github.com/jeroendoggen/Arduino-KDE-syntax-highlighting

Just download the ArduinoKate.xml file and as root copy it to the /usr/share/kde4/apps/katepart/syntax folder. Just make sure that on your distribution that the path is correct.

Now if opening an .ino or .pde file with the Kate editor, we should have syntax highlight.

Next we need to download an Arduino Make file from https://github.com/sudar/Arduino-Makefile. Just download it and unzip it to a directory that won’t be deleted or moved. You also need the Arduino IDE to make this work, as this make file will get the tools and libraries from the Arduino IDE installation directory.

Second, change the .bashrc file so the following environment variables are added:

# Base directory where the arduino IDE is installed. Change to suit your directory
export ARDUINO_DIR=/home/pcortex/arduino
# Base directory where the Sudar Arduino Makefile files where installed
export ARDUINO_DIR=/home/pcortex/00.Develop/Arduino-Makefile-master
# Base Arduino tools directory
export AVR_TOOLS_DIR=/usr

We have almost everything ready:

Just launch now the Kate editor and goto Settings->Configure Kate->Plugins and enable the Build and Project plugin.

We are now ready. Let’s develop:

1) Create a directory for your project: mkdir ~/Arduino-project

2) Change to that directory and create a makefile. The content is simple:

BOARD_TAG = uno
MONITOR_PORT = /dev/ttyACM*
#include $(ARDMK_DIR)/Arduino.mk
include /home/pcortex/00.Develop/Arduino-Makefile-master/Arduino.mk

Save the file. This makefile is for the Arduino Uno. To compile for other boards, on this directory and with this make file saved, just run the command make show_boards to see the available boards. Then change the BOARD_TAG appropriately to your board. For example, for the Arduino Mini Pro 5v the BOARD_TAG is pro5v328 and not uno.

3) Create the Kate project file:  This file MUST be named .kateproject :

{
"name": "My Arduino Project Name"
, "files": [ { "git": 1 }, {"directory": ".", "filters": ["*.ino","*.pde","*.c","*.cpp", "*.h" ] } ]
, "build": {
                  "directory": "."
                   , "build": "make all"
                   , "clean": "make clean"
                   , "upload": "make upload"    
            }
}

The JSON “name” tag will define the name that shows up at the Kate Project dropdown box selector.

4) If using Git (as I do) just add a .gitignore file where the *.o and *.d files are ignored.

That’s it.

Create your main.ino file and add code.

To compile, just go to Build->Build Default Target.  This is equivalent to Verify on the Arduino IDE.

To upload, on the Build plugin window, just select (or add) the make upload option, and the Makefile will upload the sketch/program to the board.

If any errors happen, clicking on the Build plugin output tab, on the lines with errors and line numbers, will jump to the exact location of the error.

For more information refer to Sudar documentation for the Makefile.

Happy coding!

 

Kubuntu upgrade from 12.04 to 13.04

Despite Kubuntu 12.04 being a LTS release, and after some weeks upgrading to 13.04 on my personal desktop computer, I decided to do the same on my Work Laptop.

Things didn’t ran as expected…

First the upgrade from 12.04 to 12.10 deleted a bunch of packages, by my command 😦 and I ended up with no graphical display… A quick look at Xorg.0.log file showed me that my Xorger’s driver for my Intel graphic card was gone.

Anyway, I’ve installed the xservers-xorg-video-intel package and proceeded to upgrade to 13.04.

At the end despite having a graphical desktop, after login on KDE, a qdbus error appeared… qdbus package was missing… (apt-get install qdbus).

Also on 12.04 the transition from the login greeter to the desktop is silky smooth (it is on my desktop), on my laptop it blanks showing a black screen with a mouse cursor, but the desktop shows up abruptly. I don’t have now the KDE logon progress icons…

And finally, DNS settings from my DHCP servers didn’t worked, I had to manually add the dns servers IP to resolv.conf…  This issue was also a missing package, namely dnsmaq. After adding up the nameserver 127.0.0.1 to my /etc/resolv.conf file, everything is up….

Let’s see what is waiting again in the dark…

[K]Ubuntu on the Asus N73SV video issues – i915, Nouveau, Nvidia and Bumblebee

Well, after a month on using this Asus Laptop N73SV there are some issues with it.

The first one, and I’m not sure if it’s a driver issue or just a plain hardware issue is that the external connected monitor was working fine, and then started to have a blue tint and now it has a green tint. So first I wonder if the VGA cable or the monitor itself was bad, but replacing it by another same monitor brand and model  and different VGA cable, it has shown the same issues. So Ok, it’s a laptop issue that some HP owners are also having… Just search for HP an video tint… Removing the battery and power, waiting some time, and booting up with the external monitor, even the ASUS logo is tinted… So it’s not a K/Ubuntu issue. Solution? None so far. I have to try with a different monitor/and cable namely HDMI.

The second part of this post related with the video issues that I have is due to the fact that this N73SV has dual cards: an Intel i915 and NVidia GT540M. While trying to debug the above issue, I ended up with no desktop effects on KDE KDM by messing around with the desktop effects options… Whatever I did to enable them I was also greeted with the message that Effects couldn’t be enabled. So issue was related to the fact that the GLX libraries couldn’t be found/loaded… When running glxgears this error appear:

name of display: :0.0
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.

The solution:
I’ve removed bumblebee and nvidia, which cleared the issue:

apt-get purge bumblebee
sudo apt-get purge nvidia*
apt-get install –reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
dpkg-reconfigure xserver-xorg
reboot

And after this I could enable  again Desktop effects but I was using the default Intel driver and the Nouveau driver.

Finally, I’ve installed again MrMee/Bumblebee, which by itself installed again the Nvidia drivers, and after that I could only boot into Recovery Mode, because a normal start wouldn’t give me the Kubuntu boot logo and at final boot stage I just had a black screen with an hanged computer…

This issue is due to the fact that the nouveau driver is/was enabled, and I had to disable it. I found no complete instructions for doing that, but these do work:

The nouveau driver needs to be disabled, by editing two files:

/etc/modprobe.d/blacklist.conf

Add at the end of this file the following line: blacklist nouveau

And then, the other file to edit it depends of your grub version. For Grub2 , there is the need to add the following to the file /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash pci=nomsi nouveau.blacklist=1

And then run the command: update-grub2

On Grub1, just edit the menu.lst file and add the nouveau.blacklist=1 to yur booting kernel options, keeping in mind that after a kernel upgrade you need to blacklist the module again.

Booting up now with the Intel Driver and the Nvidia driver installed by Bumblebee should work.

Kubuntu, Bumblebee upgrade and NVidia

Yesterday, I’ve upgraded bumblebee on my Asus N73SV, which by itself downloaded and installed a new version of the proprietary Nvidia driver.

During the upgrade process, I was asked to install the maintainer version or my version… and I kept my version.

So after rebooting, I had no Kubuntu splash screen, just a black screen and after a while it just computer just hang with a dead keyboard. So unbootable and only rebootable by pressing the power button several seconds.

After some fiddling around I found out that booting into safe mode, getting into a root shell and starting KDM, everything seemed to work fine.

To keep a long story short, at boot time the X server loaded the Nouveau driver, and it was failing (looping) with some strange IRQ error. So the computer hanged.

The solution: Goto System -> Additional Drivers and enable the NVidia driver.

Reboot, and everything is Ok: Splash screen and Kdm.

A good solution is probably to purge completely the Nouveau driver if you’re really want to use the Nvidia driver. Instructions here: https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia

I reality this is the same issue with the ATI drivers. After upgrading the drivers it is, at least in my case, to explicitly enable them.

[K]Ubuntu on Asus N73SV

So my employer replaced my old work laptop HP nx9420 by a new ASUS N73SV, more precisely N73SV-V1G-TZ393V, which by the way is  a great name (not…). The Asus N73 is the bigger screen brother of the Asus N53.

My old HP was able to do any work I could ask for, but it’s limitations on handling virtual machines where showing up, delaying work significantly. This Asus is a completly different beast. It’s fast, and has 3 SODIMM slots, so right now I have it with 12GB of RAM (8GB are two 4GB of Kingston memory plus the original 4GB of RAM). To open up it, you must remove the keyboard (small tabs near the ESC key, F5, F9, PRTSC and End at the top)  and one SODIMM slot is available right away (on th Q2630 CPU’s). Then after removing some screws (check the manual), the disk bay and remaining memory slot is also available at the bottom by removing the bottom cover.

The first thing to do with it was of course to nuke Windows 7, and after much indecision between KUbuntu and Arch, I installed Kubuntu 11.04 64 bit edition. After some fiddling with partitioning (I just left the original recovery partition), everything installed smoothly. Going to KUbuntu was more for getting a full working computer as fast as I can, without too much fiddling, but I left a partition to try out Arch on my spare time.

So what works out of the box? Well almost everything. Let’s talk about what doesn’t work.

First I’ve followed these instructions on the Ubuntu Help Pages for the N53SV and installed the acpi4asus_dkms, blueetooth driver and Bumblebee for the dual card support.

Still USB3 with USB2 devices doesn’t work, and hibernation/suspension doesn’t work. Regarding USB3 it’s a confirmed bug, so in the near future a solution will be available. Regarding hibernation/suspension I think it’s related to the NVidia card driver, but not sure because the computer does shutdown, but comes up to a black screen.

Also this specific version of the N73SV ha a DVB-T card with the Philips chipset SAA7231. It doesn’t work and there is no driver available because the manufacturer doesn’t won’t to support Linux. There is a two year old drive, but I think I doesn’t work with the recent kernels.

At the end I have a full accelerated desktop, dual monitor support, Wifi, bluetooth, networking, webcam, USB2, TurboBoost and the left media keys working fine.

Moving from the old computer, was just a matter of copying my home directory and following these instructions to re-install all software.

The good:

  • Screen size and quality: Superb
  • Fast, fast, fast
  • Big Hard disk (640GB). Available slot for a second hardisk/SSD
  • Allows a lot of memory: 12GB
  • ExpressGate

The bad:

  • Fiddly keyboard, getting time to get used to.
  • Keyboard sunken a bit when pressing keys.
  • No ExpressCard Slot
  • No eSata port
  • Location of some USB ports at the back is not very practical.