Showing posts with label OS. Show all posts
Showing posts with label OS. Show all posts

Monday, February 08, 2016

FreeRDP

FreeRDP enables a connection to a windows machine from Debian GNU-Linux. freerdp-x11 can be installed from the Synaptic package manager. The program is called xfreerdp.


Usage example:
xfreerdp /u:**user** /p:**password** /v:**IP** /drive:data,/home/paul/R/forestproductsdemand/data-end
Connect in fullscreen mode using a stored configuration connection.rdp and the password Pwd123! :
xfreerdp connection.rdp /p:Pwd123! /f
Connect to host rdp.contoso.com with user CONTOSO\\JohnDoe and password Pwd123!
xfreerdp /u:CONTOSO\\JohnDoe /p:Pwd123! /v:rdp.contoso.com

Connect to host 192.168.1.100 on port 4489 with user JohnDoe, password Pwd123!. The screen width is set to 1366 and the height to 768. See also option /drive below.
xfreerdp /u:JohnDoe /p:Pwd123! /w:1366 /h:768 /v:192.168.1.100:

The screen shot below shows a windows session accessed from within the Gnome desktop. A folder is shared an can be visible in both the windows and Gnome file explorers.


Options

Command line options
/drive:nameofdrive,localfolder : Redirect localfolder as nameofdrive on the server machine

Window size

Pressing CTRL+ALT+ENTER will switch from windowed to full screen and vice-versa. This is sufficient for me to see the full screen on a Gnome Desktop. But there is no option for scroll bars if the distant screen is to large to appear on screen.

Multiple RDP connections to a windows machine

I'm working with a colleague on the same machine. She has long running processes on the machine and I need to use specific software. According to this Microsoft forum, multiple RDP connection is not possible on windows.

Change keyboard layout

List available keyboard layout
xfreerdp /kbd-list
I didn't manage to enter the keyboard option. I asked a question on SuperUser.

Automation for a thin client

Command script to open xfreerdp and reopen it when it closes suggests this script: 
while (true); do xfreerdp -f xxx.xxx.xxx.xxx ; sleep 2; done

Monday, January 25, 2016

A year on Debian

Inspired by other users seen on the Linux setup. I switched my work computer to Debian GNU/Linux in January 2015. I used the Jessie version which was "unstable" at the time. It became "stable" in april 2015 and I think the adjective is deserved. I'm happy.


I mostly use the R statistical software, the iceweasel web browser, the Lyx editor, the reference manager Jabref and the Evolution mail and calendar program. I learned a lot by using git (file revision system) and databases through the command line. I sometimes use vim to edit text files and I use the RStudio editor in Vim mode. I also use the Libre office Calc, Writer and Draw software.

As long as you stick with what is in the huge Debian package repository, software updates are easy. If you need programs updated very recently (in the last months), installation can become tricky. Although it mostly involves adding new software repositories or installing .deb files directly. For example I managed to install the proprietary statistical software STATA.

Monday, May 26, 2014

Debian GNU-Linux installation on a Lenovo T400


I needed an operating system more stable than Microsoft windows for my daily tasks such as: programming with the R statistical software and writing PDF reports with the Lyx document processor. I read about John MacFarlane (author of pandoc) who is using Debian with the xmonad desktop. This blogger documented why he switched from Ubuntu to Debian. The same blogger also wrote interesting posts at the electronic Frontier Fondation on privacy issues with Ubuntu: on the one side Ubuntu offers an easy way to install full Hard Drive encryption, on the other side, Ubuntu's default desktop search sends search requests over unencripted internet (I should move this additional content to another post).

15 years ago already, I had talked with a friend who was using Debian. I wonder if he still is?

I decided to give Debian a try.

Creating a bootable USB stick

Trying the live version from a USB stick

I introduced the USB key in the laptop,  pressed the "blue thinkvantage" key, entered the BIOS setup and changed the boot order. I placed the USB devices first in the list. The live version seemed to work fine, the Gnome desktop was responsive enough on that machine (Lenovo Thinkpad T400). The external screen was easy to set-up, and network access configured automatically. So I decided to install that Debian system on the hard drive.

Installation

I restarted the laptop with the USB key inserted. I chose the graphical installer. There was a small issue with the fact that the installer was looking for a CD-ROM. But no CD-ROM was available because I was running the install from a USB stick. Based on this blog post, I jumped to the command line interface and typed:
mount /dev/sdb /cdrom 
This command fixed the issue, installation could continue. I partitionned my hard drive to leave 100 GB for the windows partition and the rest (144 GB) for the new GNU-Linux system. Partitioning took a frightening amount of time. During which I thought the system as frozen. But after maybe an hour, installation carried on... I restarted the system. I am now writing this blog post from a fresh Debian system.

Hardware support

Docking station

Hotpluging usb keyboard was working on the laptop itself, but not working on the docking station. A quick fix was to disconnect and reconnect the docking station.
I have connected the docking station to an external larger screen I set this up as my main monitor under system settings / displays.

Different Keyboard layouts

My laptop has a Finnish keyboard, and I am located in France, therefore I use a French keyboard. Under system settings / region and language settings I could add the French keyboard layout. The fact that it's possible to "use the same layout for all windows" is a plus compared to windows. I regularly switch from the Finnish to the French keyboard layout. In windows, I had to change the keyboard layout for all windows one by one.

Network drive

From the Nautilus file manager, I could access windows shared drive using my company's internal network login details.
I have been trying to synchronize this folder using Unison (GUI for rsync). Setting up a local synchronization requires to mount the windows share in the file system. mount.cifs from cifs utils can mount windows shared drives.

Network printer

Under system settings /  printers, the network printer appears. But I didn't manage to connect to the Sharp MX 2600 N.

Wireless card

Show all hardware
lspci
 Network controller: Intel Corporation PRO/Wireless 5100 AGN
Install support for wifi device on Debian
apt-get install firmware-iwlwifi
Reinsert this module to access installed firmware:
# modprobe -r iwlwifi ; modprobe iwlwifi
Wifi works! :-)

Location of software packages

A mirror for France is located at http://ftp.fr.debian.org/debian/.

Install research software 

See also other software install tips in this post on Debian GNU Linux
Lyx editor for Latex
sudo aptitude install lyx
Jabref
sudo aptitude install jabref

Evolution with Microsoft Exchange plugin

My Company uses microsoft exchange on its email servers. An "exchange" plugin can be installed from the Synaptic package manager but this only works for exchange 200 and 2003. This site recommends using the mapi plugin instead which should work for exchange 2007 and 2010. As explained here, my company also uses a different server for the web mail access and the internal connection to the mail server.

To find the internal sever name, I went to the windows version of outlook 2007. Right click on mail box / properties / advanced ... / Microsoft Exchange server.

Mail loads fine now. I can send email too.

Calendar events are not displayed, even though outlook calendar events appear within the desktop calendar (The little calendar that appears when clicking on the desktop clock). This page says that I should upgrade to a more recent version of Evolution. This would require the use of Debian backports. Couldn't get backports to work for now. It said that I already have the most recent version of evolution installed.
I add this line to the 
# Backports repository
deb http://ftp.debian.org/debian wheezy-backports main contrib non-free
Ran this command
sudo apt-get update
sudo apt-get -t wheezy-backports install evolution
Got this message
evolution is already the newest version.
Well it's actually normal because evolution is currently (August 2014) not in the list of Debian backports.

R and Rstudio install on Debian wheezy 7

Instruction below kept here for historical purposes, I'll update these R specific instruction in another blog post.

I used the Synaptic package manager to add the R repository for Debian from a nearby mirror, under : settings / repositories / other software / add.
Add this APT line:
deb http://cran.univ-paris1.fr/bin/linux/debian/ wheezy-cran3/

There was an error:
W: GPG error: http://cran.univ-paris1.fr wheezy-cran3/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 06F90DE5381BA480
After looking at several forums, and this stackoverflow question, I installed debian-keyring and added the key with the commands:
gpg --keyserver pgpkeys.mit.edu --recv-key 06F90DE5381BA480
gpg -a --export 06F90DE5381BA480 |sudo apt-key add -
I could then install R version 3 from the synaptic package manager.

I downloaded R-studio and installed it. There was a missing dependency for libjpeg62. I installed that package from Synaptic. Then ran the dpkg command to install rstudio.
dpkg -i rstudio-0.98.507-i386.deb
Then I installed Git in order to clone my R project from an online repository.
git clone  project_repository_url
Within Rstudio, I installed a few packages:
install.packages(c("plyr", "reshape2", "ggplot2"))
install.packages(c("xtable", "markdown", "devtools"))
Ready to work!

Further reading

Wiki on installing Debian on Thinkpad laptops.

Wednesday, March 17, 2010

Installing Ubuntu server on KVM virtual machine

In the previous post, I tested the usage of Xubuntu on a virtual machine.

Today I installed Ubuntu server edition on a virtual machine. The 64 bit edition won't install on the virtual machine. By dowloading the 32 bit version , I could install a server on the virtual machine. Command:
kvm -m 750 -cdrom ../Downloads/ubuntu-9.10-server-i386.iso -boot d ubuntu-server.img
It installed fine, and I added the 2 options to install a LAMP server and a Postgreesql database.
After installation, I restarted the new system with the command:
kvm -no-acpi -m 700 ubuntu-server.img
[edit] The -no-acpi flag is to disable acpi. I used the command from a how-to done by a guy who wanted to avoid a kernel panic on an Ubuntu 7.10, but in ubuntu 9.10 acpi works well. So I can start the server with:
kvm -m 700 ubuntu-server.img

Starting Ubuntu-Server on KVM Virtual Machine

Next step would be to access the http server from outside the virtual machine. For this I probably need to set a public bridge.

Tuesday, March 16, 2010

Virtual Machine

I installed KVM on my Ubuntu computer.
Following this instruction, I created a raw drive image with the command:
qemu-img create xubuntu.img -f qcow2 2G
I used the option -m 750 to start the virtual machine (VM) with 750 Mb of RAM. Then I used the option -cdrom to use a file as a cdrom image and the option -boot d to say that the VM shall boot on a cdrom drive. The command:
kvm -m 750 -cdrom ../xubuntu-9.10-desktop-i386.iso -boot d xubuntu.img
...starts the installation of Xubuntu on the virtual machine.

Screenshot of the starting page of Xubuntu on the virtual machine.

The virtual Machine runing Xubuntu

Now I'm going to install Ubuntu server and try to install a LAMP on it.

Thursday, March 04, 2010

From DOS to Windows NT

In 1981 IBM relesead the Personal Computer with Microsoft's MS DOS as operating system.CP/M-86:
When IBM contacted other companies to obtain components for the IBM PC, the as-yet unreleased CP/M-86 was its first choice for an operating system because CP/M had the most applications at the time. Negotiations between Digital Research and IBM quickly deteriorated over IBM's non-disclosure agreement and its insistence on a one-time fee rather than DRI's usual royalty licensing plan.[1] After discussions with Microsoft, IBM decided to use 86-DOS (QDOS), a CP/M-like operating system that a Seattle area computer company had made for its own hardware. Microsoft adapted 86-DOS for the PC hardware and IBM shipped it as PC-DOS.

After learning about the deal, Digital Research founder Gary Kildall threatened to sue IBM for infringing DRI's intellectual property, and IBM agreed to offer CP/M-86 on the PC to settle the claim. CP/M-86 was released a few months after the PC and was one of three operating systems a customer could buy from IBM. At $240 per copy it sold poorly compared to the $40 PC-DOS. Kildall would later accuse IBM of setting the prices to marginalize him, but the accounts of Microsoft, IBM, and other DRI executives indicate that Kildall had demanded a substantial royalty for CP/M-86 while Microsoft had accepted a fixed sum. Customers rapidly adopted the PC platform with PC-DOS as the new industry standard, and opportunities for DRI to license CP/M-86 to other customers dwindled.


Windows NT:
Microsoft decided to create a portable operating system, compatible with OS/2 and POSIX support and with multiprocessing in October 1988.[10] When development started in November 1989, Windows NT was to be known as OS/2 3.0,[11] the third version of the operating system developed jointly by Microsoft and IBM. In addition to working on three versions of OS/2, Microsoft continued parallel development of the DOS-based and less resource-demanding Windows environment. When Windows 3.0 was released in May 1990, it was eventually so successful that Microsoft decided to change the primary application programming interface for the still unreleased NT OS/2 (as it was then known) from an extended OS/2 API to an extended Windows API. This decision caused tension between Microsoft and IBM and the collaboration ultimately fell apart. IBM continued OS/2 development alone while Microsoft continued work on the newly renamed Windows NT. Though neither operating system would immediately be as popular as Microsoft's MS-DOS or Windows products, Windows NT would eventually be far more successful than OS/2.


Windows NT was intended to complement consumer versions of Windows that were based on MS-DOS. NT was the first fully 32-bit version of Windows, whereas its consumer-oriented counterparts, Windows 3.1x and Windows 9x, were 16-bit/32-bit hybrids. Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Home Server, Windows Server 2008 and Windows 7 are based on Windows NT, although they are not branded as Windows NT.

Wednesday, March 03, 2010

Linus: Software evolves over time

Linus (after having been asked about cooperation in writing software): "I never actually though about how the kind of community works at all. Until people started asking me about it later on, like journalists started - how can this ever work? - (in a very doubting way, by the way). [...] these people who asked the questions, they were not exactly convinced that it could work at all. So I kind of had to rationalise, why the Linux kind of development does work. And I don't know if this answers your question, but I actually came to my private conclusion which is that it really is all about evolution. And what you find, whether you like it or not is that [...] you don't design software, you don't even know what it is the user wants. Most cases the user himself doesn't know what he wants [...] If you designing things and you don't know what you're designing for, the design simply cannot work [...] and it turns out that this is a problem that humanity has had forever"

In this video (around 0:36:00) :



Interactive linux kernel map.

Tuesday, March 02, 2010

Richard Stallman comparing proprietary software companies with colonial powers

Richard Stallman speaking at a conference on development. He compares proprietary software companies to the colonial powers of the past: Another feature you might remember from the colonial system was that the colonial power would recruit a local elite, a few local people who would - like maybe the nobles or whoever, or one tribe against another or they would create tribes if they weren't tribes (so they can massacre each other decades later) - and so the local elite, they would get certain privileges and in return they would help keep everybody else down. Well you can see that today, some proprietary software companies actively recruit local elites, they set up a software development centre in your country and the people who work there are part of the local elite or they do some favour either for politicians secretly or for the government openly. But it doesn't make any difference which one, either way they're buying influence in the government, converting that governement - from a sovereign state - into their local overseer, of their empire, who's job is to make sure everybody else becomes dependent on the same non-free software. They say the schools: "we will help you by giving you these gratis copies of our non-free software, so that you can turn your students into addicts of our software. Why do I use the term addicts? Because they develop a dependency, on this software. And then after they graduate, you can be sure they're not going to be offered these gratis copies any more. Because it's only the first dose that's gratis. Once you're addicted, then you're supposed to pay. And then, also of course the companies that these graduates work for,... those companies are not going to be offered gratis copies, so what essentially these companies - these software developers - are doing is: they're recruiting the schools into agents to lead people into permanent life-long dependency. These are things that the open-source movement usually doesn't talk about, that's why I don't support open-source. Open source is a way of promoting software that usually is free, but without mentioning these ideals. These are issues of freedom, they're left in the background, open source people usually talk only about practical values, you know, how do you get powerful convenient software and how much will it cost. Well free software probably allows you to save money too if you're not being forced to pay for permission to use it, you can probably save money. But I think that's a secondary issue, even in poor countries freedom is important. We should never start saying: "Oh they're so poor, freedom for them doesn't matter. All they need is some bread and circuses". Which they had here once upon a time. and then they shouldn't even think about being free. I think freedom is important in every country, in every society, whether its rich or poor. Nonetheless, people who support open-source often contribute to extending the free software community. Many of them develop free software, those are useful contributions. I'm not saying that what they do is bad, I'm saying that by itself it is not enough. Because it's weak, you see. When you say: "the goal is to have powerful, reliable, convenient software and get it cheap", then it becomes possible for the representatives of proprietary software to say: "well we claim that we'll deliver you more powerful reliable software, we claim that our total cost of ownership will be cheaper". And I think it's usually bullshit. When Microsoft says this, it's based on distorted facts, but it's weak, but when we say the goal is to live in freedom and to be allowed to cooperate with other people in a community, they can't say they're going to offer us more of that cheaper. Because they don't offer that at all, they're not even competing with us. They're out of the running! Once you decide you want to live in freedom, they're out of the running. So we are trying to help you reach freedom, in a community, they are trying to subjugate you, but they say that they'll get you there faster! And maybe they would.



Monday, March 01, 2010

Wikibook linuxguide

Linuxguide: "The easiest way to begin using a Linux system may be to use an already running system. For example, some systems may be available in various educational or work environments. In this case you only need to contact the appropriate administrator and obtain a user ID and password. You will only be able to explore the system to a certain extent, but the first steps can be taken without having go through the installation process. Another trouble-free way of obtaining a Linux system is to buy a computer with Linux pre-installed. The number of vendors selling such systems is constantly increasing."