Tips and Tricks About Computers, Web Development, Linux, the Internet and the Like
Application Management
Multiple X (Desktop) Sessions in Ubuntu
Oct 13th
This post has a lot to do with graphics but there are no graphics. It’s a walk-through explanation and and proof of concept of some very interesting features of Linux as a desktop operating system.
If you aren’t familiar with X, than this webpage might confuse you, the X Window System is what draws the GUI (graphical user interface) for Ubuntu. On top of this, you may have a Window Manager or Desktop Environment, such as Gnome (Ubuntu default) or KDE (Kubuntu).
When you boot up Ubuntu, it creates a set of “virtual terminals”. These VTs are accessible via a key combination of clt+alt+f1-12. VT7 (ctrl+alt+f7) is the default and it handles X’s “screen 0″. If you play around, with the key combination, you’ll notice you drop into consoles with a login prompt (f1-6) or a blank screen (f8-f12, don’t worry if you see USB errors).
These virtual terminals used to be handled by X which was slower and more prone to crash (citation needed) but since Ubuntu 8.04, this has been handled by “Kernel Mode”, where this management is handled by the kernel. You can switch to another virtual terminal and create another X session.
Typically in Linux, you could switch to another VT, login [as another user] and type $ startx — :1 (special argument ‘--‘ marks the end of client arguments and the beginning of server options, :1 defines screen 1). This will work in Ubuntu but the part where I found it failing was switching between this newly created X session and back to my original :0 on VT7.
The way I found to do this in Ubuntu seems a bit counter-intuitive. Before I explain, you should create a new user, if you don’t have another already. You can do this by going to System > Administration > Users and Groups.
To create a second X session in Ubuntu, go to your logout menu (default top right) and select “switch user”, and login as another user (you don’t want to create an error in the user environment). When you login as another user, Ubuntu creates a screen :1 on VT8. This means, you can change back to VT7 with ctrl+alt+f7, then back to VT8 with ctrl+alt+f8. I suspect this is the reason VT8-12 show up as blank screens instead of login terminals. Ubuntu seems to be leveraging the power of virtual terminals for “user switches”.
I haven’t noticed much in performance loss doing this and the other big question is practicality. Why would you ever do this? Perhaps you are testing software and want isolated test cases or you want a dedicated user for games with a more streamlined window manager and want to be able to flip back and forth.
Similar areas I came across in my research were Nested X sessions and Multiseat X.
The Best Way to Tweet to Twitter, Post on Facebook from WordPress
Jul 26th
I’ve been focusing some time recently to the foundation levels of Internet marketing. I’m aiming to increase visibility as strongly as possible at the core of a website giving it the power to leverage evolving trends as simply as possible. This of course means utilizing APIs from other web applications, such as social networks. The title of this post is true but deceptive. I consider the following method the best way to tweet from WordPress but it’s actually a whole lot more than that. It’s a gateway to a large number of social media applications; one account to rule them all. ping.fm is a service that allows you to link multiple social network websites, such as facebook, twitter, linkedin and more.
So the idea then, is to leverage then is to utilize the ping.fm application from your website. If you’re using WordPress then you’re set, the simple no frills publish 2 ping.fm plugin will allow you to interact with ping.fm from your blog/website.
I’ve tested this out with the free open-source GPL First Person Shooter, Xonotic and a new site I just started dumbtubes.com. Both have twitter accounts that you can see publishing twitter.com/dumbtubes, twitter.com/xonotic. Xonotic also publishes to many other social accounts, see the Xonotic homepage to find other accounts.
Stay tuned for more wordpress tips.
WARNING, this plugin may cause other plugins options panels not to work. I’m not sure the cause yet but be aware that it can cause the sub settings of dedicated plugin setting groups to throw access errors.
Blocking Ads Cross-browser and Save Bandwith Using Your Hosts file
May 26th
Ethics of blocking ads vs. data mining aside, one of the smartest ways I found to block ads is at http://someonewhocares.org/hosts/zero/ where the author, Dan Pollock has compiled a list of urls, with the help of contributors that all redirect to 0.0.0.0 or 127.0.0.1 (localhost, your machine). By appending this list to your current hosts file (or selectively adding parts), whenever your machine attempts to look up a domain name in this list, it will resolved to 0.0.0.0 or your machine. It will never make a request on the internet to the intended server. It will never even download the advertisement.
To take this a step further, you could develop a similar list for your router or DNS server (if you operate it).
I still use adblock plus on top for missed entries.






