# Yast2 GUI from command-line

**URL:** <https://forums.suse.com/t/yast2-gui-from-command-line/23214>\
**Category:** SLES Configure-Administer\
**Created:** [October 18, 2012, 8:57am UTC](https://forums.suse.com/t/yast2-gui-from-command-line/23214 "2012-10-18T08:57:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NovAlf](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@NovAlf](https://forums.suse.com/u/NovAlf)\
**Post date:** [October 18, 2012, 8:57am UTC](https://forums.suse.com/t/yast2-gui-from-command-line/23214/1 "2012-10-18T08:57:11Z")

</div>

Hi!  
SLES 11 SP1/2 for VMware. Don’t have direct root access, but have rights to use sudo. Trying to run Yast2 from command-line using sudo, but … only text (terminal) screen appear. Same using Yast. Any ideas?  
More thanks, Alar.

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [October 18, 2012, 2:29pm UTC](https://forums.suse.com/t/yast2-gui-from-command-line/23214/2 "2012-10-18T14:29:07Z")

</div>

> [@NovAlf](#):
>
> Hi!  
> SLES 11 SP1/2 for VMware. Don’t have direct root access, but have  
> rights to use sudo. Trying to run Yast2 from command-line using sudo,  
> but … only text (terminal) screen appear. Same using Yast. Any ideas?  
> More thanks, Alar.

Hi  
Is this a remote or local connection to the system? Are the YaST GUI  
components installed (yast2-gtk)?

–  
Cheers Malcolm Â°Â¿Â° (Linux Counter #276890)  
openSUSE 12.2 (x86\_64) Kernel 3.4.11-2.16-desktop  
up 10:50, 3 users, load average: 0.09, 0.12, 0.08  
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

---

<div class="post-metadata">

**Author:** ![NovAlf](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@NovAlf](https://forums.suse.com/u/NovAlf)\
**Post date:** [October 18, 2012, 2:56pm UTC](https://forums.suse.com/t/yast2-gui-from-command-line/23214/3 "2012-10-18T14:56:46Z")

</div>

Hi and thanks!  
This is a remote connection, using NX. Tried to lookup for yast2-gtk, but couldn’t find at all under Software Management, probably I’m looking for wrong name, I’m not so good at this, sorry. Seems to be default SLES installation, I suppose all components is there. Btw. mentioning “gtk” reminds that when I tried to use “sudo gedit” I get “(gedit:10544): Gtk-WARNING \*\*: cannot open display:”. Could be connected!  
More thanks, Alar.

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [October 18, 2012, 3:37pm UTC](https://forums.suse.com/t/yast2-gui-from-command-line/23214/4 "2012-10-18T15:37:46Z")

</div>

> [@NovAlf](#):
>
> Hi and thanks!  
> This is a remote connection, using NX. Tried to lookup for yast2-gtk,  
> but couldn’t find at all under Software Management, probably I’m looking  
> for wrong name, I’m not so good at this, sorry. Seems to be default SLES  
> installation, I suppose all components is there. Btw. mentioning “gtk”  
> reminds that when I tried to use “sudo gedit” I get “(gedit:10544):  
> Gtk-WARNING \*\*: cannot open display:”. Could be connected!  
> More thanks, Alar.

Hi  
Try exporting the display, for example;

```auto
malcolml@bert:~$ echo $DISPLAY
:1019.0
malcolml@bert:~$ sudo DISPLAY=:1019.0 gedit
malcolml@bert:~$ sudo DISPLAY=:1019.0 /sbin/yast2
```

–  
Cheers Malcolm Â°Â¿Â° (Linux Counter #276890)  
openSUSE 12.2 (x86\_64) Kernel 3.4.11-2.16-desktop  
up 11:46, 3 users, load average: 0.00, 0.01, 0.05  
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

---

<div class="post-metadata">

**Author:** ![NovAlf](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@NovAlf](https://forums.suse.com/u/NovAlf)\
**Post date:** [October 18, 2012, 4:26pm UTC](https://forums.suse.com/t/yast2-gui-from-command-line/23214/5 "2012-10-18T16:26:30Z")

</div>

Hi and thanks!  
Absolutely, did the trick! =) Tried all morning find something via internet … nothing I could and now … it’s done! Thank You! I’m so pleased.  
More thanks, Alar.
