ADF launchDialog and window title

Hello there
is it possible to set Window title for dialog opened via
AdfContext launchDialog?
I am redirecting dialog to another servlet out of Faces context to show some pdf files in the browser.
What properties are supported for the window properties parameter, except width and height?
ferdo

I used the handleLaunch method and then set up the url along with parameters that generates the pdf report:
public void handleLaunch(LaunchEvent launchEvent){
parametros = "P_CD_PARCEIRO=" + (codParceiro.getValue()==null?"":codParceiro.getValue()) + "&P_DT_INICIO=" + dtInicio + "&P_DT_FIM=" + dtFim +
"&P_TP_DOCUMENTO=" + tpDocumento.getValue() + "&P_NU_DOCUMENTO=" + this.retiraMascaraCampo((String)("2".equals(tpDocumento.getValue())?numeroDocumentoCNPJ.getValue():numeroDocumentoCPF.getValue())) +
"&P_CD_BANCO=" + codigoBanco.getValue() + "&P_CD_AGENCIA=" + codigoAgencia.getValue() +
"&P_NU_CHEQUE=" + numeroCheque.getValue() + "&P_CD_CLIENTE=" + codigoUnidadeServico.getValue();
String url = resource.getString("historicocobranca.url") + parametros;
//Set the url value into the report page (Dialog)
Object urlObj = url;
launchEvent.getDialogParameters().put("url", urlObj);

Similar Messages

  • Why has theDownloads window been removed? How do I get it back with full functionality and Window Title?

    Windows 7 32-bit. Firefox 21

    The Downloads window was removed in favor of the new download toolbar button and panel.
    * [[Find and manage downloaded files]]
    You can re-enable the old Downloads window as follows, but this workaround may no longer have an effect at some point in a future version.
    # Type ''about:config'' into the address bar and press Enter.
    # Press the big button to bypass the warning.
    # In the search box, paste ''browser.download.useToolkitUI''
    # In the search results, double-click ''browser.download.useToolkitUI'' to set its value to '''true'''
    If you're missing any feature of the old Downloads window, try a download manager add-on.
    * https://addons.mozilla.org/firefox/addon/downthemall/
    * https://addons.mozilla.org/firefox/addon/download-manager/

  • Annoying font size in windows title

    First time I installed Arch 7.2 I had small fonts in Gnome windows title, so I had to set Font size of windows titles to 12 (10 its the default).
    After some upgrade, this was fixed, and I could set font size to 10.
    Tonight I did another upgrade, and window title fonts became small again, so I had to configure font size at 12 again.
    Any idea whats broken this? its not an important problem at all, but its kinda annoying...

    delphinen wrote:Tonight I did another upgrade, and window title fonts became small again, so I had to configure font size at 12 again.
    Any idea whats broken this? its not an important problem at all, but its kinda annoying...
    The obvious thing to look at is what did you upgrade?

  • Change icon & window title - for Mac projectors? (but not Zinc)

    I need to change the icon and window title for a Mac projector made with CS5 (on Windows).
    I know there are a few solutions for the Windows exe.
    But I can't find an affordable solution for the Mac projector. Any ideas?
    I tried the Windows version of Zinc, it created exactly what I need for both the PC and Mac - but there's no way I'm paying $800+ for Zinc just to change the icon and window title.

    My feeling was that there was a residual window spec left
    over from a previous build. (You can go on adding windows via
    Project>Windows rightclick.)
    Now - if you Open <yourprojectname>.hpj the project
    summary is displayed in dialog format. The first line reads 'This
    file is maintained by HCW. Do not modify this file directly.'
    Nevertheless, it is possible to do so - doubleclick on any of the
    sections to bring up an editable dialog on its settings. There are
    buttons at right, too, that replicate several of the doubleclicks.
    I'm annoyed that I can't remember which file stores all this data
    in an accessible form.
    In the General tab of the resulting Windows dialog there are
    the options to Add, Remove and Include window types and enter/edit
    Title texts. It's worth having a look at what's shown here just in
    case there is an Include being copied from another (and possibly no
    longer available?) project file.
    Perhaps try this (having backed up, of course!!):
    1 Note the required spec for your second window.
    2 Open the .hpj windows dialog and Remove any and all windows
    apart from Main.
    3 Open the project and see if the ghost is still there.
    4 Is it??
    (No-one else going back this far?)
    Brian

  • The window title attribute for the page layout region has not been set

    Hi, I am a newbie to OA Framework extensions. Could you please advise me how to get rid of below error ?
    "The window title attribute for the page layout region has not been set. This attribute value will be used for the browser window title and should be set according to the UI standards. A default window title will be displayed for all such pages that violate the standards. Action: Set the window title or title attribute for the page layout region. The title attribute is used as a secondary source for the window title if the window title is missing."
    My requirement is to extend a VO and almost done with that but when i run the PG ( HomePG.xml ) file to ensure everything is fine , The target page is being displayed with above error. Just to let you know that i have already set the Titile and Window Title attributes for the HomePG.xml region i.e PageLayoutRN.
    One more thing i would like to share is that i was set the Window Title to 'Oracle Applications Home Page' , but target page name is being displayed as 'Oracle Applications'.
    Any suggestions ??
    Thanks.

    Hi all, I now getting below error when i click on notification from notification page ( AdvancWorklistPG.xml ) which should have taken me to the notification details page ( NotifDetailsPG ). Please note that i am running the page from Jdeveloper.
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT NtfEO.NOTIFICATION_ID,
    NtfEO.RECIPIENT_ROLE,
    NtfEO.BEGIN_DATE AS BEGIN_DATE_F,
    NtfEO.DUE_DATE AS DUE_DATE_F,
    DECODE(NtfEO.MORE_INFO_ROLE, NULL, NtfEO.SUBJECT, FND_MESSAGE.GET_STRING('FND','FND_MORE_INFO_REQUESTED')||' '||NtfEO.SUBJECT) AS SUBJECT,
    NtfEO.PRIORITY AS PRIORITY_F,
    NtfEO.STATUS,
    NtfEO.END_DATE AS END_DATE_F,
    NtfEO.USER_COMMENT,
    NtfEO.MORE_INFO_ROLE,
    NtfEO.FROM_USER,
    NtfEO.FROM_ROLE,
    NtfEO.TO_USER
    FROM WF_NOTIFICATIONS NtfEO
    WHERE NtfEO.NOTIFICATION_ID = ?
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:597)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.nav.OAPageButtonBarBean.processRequest(OAPageButtonBarBean.java:351)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:953)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:899)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1095)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:932)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:899)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:932)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:899)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2298)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1711)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01008: not all variables bound

  • Window title and borders for Render Window (3D Picture Control)

    Hi all,
    some more questions on the 3D picture control.
    I use the external render window, because in the solarsystem.vi demo, the 3d picture control appears to be very slow. The render window is much faster there. (I haven't tried it for my application though.)
    I'd like to display a full screen 3D animation. How the hell do I get rid of the window title bar (I can set it to empty, but the bar itself remains), and the borders of the render window?
    Regards
    Matthias

    The update speed of the solarsystem example is 2 ms (in the timeout event). This would result in 500 updates per second, witch is totally redundant. Put it on 33 ms, and you'll still get smooth updates, and much better performance! No monitor will update 500 times a second, and your eye can only see 25-30 frames per second anyway.
    With this, you could probably use the normal 3d control (indicator actually). The window doesn't have any way to remove the title bar.
    (You can do some things with window API's, but removing the titlebar is only possible by creating a new class, a new window, and then it would be impossible to tell LabVIEW to use this window...)
    If you'd make the render window full screen, how would you close your application? There is no way (or I'm missing it) to get events back from the render window.
    Regards,
    Wiebe.

  • Firefox 5.0 on Windows 7 jumpy, window title bar pops in and out, window resizes.

    Question pretty much sums it up. Windows Title bar keeps flitting in and out, causing screen to jump. Concurrently, right and bottom window margins resize a bit smaller. No apparent rhyme or reason, but leads to a lot of bad mouse clicks. Unrelated to whether the bookmarks tab is open or not. Happens in safemode as well, and my theme is the default. I don't want a plug-in to fix this, I want Firefox 5.0 to behave properly on its own.

    The Views menu is only meant to view bookmarks in a different sort order (hence the name of that menu). It doesn't have any lasting effects.
    * http://kb.mozillazine.org/Sorting_and_rearranging_bookmarks_-_Firefox
    * SortPlaces: https://addons.mozilla.org/firefox/addon/sortplaces/

  • Q:  Window Titles for Identically Named Objects and Views

    How does such an application described on
    http://java.sun.com/products/jlf/at/book/Windows8.html#50028
    behave when there are 4 Windows and Window #2 is closed ?
    Will 3 and 4 renumbered to 2 and 3 ? or Do they stay and the next Window opened becomes #2 ?

    Aside from testing it yourself, reading the link,
    you the programmer must add "something" to identify
    each windows...
    How shall I test it ? - I don't think SUN is giving
    SMC away for free ...Don't need SMC, it was used as an example, It could be a text editor with multiple windows pointing to the same file object...
    >
    so following that logic, the next window that gets
    opened will be "5"...
    How do you know ? - Is there a reference
    implementation of a swing program ???
    Best explained in this statement from the link...
    If multiple primary windows show views of the same object, distinguish each of the windows by appending the suffix :n to the object name in the window title
    So lets say that I am using multiple Windows (like JFrame) to display the same object... Then as part of the opening sequence for each window would do a check to see if it is the same object, if so, then it would increment an int like int windowNumber; then use the setTitle("myObjectname" + windowNumber)
    since the int windowNumber increments by one each time a new window opens up displaying the same object, then logically it I have 4 windows open, they would be numbered 1-4 with the next one being 5 regardless of whether the other windows are open or not...
    Unless I wrote some code that upon closing a windows, it re-numbers the window... Which brings us to this question below...
    you would need to program something ( like a method
    ) that renumber your windows...
    Really ?!? - That's why I'm asking: HOW should it be
    renumbered ???Well this would be the fun part...
    each window would have a int variable to indicates is number if its the same object...
    each window object will be kept in a list...
    upon closing a windows, it will check all windows containing the same object who ID number is greater than the window ID number of the closed window and decrement them by one... so if window with ID number 2 gets closed, then window with ID number 3,4,5 6 gets decremented by one making its 2,3,4,5 respectively...
    Which means that you will have to create a method that upon closing a windows with an ID number, call the decrement method that iterates through the list and decrements the ID number...
    psuedo code:
    upon windows close call renumber menthod...
    renumberMethod ( windowList,ID , object)
    for (int i=0; i < windowList.size() -1; i ++){
                if ((windowList.getObject() ==object)&&(windowList[i].getID() > ID){
    windowList[i].decrementID();}
    //... some code...
    decrementID(){
    --IDnumber; // where ID number is an instance variable of the Window object
    setTitle(ObjectName + IDnumber);
    Or something along these lines...
    - MaxxDmg...
    - ' He who never sleeps... '

  • When I open new window browser has inverted color scheme and no window title.

    When I open 1st window in FF top of the page looks usual - like this http://imagestun.com/hosting/kartinki/ff1.jpg
    But when I try to open something in a new window, this new window has strange color scheme at the top and no title, like this
    http://imagestun.com/hosting/kartinki/ff2.jpg
    If I switch from window mode to full screen mode and vice versa everything gets to look normal.
    I've used Classic Theme Reestorer addon, but the same problem occurs when this addon is uninstalled. Restaring computer, reinstalling firefox etc didn't help, I still get these annoying white letters in the main menu when I try to open 2 or more firefox windows.
    Is there any way to fix it?

    Thanks, I followed your advice and disabled everyting then started turning addons one by one. The problem was caused by Hola Unblocker, now everything is ok.

  • Windows 10 needs an option to completely remove Metro/Modern UI, Apps, Live Titles and Windows Store.

    The main thing I expected for next version of Windows is an to completity remove Metro/Modern UI, Apps, Live Titles and Windows Store. Microsoft does not understand the Windows 8 bad reputation and has not learned anything.

    A little Microsoft last years history:
    Microsoft en general has good operatings systems in all segments, good office and server products, before year 2010.
    The best OS that Microsoft never ended is Longhorn:
    http://www.zdnet.com/windows-longhorn-still-the-most-exciting-windows-ui-to-date-7000007363/
    http://longhorn.ms/
    Microsoft be the first on a good mobile OS: Windows Mobile. In lastest versions of Windows Mobile, i can sync all my Exchange items, including tasks and notes. Its has a good interface with a menu, a desktop with shortcuts and more. Every new version improve
    visuals with more effects, gradients, transparencies and more. Windows Mobile are far years old than iOS or Android.
    But since year 2010, Microsoft presents Windows Phone, with and ugly user interface, with less visuals, no desktop, no notifications, no apps, no app compatibility with Windows Mobile and only sync Contacts and Email. No calendar, tasks, notes. Also the
    simplicity of the Mail app makes it unuseable.
    Now, in 2014, Windows Phone can sync Calendar, but no Tasks or Notes. Less than in Windows Mobile.
    Android is new for year 2009 and mimics desktop OS's and Windows Mobile with a desktop and gadgets. In every new version of Android i see a lot of improvements and new features. I also sync Exchange tasks and with another app, Exchange Notes. Android continues
    to mimic desktop OS's now featuring Windows on a mobile OS, but Microsoft is removing desktop features in order to a limited Metro ugly interface.
    Windows Mobile had a 30% market share and Windows Phone has a 2,5% of market share.
    With this bad and ugly OS, Microsoft completity destroys Nokia.
    With this bad reputation of an ugly and unuseable OS, Microsoft decide to put all this ugly OS to the Windows Desktop OS, with less features than older Windows OS versions,
    obtaining no more than 10% of market share, compared to the more than 50% of Windows 7 and the more than 20% of Windows XP.
    Also Microsoft remove features in every new version of every Microsoft product except in SQL Server.
    Microsoft Office removed crucial features and shows an ugly UI with ugly icons. For example, Office 2013 shows me less emails on screen than Office 2010. Also the lack of constrast and the lack of ClearType make it difficult to read.
    The UI and icons in Visual Studio with the ridicolous ALL CAPS menu are higly
    criticized by the developer community forcing Microsoft to change visuals, new icons and a Visual Studio 10 Theme. But continues flat, ugly and with less features than previous versions.
    Exchange removes the Exchange Management Console and Exchange Control Panel for an ugly web interface. More functions and commands need to do now by the Exchange Powershell cmdlet commands instead of a Visual GUI interface.
    With this bad numbers and reputacion, Microsoft also puts these ugly OS on the new XBox One, a cloud console developed for a
    house living room to show TV, movies, listen music and play games. Initially forced to always connected to Internet, Microsoft was forced to remove that and the kinect due to the poor reception of a console not developed to power games users and
    with insuffient power for actual games. Actual sales data compared to Playstation4 shows a bad and dead product like Nokia Phones.
    And now, close to year 2015, with all this bad reputation and numbers, Microsoft still continues to force to an ugly, flat and simple OS with apps and cloud. I never use cloud or put my private data on the cloud.
    With even more reason never put my company or work data on the cloud.
    I do not trust the cloud, and even less
    trust in Microsoft. Ads like Scroogled,
    make me gain more confidence in Google
    and lose even more confidence in Microsoft,
    because you need to attack the competition rather than
    focus on developing good products.
    Instead i got at least the same features on a new OS, i never upgrade.
    Less appearance settings. No advanced appearance settings like in Windows 7. No Aero. No Themes. No Customizations options. Only flat and ugly design, with bad and heavy colors that makes eye strained and lack of constrast between areas on the Window of
    an application (see Office 2013).
    Less Protect System options. No Shadow Copies or Prevoius Versions. File History is unusefull.
    Less Network options. No Network map. Less Wi-Fi features. No Bluetooth File sharing.
    No desktop games.
    General ugly UI without options. I dont like FLAT.
    Why change Windows 7 with an OS with less features like Windows 8.x and 10?
    The only new is:
    Ugly Metro/Modern UI does nobody wants and solicitated this.
    Simple apps with ADS that are practically unusefull on desktop PC and more on enterprise.
    Cloud!!! Who, in their right mind, puts his own private data on the cloud?
    Cloud!!! Who, in their right mind, puts his own company private data on the cloud?
    Nobody wants to create a Microsoft Account or use a Store of Simple apps with ADS. Nobody solicitated this but Microsoft wahts to makes money.
    Seeing the little progress
    and development of new features including
    new versions, as
    Windows Phone 7 to Windows
    Phone 8, Windows
    8 to 8.1 and 10 shows the
    reducidad capacity and
    the current difficulty of
    development by Microsoft
    counting the numerous
    layoffs and closing of
    numerous development teams.
    Serious and professional developers never develop Windows Store/Metro-Style apps.
    They develops .NET, Windows Forms Applications, WPF, MFC, C++, etc. applications.
    That is the actual technology that people are using, learning and jobs searching.
    And what Microsoft means Modern or actually:
    “Windows Store/Phone Projects”
    is technology that never wants, nobody asked and needed for.
    I never see a decent “Windows Store/Phone Projects” or a rich client app on that technology. I only see garbage, spam, ads and its the better platform for spammers, and people who want to get my money badly and with bad ways.
    “Windows Store/Phone Projects” is the best platform for thieves, crooks, swindlers and more.
    I never develop to a simply unusefull platform whit limited technologies and a platform in which Microsoft gets 20% of my work.
    I want .NET technologies, WPF, Windows Form and to create exe files. For Mobile/Tablet platform i used .apk files that not need a store to distribute them.
    I expect from next version of Windows to create local accounts and options to COMPLETITY disable Metro and Windows Store with the restore of removed features like Shadow Copies, Backup and Restore, Aero, Advanced Appearance Settings, Expand All Programs
    in Start Menu, Games apps like Solitaire, Mineswipper, Chess Titans, DVD Maker and more removed features. If Microsoft not do this, the next version of Windows continues to be another disaster like Windows 8.x and people stick with Windows XP and 7 in order
    to think about migrations to Mac OSX or Linux.
    For all who likes and defends the new Microsoft concept, please see the actual Microsoft marketshare in all segments.
    Microsoft has to think and open your eyes
    and see that from 2010 all
    new versions of their products are inferior
    products with fewer features,
    destroying and killing the product like Windows Mobile, Nokia, Windows, XBox, etc. Microsoft needs to see the marketshare of all this new products and compare with the marketshare of old products.
    It is very serious and a lot of attention
    today that Windows XP has greater
    market share than Windows 8.x for this reason
    alone should be enough for Microsoft
    to react and change all their wonderful way
    of thinking and his philosophy like
    "Devices and Services "or the
    new" Cloud first,
    Mobile First ".
    In business, one of the main premises
    is that if a product works and sold, do not change it. Microsoft is not only changing Windows, is elimintating the sale of the 50% marketshare of Windows 7 Home Premium and Ultimate edition. And
    more, for more than 2 years, Microsoft is not developing any Service Pack for Windows 7, that is unaceptable. All of this is stupid and idot and the best things to lost confidence and trust on Microsoft.
    Microsoft is doing the all things that i can do to kill a company.
    Remember those companies, like Coca-Cola, Xerox, etc. that
    were about to go bankrupt to change
    its philosophy and strategy, which worked
    very well, and failed to get up
    again until they return to its own strategy and
    philosophy of the beginning.

  • ADFS SSO and SharePoint 2013 on-premise Hybrid outbound search results from SharePoint Online - does it work?

    Hi, 
    I want to setup an outpund hybrid search for SharePoint 2013 on-premise to SharePoint Online.
    But I'm not shure if this works with ADFS SSO.
    Has somebody experience with this setup?
    Here's my guide which I'm going to use for this installation:
    Introduction
    In this post I'll show you how to get search results from your SharePoint Online in your SharePoint 2013 on-premise search center.
    Requirements
    User synchronisation ActiveDirectory to Office 365 with DirSync
    DirSync password sync or ADFS SSO
    SharePoint Online
    SharePoint 2013 on-premise
    Enterprise Search service
    SharePoint Online Management Shell
    Instructions
    All configuration will be done either in the Search Administration of the Central Administration or in the PowerShell console of your on-premise SharePoint 2013 server.
    Set up Sever to Server Trust
    Export certificates
    To create a server to server trust we need two certificates.
    [certificate name].pfx: In order to replace the STS certificate, the certificate is needed in Personal Information Exchange (PFX) format including the private key.
    [certificate name].cer: In order to set up a trust with Office 365 and Windows Azure ACS, the certificate is needed in CER Base64 format.
    First launch the Internet Information Services (IIS) Manager
    Select your SharePoint web server and double-click Server Certificates
    In the Actions pane, click Create Self-Signed Certificate
    Enter a name for the certificate and save it with OK
    To export the new certificate in the Pfx format select it and click Export in the Actions pane
    Fill the fields and click OK Export to: C:\[certificate
    name].pfx Password: [password]
    Also we need to export the certificate in the CER Base64 format. For that purpose make a right-click on the certificate select it and click on View...
    Click the Details tab and then click Copy to File
    On the Welcome to the Certificate Export Wizard page, click Next
    On the Export Private Key page, click Next
    On the Export File Format page, click Base-64 encoded X.509 (.CER), and then click Next.
    As file name enter C:\[certificate
    name].cer and then click Next
    Finish the export
    Import the new STS (SharePoint Token Service) certificate
    Let's update the certificate on the STS. Configure and run the PowerShell script below on your SharePoint server.
    if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"}
    # set the cerficates paths and password
    $PfxCertPath = "c:\[certificate name].pfx"
    $PfxCertPassword = "[password]"
    $X64CertPath = "c:\[certificate name].cer"
    # get the encrypted pfx certificate object
    $PfxCert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 $PfxCertPath, $PfxCertPassword, 20
    # import it
    Set-SPSecurityTokenServiceConfig -ImportSigningCertificate $PfxCert
    Type Yes when prompted with the following message.
    You are about to change the signing certificate for the Security Token Service. Changing the certificate to an invalid, inaccessible or non-existent certificate will cause your SharePoint installation to stop functioning. Refer
    to the following article for instructions on how to change this certificate: http://go.microsoft.com/fwlink/?LinkID=178475. Are you
    sure, you want to continue?
    Restart IIS so STS picks up the new certificate.
    & iisreset
    & net stop SPTimerV4
    & net start SPTimerV4
    Now validate the certificate replacement by running several PowerShell commands and compare their outputs.
    # set the cerficates paths and password
    $PfxCertPath = "c:\[certificate name].pfx"
    $PfxCertPassword = "[password]"
    # get the encrypted pfx certificate object
    New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 $PfxCertPath, $PfxCertPassword, 20
    # compare the output above with this output
    (Get-SPSecurityTokenServiceConfig).LocalLoginProvider.SigningCertificate
    [/code]
    ## Establish the server to server trust
    [code lang="ps"]
    if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"}
    Import-Module MSOnline
    Import-Module MSOnlineExtended
    # set the cerficates paths and password
    $PfxCertPath = "c:\[certificate name].pfx"
    $PfxCertPassword = "[password]"
    $X64CertPath = "c:\[certificate name].cer"
    # set the onpremise domain that you added to Office 365
    $SPCN = "sharepoint.domain.com"
    # your onpremise SharePoint site url
    $SPSite="http://sharepoint"
    # don't change this value
    $SPOAppID="00000003-0000-0ff1-ce00-000000000000"
    # get the encrypted pfx certificate object
    $PfxCert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 $PfxCertPath, $PfxCertPassword, 20
    # get the raw data
    $PfxCertBin = $PfxCert.GetRawCertData()
    # create a new certificate object
    $X64Cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
    # import the base 64 encoded certificate
    $X64Cert.Import($X64CertPath)
    # get the raw data
    $X64CertBin = $X64Cert.GetRawCertData()
    # save base 64 string in variable
    $CredValue = [System.Convert]::ToBase64String($X64CertBin)
    # connect to office 3656
    Connect-MsolService
    # register the on-premise STS as service principal in Office 365
    # add a new service principal
    New-MsolServicePrincipalCredential -AppPrincipalId $SPOAppID -Type asymmetric -Usage Verify -Value $CredValue
    $MsolServicePrincipal = Get-MsolServicePrincipal -AppPrincipalId $SPOAppID
    $SPServicePrincipalNames = $MsolServicePrincipal.ServicePrincipalNames
    $SPServicePrincipalNames.Add("$SPOAppID/$SPCN")
    Set-MsolServicePrincipal -AppPrincipalId $SPOAppID -ServicePrincipalNames $SPServicePrincipalNames
    # get the online name identifier
    $MsolCompanyInformationID = (Get-MsolCompanyInformation).ObjectID
    $MsolServicePrincipalID = (Get-MsolServicePrincipal -ServicePrincipalName $SPOAppID).ObjectID
    $MsolNameIdentifier = "$MsolServicePrincipalID@$MsolCompanyInformationID"
    # establish the trust from on-premise with ACS (Azure Control Service)
    # add a new authenticatio realm
    $SPSite = Get-SPSite $SPSite
    $SPAppPrincipal = Register-SPAppPrincipal -site $SPSite.rootweb -nameIdentifier $MsolNameIdentifier -displayName "SharePoint Online"
    Set-SPAuthenticationRealm -realm $MsolServicePrincipalID
    # register the ACS application proxy and token issuer
    New-SPAzureAccessControlServiceApplicationProxy -Name "ACS" -MetadataServiceEndpointUri "https://accounts.accesscontrol.windows.net/metadata/json/1/" -DefaultProxyGroup
    New-SPTrustedSecurityTokenIssuer -MetadataEndpoint "https://accounts.accesscontrol.windows.net/metadata/json/1/" -IsTrustBroker -Name "ACS"
    Add a new result source
    To get search results from SharePoint Online we have to add a new result source. Run the following script in a PowerShell ISE session on your SharePoint 2013 on-premise server. Don't forget to update the settings region
    if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"}
    # region settings
    $RemoteSharePointUrl = "http://[example].sharepoint.com"
    $ResultSourceName = "SharePoint Online"
    $QueryTransform = "{searchTerms}"
    $Provier = "SharePoint-Remoteanbieter"
    # region settings end
    $SPEnterpriseSearchServiceApplication = Get-SPEnterpriseSearchServiceApplication
    $FederationManager = New-Object Microsoft.Office.Server.Search.Administration.Query.FederationManager($SPEnterpriseSearchServiceApplication)
    $SPEnterpriseSearchOwner = Get-SPEnterpriseSearchOwner -Level Ssa
    $ResultSource = $FederationManager.GetSourceByName($ResultSourceName, $SPEnterpriseSearchOwner)
    if(!$ResultSource){
    Write-Host "Result source does not exist. Creating..."
    $ResultSource = $FederationManager.CreateSource($SPEnterpriseSearchOwner)
    $ResultSource.Name = $ResultSourceName
    $ResultSource.ProviderId = $FederationManager.ListProviders()[$Provier].Id
    $ResultSource.ConnectionUrlTemplate = $RemoteSharePointUrl
    $ResultSource.CreateQueryTransform($QueryTransform)
    $ResultSource.Commit()
    Add a new query rule
    In the Search Administration click on Query Rules
    Select Local SharePoint as Result Source
    Click New Query Rule
    Enter a Rule name f.g. Search results from SharePoint Online
    Expand the Context section
    Under Query is performed on these sources click on Add Source
    Select your SharePoint Online result source
    In the Query Conditions section click on Remove Condition
    In the Actions section click on Add Result Block
    As title enter Results for "{subjectTerms}" from SharePoint Online
    In the Search this Source dropdown select your SharePoint Online result source
    Select 3 in the Items dropdown
    Expand the Settings section and select "More" link goes to the following URL
    In the box below enter this Url https://[example].sharepoint.com/search/pages/results.aspx?k={subjectTerms}
    Select This block is always shown above core results and click the OK button
    Save the new query rule

    Hi  Janik,
    According to your description, my understanding is that you want to display hybrid search results in SharePoint Server 2013.
    For achieving your demand, please have a look at the article:
    http://technet.microsoft.com/en-us/library/dn197173(v=office.15).aspx
    If you are using single sign-on (SSO) authentication, it is important to test hybrid Search functionality by using federated user accounts. Native Office 365 user accounts and Active Directory Domain Services
    (AD DS) accounts that are not federated are not recognized by both directory services. Therefore, they cannot authenticate using SSO, and cannot be granted permissions to resources in both deployments. For more information, see Accounts
    needed for hybrid configuration and testing.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • ADF UIX and Javascript

    Hello,
    I am new in ADF UIX...
    I have a table in ADF UIX and I would like to use some my javascript functions. I know I have to set: <table proxied="true">....</table> but where I can write my functions, in an included file ? I mean, how does the interaction between the XML configuration file and javascript work ?
    Thank in advance,
    Henry

    Hi Rade Todorovich,
    As mentioned previously, if you had placed the javascript as indexed child of head element it would be fine.
    <Head> is named child of <metaContainer> which inturn is named child of <document> element. The example below should make it clear.
    This is how the UIX document would be
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="test">
    <contents>
    <!-- case 1 -->
    <script source="./cabo/js/test.js"/>
    <script>
    <contents>
    function theFunction()
    alert('the function');
    </contents>
    </script>
    </contents>
    </head>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <form name="form0">
    <!-- case 2 -->
    <contents>
    <script>
    <contents>
    function hi()
    alert('hi');
    </contents>
    </script>
    <button text="call-hi" name="fn" onClick="return hi();"/>
    <button text="call-theFunction" name="fn1" onClick="return theFunction();"/>
    </contents>
    </form>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    There are two usages:
    Case 1
    In your html it would just appear the way you would normally write a JS function with in the head
    <html>
    <head>
    <title></title>
    <META>
    <script language="javascript" src="./cabo/js/test.js">
    <!-- case 1-->
    <scirpt language="javascript">
    theFunction()
    </script>
    </head>
    <!-- case 2 -->
    <form ....>
    </form>
    <script language="javascript">
    function hi()
    alert('hi');
    </script>
    </html>
    Case 2
    As such <script> element can occur in HTML document.
    as mentioned in http://www.w3.org/TR/html401/interact/scripts.html#h-18.2.1
    In the same way UIX also allows the use of script element with in its <body> element.
    With case 2 you can see the way the script gets inlined in the HTML document. Please run the UIX and view source for the rendered page. It should become obvious.
    Thanks,
    Vijay Venkataraman

  • Troubleshooting InTune, SCCM, and Windows 8.1 Phones

    Howdy...
    I've setup various components but when I use my Windows 8.1 Samsung phone "Workplace Account" feature, the phone gets stuck on "We're looking for your settings...", it will stay on this for 15+mins if I let it.
    What can I do for further troubleshooting?
    Here are my components used:
    InTune Trail Subscription
    Verified to use my public domain via the custom TXT DNS record
    UPN settings configured (UPN = public email format = [email protected])
    Single Sign On into InTune admin console and user portal configured via ADFS
    Logon tests from a PC are successful internally and externally into the admin console and user portal
    Used DirSync on Win2012r2 to sync my AD to the Azure cloud - works fine
    ADFS servers (and DirSync) on 2012r2
    ADFS Web Application Servers on 2012r2
    System Center Configuration Manager has Intune Subscription configured
    System Center Configuration Manager ha the trail certificate, InTunes role installed, and distro.point set to manage.microsoft.com, and trail apps that came with trail certificate
    ...note sure if I've forgotten anything - definitely not the easiest thing to get working!!
    I've also done a packet capture from the firewall - they (firewall company) have ruled out their device as the problem.
    I've been using a few URLs to help,
    this is one of them

    The Microsoft Intune team has confirmed this was an issue.  The temp solution was to disable a checkbox in my ADFS server...  In a few weeks I will call back on my ticket and see if there is a better solution, otherwise this is the only thing I
    could do.
    ADFS Server > ADFS Console > Authentication Policies
    Global Settings > Edit
    Primary Tab > Uncheck "Enable Device Authentication"
    Microsoft Tech Support Comment:
    I am confirming the only known solution, which is a short term workaround being suggested by the PG/engineering, which is to Disable device auth properties check box on ADFS side.
    The long term solution is already well underway and in testing by the Product team and should be released in the upcoming weeks. 
    Public facing documentation for this issue should be available soon but we do not have a specific date.

  • Vicious MPD widget not displaying the artist and song title

    EDIT: This thread can be closed now. It turns out Clementine doesn't support mpd and I'm now running ncmpcpp and the widget shows the artist and song title.
    I have trouble getting the mpd widget running in awesome wm, it will only display "N/A - N/A". I've read the wiki and done a lot of googling but I can't figure out what I'm missing.
    Here's my rc.lua
    -- Standard awesome library
    local gears = require("gears")
    local awful = require("awful")
    awful.rules = require("awful.rules")
    require("awful.autofocus")
    -- Widget and layout library
    local wibox = require("wibox")
    local vicious = require("vicious")
    -- Theme handling library
    local beautiful = require("beautiful")
    -- Notification library
    local naughty = require("naughty")
    local menubar = require("menubar")
    -- {{{ Error handling
    -- Check if awesome encountered an error during startup and fell back to
    -- another config (This code will only ever execute for the fallback config)
    if awesome.startup_errors then
    naughty.notify({ preset = naughty.config.presets.critical,
    title = "Oops, there were errors during startup!",
    text = awesome.startup_errors })
    end
    -- Handle runtime errors after startup
    do
    local in_error = false
    awesome.connect_signal("debug::error", function (err)
    -- Make sure we don't go into an endless error loop
    if in_error then return end
    in_error = true
    naughty.notify({ preset = naughty.config.presets.critical,
    title = "Oops, an error happened!",
    text = err })
    in_error = false
    end)
    end
    -- {{{ Variable definitions
    -- Themes define colours, icons, and wallpapers
    beautiful.init("/usr/share/awesome/themes/zenburn/theme.lua")
    -- This is used later as the default terminal and editor to run.
    terminal = "tilda"
    editor = "gedit"
    -- os.getenv("EDITOR") or
    editor_cmd = terminal .. " -e " .. editor
    -- Default modkey.
    -- Usually, Mod4 is the key with a logo between Control and Alt.
    -- If you do not like this or do not have such a key,
    -- I suggest you to remap Mod4 to another key using xmodmap or other tools.
    -- However, you can use another modifier like Mod1, but it may interact with others.
    modkey = "Mod4"
    -- Table of layouts to cover with awful.layout.inc, order matters.
    local layouts =
    awful.layout.suit.floating,
    awful.layout.suit.tile,
    awful.layout.suit.tile.left,
    awful.layout.suit.tile.bottom,
    awful.layout.suit.tile.top,
    awful.layout.suit.fair,
    awful.layout.suit.fair.horizontal,
    awful.layout.suit.spiral,
    awful.layout.suit.spiral.dwindle,
    awful.layout.suit.max,
    awful.layout.suit.max.fullscreen,
    awful.layout.suit.magnifier
    -- {{{ Wallpaper
    if beautiful.wallpaper then
    for s = 1, screen.count() do
    gears.wallpaper.maximized(beautiful.wallpaper, s, true)
    end
    end
    -- {{{ Tags
    -- Define a tag table which will hold all screen tags.
    tags = {}
    for s = 1, screen.count() do
    -- Each screen has its own tag table.
    tags[s] = awful.tag({"term", "www", "mp3", "skype", "office", "dev", "misc" }, s)
    end
    -- {{{ Menu
    -- Create a laucher widget and a main menu
    myawesomemenu = {
    { "manual", terminal .. " -e man awesome" },
    { "edit config", editor_cmd .. " " .. awesome.conffile },
    { "reboot", "gksudo reboot" },
    { "restart", awesome.restart },
    { "quit", awesome.quit }
    mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
    { "open terminal", terminal }
    mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
    menu = mymainmenu })
    -- Menubar configuration
    menubar.utils.terminal = terminal -- Set the terminal for applications that require it
    -- Initialize widget
    mpdwidget = wibox.widget.textbox()
    -- Register widget
    vicious.register(mpdwidget, vicious.widgets.mpd,
    function (mpdwidget, args)
    if args["{state}"] == "Stop" then
    return " - "
    else
    return args["{Artist}"]..' - '.. args["{Title}"]
    end
    end, 10)
    -- {{{ Wibox
    -- Create a textclock widget
    mytextclock = awful.widget.textclock()
    -- Create a wibox for each screen and add it
    mywibox = {}
    mypromptbox = {}
    mylayoutbox = {}
    mytaglist = {}
    mytaglist.buttons = awful.util.table.join(
    awful.button({ }, 1, awful.tag.viewonly),
    awful.button({ modkey }, 1, awful.client.movetotag),
    awful.button({ }, 3, awful.tag.viewtoggle),
    awful.button({ modkey }, 3, awful.client.toggletag),
    awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
    awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
    mytasklist = {}
    mytasklist.buttons = awful.util.table.join(
    awful.button({ }, 1, function (c)
    if c == client.focus then
    c.minimized = true
    else
    -- Without this, the following
    -- :isvisible() makes no sense
    c.minimized = false
    if not c:isvisible() then
    awful.tag.viewonly(c:tags()[1])
    end
    -- This will also un-minimize
    -- the client, if needed
    client.focus = c
    c:raise()
    end
    end),
    awful.button({ }, 3, function ()
    if instance then
    instance:hide()
    instance = nil
    else
    instance = awful.menu.clients({ width=250 })
    end
    end),
    awful.button({ }, 4, function ()
    awful.client.focus.byidx(1)
    if client.focus then client.focus:raise() end
    end),
    awful.button({ }, 5, function ()
    awful.client.focus.byidx(-1)
    if client.focus then client.focus:raise() end
    end))
    for s = 1, screen.count() do
    -- Create a promptbox for each screen
    mypromptbox[s] = awful.widget.prompt()
    -- Create an imagebox widget which will contains an icon indicating which layout we're using.
    -- We need one layoutbox per screen.
    mylayoutbox[s] = awful.widget.layoutbox(s)
    mylayoutbox[s]:buttons(awful.util.table.join(
    awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
    awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
    awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
    awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
    -- Create a taglist widget
    mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
    -- Create a tasklist widget
    mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
    -- Create the wibox
    mywibox[s] = awful.wibox({ position = "top", screen = s })
    -- Widgets that are aligned to the left
    local left_layout = wibox.layout.fixed.horizontal()
    left_layout:add(mylauncher)
    left_layout:add(mytaglist[s])
    left_layout:add(mypromptbox[s])
    -- Widgets that are aligned to the right
    local right_layout = wibox.layout.fixed.horizontal()
    right_layout:add(mpdwidget)
    if s == 1 then right_layout:add(wibox.widget.systray()) end
    right_layout:add(mytextclock)
    right_layout:add(mylayoutbox[s])
    -- Now bring it all together (with the tasklist in the middle)
    local layout = wibox.layout.align.horizontal()
    layout:set_left(left_layout)
    layout:set_middle(mytasklist[s])
    layout:set_right(right_layout)
    mywibox[s]:set_widget(layout)
    end
    -- {{{ Mouse bindings
    root.buttons(awful.util.table.join(
    awful.button({ }, 3, function () mymainmenu:toggle() end),
    awful.button({ }, 4, awful.tag.viewnext),
    awful.button({ }, 5, awful.tag.viewprev)
    -- {{{ Key bindings
    globalkeys = awful.util.table.join(
    awful.key({ modkey, }, "Left", awful.tag.viewprev ),
    awful.key({ modkey, }, "Right", awful.tag.viewnext ),
    awful.key({ modkey, }, "Escape", awful.tag.history.restore),
    awful.key({ modkey, }, "j",
    function ()
    awful.client.focus.byidx( 1)
    if client.focus then client.focus:raise() end
    end),
    awful.key({ modkey, }, "k",
    function ()
    awful.client.focus.byidx(-1)
    if client.focus then client.focus:raise() end
    end),
    awful.key({ modkey, }, "w", function () mymainmenu:show() end),
    -- Layout manipulation
    awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
    awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
    awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
    awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
    awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
    awful.key({ modkey, }, "Tab",
    function ()
    awful.client.focus.history.previous()
    if client.focus then
    client.focus:raise()
    end
    end),
    -- Standard program
    awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
    awful.key({ modkey, "Control" }, "r", awesome.restart),
    awful.key({ modkey, "Shift" }, "q", awesome.quit),
    awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
    awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
    awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
    awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
    awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
    awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
    awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
    awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
    awful.key({ modkey, "Control" }, "n", awful.client.restore),
    -- Prompt
    awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
    awful.key({ modkey }, "x",
    function ()
    awful.prompt.run({ prompt = "Run Lua code: " },
    mypromptbox[mouse.screen].widget,
    awful.util.eval, nil,
    awful.util.getdir("cache") .. "/history_eval")
    end),
    -- Menubar
    awful.key({ modkey }, "p", function() menubar.show() end)
    clientkeys = awful.util.table.join(
    awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
    awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
    awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
    awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
    awful.key({ modkey, }, "o", awful.client.movetoscreen ),
    awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
    awful.key({ modkey, }, "n",
    function (c)
    -- The client currently has the input focus, so it cannot be
    -- minimized, since minimized clients can't have the focus.
    c.minimized = true
    end),
    awful.key({ modkey, }, "m",
    function (c)
    c.maximized_horizontal = not c.maximized_horizontal
    c.maximized_vertical = not c.maximized_vertical
    end)
    -- Bind all key numbers to tags.
    -- Be careful: we use keycodes to make it works on any keyboard layout.
    -- This should map on the top row of your keyboard, usually 1 to 9.
    for i = 1, 9 do
    globalkeys = awful.util.table.join(globalkeys,
    awful.key({ modkey }, "#" .. i + 9,
    function ()
    local screen = mouse.screen
    local tag = awful.tag.gettags(screen)[i]
    if tag then
    awful.tag.viewonly(tag)
    end
    end),
    awful.key({ modkey, "Control" }, "#" .. i + 9,
    function ()
    local screen = mouse.screen
    local tag = awful.tag.gettags(screen)[i]
    if tag then
    awful.tag.viewtoggle(tag)
    end
    end),
    awful.key({ modkey, "Shift" }, "#" .. i + 9,
    function ()
    if client.focus then
    local tag = awful.tag.gettags(client.focus.screen)[i]
    if tag then
    awful.client.movetotag(tag)
    end
    end
    end),
    awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
    function ()
    if client.focus then
    local tag = awful.tag.gettags(client.focus.screen)[i]
    if tag then
    awful.client.toggletag(tag)
    end
    end
    end))
    end
    clientbuttons = awful.util.table.join(
    awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
    awful.button({ modkey }, 1, awful.mouse.client.move),
    awful.button({ modkey }, 3, awful.mouse.client.resize))
    -- Set keys
    root.keys(globalkeys)
    -- {{{ Rules
    awful.rules.rules = {
    -- All clients will match this rule.
    { rule = { },
    properties = { border_width = beautiful.border_width,
    border_color = beautiful.border_normal,
    focus = awful.client.focus.filter,
    keys = clientkeys,
    buttons = clientbuttons } },
    { rule = { class = "MPlayer" },
    properties = { floating = true } },
    { rule = { class = "pinentry" },
    properties = { floating = true } },
    { rule = { class = "gimp" },
    properties = { floating = true } },
    -- Set Firefox to always map on tags number 2 of screen 1.
    { rule = { class = "Firefox" },
    properties = { tag = tags[2] } },
    -- {{{ Signals
    -- Signal function to execute when a new client appears.
    client.connect_signal("manage", function (c, startup)
    -- Enable sloppy focus
    c:connect_signal("mouse::enter", function(c)
    if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
    and awful.client.focus.filter(c) then
    client.focus = c
    end
    end)
    if not startup then
    -- Set the windows at the slave,
    -- i.e. put it at the end of others instead of setting it master.
    -- awful.client.setslave(c)
    -- Put windows in a smart way, only if they does not set an initial position.
    if not c.size_hints.user_position and not c.size_hints.program_position then
    awful.placement.no_overlap(c)
    awful.placement.no_offscreen(c)
    end
    end
    local titlebars_enabled = false
    if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
    -- buttons for the titlebar
    local buttons = awful.util.table.join(
    awful.button({ }, 1, function()
    client.focus = c
    c:raise()
    awful.mouse.client.move(c)
    end),
    awful.button({ }, 3, function()
    client.focus = c
    c:raise()
    awful.mouse.client.resize(c)
    end)
    -- Widgets that are aligned to the left
    local left_layout = wibox.layout.fixed.horizontal()
    left_layout:add(awful.titlebar.widget.iconwidget(c))
    left_layout:buttons(buttons)
    -- Widgets that are aligned to the right
    local right_layout = wibox.layout.fixed.horizontal()
    right_layout:add(awful.titlebar.widget.floatingbutton(c))
    right_layout:add(awful.titlebar.widget.maximizedbutton(c))
    right_layout:add(awful.titlebar.widget.stickybutton(c))
    right_layout:add(awful.titlebar.widget.ontopbutton(c))
    right_layout:add(awful.titlebar.widget.closebutton(c))
    -- The title goes in the middle
    local middle_layout = wibox.layout.flex.horizontal()
    local title = awful.titlebar.widget.titlewidget(c)
    title:set_align("center")
    middle_layout:add(title)
    middle_layout:buttons(buttons)
    -- Now bring it all together
    local layout = wibox.layout.align.horizontal()
    layout:set_left(left_layout)
    layout:set_right(right_layout)
    layout:set_middle(middle_layout)
    awful.titlebar(c):set_widget(layout)
    end
    end)
    client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
    client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
    function run_once(prg,arg_string,pname,screen)
    if not prg then
    do return nil end
    end
    if not pname then
    pname = prg
    end
    if not arg_string then
    awful.util.spawn_with_shell("pgrep -f -u $USER -x '" .. pname .. "' || (" .. prg .. ")",screen)
    else
    awful.util.spawn_with_shell("pgrep -f -u $USER -x '" .. pname .. " ".. arg_string .."' || (" .. prg .. " " .. arg_string .. ")",screen)
    end
    end
    awful.util.spawn_with_shell("setxkbmap -layout se")
    run_once("tilda",nil,nil,"term")
    run_once("firefox &",nil,nil,"www")
    run_once("clementine ",nil,nil,"mp3")
    run_once("skype ",nil,nil,"skype")
    run_once("dropboxd &",nil,nil,nil)
    run_once("keepassx ",nil,nil,"www")
    run_once("volumeicon &",nil,nil,nil)
    awesome.font = "DejaVuSansCondensed 12"
    Here's my mpd.lua:
    -- Licensed under the GNU General Public License v2
    -- * (c) 2010, Adrian C. <[email protected]>
    -- {{{ Grab environment
    local tonumber = tonumber
    local io = { popen = io.popen }
    local setmetatable = setmetatable
    local string = { gmatch = string.gmatch }
    local helpers = require("vicious.helpers")
    -- Mpd: provides Music Player Daemon information
    -- vicious.widgets.mpd
    local mpd = {}
    -- {{{ MPD widget type
    local function worker(format, warg)
    local mpd_state = {
    ["{volume}"] = 0,
    ["{state}"] = "N/A",
    ["{Artist}"] = "N/A",
    ["{Title}"] = "N/A",
    ["{Album}"] = "N/A",
    ["{Genre}"] = "N/A",
    --["{Name}"] = "N/A",
    --["{file}"] = "N/A",
    -- Fallback to MPD defaults
    local pass = warg and (warg.password or warg[1]) or "\"\""
    local host = warg and (warg.host or warg[2]) or "127.0.0.1"
    local port = warg and (warg.port or warg[3]) or "6600"
    -- Construct MPD client options
    local mpdh = "telnet://"..host..":"..port
    local echo = "echo 'password "..pass.."\nstatus\ncurrentsong\nclose'"
    -- Get data from MPD server
    local f = io.popen(echo.." | curl --connect-timeout 1 -fsm 3 "..mpdh)
    for line in f:lines() do
    for k, v in string.gmatch(line, "([%w]+):[%s](.*)$") do
    if k == "volume" then mpd_state["{"..k.."}"] = v and tonumber(v)
    elseif k == "state" then mpd_state["{"..k.."}"] = helpers.capitalize(v)
    elseif k == "Artist" then mpd_state["{"..k.."}"] = helpers.escape(v)
    elseif k == "Title" then mpd_state["{"..k.."}"] = helpers.escape(v)
    elseif k == "Album" then mpd_state["{"..k.."}"] = helpers.escape(v)
    elseif k == "Genre" then mpd_state["{"..k.."}"] = helpers.escape(v)
    --elseif k == "Name" then mpd_state["{"..k.."}"] = helpers.escape(v)
    --elseif k == "file" then mpd_state["{"..k.."}"] = helpers.escape(v)
    end
    end
    end
    f:close()
    return mpd_state
    end
    return setmetatable(mpd, { __call = function(_, ...) return worker(...) end })
    I'm using Clementine to play the music if that makes a difference.
    Last edited by DisposableHero (2013-11-25 01:12:01)

    Hi,
    If the songs were purchased from itunes, I suggest that you delete the tracks from your itunes library and move to trash (providing you live in a country that permits redownloading). See http://support.apple.com/kb/PH12283.
    Jim

  • [DWM] How to get window titles (w/xprop?)

    I'm trying to expand my "switch-to-tag"-script to include window titles, but have stumbled upon something I can't understand:
    If I issue "xprop" (with no arguments), and click on my firefox-window, I get the following output:
    user@host $ xprop (click on firefox window)
    _NET_WM_USER_TIME(CARDINAL) = 6193278
    WM_STATE(WM_STATE):
    window state: Normal
    icon window: 0x0
    WM_HINTS(WM_HINTS):
    Client accepts input or input focus: True
    Initial state is Normal State.
    bitmap id # to use for icon: 0x14000aa
    bitmap id # of mask for icon: 0x14000ab
    window id # of group leader: 0x1400001
    WM_WINDOW_ROLE(STRING) = "browser"
    XdndAware(ATOM) = BITMAP
    _MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0
    [[ !! HUGE ASCII ICON WAS DELETED TO SAVE SPACE HERE !! ]]
    _NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 20971689
    _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
    _NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x14000a8
    WM_CLIENT_LEADER(WINDOW): window id # 0x1400001
    _NET_WM_PID(CARDINAL) = 873
    WM_LOCALE_NAME(STRING) = "C"
    WM_CLIENT_MACHINE(STRING) = "allotria"
    WM_NORMAL_HINTS(WM_SIZE_HINTS):
    program specified minimum size: 1 by 63
    program specified maximum size: 32767 by 32767
    window gravity: NorthWest
    WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
    WM_CLASS(STRING) = "Navigator", "Firefox"
    WM_ICON_NAME(STRING) = "How do I get the active window title into a script? (Page 1) / Applications & Desktop Environments / Arch Linux Forums - Mozilla Firefox (Private Browsing)"
    _NET_WM_ICON_NAME(UTF8_STRING) = "How do I get the active window title into a script? (Page 1) / Applications & Desktop Environments / Arch Linux Forums - Mozilla Firefox (Private Browsing)"
    WM_NAME(STRING) = "How do I get the active window title into a script? (Page 1) / Applications & Desktop Environments / Arch Linux Forums - Mozilla Firefox (Private Browsing)"
    _NET_WM_NAME(UTF8_STRING) = "How do I get the active window title into a script? (Page 1) / Applications & Desktop Environments / Arch Linux Forums - Mozilla Firefox (Private Browsing)"
    So that worked alright. However, if I feed the ID of the window (0x1400001) to xprop, I get the following:
    user@host $ xprop -id 0x1400001
    WM_CLASS(STRING) = "firefox", "Firefox"
    WM_COMMAND(STRING) = { "firefox" }
    _NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x1400002
    WM_CLIENT_LEADER(WINDOW): window id # 0x1400001
    _NET_WM_PID(CARDINAL) = 873
    WM_LOCALE_NAME(STRING) = "C"
    WM_CLIENT_MACHINE(STRING) = "allotria"
    WM_NORMAL_HINTS(WM_SIZE_HINTS):
    program specified size: 10 by 10
    WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING
    WM_ICON_NAME(STRING) = "firefox"
    _NET_WM_ICON_NAME(UTF8_STRING) = "firefox"
    WM_NAME(STRING) = "Firefox"
    _NET_WM_NAME(UTF8_STRING) = "Firefox"
    There's no title in that output, even though I saw it by clicking - How come? And how do I grab the correct window title from a window id?
    Last edited by graph (2013-05-05 08:18:10)

    man xprop wrote:If the desired window is not the root window, it may be selected in two ways on the command line, either by id  number such as might be obtained from xwininfo, or by name if the window possesses a name.
    The id you obtained from xprop is the WM_CLIENT_LEADER, also listed in the WM_HINTS as the group leader. So that appears to be something like a root window for Firefox, not necessarily the one you see (with the title you want).

Maybe you are looking for