Forcing desktop view for mobile device users

We’ve got a couple of “power users” who use mobile devices but want the full RT desktop web site UI experience. They’ve got the link on the mobile UI to switch to the desktop view, but they were complaining about having to do that on each session.

I therefore create a new user preference to determine whether to decided to use the Mobile UI automatically, or force the desktop layout. It seems to be working for our chaps, so I thought other RT sites might find it useful. I’ve submitted a patch to Best Practical, which you can grab from:


thanks @GreenJimll this is absolutely usefull !

1 Like


When I try to login and enter not correct pass (for example), I see error in log:

[5091] [Thu Sep 26 11:17:04 2019] [warning]: Use of uninitialized value in concatenation (.) or string at /opt/rt4/sbin/…/lib/RT/ line 163. (/opt/rt4/sbin/…/lib/RT/
[5091] [Thu Sep 26 11:17:04 2019] [error]: Couldn’t load from the users database. (/opt/rt4/sbin/…/lib/RT/

In /NoAuth/Login.html and /index.html replace

my $user = $session{'CurrentUser'}->UserObj;
$choice = $user->Preferences('MobileUI') || 'Automatic';


if($session{‘CurrentUser’}->Id) {
my $user = $session{‘CurrentUser’}->UserObj;
$choice = $user->Preferences(‘MobileUI’) || ‘Automatic’;

1 Like