Between Linux and Anime

Kind of like Schrodinger's Cat

Tag: Tech (Page 5 of 8)

Dual/Multi-head Monitors on Linux – the Xorg Hurdle

Okay, I’m gonna post this in here once and for all, if for nothing more than my own recording purposes. So the somewhat sticky problem of multiple-monitor configuration is getting very nice and shiny new GUI’s in Linuxland nowadays. KDE Plasma 4.6, for example, has something like this:

Very lovely. The vexing thing however is that it doesn’t have “full control” so to speak. It’s likely a xrandr frontend, and that’s all nice and good except that if your Xorg config isn’t set up right, no configuration actually works, except for cloning, which clearly isn’t the most useful set up around. It turns out that you need to set the maximum virtual screen size to a value larger than required for your set up. For example if you’re configuring a 1280×800 desktop and a 1440×900 desktop side-by-side, you’ll need a virtual screen size of at least 2720(1280 + 1440)x900, and if they’re stacked vertically you need at least 1440×1700(900+800). How do you set the virtual screen size? Open /etc/X11/xorg.conf in your favorite editor as root:

sudo nano /etc/X11/xorg.conf

And under the “Display” subsection of the “Screen” section, add a “Virtual” line with your desired virtual screen dimensions as arguments. Example:

Section "Screen"
	Identifier "aticonfig-Screen[0]-0"
	Device     "aticonfig-Device[0]-0"
	Monitor    "aticonfig-Monitor[0]-0"
	DefaultDepth     24
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Virtual		3000 3000 # <-- ADD THIS LINE!
	EndSubSection
EndSection

And you should now be able to configure your multi-head set up with xrandr or with your preferred graphical frontend (in KDE Plasma 4.6 the frontend is at System Settings > Display and Monitor > Size and Orientation).

You know what the worst thing is? Software updates sometimes rebuild your Xorg.conf, overwriting your changes, which means that you may need to repeat the above again after certain updates. That’s what just happened to me, so I’d keep this page (or whatever other page on this problem you find) bookmarked.

1049
Rate this post
Thanks!
An error occurred!

Connecting to Hidden Wireless Networks using KDE’s Networkmanager

It is not without some surprise and.. disappointment.. that I discovered that KDE’s networkmanager frontend appears to be still having trouble with hidden wireless networks. It used to be so when we used KNetworkManager, and now that we’ve moved on to the shiny new plasmoid, the problem… stayed. Oh well, the common advice that hidden SSID’s are not useful and that one should be setting up WPA encryption for true security is likely sound, but for folks like me who happen live under already-configured hidden networks, we’ll need to use a workaround for now.

To allow the networkmanagement plasmoid to detect and connect to a hidden wireless network called, say, “hiddennetwork”, open a terminal and type the following command:

sudo iwlist wlan0 scanning essid hiddennetwork

Note that you need to replace wlan0 with your wireless interface. This is usually either wlan0 or eth1. You can use the iwconfig command to find out what your wireless interface is called. Of course, also replace “hiddennetwork” with your desired hidden network.

If all goes well, your hidden network should now appear in the networkmanagement plasmoid, and you should now be able to connect to it like any other network.

1036
Rate this post
Thanks!
An error occurred!

The Rise of Plasma Activities and What it can do for You

So having been kept away from KDE-land for some while, I innocently but excitedly pushed the upgrade button when I saw that 4.6 was out, and ran immediately smack into the huge forward leap that plasma activities has made this release. I have always been a big fan of activities and this is really exciting stuff for me, so I made a quick visit down to Chani’s blog for a quick-tour of what’s new and what’s good, but while I personally found her screencasts illuminating, a quick skim through the blog comments quickly revealed that many people remain more perplexed about activities than ever.

I’m gonna spend some hours on the keyboard here and see if I can fix some of that :)

Read More

1009
Rate this post
Thanks!
An error occurred!

Fixing Funny Image Colors in Firefox on OpenSUSE 11.3

Actually I don’t know if this affects other Linux systems or even other operating systems, apparently it has something to do with the way newer Firefoxes handle colors. Anyway, what happens is that Firefox renders some images properly, but renders some others with incorrect colors. This behaviour can be fixed by changing some of Firefox’s config values. Instructions as follows:

  1. Get into the config interface by opening a tab in Firefox and keying in “about:config” into the address bar. Read the warning and continue.
  2. Look for gfx.color_management.mode and set its value to 0, and then look for gfx.color_management.rendering_intent and set its value to -1.
  3. Restart Firefox

Source.

1004
Rate this post
Thanks!
An error occurred!

Dealing with Broadcom Wireless and ATI Radeon Mobility HD Cards on OpenSUSE 11.3

And Linux has now officially taken over my new laptop :) I decided to try out installing the OpenSUSE-based KDE Four Live image (downloadable here), and it looks great so far! More importantly, I bought this laptop (HP G42 or something) well-knowing that it didn’t have Linux-friendly hardware. Well, it was relatively cheap and had great CPU and graphical specs (damn you Starcraft 2), plus the chaps manning the store were really nice.. Anyway, so I rolled my sleeves and set out to set myself up a Linux installation today expecting to spend some gruelling hours wrestling the inevitable issues – and was pleasantly surprised to have now apparently resolved everything quite cleanly and painlessly. Awesome :) And with that, I’m gonna pen me some trusty ol howto posts – the first ones in quite awhile I believe.

Read More

999
Rate this post
Thanks!
An error occurred!

Allowing PHP/httpd to use sendmail on Fedora

I had to Google hard for this – twice, because I was too busy to blog this when I solved it the first time. Anyway, people not accustomed to sysadmin-ing on Fedora will find themselves quickly acquainted with this rather unfriendly beast called SELinux, which firmly prevents you from doing a bunch of stuff – sometimes quietly.

Anyway, it turns out that although sendmail is installed and working on Fedora by default, SELinux will by default prevent httpd (and thus your PHP scripts) from using it to send email. To fix this, simply tell SELinux to don’t do that, like so:

$ restorecon /usr/sbin/sendmail.sendmail
$ setsebool -P httpd_can_sendmail 1

Or, if you prefer, look for the httpd_can_sendmail boolean in the SELinux configuration GUI and tick it off. Restart httpd after that:

/etc/init.d/httpd restart

Source

929
Rate this post
Thanks!
An error occurred!

Hiding Kate Session Applet Items

I put my Kate Session Applets at the corners of my programming-related activities, and they are usually little. So it always annoyed me that the three default items that I cared little about were at the top and had to stay at the top, forcing me to scroll to load the kate sessions I’m actually regularly interested in.

Well, I recently scratched that itch:

All items in the applet, including the default three, can now be hidden by unchecking it in the new configuration interface. And what’s more, different applet instances can hide and show different items too.

926
Rate this post
Thanks!
An error occurred!

Mounting LVM on an Ubuntu Live System

For those of you folks out there who, like me, carry around an Ubuntu-based live CD/USB as a friendly and handy system recovery companion, you might be surprised and shocked (as I was) to discover that LVM partitions that some Fedora systems are apparently installed on are unsupported by stock Ubuntu live systems. Ie – you cannot mount these partitions or do anything with them except delete/format them.

Fortunately it turns out that there is a quick remedy – install that support. Make sure that you have internet access, then simply do:

sudo apt-get install lvm2

You should now be able to mount and read the partition.

921
Rate this post
Thanks!
An error occurred!

GSoC wrapup for Plasma Mobile System Tray

I know the pencils down was a week (plus?) ago, but I did a fresh upgrade of my system (to OpenSUSE 11.3, then to KDE SC 4.5.0) and then realized to my horror that there was obviously no way I could make a screencast or even take screenshots for this post until I’ve rebuilt trunk and plasma-mobile. So I frantically spent the past week doing exactly that, and now without further ado, the screencast:


OGG here

My trunk kdebase is still a little screwy at the moment, in case you noticed the extreme ugliness of that context menu there. Also, somehow the sizing and position of the icons have gone a little off between the end of GSoC and now (Damn).

Anyway as you can see, nothing much has changed in the high-level ideas of the system tray I described in my previous post. Most of the work I put in since the mid-term had been in the way of improving the implementation strategy – cutting most of the harder ties between the system tray and the mobile shell, and getting the system tray to update its behavior based on loose events like resizing instead of specific events like Qt signals. All this of course to fit into the Plasma philosophy of creating loosely coupled independent parts – so that for instance we could put in a replacement tray without needing to change the shell code – since the shell only knows it is given a containment that it needs to resize – and we could also easily put my systray elsewhere as long as it knows to resize the tray the right way.

There is also of course noticeable change in the look and feel. The tray containment paints its own background now, and the icons now resize along with the containment instead of disappearing and reappearing at the ends of the animation – so that we don’t need extra signals to indicate when those ends occur. I’ve also thrown a couple of “fake” plasmoids in – a fake battery indicator and a fake service signal indicator – since both of these things apparently require hardware-specific treatment. Unlike the desktop system tray, the mobile version only supports the plasmoid and dbus system tray protocols – xembed isn’t supported. Iirc those aren’t resizable anyway :)

It’s been fun. I have always loved Plasma for the sheer sensibility and elegance of its software architecture, and its really nice to be given a chance to gain a deeper understanding of it and experience it for myself. It was also great to be forced to crunch through a bunch of documentation for all kinds of QGraphicsObject derivatives – and have a brief tantalizing tango with QML while I was at it. It was a great GSoC, and I’d like to thank my mentor Alexis and the ever helpful (some say omnipotent) Marco for making this possible for me.

Oh, and I plan to be hanging around of course. I forsee my school final year project crashing down on me tsunami-style very soon, but I still hope to get a couple of things done before 4.6 gets out. Will blog about those when the time comes ;)

892
Rate this post
Thanks!
An error occurred!

GSoC Mobile Systemtray Update

Had been holding off posting on this until I have something reasonably pretty to show for it, but damn, said pretty thing sure took its time. Anyway, GSoC mid-term evaluations just ended, and I finally managed to hack up something that looks somewhat presentable. Here’s a short screencast of it.


EDIT: Oops forgot the ogg here

Some key ideas of the current implementation:

  • The tray lives in it’s own containment separate from the main activities/launchers.
  • There is a passive “shrunken” form and an active “enlarged” form.
  • The passive form is not interactive and click/tapping it simply switches it to the active form (with a simple QML animation thrown in). It shows a number of defined “always-show” applets and a limited number of the other applets, prioritized by recent activity.
  • The active form shows all available applets in large, finger-friendly sizes, and is scrollable in case it doesn’t fit the screen (hello Plasma::ScrollWidget!). It behaves more or less like one would expect a systray to behave.

Not a lot to show for one month plus worth of development I admit :( This is actually my third implementation attempt. In the first attempt there were two “trays” – one small and one large, and taking hints from the comic plasmoid, I put the large one on a full-screen transparent QGraphicsView which covers the small one when activated – but this isn’t nice since it, in notmart’s words, relies on compositing being available to not look like crap. So the second implementation gets rid of the QGraphicsView and instead positions the large tray relative to the parent containment, but then there was another problem: we can only have one set of plasmoid applets running to save memory, and there was no way to display one set of applets in two trays. So I gutted the thing again and did this third attempt where there is only one tray which shrinks and expands accordingly… and that’s what you see in the screencast :)

This is far from finished of course – if nothing else that “cancel” button probably doesn’t quite belong there :P Iirc I should also be thinking about doing notifications for my GSoC, so there’s plenty more to do for the rest of the GSoC period. Fun stuff. Alright, think it’s time I wrapped this post up and go clean up my code and commit it – and pray I don’t get torn to bits by darktears and notmart for some terrible mistake or design flaw I made :)

871
Rate this post
Thanks!
An error occurred!

Page 5 of 8

Powered by WordPress & Theme by Anders Norén