Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: KDE 4.11.5 - Application Launcher (Kickoff)

  1. #1
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,015

    Default KDE 4.11.5 - Application Launcher (Kickoff)

    hello.
    I use many script like this one :
    Code:
    #!/bin/bash
    #
    ########################
    #
    #   /usr/local/bin/some_script
    #
    ########################
    #
    # COMMENT
    #
    ########################
    #
    kate --startanon  file1 file2 ....
    Some of file1 file2 ....., need to be open under root account like /var/log/messages

    So I used to open a terminal in super user mode, type root password, and start my script.

    I have added a sub-menu using the "KDE MENU EDITOR" and added an item for my script. In the command argument I have tried unsuccessfully :
    1°) xdg-su -c /usr/local/bin/some_script
    2°) kdesu /usr/local/bin/some_script
    3°) $(kde4-config --path libexec)kdesu /usr/local/bin/some_script

    Any help is welcome

    As soon as this will be fixed, I shall add some items under the root account.
    How to inherit this modification in the Kickoff Apps menu for all the users without to re-edit the system menu for all users.

    Any help is welcome
    Thanks for helping. JCD
    __________

    server leap 15-- ASUS g75vw KDE leap 42.3 -- ASUS g750JZ KDE leap 42.3 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,165
    Blog Entries
    3

    Default Re: KDE 4.11.5 - Application Launcher (Kickoff)

    Quote Originally Posted by jcdole View Post
    So I used to open a terminal in super user mode, type root password, and start my script.

    I have added a sub-menu using the "KDE MENU EDITOR" and added an item for my script. In the command argument I have tried unsuccessfully :
    1°) xdg-su -c /usr/local/bin/some_script
    2°) kdesu /usr/local/bin/some_script
    3°) $(kde4-config --path libexec)kdesu /usr/local/bin/some_script
    I haven't tried any of those. I suspect the problem is that your script is not a GUI application, so even if the script runs you won't see any output.

    Try something like:
    Code:
    kdesu xterm -e /usr/local/bin/some_script
    That would provide a terminal window and run the script in that window. Note that I have not tested this.
    openSUSE Leap 15.1; KDE Plasma 5;

  3. #3

    Default Re: KDE 4.11.5 - Application Launcher (Kickoff)

    Quote Originally Posted by nrickert View Post
    Try something like:
    Code:
    kdesu xterm -e /usr/local/bin/some_script
    That would provide a terminal window and run the script in that window. Note that I have not tested this.
    Or just set the script as command, and enable "Run as different user" and "Run in a terminal" on the "Advanced" tab.

  4. #4

    Default Re: KDE 4.11.5 - Application Launcher (Kickoff)

    Quote Originally Posted by jcdole View Post
    How to inherit this modification in the Kickoff Apps menu for all the users without to re-edit the system menu for all users.
    The menu entries are stored in ~/.local/share/applications/, the sub-directories in ~/.local/share/desktop-directories/, and the menu structure in ~/.config/menu/.
    So copy those folders to your other user accounts.

    To create a menu entry system-wide, you would have to put a corresponding .desktop file into /usr/share/applications/, sub-directories are in /usr/share/desktop-directories/ accordingly, and the menu structure is defined in /etc/xdg/menus/ (but you shouldn't change the latter probably ).

  5. #5
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,015

    Default Re: KDE 4.11.5 - Application Launcher (Kickoff)

    In the command line option of "KDE MENU EDITOR" :

    Code:
    kdesu xterm -e /usr/local/bin/some_script
    Not working.

    Code:
    kdesu xterm
    Open a window and if I start the script manually, it starts.

    If I write a new script "/usr/local/bin/some_script_launcher" and in that script I put :
    Code:
    xterm -e /usr/local/bin/some_script
    and In the command line option of "KDE MENU EDITOR" :
    Code:
    kdesu /usr/local/bin/some_script_launcher
    Not working

    In /var/log/messages I got :
    Code:
    §TIME§ Sep  5 16:50:54,§PR§ 5,§FCLTY§ 4,§HOST§ LINUX-TEST-123, §TAG§  su:, §MSG§  { (to tux_user) tux_user on none} 
    
    §TIME§ Sep  5 16:50:54,§PR§ 6,§FCLTY§ 10,§HOST§ LINUX-TEST-123, §TAG§  su:, §MSG§  { pam_unix(su:session): session opened for user root by (uid=1000)} 
    
    §TIME§ Sep  5 16:50:54,§PR§ 3,§FCLTY§ 10,§HOST§ LINUX-TEST-123, §TAG§  su:, §MSG§  { pam_systemd(su:session): pam_putenv: delete non-existent entry; XDG_RUNTIME_DIR}
    Any idea ?
    Thanks for helping. JCD
    __________

    server leap 15-- ASUS g75vw KDE leap 42.3 -- ASUS g750JZ KDE leap 42.3 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  6. #6
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,015

    Default Re: KDE 4.11.5 - Application Launcher (Kickoff)

    Quote Originally Posted by wolfi323 View Post
    Or just set the script as command, and enable "Run as different user" and "Run in a terminal" on the "Advanced" tab.
    Not working.
    Just a blank screen with passwd:
    Keep blank after typing passwd.
    Same kind of message in /var/log/messages
    Code:
    §TIME§ Sep  5 17:13:11,§PR§ 5,§FCLTY§ 4,§HOST§ LINUX-TEST-123, §TAG§  su:, §MSG§  { (to tux_user) tux_user on none} 
    
    §TIME§ Sep  5 17:13:11,§PR§ 6,§FCLTY§ 10,§HOST§ LINUX-TEST-123, §TAG§  su:, §MSG§  { pam_unix(su:session): session opened for user root by tux_user(uid=1000)} 
    
    §TIME§ Sep  5 17:13:11,§PR§ 3,§FCLTY§ 10,§HOST§ LINUX-TEST-123, §TAG§  su:, §MSG§  { pam_systemd(su:session): pam_putenv: delete non-existent entry; XDG_RUNTIME_DIR} 
    
    §TIME§ Sep  5 17:13:12,§PR§ 6,§FCLTY§ 10,§HOST§ LINUX-TEST-123, §TAG§  su:, §MSG§  { pam_unix(su:session): session closed for user root}
    Thanks for helping. JCD
    __________

    server leap 15-- ASUS g75vw KDE leap 42.3 -- ASUS g750JZ KDE leap 42.3 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  7. #7
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,015

    Default Re: KDE 4.11.5 - Application Launcher (Kickoff)

    Quote Originally Posted by wolfi323 View Post
    The menu entries are stored in ~/.local/share/applications/, the sub-directories in ~/.local/share/desktop-directories/, and the menu structure in ~/.config/menu/.
    So copy those folders to your other user accounts.

    To create a menu entry system-wide, you would have to put a corresponding .desktop file into /usr/share/applications/, sub-directories are in /usr/share/desktop-directories/ accordingly, and the menu structure is defined in /etc/xdg/menus/ (but you shouldn't change the latter probably ).
    I will try when I make things working.
    Thanks for helping. JCD
    __________

    server leap 15-- ASUS g75vw KDE leap 42.3 -- ASUS g750JZ KDE leap 42.3 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  8. #8
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,015

    Default Re: KDE 4.11.5 - Application Launcher (Kickoff)

    Putting
    Code:
    xterm
    as command ( with or without option run in terminal ) works; but
    Code:
    xterm -e <script name>
    does not
    Thanks for helping. JCD
    __________

    server leap 15-- ASUS g75vw KDE leap 42.3 -- ASUS g750JZ KDE leap 42.3 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  9. #9

    Default Re: KDE 4.11.5 - Application Launcher (Kickoff)

    Quote Originally Posted by jcdole View Post
    Putting
    Code:
    xterm
    as command ( with or without option run in terminal ) works; but
    Code:
    xterm -e <script name>
    does not
    Well, then something is wrong with your script, obviously.
    And that explains why the other ways are not working either.

    Is the script actually marked as executable?
    Can you run it manually in a terminal window?

  10. #10
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,165
    Blog Entries
    3

    Default Re: KDE 4.11.5 - Application Launcher (Kickoff)

    Quote Originally Posted by jcdole View Post
    Not working.
    Just a blank screen with passwd:
    Keep blank after typing passwd.
    If you are trying to handle password prompts in a script, that's probably not going to work the way you want.

    Perhaps look into an "expect" script for that.
    openSUSE Leap 15.1; KDE Plasma 5;

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •