Extended desktop in Linux - linux

My goal is to have an extended desktop like in windows. Linux only uses my second monitor as a mirror, which is useless. I have searched a lot on google and SO for a way to get this right. I want linux to use both my monitors for one extended desktop, not as a mirror. As of yet I have not found out how to do this. Any help appreciated, thanks.

OK so a colleague explained it to me. Apparantly xrandr comes with almost all linux distributions. The proper way to use xrandr to set multiple monitors to display a different part of the same desktop is as follows:
xrandr
Shows you the names and dimensions of your displays. Say VGA1 and VGA2. Then if VGA1 is the screen on the left and you want VGA2 to extend it to the right you use:
xrandr --output VGA2 --right-of VGA1
Thats it.
Was looking for this on google and SO for hours, finally its working! Hope this will help other people as well. Dont know how to save this setting yet and I dont know if this is the most elegeant/best way to do this.
When you know the answer its easier finding other answers. Here are two sources that show how to save this setting as well. (although that does not work on my system as the files they point to cant be found)......
intel guide to xrandr
thinkwiki guide to xrandr

xrandr --output VGA2 --right-of VGA1
You get xrandr help if the first option is misspelled.

After you get your displays extended as #Leo explains, you can fine tune their placement using arandr from the terminal. It brings up a gui for xrandr.

Related

Is there a way to “hijack” a window and make it do things, like expand it, minimize it, or draw something in it?

I am trying to create a tool to manipulate windows - a window. Not Windows. I want to be able to minimize it or fullscreen it, at least. Assuming I know the windows’ title, PID, and everything else you can think of. I think I can rig up a solution with pywin32, but I want it to be able to run on other platforms as well, namely Mac and Linux. Any help will be appreciated, thank you.

Screen video (screencast) recording on Linux

I was trying to record video of all the monitors or a selection, so was wondering what to use for Linux.
The thoughts that came to mind were screenshot the screen a bunch but this probably isnt the right way to go about it.
I looked at the Cairo docs but can't find anyhting. On Windows I found DirectShow and OSX I found AVFoundation.
edit:
i just came across something: XvGetVideo would this be an option?
You can check out ffscreencast with the --dry parameter which will show you the commands that would be issued. Looks nice for learning.
Did it under linux and it showed me it was using x11Grab

X11 with window decorations on ubuntu mini distro

Goal: To display an application in the middle of the screen on a solid colour background. This means nothing else showing no gnome-desktop nothing apart from the application and the solid colour background.
Currently I'm using X11 for the background xstart -solid Grey which is great however as a test application I'm running firefox which I see has no window decorations ie: max, min title or boarder neither for that matter does xterm. I was wondering if it is possible to show the decorations without installing gnome possibly by installing just the themes eg: gnome-themes which I have done but have been unable to make the connection, or weather just running X isn't going to work without more gnome modules. I'm new to delving into the inner workings of linux as I've never had to deal with it before. I did ask a question previously which led me to xstart and xsetroot and I've been playing around with them for a bit trying to familiarise myself.
I do recognise that it is possible that I have gone about this all wrong, but if we don't try we don't learn.
If anyone knows of any tutorials or documentation that could help or if anyone has any tips I'd be grateful for the pointers.
Cheers
Chris
SOLUTION
Just thought I'd mention that I solved my issue after installing an ubuntu server distro I added xinit via apt-get then added metacity Then I edited the gconf files using gconf-editor then removed the Gnome-panels from /usr/bin However as I may possibly require them in the future I have made a copy of them before I deleted them. Thanks again for the help it was much appreciated.
The window decorations are created/managed by the window manager. If you don't have one running, you won't get window decorations.
Ok... I think I understand what you are asking. Gnome is a "Desktop", and includes with it one of many "Window Managers" called Metacity if I remember correctly. That is the part that adds the title and borders etc. There are many pure window managers(not desktops). A common and popular "Window Manager" is fluxbox although there are many others. Fluxbox does allow you to "undecroate" a window when you launch it. I'm not sure if this is what you are asking. Hopefully it is of some help.

unix shell command that make the virtual desktop spin

I'm looking for a way to make my virtual desktop change without using keyboard shortcuts.
I explain: I want to do a java program that will change my current desktop to the desktop at the left for exemple, let's say by clicking on a button. I've done it using keyboard shortcuts sent by the java program, but i want it more universal (i mean, that can work for everyone). Hope I'm clear enough!
Thanks.
This will give you available workspace (virtual desktop) names:
wmctrl -d
then
wmctrl -s <workspace name>
will move to the workspace.
Take a look at here http://tomas.styblo.name/wmctrl/ to see what window managers are supported.
My previous answer was:
xrandr is probably what you want. Take a look at this wikipedia page here too.
I thought xrandr will work but couldn't figure out how. I hope someone will comment and give the definite answer whether xrandr will work or not.

How to programmatically invert screen colors in Linux

In Ubuntu, for example, you can use Super-M to invert the screen colors (requires desktop effects, see [1]). Other OSes have similar abilities, although I'm not really concerned with anything other than Linux.
Which API should I look into if I want to write a simple program that, when run, inverts the screen colors?
The language that I use the API from doesn't particularly matter to me. I am familiar enough with C/C++/Bash/Perl/Python that I can hack this up in whatever language has the easiest access to this API. Working on Ubuntu is required, working on other similar *nixes is not terribly important.
[1] https://help.ubuntu.com/community/KeyboardShortcuts#Desktop%20Effects%20enabled%20shortcuts
You could use xcalib to do what you want.
For example, a simple bash script to invert the screen colors would look like this:
#!/bin/bash
xcalib -invert -alter
Here are scripts and instructions for shifting colors using compton: https://github.com/vn971/linux-color-inversion
xrandr-invert-colors worked out of the box for me.
xcalib does not work for me using xorg and a tiling window manager, with an external display and gives me the following error: "Unable to get a display calibration".
Credit to Imat.

Resources